[ Home | Schedule | Labs | Policy ]


Distributed systems labs for C++ lovers.

Lab assignments

Collaboration Policy

See here.

Lab Environment

A Ubuntu 20.04 amd64 environment is recommended for the labs. The labs do not require a lot of CPU/memory resources, but to avoid weird errors it is better to have more than 4 cores and 8G memory. If you do not have access to this, consider using a virtual machine (on cloud). We do not provide machines.

Lab Repository Setup

Our labs are distributed and submitted through Github. Sign up an account if you don’t yet have one. Then join the labs assignment system via this link. Choose your student ID in the next page. If you don’t see your ID there, stop (don’t click skip) and contact the lecturer. Then follow the hints on the next page for initial setup of your private labs repo. (Github sometimes fails this step. Retry after a few minutes if it happens.)

You will submit labs by pushing to your private repo (as many times as you want) and we will collect labs for grading after the lab deadline directly from Github. Below are the steps for setting up the lab environment on your laptop. If you are not familiar with the git version control system, follow the resources here to get started.

Clone your repo by typing the following in a terminal:

$ git clone git@github.com:shuai-teaching/dslabs-cpp-<YourGithubUsername>.git  
$ cd dslabs-cpp-<YourGithubUsername>

You will see that a directory named dslabs-cpp-<YourGithubUsername> has been created under your home directory. This is the git repo for your lab assignments throughout the semester. –>

Setting up the upstream repo

The repo you created is currently empty. Add the upstream and sync with it.

$ git remote add upstream https://github.com/stonysystems/dslabs-cpp 
$ git fetch upstream 

Next you will checkout the branch for the lab you are going to solve. For example, for lab 1:

$ git checkout -b lab-raft-solution upstream/lab-raft-23 
$ git submodule update --init
$ git push -u origin lab-raft-solution

Before compile, you need to install needed software dependencies.

sudo apt-get update
sudo apt-get install -y \
    git \
    pkg-config \
    build-essential \
    clang \
    libapr1-dev libaprutil1-dev \
    libboost-all-dev \
    libyaml-cpp-dev \
    libjemalloc-dev \
    python3-dev \
    python3-pip \
    python3-wheel \
    python3-setuptools \
sudo pip3 install -r requirements.txt

Refer to each lab assignment for compiling commands.


These labs are inspired by the C++/Go labs of MIT 6.824.