Week 1
Centralized, Decentralized And Distributed
- Decentralized systems from zero, week 1
- After today you can describe who controls any system and where it runs.
Outcomes
What You Can Do By The End
- Define the three words in your own words
- Classify real services by machines and by control
- Name the three axes of decentralization
- Weigh trade-offs of each design
- Decide when a central server is the right choice
Starting point
Two Questions Behind Every System
- Where do the computers run, and how do they connect?
- Who decides what the system does?
- Three words answer these in different ways
History
Baran'S Three Pictures
- Paul Baran, RAND Corporation, 1964
- Centralized: one hub, many spokes
- Decentralized: several hubs linked together
- Distributed: a net with no special center
Centralized Decentralized Distributed
o o o o-o o-o o-o-o-o
\|/ \| |/ |\|/|/|
o--X--o o--X---X--o o-o-o-o
/|\ /| |\ |/|\|\|
o o o o-o o-o o-o-o-oDefinition
Centralized: One Place Decides
- One party holds the data and sets the rules
- Example: a school registrar, a social media company
- One source of truth for everyone
- Easy to build and to change
Weak points
Where Centralized Designs Hurt
- The center fails, everyone loses service
- The owner changes the rules or closes accounts
- An attacker who enters the center reaches everything
- Users must trust one party completely
Definition
Decentralized: Control Is Shared
- Several independent parties each hold part of the control
- Shared rules (protocols) let them work together
- Example: email across many providers
- A matter of degree, not a yes or no
Definition
Distributed: Many Machines, One Job
- Computers in different places act as one system
- Describes machines, not owners
- A big video service is distributed but centrally owned
- Bitcoin is distributed and decentralized
Putting it together
Four Combinations
- One server, one owner: centralized
- Many data centers, one owner: distributed, centralized control
- Many owners, shared rules: decentralized
- Many owners, many machines: both
one owner many owners
one machine small web shop (rare)
many machines big tech cloud Bitcoin, email
Vitalik Buterin, 2017
Three Axes Of Decentralization
- Architectural: how many machines can fail
- Political: how many owners control them
- Logical: one shared state or separate parts
- A system can score high on one and low on another
No free lunch
The Trade-Offs
- Centralized: fast, cheap, simple, one point of failure
- Decentralized: shared power, harder to switch off
- Distributed: scales and survives hardware loss
- The price is complexity and slower agreement
| Design | Strength | Price |
|---|
| Centralized | Fast, cheap, simple | Single point of failure |
| Decentralized | Shared power | Slower coordination |
| Distributed | Scales, survives hardware loss | Complexity |
Motivation
Why People Want Decentralization
- Censorship resistance
- Uptime when one operator fails
- Users keep their own data and keys
- Credible neutrality: rules nobody can quietly change
Honest limits
When A Central Server Wins
- Everyone already trusts one operator
- Speed and low cost matter most
- Rules must change often
- Legal accountability must sit with one party
Your toolkit
Five Questions For Any System
- Who runs the machines?
- Who can change the rules?
- What happens if one machine fails?
- What happens if one operator turns hostile?
- Who can see the data?
Summary
Recap
- Distributed describes machines, decentralized describes control
- Decentralization has three axes and many degrees
- Each design has real strengths and costs
- Pick the design by the threat you face
Week 2
Next Week
- Distributed systems fundamentals
- Networks, latency and failures
- The CAP theorem and eventual consistency
Your turn
Questions And Exercise
- Classify five services you use
- Fill the table of machines, control and failure
- Score each on the three axes
- Bring the table to week 2