Discovering some distributed algorithms. Introduction to Reliable and Secure Distributed Programming. Second Edition
book by Christian Cachin, Rachid Guerraoui, Luis Rodrigues, used as main reference.
- Best-Effort Broadcast (3.1 Basic Broadcast) - goto
- (N,N)-Atomic Register (4.10-4.11 Read-Impose Write-Consult-Majority) - goto
- Eventually Perfect Failure Detector (2.7 Increasing Timeout) - goto
- Eventual Leader Detector (2.8 Monarchical Eventual Leader Detection) - goto
- Epoch-Change (5.5 Leader-Based Epoch-Change) - goto
- Epoch Consensus (5.6 Read/Write Epoch Consensus) - goto
- Uniform Consensus (5.7 Leader-Driven Consensus (Paxos)) - goto
NewDalgs communicates via TCP with the Hub and other nodes (both dalgs
and NewDalgs
run 3 separate nodes - simulating a distributed environment).
- The Core uses
Asynchronous Server Socket
for networking (supports graceful stop) - The algorithms are based on
Event-driven programming
, so the Core uses a BlockingQueue in order to process all proto-defined messages.
- .NET Core
- Protocol Buffers
- NLog
protoc.exe -I=\NewDalgs\proto --csharp_out=\NewDalgs\proto NewDalgs\proto\communication-protocol.proto
- Generate protodotnet publish -c Release -r win10-x64 /p:PublishSingleFile=true
- Compile appdalgs.exe 127.0.0.1 5000 127.0.0.1 5001 5002 5003
- Run reference binaries (containing the Hub)NewDalgs.exe 127.0.0.1 5000 127.0.0.1 5004 5005 5006 alias
- Run second instance
- Broadcast
- (N,N)-Atomic Register
- Consensus