Designing, building, testing, and operating distributed system remains a hard problem because of complexity. What happens if we use only a handful of limited tools & techniques to build a distributed system? For example:
- write-once registers
- cryptographic checksums
- CRDTs: Conflict-free Replicated Data Types
This talk explores the architecture and implementation of Machi, a replicated file store that uses each tool above. First, each byte in a file is a write-once register. Second, every file byte is protected by client-calculated, end-to-end system checksum to detect file corruption. Third, all file contents can be merged in any order at any time without conflicts, via a CRDT-inspired design. Elsewhere, Machi uses write-once registers and CRDTs to orchestrate file data replication via Chain Replication. Together, these tiny tools create a system that is robust, very resistant to data loss, and easy to test.
- Starting with the constraints of our simple tools, show what a write-once, always mergeable file store looks like from a distributed systems point of view. We also show that this file store can provide either strong consistency or eventual consistency semantics (but not both at the same time!).
- Explore how a software developer can exploit Erlang's many strengths to implement a robust and scalable file store based on the foundation tools.
- Discuss the testing methods used to verify that our Erlang implementation behaves correctly.
Erlang developers who want to design safer applications with properties like, "A server never loses data," and/or need to test those apps, e.g., "What does 'never loses data' really mean?"