CPSC 416: Distributed Systems Syllabus - 2024/25 W 2
Leslie Lamport, a computer scientist who won the 2013 ACM Turing Award, gave the following definition of a distributed system.
A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable.
Yet, distribution provides numerous benefits. A system becomes more fault tolerant if there no single-points of failure or centralized components. By extending the system with more physical nodes the system gains performance and becomes more scalable, capable of handling more load. Distribution can also improve latency, by improving geographic diversity, by placing resources closer to clients who use the system.
Achieving these benefits is not easy. As the quote above illustrates, distributed systems can fail in complex ways and these systems are more difficult to build, test, and understand than centralized systems.
This course will introduce you to a broad range of topics in distributed systems. The topics are listed in the schedule below. For the most part this is a lecture-style course. However, distributed system concepts are notoriously challenging to internalize without first-hand experience. The emphasis of this course, therefore, will be on building distributed system prototypes, small and large.
Course pre-requisites: CPSC 317 (networks) and CPSC 313 (computer hardware and operating systems).
The course will provide an opportunity for students to:
Name | Role | Contact Info | Office |
---|---|---|---|
Mike Feeley | Instructor | feeley@cs.ubc.ca | ICCS 393 |
Arun Balamurali | TA | arun.sfc@outlook.com | |
Mishaal Kazmi | TA | mkazmi@cs.ubc.ca | |
Ken Li | TA | ||
Praveen Gupta | TA | ||
Ryan Wang | TA | ryanwangubc@gmail.com |
Who | When | Where |
---|---|---|
Mike | Tue 9:30-10:30 & We 10:30-11:30 | ICCS 393 (feeley@cs.ubc.ca) |
Ryan | Tue 3:30 - 4:30 pm | ICCS X341 (ryanwangubc@gmail.com) |
Mishaal | Thu 11:00 am - 12:00 noon | ICCS X341 (mkazmi@cs.ubc.ca ) |
Arun | Thu 3:30 - 4:30 pm | ICCS X341 (arun.sfc@outlook.com) |
Piazza is the main place for formal, academic Q&A and discussion with each other and with the teaching staff.
Discord is a good place for informal, non-academic discussions with each other (without us there). Join via the following invite link https://discord.gg/akzSjGmA.
In this course we will exclusively use the Go programming language for all course work. Learning a new programming language is an important skill. You will practice it in this course. For the most part I will expect that you learn this language on your own. We will be using Go version 1.23.4 (available at /cs/local/bin/go on ugrad servers). If you use a personal machine, make sure to install this exact version. Though, please note that all homework solutions will be tested on the ugrad server machines.
Go is a systems language originally introduced by Google. It is especially well suited to building distributed systems. Like with any language, the fastest way to become proficient at Go is to put in the time writing programs in Go. Here are some resources to get you started:
Amanda Carbonan and Stewart Grant led an in-class Go tutorial in the 2017. Here is the recorded version: Part 1, and Part 2.
After you install the correct version of Go, you can now install an IDE of your choice. For example, VS Code provides good support for Go. Another popular option is JetBrain's GoLand (free to students; register here with your UBC email).
We will use an enterprise version of GitHub at UBC for all assignment/project code and writeup submissions. Log into github.students.cs.ubc.ca and connect to the CPSC416-2024W-T2 organization. Lecture slides, sample code, the syllabus and other resimilar information is found in the shared repository.
Each group should create one private repo for each lab by following the Step-by-Step Instructions listed below.
The repo must be named labX_cwl0_cwl1
hereX
is the lab number (e.g., 1
or 4a
) and cwl0
and cwl1
are the CWL IDs of the two group members.
The template contains starter code. Be sure to select that you want to include all template files, when you create your repo.
Repository template
select CPSC416-2024W-T2/labX
whereX
is the lab number (e.g., 1
or 4a
)labX_cwl0_cwl1
where X
is the lab number and cwl0
and cwl1
are the CWL IDs of the two group members (e.g. lab1_alice_bob).Create repository
Write
access by selecting Settings
, then selecting Collaborators and teams
, then pressing Add people
, and then entering their CWL ID and giving them Write
privilages.Warning
Ensure that your repo conforms to the following constraints.
Work in your group's repo and push commits frequently. We will grade your last commit. If that commit occurred after the deadline, a late penalty of 2% per full hour will be apply. The deadline for each Lab is 11:59pm on the designated deadline day.
So, for example, commits between 11:59pm and 12:59am receive no penalty. Those between 1:00am and 1:59am receive 2%. And so on.
Important
Push Commits Frequently.
You are required to show incremental changes to your code to demonstrate your evolving work product.
While we grade your last commit, we will also examine this history to see how your work evolved.
A single commit that contains a fully-formed solution will be flagged as suspicious and may result in a mark of zero for the lab and trigger an academic-integrity investigation.
Unit | Topic / Slides ‡ | Textbook | Papers |
---|---|---|---|
0 | Introduction | ||
1 | RPC | § 4.2, 8.3.2 | Implementing RPC |
Grapevine | |||
2 | Consistency | § 7.1, 7.2.1, 7.2.3, 7.3 | Linearizability |
Release Consistency | |||
3 | Time | § 5.2, 5.3.1-5.3.3 | Time, Clocks, and the Ordering of Events in a Distributed System |
Why Logical Clocks are Easy | |||
Upcalls | |||
4 | Replication | § 7.5.1, 7.5.5, 8.4 | A Simple and Reliable Broadcast Protocol |
Lightweight Causal and Atomic Group Multicast | |||
Bayou | |||
5 | Consensus | § 5.44, 8.1, 8.2 | PAXOS: The Partime Parliament |
PAXOS Made Simple | |||
Raft | |||
FLP | |||
CAP | |||
6 | Transactions | § 8.5 | |
7 | Naming | § 6.1-6.3 | AFS |
Chord | |||
8 | Example Systems | ZooKeeper | |
Google File System | |||
DynamoDB | |||
9 | Byzantine Failure | § 8.2.5 | Byzantine Generals |
PBFT |
‡ Slides can change up to day of lecture; check git for the latest version.
Date | Topic | Lab Released | Lab Due | Quiz |
---|---|---|---|---|
J07 | Intro | Lab 0 | ||
J09 | RPC | |||
J14 | RPC | |||
J16 | RPC | Lab 1 | ||
J21 | RPC & Consistency | |||
J23 | Consistency | |||
J28 | Consistency & Time | |||
J30 | Time | Lab 2 | Lab 1 | |
F04 | Time & Replication | |||
F06 | Replication | Quiz 1 | ||
F11 | Consensus | Lab 3 | Lab 2 | |
F13 | Consensus | |||
BREAK | ||||
F25 | Consensus | Lab 4a | Lab 3 | |
F27 | Consensus | |||
M04 | Consensus | |||
M06 | Transactions | Lab 4b | Lab 4a | |
M11 | Transactions | |||
M13 | Naming | Quiz 2 | ||
M18 | Naming | Lab 4c ‡ | Lab 4b ‡ | |
M20 | Naming | |||
M25 | DynamoDB | |||
M27 | Zookeeper | Lab 5 | Lab 4c | |
A01 | Google File System | |||
A03 | Byzantine Failure | |||
A08 | Bysantine Failure | Lab 5 |
‡ Actual date is M15.
Lab | Topic | Released | Due | Weight |
---|---|---|---|---|
0 | Go... | J07 | 0% | |
1 | RPC | J16 | J30 | 16% |
2 | Time | J30 | F11 | 14% |
3 | Replication | F11 | F25 | 14% |
4a | Raft: Leader Election | F25 | M06 | 14% |
4b | Raft: Logging | M06 | M15 | 14% |
4c | Raft: Persistence | M15 | M27 | 14% |
5 | Relaiable Key-Value Store (Using Raft) | M27 | A07 | 14% |
Quiz | Date | Topics |
---|---|---|
1 | F06-08 | RPC – Time |
2 | M13-15 | Replication – Consensus |
Quizzes are closed-book and 50-minutes in duration. They are administered online through Prairie Learn in the Computer-Based Testing Facility (CBTF) at a self-scheduled time between the Thursday and Saturday dates listed above for each Quiz.
Component | Percentage | Notes |
---|---|---|
Labs | 38% | Late penalty is 2% per full hour |
Quizzes | 32% | |
Final | 30% |
UBC provides resources to support student learning and to maintain healthy lifestyles but recognizes that sometimes crises arise and so there are additional resources to access including those for survivors of sexual violence. UBC values respect for the person and ideas of all members of the academic community. Harassment and discrimination are not tolerated nor is suppression of academic freedom. UBC provides appropriate accommodation for students with disabilities and for religious and cultural observances. UBC values academic honesty and students are expected to acknowledge the ideas generated by others and to uphold the highest academic standards in all of their actions. Details of the policies and how to access support are available at https://senate.ubc.ca/policies-resources-support-student-success.
Labs can be completed in pairs. You must not share any portion of your assignent with anyone other than your lab parter. If you change parters part way through a lab, you must contact course staff for permission to share any part of your previous work with your new partner.
You must not consult online or other resources that include any portion of a solution to a lab. You must not use a tutor for help with a lab. You must not use large language model, generative AI tools (e.g., ChatGPT or GitHub Copilot) to write lab code. All work that you submit must be entirely original to you and/or your partner unless you explicitly indicate otherwise and must not, for example, contain any generated code.
Course material is provided for registered students only. You must not provide this material to anyone else in any form.
Violation of these course rules constitutes academic misconduct. Other examples of misconduct and a more detailed description can be found on the department page on collaboration and on the University Academic Integrity page.