Developing Communication Concepts through Structured Examples Peter A. Cooper Sam Houston State University cooper@shsu.edu 1. Introduction The CS 463 course is the second in a sequence of three Networks courses (two undergraduate and one graduate) in the Computer Science program at Sam Houston State University. The course covers LAN and WAN technologies including networking topologies, responsibilities of the Physical, Data Link and Network layers of the OSI reference model including framing and error control, IP addressing and routing algorithms. The course includes basic network management issues and has a significant interprocess communications component. It is this last component that is of interest in this paper. CS 463 students are expected to write a sequence of programs during the course of the semester. Initially, the examples were developed as individual responses to concepts and issues that arose out of the theoretical content of the course, in particular transmission error control. However a number of problems arose that dictated a change in the approach to providing the examples, including: Some recent developments including multithreading, RMI and servlets were not being addressed. Students needed greater guidance than was being provided with the individual examples and a tutorial document began to develop. System policies toward orphan processes on university provided equipment made it difficult for servers to be available all the time. Students felt they benefited from being able to run and control sample versions of the assignments and examine the interaction between client and server. As a result, the scope of the examples widened and the need to provider a container environment to manage all the examples became evident. In order to do so the author had the following tasks 1. To manage multiple processes within a single application 2. To provide both local servers for the development stage and remote servers for the testing phase of each assignment. 3. To provide supporting utilities for general interprocess communication concepts including the notion of a communications protocol and an error detection mechanism. 4. To execute external processes including application development environments, text 5. 6. editors, word processors, and the server applications To account for platform differences between target machines To provide a distribution environment that allowed students to install and manage the tutorial application. 2 Assignments The first block of assignments related to the development of increasingly sophisticated clients designed to connect to servers provided by the instructor. In order to do so the students necessarily had to conform to protocols employed by those servers. Assignment 1: String communication. The client communicates a string to an existing server. The server stores all the strings received from clients. Clients can request the strings to be returned. From the first assignment students encounter the following concepts Socket communication Binding streams Simple communication protocols Assignment two extended the first assignment by communicating java objects rather than strings, thus allowing for the development of a packet object containing structured data and methods for managing that data. The server is once again provided for the students. From assignment 2, students encounter: Communication of structured data Need for common definition of payload for both client and server Embedding communication protocols within the payload, in this case, establishing a communication type field within the payload object. Assignment three examines connectionless services through the DatagramSocket and Datagram facilities in Java. The student is required to develop an application for sending STMP mail information to a proxy server (designed by the instructor) that validates the mail and forwards. From Assignment 3 students encounter Connectionless communication Embedding protocols within the payload, in this case structure the byte array payload to identify source and destination addresses and mail subject line. Assignment four extends the DatagramSocket to MulticastSockets. In assignment four, students develop a multithreaded chat application that allows multiple clients to communicate through the Multicast socket. Students encounter: Multicast communication Multicast group management Assignment 5 extends the conceptual work on the function of the Data Link Layer via connectionless communication techniques to include error management principles including: Missing packets Duplicate packets Garbled packets Student implement both stop and wait protocols and sliding window protocols in assignment five. The results of the assignment provide data for examining relative performance levels under a range of conditions. Assignment six examines the server side of client server communication. Students develop socket-oriented servers and the associated slave processes required for reliable and stable systems. In assignment six, students encounter: ServerSockets Blocking processes Slave processes 3. Student Responses Student responses to the tutorial have been generally very favorable. Most comments revolve around four issues, The packaging of the assignments aids students in managing their work. The inclusion of working examples provides a sense of security and gives the student an understanding of what the assignment is supposed to do. The templating of the assignments removes a lot of the ‘noise’ associated with development of applications in an unfamiliar environment and language and allows them to concentrate on the communications aspects of the problem. The early assignments have the user interface and much of the event handling structure in place from the outset. The focus is then on the communication issues. The ability to both control and to interrogate the servers during the development process gives them a clearer idea of what is happening, how the communication-response sequence functions, and, sometimes, where in the socket instantiation and binding process, they are going wrong. 6. For the future It has been said that software becomes obsolete whenever you stop having to maintain it. The communication resources outlined above are a work in progress. The instructor plans to continue to development the tutorial. The following list represents the current priorities: 1. Server reorganization. Currently each server is an independent process. Current development revolves around the design of a single server to service all assignment clients. 2. A number of useful content areas have not yet been developed including: Servlets Remote Method Invocation References [1] Hall, M. (1997). Core Web Programming. Prentice Hall. [2] Chan P., Lee R., and Kramer D. The Java Class Libraries Second Edition vol. 1. Addison Wesley