This repository contains the complete collection of assignments and documentation for the Fundamentals of Distributed Systems course at the University of Tehran. The projects progress from basic concurrent programming in Go to building complex, fault-tolerant distributed consensus protocols.
- Objective: Build a concurrent, thread-safe Key-Value database server.
- Key Concept: State management and synchronization using Go's Goroutines and Channels (
selectstatements), strictly without traditional locks or mutexes. Includes test-driven development for a secondary server implementation.
- Objective: Implement a distributed MapReduce execution engine inspired by the OSDI '04 paper.
- Key Concept: Managing parallel Map and Reduce tasks across distributed worker processes via RPC. Features robust fault tolerance to detect worker crashes and safely reassign stalled tasks using atomic file operations.
- Objective: Build a Key-Value server that guarantees strict consistency over an unreliable network.
- Key Concept: Ensuring "exactly-once" execution semantics. Implements client retry logic and server-side duplicate detection using monotonic identifiers to prevent duplicate state modifications during network disconnects or packet loss.
- Objective: Implement a fault-tolerant, replicated state machine using the Raft consensus protocol.
- Key Concept: Achieving distributed consensus through robust Leader Election and Log Replication. Features persistent state management for crash recovery and snapshotting for efficient log compaction.
- Objective: An interactive Jupyter Notebook demonstrating the inner workings of the Paxos consensus algorithm.
- Key Concept: Visualizing the interactions between Proposers, Acceptors, and Learners under various conditions, including proposer collisions, message loss, and acceptor node crashes, to prove the algorithm's safety and liveness properties.