Skip to content

Instantly share code, notes, and snippets.

@jchapuis
Last active March 5, 2024 16:10
Show Gist options
  • Save jchapuis/31399eed6aae5594d7d8db65f49a667d to your computer and use it in GitHub Desktop.
Save jchapuis/31399eed6aae5594d7d8db65f49a667d to your computer and use it in GitHub Desktop.
prepare-phase
Example: orchestration of the booking process for a journey - prepare phase Data store Transaction branch operation
Create cancelable hotel & flight reservations External API Make a reversible synchronous HTTP POST/PUT request
Request the billing backend for the credit card guarantee charge and await confirmation Internal service Send a message or call an endpoint and wait for an event to occur
Add details to the customer row in the database Database Acquire an exclusive lock on a database row or use builtin XA support
Grab a semaphore to update the recent bookings cache In-memory resource Lock an in-memory resource
Schedule traveller reminder notifications Actor cluster Send a command to an actor
Add an entry in a bookings log File Persist a rollback-ready change in a file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment