tar cvf proj1.tar foo.c foo.h
Here, proj1.tar is the archive file, and foo.c and foo.h are your source files.
Q1. Can I implement the project 2 on Windows environment?
You might but I don’t recommend. You must show that you can start your program on at least 5 different machines at the same time.
Q2. Where can I get the program for starting remote processes?
Here it is. Copy the tar file to your working directory and extract files as follows:
tar xvf StartRemotePeers.tar
Then read the README.txt file for getting how to use it. Please note that this program was only tested on CISE SunOS environment. If you use another environment, for example, linux environment in CISE or other environments not in CISE, it is not guaranteed to work properly. It is your responsibility to adapt this program to your testing environment.
Q3. Can I assume that the subdirectories for peers have already been set up before I run the peer processes?
Yes. You may create subdirectories with proper names before you run your peer processes. That saves you a burden for managing subdirectories in your program.
Q4. When is a ‘have’ message used?
A 'have' message should be sent to all its neighbors by a peer whenever it receives a new piece from other peers. Actually the function of 'have' messages is similar to that of 'bitfield' messages in that both messages are used to notify neighbors which pieces it has. Note that a ‘bitfield’ message is only sent as the first message right after handshaking is done when a connection is established. Note also that a 'have' message contains the existence information of only one new piece.
Q5. How many TCP connections should be used between two peers?
Only one TCP connection should be used for a pair of peers. It means that a peer maintains only one socket per each neighbor peer. However, you will have two threads associated to the socket, one for getting messages from the neighbor peer and the other for sending messages to the peer. The socket should be shared by those two threads.
However, if you already decided to use more than one TCP connection for a pair of peers, it is fine. We won’t restrict the number of TCP connections for a pair of peers this semester.
Q6. How can I submit the final project and how will the demo be held?
Please read all the directions carefully.
1. Compress your project files into a zip file or a tar file.
2. The zip file should contain all source files, any files needed to compile your program, and any files needed to run your program. Your zip file should not contain executable files or object files which can be generated by compiling your program. Your zip file should also contain files for starting your remote processes. Please add them even though you use the given files from the course web site without changing anything. However, your zip file should not contain Common.cfg, PeerInfo.cfg, and any other sample files for testing.
3. Submit your project file on E-learning system before Aug. 1, 2008 11:59 PM. You can submit it at the menu “Project #1” on Assignments page.
4. No late project will be accepted.
5. The demo will be held at CSE 309 (or to be determined). You should come 15 minutes before your scheduled time.
6. At the demo, your group will be given the zip file that you already submit before the demo. You will be also given Common.cfg file, PeerInfo.cfg file, and a sample file for distribution. You will be asked to compile your program and to get ready for running it. You will have only five minutes for the preparation. Please make sure that it is your responsibility to set up the environment to demonstrate your program. Note also that you should not change your source codes at this time.
7. For the demo, you should have at least 120Mbytes free disk space. We are using a sample file of about 20Mbytes. The piece size will be 16384 bytes. The required free disk size actually depends on how you handle partial temporary files. You may need more than 120Mbytes. Please make sure that you have enough free disk space for your program to distribute a 20Mbyte-file on a peer to four other peers.
8. It is very important to meet the requirements described in the implementation specifics for getting high points. Especially ‘writing logs’ part is very crucial one in this project.
9. EDGE students should also submit a document to describe how to compile your program, how to run it, and the environment where the program runs. You should explain them as detail as possible so that we can run your program. On-campus students don’t have to submit any document about your program.
Back to the course home page or to the lectures page