@bogdannedBogdan Nedelcu1Scaling event driven systems:Node.js and GraphQLPrincipal Software EngineerNode.js Global Summit 05.31.2020
View Slide
@bogdannedOnce upon a time there was ...2
@bogdanned… a monolith3
@bogdanned… split into microservices4
@bogdanned… choreographed by events5
@bogdannedEvent driven designs are focused on systembehaviour rather than structure.6
@bogdannedNode.js ...… an asynchronous event-driven runtime7
@bogdannedHow does Node scales?8
@bogdannedRequirements- performant- cost effective- reliable, fail safe9
@bogdannedNode performs well when the amount ofCPU work per request is relatively “small”.10
@bogdannedScale Horizontally11
@bogdannedRunning more instances of a nonperformant app is not cost effective.12
@bogdannedScale Vertically13
@bogdannedWhat about … building apps that leverage thehardware more?14
@bogdannedNode inherits the Event Loop model thatmade Javascript successful in thebrowser.15
@bogdannedWorker threads16
@bogdanned 17
@bogdannedCan I use worker threads for everything?18
@bogdannedSpawning workers is expensive if donefrequently.19
@bogdannedHow can I use this with GraphQL?20
@bogdannedGraphQL subscriptions:- server: push data to client- clients: listen to real time messages21
@bogdanned 22
@bogdannedIn the real world ...23
@bogdanned 24
@bogdannedDemo25
@bogdanned 26
@bogdannedFuture work- deployment to cloud- add performance hooks- set up profiling27
@bogdannedSumming Up- node is a perfect fit for event driven systems- worker threads improve performance- easily go fullstack with GraphQL28
@bogdannedthank @you29
@bogdannedBogdan NedelcuEntrepreneurial software engineer with a proventrack record across large IT projects within thefinance and construction industry.30