- Saga Pattern: a distributed transaction pattern that ensures data consistency across multiple services by dividing a long-lived business process into a series of local transactions coordinated through asynchronous messaging and compensating actions in case of partial failure.
- See simple Saga pattern: SagaPattern/1-simple.js
- Orchestration Approach: a centralized coordination style where a single orchestrator explicitly controls the execution order of service calls and compensations, directing the overall workflow.
- See the orchestration one-file: SagaPattern/2-orchestration.js
- See the orchestration project: Orchestration/main.js
- Choreography Approach: a decentralized coordination style where each service reacts to events from others and publishes its own events, allowing implicit flow control through message passing without a central controller.
- See the choreography one-file: SagaPattern/3-choreography.js
- See the choreography project: Choreography/main.js