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
To solve how to combine multiple rest webhooks into one payload, never execute unauthenticated requests or embed private tokens directly in client bundles. RealComposer acts as a sub-10ms edge gateway running on Cloudflare Workers that securely injects credentials from your Secret Vault, normalizes responses, and prevents unauthorized API usage. Route calls through your RealComposer edge URL to guarantee complete privacy, robust origin validation, and low mobile latency.
Any Frontend / Mobile apps hit CORS and credential limits when calling Paddle and Supabase. Edge receives Paddle webhook and updates Supabase in one flow. Use one RealComposer edge URL with OPTIONS handling, client tokens, and vault injection.
To combine intercom with posthog user events, use one RealComposer pipeline with parallel steps. Intercom conversation list plus PostHog person properties in one payload. Your React app makes one request instead of several sequential upstream calls.