Event Choreography
Event choreography is a distributed design where each service publishes and reacts to domain events without a central orchestrator telling every step what to do next. Services subscribe to events they care about and emit new events when their own work completes, forming decentralized workflows.
Technical Architecture & Deep-Dive
Choreography trades a single workflow diagram for emergent behavior: a `OrderPaid` event might trigger inventory, email, and analytics independently. No component holds the full saga state unless you add compensations explicitly.
SaaS webhooks are choreography in practice: Stripe fires `payment_intent.succeeded`, and each internal handler decides whether to update CRM, provision access, or enqueue fulfillment. Edge receivers verify signatures, normalize payloads, and forward to multiple internal APIs so one public webhook URL replaces fragile per-vendor wiring.
Key Architectural Benefits
Implement Event Choreography at the Edge
Deploy lightweight API aggregation, edge caching, and secret injection in minutes without Docker containers or complex servers.
Frequently Asked Questions
Q:How is choreography different from orchestration?
Orchestration uses a coordinator to call services in order. Choreography relies on events and reactions. Sagas can use either style for failure recovery.
Related Architecture Concepts
Event-driven architecture is a design approach where services communicate by producing and consuming events, such as order placed or subscription canceled, rather than calling each other synchronously. Consumers react to events independently, which decouples systems and improves resilience.
The saga pattern manages data consistency across multiple services without a single database transaction. Each step commits locally, and if a later step fails, compensating actions undo prior work, keeping the overall business process eventually consistent.
Publish-subscribe is a messaging pattern where publishers send events to a topic without knowing subscribers, and multiple subscribers receive copies independently. It enables broadcast notifications, cache invalidation, and loosely coupled microservices.
A webhook is an HTTP callback: when an event occurs in one system, it sends an HTTP POST with event data to a URL you register. Instead of polling an API repeatedly for changes, your application receives updates in real time, such as payment succeeded or ticket created events.
Ready-to-Use Edge Recipes
Instead of Frontend / Web firing serial fetches to REST API, one pipeline hits https://jsonplaceholder.typicode.com/users/{{query.userId}} (and sibling steps) in parallel and returns mapped JSON.
Edge receives Paddle webhook and updates Supabase in one flow. For "paddle webhook and supabase user sync edge", store PADDLE_API_KEY, SUPABASE_SERVICE_ROLE_KEY in Secret Vault, call https://api.paddle.com/subscriptions/{{query.subscriptionId}} from a Worker, and let Any Frontend / Mobile hit only https://realcomposer.com/v1/workspace/paddle-webhook-supabase-sync-edge with an rc_live_ client token.
Intercom conversation list plus PostHog person properties in one payload. For "combine intercom with posthog user events", store INTERCOM_ACCESS_TOKEN, POSTHOG_PERSONAL_API_KEY in Secret Vault, call https://api.intercom.io/contacts from a Worker, and let React hit only https://realcomposer.com/v1/workspace/combine-intercom-with-posthog-events with an rc_live_ client token.