Getting Help

For urgent communication with the instructor and the teaching assistant, it is best to send an email (preferred) or give a phone call. If you want to talk to any of them in person, remember that their posted office hours are merely nominal times when they guarantee that they will be in their offices. You are always welcome to visit them outside of their office hours if you need help or want to talk about the course.


We ask that you follow a few simple guidelines. The instructor normally works with his office door being open. Whenever the office door is open, he welcomes visits from students. However, if his office door is closed, this means that he is busy with meetings or phone calls, thus prefers not to be disturbed.


We will use the course webpage as the central repository for all information about the class. Through the webpage, you can:


  1. Obtain copies of any handouts or assignments. This is especially useful if you miss a class or lose a document.
  2. View announcements that relate to the course.
  3. Find links to any electronic data you need for your assignments.
  4. Read clarifications and changes made to any assignments, schedules, or policies.

Lastly, you can use Piazza for asking questions and receiving answers without all the emails! Posting your questions on Piazza will help the whole class benefit and will certainly avoid redundancy. Find our class Piazza page at: https://piazza.com/qatar.cmu/fall2018/15440

15-440: Distributed Systems

Distributed systems 15-440 is a 12-unit course and requires a grade of “C” or better in 15-213, Introduction to Computer Systems as a prerequisite

This is an introductory course in distributed systems. The emphasis will be on the techniques for creating functional, usable, and high-performing distributed systems. To make the issues more concrete, the class includes several multi-week projects requiring significant design and implementation.

In this course, students will gain an understanding of the principles and paradigms that underlay distributed systems, such as communication across networks, concurrency, synchronization, consistency and fault-tolerance. In addition to the practical experience in designing, implementing, and debugging real distributed systems

Announcements

  • Thursday 21st of November 2019 : P4 is out

  • Wednesday 20th of November 2019 : PS5 is out

  • Monday 4th of November 2019 : PS4 is out

  • Wednesday 30th of October 2019 : P3 is out

  • Monday 28th of October 2019 : P2 Due

  • Monday 21st of October 2019 : Mid-semester grades are out!

  • Thursday 10th of October 2019 : PS3 Due

  • Sunday 6th of October 2019 : P2 is out

  • Saturday 5th of October 2019 : P1 Due (Extended)

  • Friday 4th of October 2019 : P1-DR & PS2 grades are out

  • Monday 30th of September 2019 : PS3 is out

  • Monday 30th of September 2019 : Quiz (1) grades are out

  • Thursday 26th of September 2019 : Quiz (1) will be held in class

  • Monday 16th of September 2019 : PS1 grades are out

  • Thursday 12th of September 2019 : Problem set (2) is out and is due on the 23rd of September 2019

  • Thursday 5th of September 2019 : Project (1) is out and is due on the 3rd of October with a design report submission on 19th of September 2019

  • Thursday 29th of August 2019 : Problem set (1) is out and is due on 9th of September 2019

  • Monday 26th of August 2019 : Course starts

Lectures

Mondays and Wednesdays, from 9:00 AM to 10:20 AM, in Room 3044

Recitations

Thursdays, from 9:00 AM to 9:50 AM, in Room 3044

Course Objectives & Outcomes

Distributed systems combine the computational power of multiple computers to solve complex problems. The individual computers in a distributed system are typically spread over wide geographies, and possess heterogeneous architectures and operating systems. Hence, an important challenge in distributed systems is to design system models, algorithms and protocols that allow computers to communicate and coordinate their actions over heterogeneous networked computers so as to solve large-scale problems. Our aim in this course is to introduce you to the area of distributed systems. You will examine and analyze how a set of networked computers can form a functional, usable and high-performing distributed system.

In this course, students will gain an understanding of the principles and paradigms that underlay distributed systems, such as communication across networks, concurrency, synchronization, consistency and fault-tolerance. In addition to the practical experience in designing, implementing, and debugging real distributed systems

The course has three major goals:

  1. To learn the principles, architectures, algorithms and programming models used in constructing distributed systems.
  2. To examine state-of-the-art distributed systems, such as Google File System.
  3. To design, implement and debug real distributed systems

Themes in designing and building distributed systems

The course teaches major themes in designing and building distributed systems such as:

Learning Outcomes

The course encompasses two main learning outcomes:

Understanding the Core Concepts of Distributed Systems

Students will learn the core concepts that comprise any distributed system. They will recognize the system constraints, trade-offs and appropriate techniques for building distributed systems that best serve the computing needs of different classes of applications. In particular, students will learn the following concepts:

Access & Location Transparency

Exposing the capabilities of machines, yet hiding their details is one of the first steps in designing distributed systems. Such systems penetrate economies and masses which transparently leverage their powers. For instance, in the Internet, which is a successful distributed system, a simple browser interface will allow you to explore information scattered over wide-geographies. In this course, students will examine how to abstract data and machine locations (which may reside at different physical places) as well as data and machine replications. Specifically, students will study the following topics:

Processes and Communication
Students will explain and contrast the communication mechanisms between different processes and systems.

Naming
Students will identify why entities and resources in distributed systems should be named, and examine the naming conventions as well as some naming resolution mechanisms.

Task Parallelization

Traditional algorithms that work on a single processor are inefficient - or even fail to work - in a system where multiple machines are working in parallel. In distributed systems, problems/jobs can be solved using parallelization. Generally a job is split into multiple tasks, and all tasks are executed in parallel on different machines. The tasks may access common resources, such as data contained in a shared file. Consequently, two main challenges emerge. First, we ought to ensure that the concurrently running tasks are coordinated and synchronized in a manner that correctly achieves the job's goal. Second, we can potentially replicate and place resources across multiple computers in a way that allows tasks to access them more effectively. Specifically, students will study the following topics:

Concurrency and Synchronization
Students will identify issues on how to coordinate and synchronize multiple tasks in a distributed system.

Caching, Replication and Consistency
Students will understand how replication and caching of resources can optimize performance and scalability, as well as examine various models that allow maintaining consistency of replicated and cached data.

Fault-tolerance

In distributed systems, a failure of a single or a part of a computer (or what is known as partial failure) is very likely. If such a failure is not tolerated, the whole system might come to a grinding halt or result in a random and unpredictable behavior. Students will learn how to avoid and recover from partial failures, a concept referred to as fault-tolerance.

Practical Application of the State-of-the-Art Distributed Systems:

Students will also learn how to apply principles of distributed systems in a real-world setting. In particular, they will learn the following topics:

Distributed Frameworks:

Students will learn some of the distributed frameworks such as MapReduce, GraphLab and Pregel. These distributed frameworks allow developers to easily program distributed problems/algorithms, while ensuring correctness, fault-tolerance and efficiency.

Distributed File Systems

Students will learn how a file can be striped and placed anywhere in a distributed system (or what is referred to as distributed file system), yet be accessed transparently- as if it is a local file. They will examine how to apply distributed system principles to ensure transparency, consistency and fault-tolerance in distributed file systems.

Virtualization

Students will learn the concept of system virtualization, where a state of a computer is abstracted from the underlying hardware. This allows masking the heterogeneity of the machines that comprise a distributed system, besides increasing overall system utilization and security.

Schedule

Please refer to this section for the tentative schedule for the class. The schedule indicates the project and the assignment activities as well. Any changes will be always announced and reflected on this webpage.

Filter schedule by:

Project Date Out Date Due Handout Code
Project 1 5-Sep Design report: 19-Sep, Due: 3-Oct Handout Starter code
Project 2 6-Oct 28-Oct Handout Starter code
Project 3 30-Oct 20-Nov -- --
Project 4 21-Nov 2-Dec -- --
Problem Set Date Out Date Due Handout Code
PS 1 29-Aug 9-Sep Handout Code
PS 2 12-Sep 23-Sep Handout --
PS 3 30-Sep 10-Oct Handout --
PS 4 4-Nov 13-Nov Handout --
PS 5 20-Nov 28-Nov -- --
Quiz Date
Quiz I (Mock Quiz) 26-Sep
Quiz II (Mock Quiz) 13-Nov
Exam Date
Midterm 9-Oc
Final Review 2-Dec
Final TBA
Week Session Date Topic Coursework
1 1 26-Aug Introduction  
  2 28-Aug Networking - Part I  
  3 29-Aug Intro to Java, Sample Code Start PS1
Handout, Code
2 4 2-Sep Networking - Part II  
  5 4-Sep Remote Procedure Calls - Part I  
  6 5-Sep Socket programming with Java, Sample Code Start P1:
Handout, Code
3 7 9-Sep Remote Procedure Calls - Part II Submit PS1
  8 11-Sep Architectures  
  9 12-Sep Project 1 - Part I Start PS2:
Handout
4 10 16-Sep Naming - Part I  
  11 18-Sep Naming - Part II  
  12 19-Sep Project 1 - Part II Submit P1-DR
5 13 23-Sep More on Naming Submit PS2
  14 25-Sep Synchronization - Part I Mock Quiz
  15 26-Sep QUIZ I  
6 16 30-Sep Synchronization - Part II Start PS3:
Handout
  18 2-Oct Synchronization - Part II Discussion
  19 3-Oct Synchronization - Part II Discussion
  -- 5-Oct -- Submit P1
  -- 6-Oct -- Start P2:
Handout, Code
7 20 7-Oct Synchronization - Part III  
  21 9-Oct MIDTERM  
  22 10-Oct Project II Submit PS3
8 23 21-Oct Synchronization - Part III Discussion  
  24 23-Oct MPI  
  25 24-Oct MPI,Handout,Code
9 26 28-Oct MPI - Part II Discussion Submit P2
  27 30-Oct Hadoop Start P3:
Handout, Code
  28 31-Oct MPI(CR),Code
10 29 4-Nov Hadoop - Part II Discussion Start PS4: Handout
  30 6-Nov Pregel  
  31 7-Nov MapReduce, Word Count, Handout  
11 32 11-Nov GraphLab  
  33 13-Nov QUIZ II(Mock quiz)
  34 14-Nov Sort MapReduce, Project 3
  -- 16-Nov -- Submit PS4
12 35 18-Nov Caching - Part I
  36 20-Nov Caching - Part II Submit P3
Start PS5
  37 21-Nov Caching - Part III Start P4
13 38 25-Nov Replication - Part I Project 4 Rec
  39 27-Nov Replication - Part II  
  40 28-Nov HDFS - Reading & writing
14 41 2-Dec Fault Tolerance Submit P4 on Dec3
  -- 5-Dec -- Submit PS5
  43 TBA FINAL EXAM  

Team

For urgent communication with the instructor and the teaching assistant, it is best to send an email (preferred) or give a phone call. If you want to talk to any of them in person, remember that their posted office hours are merely nominal times when they guarantee that they will be in their offices. You are always welcome to visit them outside of their office hours if you need help or want to talk about the course. We ask that you follow a few simple guidelines. The instructor normally works with his office door being open. Whenever the office door is open, he welcomes visits from students. However, if his office door is closed, this means that he is busy with meetings or phone calls, thus prefers not to be disturbed.

Mohammad Hammoud

mhhammou@qatar.cmu.edu

Room 1006

4454-8506

Office hours: Monday, 10:30 - 11:59 AM

Zeinab Khalifa

zfk@andrew.cmu.edu

Room 1004

4454-8496

Office Hours: Sunday, 2:00 PM – 3:00 PM,
Tuesday, 2:00 PM – 3:00 PM

Course Assessment

The participation of students in the course will involve five forms of activities:

  1. Attending lectures and recitations
  2. Solving assignments (including writing and reading assignments)
  3. Solving large programming projects
  4. Taking exams and quizzes
  5. Participating in class discussions

Final Grade Assignment and Assessment methods

To this end, the below table shows the breakdown of the five forms of activities that the course involves, alongside the quantity and the overall weight of each activity. Take into account that small differences in scores can make the difference between two letter grades. Letter grades will be determined by absolute standards. The total score will be plotted as a histogram. Cutoff points are determined by examining the quality of students' work on the borderlines. Individual cases, especially those near the cutoff points may be adjusted upward or downward based on factors such as attendance, class participation, improvement observed throughout the course, exam performance, and special circumstances




Type # Weight
Projects 4 40%
Exams 2 30%
Problem Sets 5 15%
Quizzes 2 10%
Class Participation and Attendance 42 5%



Because of the importance of understanding both the theoretical and hands-on elements of the class, students must pass both components of the course (projects as one component, and exams, quizzes and problem sets as the second) in order to receive a passing grade for the course. This does not affect the actual letter grade assignment unless one of the components is not completed to a passing standard.

Projects (40%)

The projects will count for a total of 40% of your final score. There will be 4 projects throughout the course. All projects are individual projects (i.e., no team can work on the same project).

Project's percentages are as follows:

Project Date Percentage Notes
Project 1 5 Sep - 2 Oct 15%
Project 2 3 Oct - 28 Oct 7.5%

Project 2 heavily relies on completing Project 1, and therefore, it’s strongly advised to finish P1 early to avoid complications with P2 (If you have not completed P1, you will not be given any solution files to work on P2!

Project 3 30 Oct - 20 Nov 10%
Project 4 21 Nov - 2 Dec 7.5%



You are encouraged to submit the projects on time. For all projects except the final one, the following rules apply:

Grace days

There is a grace-days quota for projects. In particular, you will be given 3 grace days for all projects, except for the final one. You can use the grace days as needed. For instance, you can submit your first project three days late and still receive no penalty. In this case, you will be penalized starting from the 4th day after the deadline. Furthermore, when you consume all your grace days, you will be left with no grace days for the rest of the projects.


Final project

Note that the final project is unique in two aspects. First, you cannot cannot use grace days for it. As such, if you are left with some grace days before the final project, you will lose them all. Hence, plan how to utilize your grace-days quota judiciously.

Second, there will not be any penalty system for this project either. More precisely, if you are one day late in submitting the project, it will not be graded and you will receive a zero score on it.

Exams (30%)

There will be two in-class exams – midterm and final – which together will count for 30% of your final score.

  • The midterm is worth 10%
  • The final is worth 20%
  • Both exams are open-book. That is, you are allowed to bring your textbooks, slides, and other supporting documents of your own. Any electronic equipment is not allowed, however.

    Problem Sets (15%)

    There will be 5 assignments that will test you on problem analysis and solving skills. These assignments will altogether carry 15% of your final score. At the end of the semester, the Problem Set with the lowest score will be dropped

    Quizzes (10%)

    There will be 2 quizzes, which together will count for 10% of your final score. These quizzes are meant to test your understanding and preparation for the concepts covered throughout the course.

    Participation & Attendance (5%)

    Class-Recitation Participation and Attendance:

    Your attendance of both, classes and recitations, as well as your participation in discussions during presentations will count for 5% of your final score.

    Piazza

    you can use Piazza for asking questions and receiving answers without all the emails! Posting your questions on Piazza will help the whole class benefit and will certainly avoid redundancy. Find our class Piazza page at: https://piazza.com/qatar.cmu/fall2019/15440

    Textbooks

    In this course, there are two primary textbooks and two additional textbooks that you can refer to:

    Distributed Systems: Principles and Paradigms

    (Primary)

    Andrew S. Tannenbaum and Maarten Van Steen
    Second Edition, Pearson, 2007
    Distributed Systems: Concepts and Design

    (Primary)

    George Coulouris, Jean Dollimore, Tim Kindberg, and Gordon Blair
    Fifth Edition, Addison Wesley, 2011
    Computer Systems: A Programmer's Perspective

    (Additional)

    Randal E. Bryant and David R. O'Hallaron
    Prentice Hall, 2003
    Hadoop: The Definitive Guide

    (Additional)

    Tom White
    Second Edition, O'Reilly Media, 2010

    Policies

    Working Alone on Assignments/Projects

    Assignments/projects that are assigned to students should be performed individually. This course does not include any team projects or assignments.

    Handing in Assignments/Projects

    All assignments/projects are due at 11:59PM (one minute before midnight) on the specified due date. All submissions are electronic and should be submitted using Gradescope's course page.

    Refer to the following link for how to submit your solutions to Gradescope: https://www.gradescope.com/get_started#student-submission

    Making up Exams, Assignments and Projects

    Missed exams, assignments and projects can be made up on a case by case basis, but only if you make prior arrangements with the instructor. However, you should have a good reason for doing so. You need a written consent from the instructor for making up exams, assignments or projects. It is your responsibility to get your projects and assignments done on time. Be sure to work far enough in advance to avoid unexpected problems, such as illness, unreliable or overloaded computer systems, etc.

    Appealing Grades

    After each exam, assignment, and/or project is graded, you have 7 calendar days to appeal your grade. All your appeals should be provided in writing. If after appealing you are still not satisfied, please visit the instructor. If you have questions about an exam, an assignment or a project grade, please visit the instructor directly.

    Cheating

    Each project or assignment must be the sole work of the student turning it in. Projects and assignments will be closely monitored, and students may be asked to explain suspicious similarities with any write-up or piece of code available. The following are guidelines on what cheating is and is not:

    What is cheating?

    1. Sharing code or other electronic files: either by copying, retyping, looking at, or supplying a copy of a file.
    2. Sharing written assignments: either by re-writing, looking at, or supplying a copy of an assignment.

    What is NOT cheating?

    1. Clarifying ambiguities or vague points in class handouts.
    2. Helping others use the computer systems, networks, compilers, debuggers, profilers, or other system facilities.
    3. Helping others with high-level design issues.
    4. Helping others debug their codes.

    Consequently, be aware of what constitutes cheating (and what does not) when interacting with your colleague students. Same rules of cheating as above apply when collaborating with other students. In short, you cannot share written assignments, code, and/or other electronic files with other students. If you are unsure, ask the teaching staff. Finally, be sure to store your work in protected directories. The penalty for cheating is severe, and might jeopardize your whole career as a student - cheating is not worth the trouble. By cheating in the course, you are cheating yourself; the worst outcome of cheating is missing an opportunity to learn. Besides, you will be removed from the course and assigned a failing grade. We also place a record of the incident in your permanent university profile.

    Health

    Learning Disabilities

    Carnegie Mellon University is committed to providing reasonable accommodations for all persons with disabilities. To access accommodation services you are expected to initiate the request and submit a Voluntary Disclosure of Disability Form to the office of Health & Wellness or CaPS-Q. In order to receive services/accommodations, verification of a disability is required as recommended in writing by a doctor, licensed psychologist or psycho-educational specialist. The office of Health & Wellness, CaPS-Q and Office of Disability Resources in Pittsburgh will review the information you provide. All information will be considered confidential and only released to appropriate persons on a need to know basis. Once the accommodations have been approved, you will be issued a Summary of Accommodations Memorandum documenting the disability and describing the accommodation. You are responsible for providing the Memorandum to your professors at the beginning of each semester. For more information on policies and procedures, please visit this document.


    Taking Care of Yourself

    Do your best to maintain a healthy lifestyle this semester by eating well, exercising, getting enough sleep, and taking some time to relax. This will help you achieve your goals and cope with stress. All of us benefit from support during times of struggle. You are not alone. There are many helpful resources available on campus and an important part of the college experience is learning how to ask for help. Asking for support sooner rather than later is often helpful.

    If you or anyone you know experiences any academic stress, difficult life events, or feelings like anxiety or depression, we strongly encourage you to seek support. Counseling and Psychological Services (CaPS-Q) is here to help: call 4454 8525 or make an appointment to see the counselor by emailing student-counselling@qatar.cmu.edu. Consider reaching out to a friend, faculty, or family member you trust for help.

    If you or someone you know is feeling suicidal or in danger of self-harm, call someone immediately, day or night, at 5554-7913.

    If the situation is life threatening, call 999.

    Resources

    Communication in Distributed Systems

    Miscellaneous