Async / Event-Based API
Fire-and-forget, queue, poll for result
Why it exists
- Scalability — decouple producer and consumer
- Loose coupling; retries and backpressure via queue
Tradeoffs
- Eventually consistent; need polling or callbacks for result
POST /api/events/job → 202 + jobId · GET /api/events/job/:id → status + result
Enqueue job (fire-and-forget)
Server returns 202 immediately; job runs in the background (~2s), then you can poll for the result.