Practicum in Trading Systems Development: Lab 3

Due:           Thursday, July 12, 2012, by 5:00 PM


PURPOSE AND RATIONALE

The purpose of this lab is to let students gain specific experience with basic UDP multicast socket programming of a message sender and receiver.  The goal of this lab is to provide students with the foundations necessary to understand the dynamics of multicasting communication that will be fundamental in many of the components in the UCEE architecture.

NB:  If you are not a CSPP student and are in need of a CS Cluster login ID (if you don't know what this is you are in need of one), contact the TAs immediately so you can get set up with a cluster login ID for the labs.  This course cannot be conducted without a CS Cluster login ID.  If you already have a UofC CNET ID, you can (and should) manually apply for a CS cluster ID here.


PRIMARY RESOURCES:

You should refer to relevant sections of the man pages for assistance for this lab, in addition to materials in the assigned chapters from the primary texts for this week (per the syllabus).

You should ssh into the cluster to perform all lab activities.

Make sure you have read this week's assigned reading. 

README

  1. If you are not in our course email list, please subscribe to the cspp51025 email list here:  http://mailman.cs.uchicago.edu/mailman/listinfo/cspp51025

  2. Turn the lab assignment as a tarball in by email to the TA (cc'ing the instructor) by the due date above.

  3. For printing out your documents, you might find the following commands useful during your year(s) in this department:

    1. lpr -  off line print. Note that this command is called when you print from acroread  (for .pdf files) or gv (for .ps files)
    2. lpq - shows the printer queue
    3. lprm - removes jobs from the printer queue
    4. enscript - converts text files to PostScript (useful when you want to print out text files)

  4. Make sure you have read the Submission Guidelines for submission.

LAB 3

This lab will introduce the multicast API in Linux.  In this lab, you will create a multicast sender and a multicast listener, then demonstrate their operation.

The multicast sender will send out a 32-bit message containing the time in UNIX format (seconds since the epoch) as returned by the time() call. This information will be sent out on the specified multicast address and port once per second.  The multicast address and the port should be passed in on the command line of the sender and listener.

The multicast listener will listen for multicast data on the specified address and port. It will parse the received data and display the decoded timestamp in human readable form, along with the current time. (It is not expected that this information will be terribly interesting because the time format quantum is the second.)

The multicast address and port must be specified on the command line; among other choices, the getopt() or getopt_long() calls may be used to assist in parsing the command-line arguments.  Your solution should be able to run two or more simulateous registered receivers both listening to and receiving messages from the sender.

Turn in a tarball containing the multicast sender and listener source code, along with an appropriate makefile, and sample output by the due date.

More information:

Spencer's Socket Site
Beej's Guide to Network Programming
Developerweb Unix Socket FAQ
Richard Steven's Home Page
BOOST Sockets
 

Mark Shacklette