T1 Intro
T1 Intro
T1:
Course
Introduction
• Database Systems
Strathmore University
Course Structure
• A blend of lecture-based study and research-based study with Programming
Assignments / Short Projects
• Lectures
• Discuss the fundamentals – algorithms and systems-aspect of the course
• Term Projects
• Two types of term projects – Reseach-based and Survey-based
• Research-based: Explore a recent research topic and come up with some
experimental studies/new algorithms/new system designs, etc.
• Survey-based: Read some (at least 3N papers for N-member groups) recent research
papers on a topic assigned and come-up with a survey paper
• Group size: 4-6 members
• Fill up this Google form to submit your group information by March 10, 2024: https://
forms.gle/28mSq9yWneqLoBd6A
Strathmore University
Course Structure
Strathmore University
What This Course is About
• Sports
• Movies
• Travel to Saturn
• Interviews
• Company Acquisitions
• (Not Kidding) 7
Strathmore University
What This Course is Really About
• Distributed Systems
• How to Design Algorithms for them
• How to Design The Systems
• How they work in real life
• How to build real distributed systems
Strathmore University
Many Students are Intimidated by Computer Science…
Strathmore University
Our Main Goal Today
10
Strathmore University
Can you name some examples of
Distributed Systems?
11
Strathmore University
Can you name some examples of
Distributed Systems?
• Client-Server (NFS)
• The Web
• The internet
• A wireless network
• DNS
• Gnutella or BitTorrent (peer to peer overlays) 12
Strathmore University
What is a Distributed System?
13
Strathmore University
I asked Alexa…
14
Strathmore University
How does Leslie Lamport define Distributed System?
15
Strathmore University
FOLDOC definition
16
Strathmore University
Textbook definitions
Strathmore University
Unsatisfactory
18
Strathmore University
19
Strathmore University
hich is a Distributed System – (A) or (B)?
(A)
20
21
23
What is the
communication medium
(links)?
24
Source: http://www.vlib.us/web/worldwideweb3d.html
Strathmore University
Datacenter
25
What are the “entities”
(nodes)?
What is the
communication medium
(links)?
Strathmore University
An Intranet & a distributed system
email server Desktop
computers
print and other servers
Local area
Running over this Intranet Web server network
is a distributed file system
email server
print
File server
other servers
26
the rest of
the Internet
router/firewall
Strathmore University
Many Interesting Design Problems
•
•
• Real distributed systems
• Cloud Computing, Peer to peer systems, Hadoop, key-value stores/NoSQL, distributed
file systems, sensor networks, measurements, graph processing, stream processing, …
• Classical Problems
• Failure detection, Asynchrony, Snapshots, Multicast, Consensus, Mutual Exclusion,
Election, …
• Concurrency
• RPCs, Concurrency Control, Replication Control, Paxos, …
29
• Security
• ACLs, Capabilities, …
• Others…
•
Strathmore University
Typical Distributed Systems Design Goals
• Common Goals:
• Heterogeneity – can the system handle a large variety of types of PCs and devices?
• Robustness – is the system resilient to host crashes and failures, and to the network
dropping messages?
• Availability – are data+services always there for clients?
• Transparency – can the system hide its internal workings from the users? (warning:
term means the opposite of what the name implies!)
• Concurrency – can the server handle multiple clients simultaneously?
• Efficiency – is the service fast enough? Does it utilize 100% of all resources?
• Scalability – can it handle 100 million nodes without degrading
30
service?
(nodes=clients and/or servers) How about 6 B? More?
• Security – can the system withstand hacker attacks?
• Openness – is the system extensible?
Strathmore University
“Important” Issues
• The Goal for the Rest of the Course: see enough examples
and learn enough concepts so these topics31and issues will
make sense
• We will revisit many of these slides in the very last lecture of the
course!
Strathmore University
“Concepts”?
32
Strathmore University
What is a Distributed System?
Strathmore University
What is a Distributed System?
Multiple Computers
Strathmore University
What is a Distributed System?
Strathmore University
Wants to talk to each other
What is a Distributed System?
Strathmore University
and ...
Strathmore University
Internet is
also a
Distributed
System
Strathmore University
You have already learned quite a few distributed algos ...
• Internet routing
• TCP congestion control
• Domain Name Systems
• Peer-to-Peer File Transfer (Have you used DC++ or Bittorrent?)
•…
Strathmore University
What Additional Are You Going to Learn Here?
Strathmore University
What Additional Are You Going to Learn Here?
Performance
Strathmore University
What Additional Are You Going to Learn Here?
Performance
Scalability
Strathmore University
What Additional Are You Going to Learn Here?
Availability
Performance
Scalability
Strathmore University
What Additional Are You Going to Learn Here?
tion
lica
p
Re Availability
Performance
Scalability
Strathmore University
What Additional Are You Going to Learn Here?
tion
lica
p
Re Availability
Agr
Performance eem
ent
Scalability
Strathmore University
What Additional Are You Going to Learn Here?
tion
lica
p
Re Availability
Agr
Performance eem
ent
Cac
hin
g Scalability
Strathmore University
What Additional Are You Going to Learn Here?
tion
lica
p
Re Availability
Agr
Performance eem
Cac
? ent
hin
g Scalability
Strathmore University
Books and References
• We'll follow various papers and articles, will refer them during discussing
different topics
Strathmore University
Some Conferences and Journals to Follow ...
• PODC
• DISC
• ICDCS
• OSDI/SOSP
• ASPLOS
• Usenix ATC
• IEEE Transactions on Parallel and Distributed Systems
• ACM Transactions on Computer Systems
Strathmore University
Some running
systems that
you might be
using ….
• Divide the data into shards and allocate servers for individual shards
• Spread the load across different databases
• Failure of shards (hardware or software failure)
Strathmore University
Facebook Shard Manager
• Challenge: During data update, how do you ensure that all the replicas of a
shard are consistent?
Shard 1
Replica 1
Shard 1 Shard 1
Primary Replica 2
Shard 1
Replica 3
Strathmore University
Facebook Shard Manager
• Challenge: During data update, how do you ensure that all the replicas of a
shard are consistent?
Shard 1
Replica 1
Shard 1 Shard 1
Primary Replica 2
Shard 1
Replica 3
Strathmore University
Facebook Shard Manager
• Challenge: During data update, how do you ensure that all the replicas of a
shard are consistent?
Shard 1
Replica 1
Shard 1 Shard 1
Primary Replica 2
Shard 1
Replica 3
Strathmore University
Facebook Shard Manager
• Challenge: During data update, how do you ensure that all the replicas of a
shard are consistent?
Shard 1
Replica 1
Failed
Shard 1 Shard 1
Primary Replica 2
Shard 1
Replica 3
Strathmore University
Facebook Shard Manager
• Challenge: During data update, how do you ensure that all the replicas of a
shard are consistent?
Shard 1
Replica 1
Failed
Shard 1 Shard 1
Primary Replica 2
Shard 1
Replica 3
Strathmore University
Facebook Shard Manager
• Challenge: During data update, how do you ensure that all the replicas of a
shard are consistent?
Shard 1
Replica 1
Failed
Shard 1 Shard 1
Primary Replica 2
Shard 1
Replica 3
Strathmore University
Facebook Shard Manager
Strathmore University
Some Other Distributed Systems from Facebook
Strathmore University
Distributed Computing @ Google
Strathmore University
Some Other Resources
Strathmore University
Strathmore University