Slide 1

Slide 1 text

Falcor + serverless 2016.08.09 #microserve

Slide 2

Slide 2 text

About me • @Quramy (Yosuke Kurami) • Frontend Web Developer at WACUL INC. • develop SPA with Angular(1 and 2) • झຯͰTypeScript༻ͷVimϓϥΪϯ։ൃ͠·͢ • http://vimawesome.com/plugin/tsuquyomi 


Slide 3

Slide 3 text

Falcor஌ͬͯ·͔͢ʁ

Slide 4

Slide 4 text

Falcorͬͯʁ Netflix͕։ൃͨ͠API Integrationͷ࢓૊Έ FacebookͷGraphQL + RelayͱࣅͨϨΠϠ

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

ʮཉ͍͠΋ͷΛཉ͍͠෼͚ͩʯ ΫϥΠΞϯτʹฦ͢࢓૊Έ (Demand Driven Architecture)

Slide 7

Slide 7 text

Falcor: Access as the JSON way import { Model } from "falcor"; import { dataSource } from "./dataSource"; import assert from "assert"; new Model({ source: dataSource, }).get( "article['123']['id', 'title']", "article['123'].author['id', 'name']" ).subscribe(response => { assert.deepEqual(response.json, { article: { "123": { id: "123", title: "graph api", author: { id: "u0001", name: "quramy" } } } }); });

Slide 8

Slide 8 text

Backends For Frontends (BFF) The BFF is tightly coupled to a specific user experience, and will typically be maintained by the same team as the user interface. http://samnewman.io/patterns/architectural/bff/#bff

Slide 9

Slide 9 text

ཁ͢Δʹ৽͍͠αʔό͕ඞཁ

Slide 10

Slide 10 text

FalcorͷͨΊʹ৽͘͠ج൫ ༻ҙ͢Μͷ໘౗ͤ͐͘

Slide 11

Slide 11 text

͜ΕɺLambdaͰΑ͘Ͷʁ

Slide 12

Slide 12 text

࡞ͬͨϒπ(એ఻) • https://github.com/Quramy/falcor-lambda • FalcorͷdataSourceΛLambdaͷhandlerʹ ͢Δ܅ • https://github.com/Quramy/serverless- falcor-starter • Serverless Framework༻Project

Slide 13

Slide 13 text

ࢥ͍ͬͯΔ͜ͱ • FalcorʹݶΒͣɺDemand Driven Architecture ͕͋·Γྲྀߦͬͯͳ͍(Α͏ʹݟ͑Δ) • ཧ༝1:ඞͣ͠΋ඞཁͳ࢓૊ΈͰ΋ͳ͍ • ؅ཧը໘ܥͱ͔ͳΒશવཁΒͳ͍ • Ϟσϧͷ਺͕গͳ͍ͱ͖΋خ͘͠ͳ͍

Slide 14

Slide 14 text

• ཧ༝2:Client, ServerͦΕͧΕʹ৽͍͠࢓૊Έ Λಋೖ͢Δඞཁ͕͋ΔͷͰɺෑډ͕ߴͦ͏ • ͦΕͰ΋៉ྷͳAPIઃܭ΍ޮ཰తͳϦΫΤετ ͳͲɺಘΒΕΔϝϦοτ΋৭ʑ͋Δ͸ͣ • BaaSͱ͔΋ग़࢝ΊͯΔ͠ɺօා͕Βͣʹ৮ͬ ͯΈͨΒྑ͍ͱࢥ͏ʂ

Slide 15

Slide 15 text

݁࿦ • Microservicesͱ͔API Integrationͱ͔࣮ફ͠ ͍ͯΔਓୡ͸GraphQL΍FalcorΛੵۃతʹ ৮ͬͯਓபn ϊ΢ϋ΢Λڞ༗ͯ͠ཉ͍͠ʂ