... | ... | @@ -36,7 +36,9 @@ This should fetch the changes from the original repo and merge them into your fo |
|
|
|
|
|
First merge a copy of your Lab 4 code into diskv/server.go, common.go, and client.go. Be careful when merging StartServer(), since it's a bit different from Lab 4. And don't copy test_test.go; Lab 5 has a new set of tests.
|
|
|
|
|
|
There are a few differences between the Lab 4 and Lab 5 frameworks. First, StartServer() takes an extra dir argument that tells a key/value server the directory in which it should store its state (key/value pairs, Paxos state, etc.). A server should only use files under that directory; it should not use any other files. The tests give a server the same directory name each time the tests re-start a given server. StartServer() can tell if it has been re-started (as opposed to started for the first time) by looking at its restart argument. The tests give each server a different directory.
|
|
|
There are a few differences between the Lab 4 and Lab 5 frameworks. First, we've replaced PutHash with PutAppend. If the `op` argument to the rpc is "Append", then append the argument to the existing value, otherwise, replace the existing value.
|
|
|
|
|
|
Next, StartServer() now takes an extra dir argument that tells a key/value server the directory in which it should store its state (key/value pairs, Paxos state, etc.). A server should only use files under that directory; it should not use any other files. The tests give a server the same directory name each time the tests re-start a given server. StartServer() can tell if it has been re-started (as opposed to started for the first time) by looking at its restart argument. The tests give each server a different directory.
|
|
|
|
|
|
The second big framework difference is that the Lab 5 tests run each key/value server as a separate UNIX process, rather than as a set of threads in a single process. main/diskvd.go is the main() routine for the key/value server process. The tester runs diskvd.go as a separate program, and diskvd.go calls StartServer().
|
|
|
|
... | ... | @@ -91,7 +93,7 @@ Some of the tests will make sure that your implementation is not using too much |
|
|
|
|
|
**Hint:** Make sure all of your key/value servers bring their Paxos log up-to-date periodically. Otherwise, your log may never be garbage collected. One way to do this is to submit an operation to the Paxos library on every `tick` event in the key/value server.
|
|
|
|
|
|
**Hint:** You might find your test are running very slowly. This is fine. It may take up to 170 seconds to finish all of the tests for this lab.
|
|
|
**Hint:** You might find your test are running very slowly. This is fine. It may take up to several minutes to finish all of the tests for this lab.
|
|
|
|
|
|
Don't run multiple instances of the Lab 5 tests at the same time on the same machine. They will remove each others' files.
|
|
|
|
... | ... | @@ -99,7 +101,7 @@ Don't run multiple instances of the Lab 5 tests at the same time on the same mac |
|
|
Make sure that you have done the following:
|
|
|
* COMMENT your code! We should be able to understand what your code is doing.
|
|
|
* Make sure all of your code passes the test cases. Do not modify them, as we will be replacing all `test_test.go` files before grading.
|
|
|
* Add a README.lab1 in 452-labs/src with:
|
|
|
* Add a README.lab5 in 452-labs/src with:
|
|
|
* Your name
|
|
|
* Your partner's name (if you had one)
|
|
|
* How many hours you each spent on the lab.
|
... | ... | |