CS 342 Lab 8: Distributed Server



Lab date: 4 April-27 April 2000
Due date: Friday 28 April 2000 11:59 pm


Use your sort program from Lab 7 to implement a distributed sort. Measure the performance of your sorter, both on a single machine and distributed.

NOTE: you can work either alone, or in groups of two or three (maximum!) students for this lab. If working in a group, the group submits only one lab report, which must show the names of all group members. All group members will receive the same grade for this lab.


  1. Review your Lab 7.

  2. Review the code in tcpserver.cpp and tcpclient.cpp.


  1. Measure the performance of your sorter, using the best sort algorithm that you added in Lab 7.

  2. Implement distributed sort.

  3. Measure the performance of a distributed sort. If you're working alone, a single comparison between one machine and a distributed sort is sufficient. If you're working in a group, your group must study the tradeoff between number of machines and sort time.

  4. NOTE: Those working in groups will have to demonstrate their distributed sorts. (Either during lab session, or during reading week.)

  5. Optional: use Command pattern to structure your remote requests. It's cool, and will probably save time overall if you do it that way. But, it takes more up-front planning.

Obtaining the Lab 8 distribution:

At a Unix shell prompt, type ~cs342/bin/lab8. That will copy a Makefile, readme, and the tcpclient/server example code to a new lab8 subdirectory. You can then cd lab8 and copy your lab7 code.

What to Submit:

By the due date, submit all source files from your final solution. Include a laboratory writeup file (named readme) documenting what you did to satisfy this assignment. readme contains a minimum list of sections that you must provide. (Please replace the comments in [] with your descriptions.) These files will be submitted automatically when you execute the command:
make turnin
NOTE: there is a Makefile target that allows you to test what you are going to turn in:
make test_turnin

It places the output that will be turned in into the TEST_TURNIN directory. You are responsible for using make test_turnin, and verifying that the files that you will submit are correct.

Please see the Lab 4 assignment for notes on using the History class to help track and count instantiations and deletions of an instrumented class.

Please see the Lab 2 assignment for hints on compiling templates.

CS 342 newsgroup