I've been curious about distributed systems programming for a while. Computing is all about [[RUM Space|tradeoffs]], one of the fundamental ones we make when blasting off from a single-host context to a compute cluster is between direct memory access and communication via message passing.
![[memoryToMessages.png | 300]]
I was always curious about the [Akka](https://akka.io/) library, which many successful companies use to build actor-oriented distributed systems. It is famous for beaing able to make high-throughput high availability messages available to actors in the cluster.
### What are the key concepts?
I'm intererested in exploring [[Kubernetes]] , so I'll map the smallest indivisible unit in Aeron, a [Cluster Node](https://aeroncookbook.com/aeron-cluster/understanding-cluster-counters/?h=node#cluster-node-role) to the Kubernets concept of a `Pod`
- Aeron operates in cluster composed of multiple pods
- All pods agree on:
- participants
- a single leader
- All pods faithfully replicate the leader's state (in the form of an append-only log)
- In the case of the loss of a leader, all pods (via their implementation of [[Raft]] are able to vote for a new leader)
- [[Aeron Context#Configure the Consensus Module]]
- Each pod has a special daemon, the Media Driver, which is responsible for:
- This advertises the existence of each node within the cluster via MultiCast messaging
- This participates in the Cluster membership rituals
- This replicates the message log via Raft concensus to
- See [[Aeron Context#What is the Aeron Media Driver?]]
- Aeron uses disk-backed [[Agrona Data Structures]] to be fast and correct!
https://github.com/real-logic/aeron