Serverless API with asynchronous processing

Serverless API with asynchronous processing Serverless API with asynchronous processing Identity Platform → API Gateway → Cloud Run → Firestore, with Pub/Sub feeding background Cloud Run functions and BigQuery Google Cloud Project: orders-prod 2. API Gateway → Orders API2 stream insert 6. Order processor → BigQuery (stream insert)6 sign in HTTPS 1. Mobile app → API Gateway (HTTPS)1 read/write 3. Orders API → Firestore (read/write)3 publish 4. Orders API → Pub/Sub (publish)4 push 5. Pub/Sub → Order processor (push)5 Mobile app (Mobile) Mobile app Identity Platform (Identity Platform) Identity Platform sign-in, JWT API Gateway (Cloud API Gateway) API Gateway JWT validation, quotas Orders API (Cloud Run) Orders API Cloud Run service Firestore (Firestore) Firestore orders Pub/Sub (Pub/Sub) Pub/Sub order events Order processor (Cloud Functions) Order processor Cloud Run function BigQuery (BigQuery) BigQuery analytics

Flow

  1. 1Mobile app → API Gateway (HTTPS)
  2. 2API Gateway → Orders API
  3. 3Orders API → Firestore (read/write)
  4. 4Orders API → Pub/Sub (publish)
  5. 5Pub/Sub → Order processor (push)
  6. 6Order processor → BigQuery (stream insert)