One API, two promises
How to choose between returning the outcome in the same request and deferring it based on when the caller needs the result or must act on a failure.
Imagine an application that shows a shipping quote before the user can choose a delivery option. The quote request is synchronous: the application needs the price, or an error it can act on, in the response to that request.
The same application lets the user request a report and leave the page. Report generation is asynchronous: the API answers whether it accepted the request, while a separate path reports the outcome later. The arrows show where requests, work, and outcome events go; HTTP replies and final email delivery are not drawn.
Stage 1 of 8: The user can ask for a shipping quote or request a report.
Next up: Trace a request on what you just read.
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.