CS 336/621 PROJECT #2 Due: 7:30pm, Tuesday 04/07/09 The purpose of this project is to acquaint students with the use of IP-multicasting in the design of a client-and-server application that is potentially of interest to a college-student audience. PROBLEM STATEMENT Use the Berkeley sockets API to craft a C++ application program for keeping college students informed about the upcoming deadlines for their assignment-submissions, or for the amount of time remaining to work on a Midterm or Final exam. Use 'deadline.cpp' as a filename for your source code, and allow users to supply three program-parameters as command-line arguments which will be incorporated into the messages that will be sent out to all the multicast-group subscribers by your deadline-server. For example: $ ./deadline CS336 project2 7:30pm-07-April-2009 Your program's notification-message should resemble this format: +--------------------------------------------------------------+ | Deadline for 'project2' in 'CS336' is '7:30pm-07-April-2009' | +--------------------------------------------------------------+ Time remaining is: 18 days, 23 hours, 15 minutes Program author: John Smith Notification-ID: 0000000674 Server hostname: hrn23501.cs.usfca.edu Notice that in an actual version of your program no useful purpose would be served by having such deadline-notices sent more often than once-per- minute (and excessive network traffic can create congestion, which would degrade performance and efficiency). During development, however, it is desirable to send the messages more rapidly (i.e., once every 5 seconds) and in some manner have each message differ from the preceeding message; this is why, for instructor testing, we require displaying an ID-number. In addition, you should also write a deadline-client application program named 'timeleft.cpp' which will 'subscribe' to the multicast group being used by your deadline-server and which will display all messages sent to your multicast-group on the standard output device. This program should be launched without ant command-line arguments: $ ./ timeleft In order to avoid other students's messages on the neterwork interfering with your program development and testing, it is desirable that students should use different IP-multicast group-addresses. The scheme for doing this will be explained during class. WHAT TO SUBMIT Your project-submission has two required parts: hardcopy and electronic. (1) a printout of your source-files ('deadline.cpp' and 'timeleft.cpp'); (2) copies of all of your project's files into your 'submit' folder; Use our 'ljpages' utility-program (under 'System Software' on our cs336 website) to produce your printout on a laserprinter in our classroom or in one of the Harney Fifth-Floor CS Labs -- Be sure your printout shows YOUR NAME as the project's programmer -- and turn in your 'printout' to your instructor's mailbox (Mathematics Office: Harney-222) or in class. ________________________________________________________________________ Allan B. Cruse University of San Francisco Spring 2009