Reactive UI + Async Backend
with Realtime GraphQL API
 

Hack Day #14
Kevin C Chen

REST API Gateway

Comm Microservice

Policy Microservices

Task Microservices

  • Many roundtrips of API calls

  • Polling for update

Image source: https://youtu.be/AYbVMNtO-ro

Polling

Image source: https://youtu.be/AYbVMNtO-ro , https://github.com/hasura/graphql-engine/blob/master/assets/realtime.gif

Event Based Subscription

DEMO

Realtime GraphQL API

Run Scan Task

Computer Activation

Policy Assignment

Event System

Atomic
Functions

Event Trigger invokes
Webhooks

Subscription

Mutation

Asynchronous Update

State Driven Architecture

Reliable Eventing

Reactive UI Realtime API without Polling

No More
Stale Data
on UI

Only fetch the data we need

Thank you!

Realtime GraphQL API

Comm Microservice

Policy Microservices

Task Microservices

Event System

Serverless
Functions

Image source: https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/event-driven

Hasura can be used to create event triggers on tables. An Event Trigger atomically captures events (insert, update, delete) on a specified table and then reliably calls a webhook that can carry out any custom logic.

 
Made with Slides.com