| Task | Deadline |
|---|---|
| Assigned: | Monday, March 22nd, 2004 |
| Choose teams by: | Friday, March 26th, 2004 |
| Checkpoint due by: | 23:59 PM EDT, Friday, April 9th, 2004 |
| Implementation and final report due by: | 23:59 PM EDT, Friday April 16th, 2004 |
You are to design and implement Chord505, a simplified Distributed Hash Table based on Chord. You have been provided with a version of DHT simulator and one of the simplest DHT lookup algorithm implementation, the Ring. This way you can concentrate on designing and implementing your protocol rather than framework issues.
A DHT lookup algorithm is the foundation of all structured peer-to-peer systems. It provides support for one operation: given a key, it maps the key onto a node. Your goal is to design a scalable lookup algorithm and implement it in the given simulator.
Your main reference should be chord, which provides a relatively simple lookup algorithm. It has the provable scalable property: A lookup only traverses O(log N) nodes. Your design is suggested to be based on chord.
Even with such a reference, a real DHT implementation could be complicated: The nodes can join and leave simultaneously or fail silently; The network could be partitioned. In general, handling byzantine faults is hard. In this project, you do not have to deal with those "churning" effects. In particular, you only have to handle sequential node join and leave. When a node leaves the DHT, it will have the opportunity to notify other relevant nodes about the event.
Students should form programming teams. A programming team should have no more than three people, there will be no exceptions. Notify the TAs by email (cis505@seas.upenn.edu) of your groups. Specify the names and email addresses of the members in your programming team. If you're having trouble forming a group, post a note to the class newsgroup.
Each programming team is required to write a complete implementation of Chord505 DHT. Code sharing between teams is prohibited. If a team contains more than one people, they will receive equal credits whatsoever. (Read as do not complain about your partners.) We do not have design teams in project 2.
We suggest that you stick to the given simulator, but you are free to make any additions that you think improve the simulation process, as long as
src/ and the
compiled classes in folder bin/ src/ and the
compiled classes in folder bin/report.{ps,pdf} as your final report. M$ Word format will
not be accepted! You can download our implementation of the simulator from here: (chord505-0.3.tar.gz).
The tarball contains two packages, algorithm and simulator. Your main
focus is to implement a Chord505 class that implements the interface
algorithm.Protocol. The algorithm.Protocol
has following methods:
| method | description |
|---|---|
| join | a new node joins the DHT |
| leave | a node currently in DHT leaves |
| update | notify events between nodes |
| stablize | fix broken/inefficient pointers/fingers |
| lookup | find a node that is closer to the one that is responsible for the given key |
There is already a working implementation of a DHT,
algorithm.Ring. It is an example of implementing the DHT
and using the whole simulator. The algorithm is extremely simple: each
node maintains a pointer to its successor in the virtual ring. If the
node does not have the responsibility to the key, it will point
to its successor for further lookup. The lookup complexity is O(N) in
the virtual network.
simulator.SimpleTest contains an example of using the
Ring implementation and the simulator. The real get and
put hash table interfaces are implemented by the class
simulator.Node. It will call the underlying lookup
protocol to find the correct node and get/put key, value pairs. Please
read the doc and the source code for details.
An elegant Chord505 basic implementation do not have to modify the existing
source code. Subclassing algorithm.Protocol and
simulator.TestCase should suffice.
The project should be submitted electronically. We use the "turnin" command on Eniac for project 2. Only one member of a team need to submit. Please do NOT submit multiple copies.
Checkpoint submission:
turnin -c cis505 -p checkpoint chord505.tar.gz
Final submission:
turnin -c cis505 -p final chord505.tar.gz
Note that you have to run this command on Eniac (red.seas or blue.seas). Type turnin -h for more information.
caveat on resubmission: Re-run "turnin" will
completely overwrite your last submission, including files and
timestamps. For example, if you have submitted something before the
checkpoint deadline, and resubmit something after the deadline with
-p checkpoint rather than -p final, you will
be considered as having a late checkpoint submission and be penalized
for your lateness.
| Host/type | Location |
|---|---|
eniac, seas, red, blue | javac in /pkg/j/j2sdk1.4.0/bin |
gradient | javac in /pkg/j/j2sdk1.4.1_01/bin |
halfdome, m100d-lin?,and other SEAS Linux systems | javac in /usr/java/j2sdk1.4.1_01/bin orjikes in /home8/c/cis505/local-linux/bin |