Why I Bet on Workflow Orchestration

#distributed-systems#temporal#backend

Event-driven architectures promised decoupling and scalability, but often delivered complexity and observability nightmares. This is why I’ve shifted my focus to Workflow Orchestration engines like Temporal and Cadence.

The Problem with Events

In a purely event-driven system (choreography), no single service knows the state of a multi-step business process.

  • Order Service emits OrderCreated.
  • Payment Service listens and processes.
  • Inventory Service listens… maybe?

If Payment fails, who cleans up? You end up building ad-hoc sagas and state machines in every DB.

The Orchestration Advantage

With code-based orchestration:

  1. State is implicit: Local variable state is the workflow state.
  2. Retries are free: The engine handles transient failures automatically.
  3. Visibility: You can ask the engine “Where is Order #123 stuck?”
// A simplified Temporal workflow
export async function purchaseWorkflow(orderId: string) {
  await activities.chargeCreditCard(orderId);
  try {
    await activities.shipItems(orderId);
  } catch (err) {
    await activities.refundCreditCard(orderId);
    throw err;
  }
}

This code is durable, testable, and far easier to reason about than a web of queues and topics.