replication
Getting data to be consistent across systems is hard. This is about databases.
dynamo
Dynamo was created by Amazon to serve their e-commerce needs. It's a fast, replicated, high availability key-value store. It sacrifices consistency to achieve uptime.
key principles
- incremental scalability: nodes should be able to be added one at the time without any impact on the database.
- symmetry: all nodes are equal / no nodes have different tasks
- decentralization: peer-to-peer leads to a better system
heterogeneity: the work distribution must be proportional to the capability of each node
saga pattern
Sagas split a long-lived transaction into individual, interleaved sub-transactions. Each sub-transaction in the sequence has a corresponding compensating transaction which reverses its effects. The compensating transactions must be idempotent so they can be safely retried. In the event of a partial execution, the compensating transactions are run and the Saga is effectively rolled back.