- Open Source Contributor 👨💻
- Game developer (Hobby) 🎮
- Developer who loves UX 💫
- Chocolate lover 🍫
- Founding Full-Stack Engineer 👷
AT
- Reliability
- Fault-tolerant
- Replicated state machine
- Retry policies
There are tradeoffs between
Consistency & Availability
(Strongly) Consistent, (Always) Available, Partition-tolerant
Replicate data
Event-driven architectures and queue-driven design promise ease of deployment and scale, but are a development nightmare.
Source: The System Design Primer
Note: If queues start to grow significantly, the queue size can become larger than memory, resulting in cache misses, disk reads, and even slower performance (queues can add delays and complexity)
This creates great complexity for error handling and propagation of state across disparate services.
Redis is useful as a simple message broker but messages can be lost.
RabbitMQ is popular but requires you to adapt to the 'AMQP' protocol and manage your own nodes.
Amazon SQS is hosted but can have high latency and has the possibility of messages being delivered twice.
Application state, retries, and error handling are abstracted away so that you no longer have to code for them. System testing is a breeze because Temporal eliminates common failure scenarios.
The Saga Pattern maintains data integrity in distributed systems by undoing previous operations if a step fails, using compensating transactions.
The pattern requires a complex programming model that develops and designs compensating transactions for rolling back and undoing changes.
Workflow definitions allow you to more easily understand, debug, and modify sagas