shahidh_k Resilient? ● Serverless functions are ephemeral ● No knowledge of state - async ● Trigger them on events ● Add retries to the mix ● We have resiliency 10
shahidh_k Architecture Recap ● Microservices became serverless functions ● Serverless functions are scalable by nature ● Database events trigger async serverless functions ● Resiliency by event source tool instead of in the API code ● Moved specific failure handling logic to generic failure handling 13
shahidh_k Changes the way we think about UI + API ● UI First modelling ● Makes API usage more natural ● Maps UI components to GraphQL queries ● Faster iterations - no back and forth b/n frontend-backend 19
shahidh_k Without GraphQL ● Polling from the client ● Websockets - custom API ● Community fragmentation ● Various patterns in different frameworks ● More work for the developer 22
shahidh_k With GraphQL ● Standardised spec ● All GraphQL Clients are compatible with all GraphQL Servers ● Client implementations available for all major platforms and frameworks ● Subscriptions: access to async info ● Less work for the developer 23
shahidh_k However, the cost is... 25 App Database API Event system Payment processing Restaurant approval Delivery assignment Generic Event System Event system Async Serverless Fns Payment processing Restaurant approval Delivery assignment GraphQL Server Subscriptions
shahidh_k 3factor.app Build backends for apps that allow for fast iteration, while being resilient and highly scalable 1. Realtime GraphQL 2. Event-driven 3. Async serverless 34