Lab assignments

Lab 1 - MapReduce (Due: 9/24)
Lab 2 - Primary-backup Key-value service (Due: 10/15)
Lab 3 - Paxos (Due: 11/17)
Lab 4 - Sharded key-value service (Due: 11/29)
Lab 5 - Persistence (Due: 12/10)

Acknowledgements

These labs are developed by Robert Morris (MIT 6.824).

Collaboration Policy

See here

Lab Virtual Machine

You are required to do all labs on the class virtual machine (based on Ubuntu Linux). To get the virtual machine running on your personal desktop or laptop, take the following steps.

If you wish to use your own existing Linux-based desktop or laptop instead of the class virtual machine, the labs might just work, but note that we don't have the energy or expertise to debug any problems you might have.

Lab Repository Setup

For each student in the class, we have created him/her a corresponding private lab repository on Github.com. You will submit labs by pushing to your private repo on github.com (as many times as you want) and we will collect labs for grading after the lab deadline directly from Github.com. Below are the steps for setting up your the lab environment on your laptop. If you are not familiar with the git version control system, follow the resources here to get started.

Cloning your lab repo locally

In a VirtualBox terminal, clone your repo by typing the following:

$ git clone https://github.com/nyu-ds/<YourGithubUsername>-golabs-2016.git golabs
$ cd <YourGithubUsername>-golabs-2016
You will see that a directory named <YourGithubUsername>-golabs-2016 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 lab skeleton code are kept in the repo golabs-2016 managed by the course staff. Therefore, the first thing you need to do is to set up your own lab repo to track the changes made in the golabs-2016 repo. In the git world, golabs-2016 would be your "upstream" repo from which changes should ``flow'' into your own lab repo.

Type git remote add to add the upstream repo, and git remote -v to check that golabs-2016 is indeed an upstream for your own lab repo.

$ git remote add upstream https://github.com/nyu-ds/golabs-2016.git
$ git remote -v
origin	git@github.com:nyu-ds/golabs-2016.git (fetch)
origin	git@github.com:nyu-ds/golabs-2016.git (push)
upstream	https://github.com/nyu-ds/golabs-2016.git (fetch)
upstream	https://github.com/nyu-ds/golabs-2016.git (push)

Immediately, you should check if the upstream golabs-2016 repo has additional changes not present in your repo. You can check for and merge in those changes by typing:

$ git fetch upstream
$ git merge upstream/master
You should perform the above two steps periodically to ensure that you've got the latest lab code. We will also remind you to fetch upstream on Piazza if we make changes/bug-fixes to the labs.

Saving changes while you are working on Labs

As you modify the skeleton files to complete the labs, you should frequently save your work to protect against laptop failures and other unforeseen troubles. You save the changes by first "committing" them to your local lab repo and then "pushing" those changes to the repo stored on github.com
$ git commit -am "saving my changes"
$ git push origin
Note that whenever you add a new file, you need to manually tell git to ``track it''. Otherwise, the file will not be committed by git commit. Make git track a new file by typing:
$ git add <my-new-file>
After you've pushed your changes with git push, they are safely stored on github.com. Even if your laptop catches on fire in the future, those pushed changes can still be retrieved. However, you must remember that git commit by itself does not save your changes on github.com (it only saves your changes locally). So, don't forget to type that git push origin.

To see if your local repo is up-to-date with your origin repo on github.com and vice versa, type

$ git status

Handin Procedure

To handin your files, simply commit and push them to github.com
$ git commit -am "saving all my changes and handing in"
$ git push origin 
We will fetching your lab files from Github.com at the specified deadline and grade them.