Skip to content

Sheet 04 / 06

Serverless Order Processing

Serverless, event-driven order pipeline on three clouds: a validated baseline on AWS, a validated variant on GCP and an implemented variant on Azure.

Status
Experimental
Type
Technical project · Event-driven architecture

Architecture

Serverless order pipeline across three cloudsThe same pipeline on three providers, in six stages: public ingress, queue, private processor, store, notifier and notification. AWS (validated baseline): API Gateway, SQS with a dead-letter queue, Lambda, DynamoDB, Lambda with Streams and SNS. GCP (validated variant): Cloud Run, Pub/Sub, Firestore and Eventarc. Azure (implemented, with an ephemeral deployment and smoke test): Azure Functions, Service Bus and Cosmos DB.INGRESSQUEUEPROCESSORSTORENOTIFIERNOTIFICATIONAWS · VALIDATED BASELINEAPI GatewayPOST /orders → SQSAmazon SQSorders queueDLQ after 5 receivesLambdaprocesses and persistsSQS event mappingDynamoDBorders tablegenerated IDLambdanotifierStreams · INSERT eventAmazon SNSnotification topicemail with confirmationus-east-1 · least-privilege IAMpublic API, private workersGCP · VALIDATED VARIANTCloud Runpublic ingressPOST /orders · 202Pub/Suborders topicdead-letter + retriesCloud Runprivate processorpush subscriptionFirestoreorders collectiongenerated IDCloud Runprivate notifierEventarc · doc createdPub/Subnotifications topicmanual test channelus-central1 · least-privilegeservice accounts · public ingress onlyAZURE · IMPLEMENTEDAzure Functionspublic ingressPOST /orders · 202Service Busorders queuenative DLQ after 5Azure Functionsprivate processorService Bus triggerCosmos DBorders + outboxNoSQLAzure Functionsprivate notifierChange Feed + timerService Busnotifications queuededupe by correlationIdephemeral deployment · smoke testHTTP and queues (202 and 400)
Swipe horizontally to see the full diagram. Component map based on what is documented. Arrows show stage order or fallback, not an execution sequence.

Problem

Processing orders with decoupled services and asynchronous messaging, with no servers to manage.

Architecture

One pipeline in six stages (ingress, queue, processor, store, notifier and notification), with one implementation per cloud:

  • AWS (validated baseline): Amazon API Gateway, Amazon SQS with a dead-letter queue, AWS Lambda, Amazon DynamoDB (with Streams) and Amazon SNS.
  • GCP (validated variant): Cloud Run, Pub/Sub, Firestore and Eventarc. Manual deployment and verified teardown.
  • Azure (implemented variant): Azure Functions, Service Bus and Cosmos DB (Change Feed). Ephemeral Terraform deployment and an HTTP and queue smoke test (202 for a valid order, 400 for an invalid one).

Goals: event-driven architecture, serverless processing, cloud integration, asynchronous messaging and decoupled services.

Status

All three variants are implemented and were deployed ephemerally; the evidence for each differs and the repository does not claim full conformance with the order contract. It is a technical project, not a production product.

Stack

  • Amazon API Gateway
  • Amazon SQS
  • AWS Lambda
  • Amazon DynamoDB
  • Amazon SNS
  • Cloud Run
  • Pub/Sub
  • Firestore
  • Azure Functions
  • Service Bus
  • Cosmos DB