The repo contains example code after following courses on distributed algorithms:
- CSE138 (Distributed Systems) lectures, Spring 2020
- Distributed Algorithms for Message-Passing Systems
Allows to receive broadcast messages even with server crashes, the only condition needed is that the first message as already been sent, without that we cannot even start talking about broadcast messages.
This algorithm is simulated using threads.
Allows to receive unicast messages when the network is not reliable.
This algorithm is simulated using threads.
Allows a group of n processes to decide on a value, the current implementation was developed only to study the algorithm.
- Paxos roles in this implementation are hierarchical:
- Proposer: is an acceptor and a learner as well;
- Acceptor: is a learner as well;
- Learner: is just a learner.
- The nodes should start from 1, if 0 is used the first propose will be ignored directly;
This algorithm is simulated using different processes on the same machine, the roles are decided by the docker compose file
Data structure used to fast compare the content of the tree Wikipedia. The current implementation is based on two arrays one sorted of the data key value pair and one that contains the actual hashes.
Because the data structure will be used to test how two servers can understand what data is not aligned in their database the current implementation has the following limitations:
- No deletion function is provided;
- Inserts must be in order to correctly have the hashes calculated. To allow this more complex code has to be developed and considering the goal of the current implementation is to test the data the functionality is not needed.
- Cannot detect which of left or right leaf is the different one, it has to check both with the real data
Allows communicating with another node to verify which data is missing or different in the other node. This is based of the Merkle tree implemented in this project so it has the same limitations.