Welcome to Lab3. The goal of this lab is to take the bin storage that we implemented in Lab2 and make it fault-tolerant.
Lab3 can be submitted in teams of up to 3 people.
$ cd ~/gopath/src/trib $ git branch lab3 $ git checkout lab3 $ git pull /classes/cse223b/sp14/labs/trib lab3 $ $ cd ~/gopath/src/triblab $ git branch lab3 $ git checkout lab3 $ git pull /classes/cse223b/sp14/labs/triblab lab3
Not many changes, only some small things, should be painless.
It does not come with more unit tests (because it is not very easy to
cleanly spawn and kill processes in unit tests). You need to test by
There could be up to 300 back-ends. Back-ends may join and leave at will, but you can assume that at any time there will be at least one back-end online (so that your system is functional). Your design is required to be fault-tolerant where if there are at least three back-ends online at all times, there should be no data loss. You can assume that each back-end join/leave event will have a time interval of 30 seconds in between, and this time duration will be enough for you to migrate storage.
There will be at least 1 and up to 10 keepers. Keepers may join and
leave at will, but at any time there will be at least 1 keeper online.
(If it is the only keeper, then it never goes offline.) Also, you can
assume that each keeper join/leave event will have a time interval of
1 minute in between. When it says "leave" here, it assumes that the
process of the back-end or the keeper is killed; everything in that
process will be lost. Each time the keeper comes back at the same
Index, although all states are lost, it will get a new
Id field in
For starting, we will start at least one back-end, and then at least one
keeper. After the keeper sends
true to the
Ready channel, a
front-end may now start and issue
To tolerate failures, you have to save the data of each key on multiple places, and we will have a slightly relaxed consistency model.
Clock() and the key-value interface calles (
Keys()) will remain the same semantics.
ListAppend() happens, when calling
caller might see the values that are currently being added appear in
arbitrary order. However, after all the concurrent
ListGet() should always return the list with
a consistent order.
Here is an example of an valid call and return sequence:
["b"], note that how
"b"appears first in the list here.
["a", "b"], note that although
"b"appears first in time, it appears at the second position in the list.
ListGet("k")again and gets
ListGet("k")again and gets
ListRemove() removes all matched values that are appended into
the list in the past, and sets the
n field propoerly.
When (and only when) concurrent
ListRemove() on the same key and
value is called, it is okay to double count on
ListKeys() remains the same semantics.
The entry functions will remain exactly the same as they are in Lab2,
but only that the
KeeperConfig might now have multiple keepers.
ErrShutdown), you can assume that the RPC server crashed.
For the ease of debugging, you can maintain some log messages (by
log package, or by writing to a TCP socket or a log file).
However, for the convenience of grading, please turn them off by
default when you turn in your code.
Also, try use a machine different than c08-11 for testing and debugging, this will lower your probability of running into a port collision.
If you are submitting as a team, please create a file called
teammates under the root of
triblab repo that lists the login ids
of the members of your team in each line.
Make sure that you have committed every piece of your code (and the
teammates file) into the repository
triblab. Then just type
make turnin-lab3 under the root of your repository. It will generate a
turnin.zip that contains everything in your gitt repo, and will then
copy the zip file to a place where only the lab instructors can read.
Last updated: Sat Apr 26 19:31:03 -0700 2014 [validate xhtml]