Detailed analysis
Code of Architecture
Detailed analysis of the first chapter from Alexander and the Code of Architecture club
Distributed Systems (4th Edition)
Authors: Andrew S. Tanenbaum, Maarten van Steen
Publisher: distributed-systems.net, 2023
Length: ~1000 pages
The seminal work of Tanenbaum and van Steen: architectures, coordination, consistency, fault tolerance and security.
Original
TranslatedChapter 1: Introduction
Definition of a distributed system
"A collection of autonomous computing elements that appears to the user as a single coherent system"
Transparency
Hiding distribution complexity from the user
Openness
Standard interfaces and protocols
Scalability
Growth without productivity degradation
8 types of transparency
Detailed analysis
Code of Architecture
Detailed analysis of the second chapter from Alexander and the Code of Architecture club
Chapter 2: Architectures
Architectural styles
System organizations
Role of Middleware
Middleware is an intermediate layer between the OS and applications that ensures system coherence. Examples: CORBA, RMI, Message Brokers, Web Services. Middleware hides platform heterogeneity and provides a single API.
Detailed analysis
Code of Architecture
Detailed analysis of the third chapter from Alexander and the Code of Architecture club
Chapter 3: Processes
Threads
- User-level vs Kernel-level threads
- Multi-threaded servers
- Thread pools
- reactor/proactor model
Virtualization
- Virtual machines
- Containers
- Resource Isolation
- Process migration
Clients and servers
- Stateless vs Stateful servers
- Server clustering
- Code migration
- Mobile agents
Detailed analysis
Code of Architecture
Detailed analysis of the fourth chapter from Alexander and the Code of Architecture club
Chapter 4: Communications
RPC (Remote Procedure Call)
Synchronous remote procedure calls with local call semantics
Message Queues
Asynchronous communication via message brokers
Multicast
Delivering messages to a group of recipients
Gossip protocols
Epidemic information dissemination: Each node periodically broadcasts updates to random neighbors. They guarantee eventual consistency with high probability with minimal coordination.
Detailed analysis
Code of Architecture
Detailed analysis of the chapter on coordination from Alexander and the Code of Architecture club
Chapter 5: Coordination
Clock synchronization
- NTP (Network Time Protocol)
- GPS synchronization
- Clock drift and correction
- Lamport's algorithm (happens-before)
- Vector clock (causality)
- Hybrid Logical Clocks
Coordination Algorithms
- Centralized algorithm
- Distributed algorithm (Ricart-Agrawala)
- Token ring algorithm
- Bully Algorithm — selection of a node with max. ID
- Ring Algorithm - roundabout
- Raft Leader Election - modern approach
Detailed analysis
Code of Architecture
Detailed analysis of the chapter on naming from Alexander and the Code of Architecture club
Chapter 6: Naming
Flat names
Identifiers without structure
Structured names
Hierarchical namespaces
Attribute names
Search by attributes
Detailed analysis
Code of Architecture
Detailed analysis of the chapter on consistency from Alexander and the Code of Architecture club
Chapter 7: Consistency and Replication
Data-centric models
Client-centric models
Consistency Protocols
Remote-write, Local-write protocols
Active replication, Quorum-based
Write-through, Write-back protocols
Video analysis
Code of Architecture
Video analysis of the chapter on fault tolerance from Alexander and the Code of Architecture club
Chapter 8: Fault Tolerance
Failure Models
Consensus
Classical Lamport consensus algorithm. Phases: Prepare → Promise → Accept → Accepted.
Atomic commit protocol for distributed transactions. Coordinator → Prepare → Vote → Commit/Abort.
Process sustainability
Active and Passive replication for high availability
Virtual synchrony for consistent state
Checkpointing and message logging
Detailed analysis
Code of Architecture
Detailed analysis of the chapter on security from Alexander and the Code of Architecture club
Chapter 9: Security
Cryptographic Basics
Protecting distributed systems
Results and recommendations
Strengths
- Fundamental coverage of distributed systems theory
- Algorithmic approach with proofs
- Examples in Python make the material more accessible
- Deep coverage of consistency and coordination
- Excellent chapter on safety
Who is it suitable for?
- For students studying distributed systems
- Engineers who want to understand the theoretical fundamentals
- For those who want to gain a deeper understanding of consensus algorithms
- Preparation for positions at the Staff+ Engineer level
- Researchers and academic professionals
Verdict: The book by Tanenbaum and van Steen is a fundamental textbook that provides a deep understanding of the principles of building distributed systems. Unlike how-to guides, it explains Why systems work this way and not otherwise. Recommended reading along with DDIA: Tanenbaum gives the theory, Kleppmann gives the practical application.
