Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Build a Saga Orchestrator in TypeScript with Effect

DEV Community·Gabriel Anhaia·30 days ago
#bWPVTRh0
#typescript#effect#webdev#input#saga#string
Reading 0:00
15s threshold

Book: TypeScript in Production Also by me: The TypeScript Library — the 5-book collection My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub Picture a team running a 4-service order pipeline. Inventory reserves the SKU, payment charges the card, shipping creates the label, and notification sends the confirmation email. Four calls inside one Express handler, wrapped in a try/catch that logged and returned a 500. The first time the shipping API returns a 504 in production, the card has been charged, the inventory still locked, no email sent. The order row flips to failed . Three side-effects landed in the world, nothing rolls them back, and support spends the morning manually refunding cards and releasing stock from a Slack thread. That handler needed a saga. Specifically the orchestrator-style version, where one process owns the workflow, runs each step, and walks the completed steps backwards if a later one fails.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More