2. OVERVIEW
What is a distributed system?
Why distributed systems?
Some Fundamental concepts
Lamport: A Distributed System From Scratch
3. WHAT IS A DISTRIBUTED
SYSTEM?
A distributed system is a software system in
which components located on networked
computers communicate and coordinate their
actions by passing messages
Source: Distributed Systems: Concepts and Design (5th
Edition). Boston: Addison-Wesley
6. FUNDAMENTALS: CONSISTENCY MODELS
"More formally, we say that a consistency
model is the set of all allowed histories of
operations. If we run a program and it goes
through a sequence of operations in the
allowed set, that particular execution is
consistent. If the program screws up
occasionally and goes through a history not in
the consistency model, we say the history was
inconsistent. If every possible execution falls
into the allowed set, the system satis es the
model." - Kyle Kingsbury @aphyr
9. FUNDAMENTALS: CONSISTENCY MODELS
CAUSAL CONSISTENCY
Writes that are "causally related" must be seen by all
processors same order
Includes "potentially" causal relationships
Concurrent writes are allowed to be seen in different order
on different processors
11. FUNDAMENTALS: TIME
Clocks can drift, synchronizing time across nodes is
dif cult
Without time, how can we order events across the system?
Lamport Timestamps (logical clocks)
Vector Clocks
Be sure to check out
by Lesile Lamport
Time, Clocks, and the Ordering of
Events in a Distributed System
12. FUNDAMENTALS: CONSENSUS
The system will have to be brought to consensus to handle
situations like:
Leader Election
Commiting Transactions
State Machine Replication
To do this we can use protocols and alogorithms like:
Or a tool library like
Raft
Paxos
Zookeeper...
13. INTRODUCTION TO APACHE ZOOKEEPER
Distributed system for building distributed systems!
Provides a hierarchichal namespace of values (i.e. znodes)
Clients can create/delete znodes
Znodes can be ephemeral and/or sequenced
Clients can "watch" for znode changes
14. INTRODUCING LAMPORT
A distributed system built in Go
An academic exercise to learn about distributed systems
Initially using Zookeeper "recipes" for leader election
An opportunity to verify correctness of consistency models
Lamport on Github
Lamport Google Group
16. REFERENCES
Distributed Systems: Concepts and Design, 5th Edition
Strong Consistency Models- Kyle Kingsbury (@aphyr)
Designing Large-Scale Distributed Systems - Ashwani
Priyedarshi
CS865 – Distributed Software DevelopmentLecture 7 -
Pace University
CAP Theorem - Brewer, Gilbert, Lynch
Time, Clocks, and the Ordering of Events in a Distributed
System