You are here: Teaching, Distributed Systems, Week 4
This week's topic is Interprocess Communication and Distributed Objects.
Internal Page Navigation Links
Learning Outcomes
Upon completion of this week's class and tasks, you should be able to do the following:
- Describe in detail the operation of the TCP and UDP protocols.
- Explain how distributed object systems differ from non-distributed object systems in terms of the challenges faced by middleware protocols.
- Demonstrate how proxy objects are used for referencing remote objects.
- Implement simple client-server applications using Java RMI.
Return to the internal page navigation links
Go to the start of the main content
Go to the site navigation links
Notes and Handouts
- Slides: This is a PDF document with this week's notes, with one slide per page. Use this for viewing on your computer.
- (Handouts: This is a PDF document with this week's notes, with six slides per page. Use this for printing.
Return to the internal page navigation links
Go to the start of the main content
Go to the site navigation links
Tasks
| Task Number | Details |
|---|---|
| 1 | Download the code for this week's class. |
| 2 |
Run the EchoClient and EchoServer applications as follows (as separate processes): java EchoServer 12345 java EchoClient localhost 12345 "Welcome to the House of Fun" This code is in folder 1 and is implemented using the Transmission Control Protocol. It is the same code as we looked at last week. |
| 2 |
Run the other EchoClient and EchoServer applications as follows (as separate processes): java EchoServer 12345 java EchoClient localhost 12345 "Welcome to the House of Fun" This code is in folder 2 and is implemented using the User Datagram Protocol. |
| 3 |
Run the other Peer application as follows (as multiple processes): java Peer 228.1.2.3 12345 "Hello from Peer 1" java Peer 228.1.2.3 12345 "Hello from Peer 2" java Peer 228.1.2.3 12345 "Hello from Peer 3" This code is in folder 3 and is implemented using multicast IP. |
| 4 |
Compile the code for the random number service, which is located in folder 4. Use the following commands: 1. To compile... javac *.java 2. To generate the stub class (if you don't want the source code for the stub class,omit the -keep switch) rmic -v1.2 -keep RandomNumberImpl 3. Start the naming service at a separate command prompt rmiregistry 4. Start the server at a separate command prompt. This will create the remote object in the server process, and bind the remote object to the naming service. java RandomNumberServer 5. Run the client at a separate command prompt. Provide the upper and lower bounds for the random numbers. java RandomNumberClient 0 100 |
| 5 |
Using TCP, implement a server which receives text from a client, along with instructions on what operation to carry out on the text. The operations are U (convert to upper case) and L (convert to lower case). The server must process the messages and return the new text. Provide a client to test the server. |
| 6 |
Using UDP, reimplement the server from task 5 above. |
| 7 |
Using Java RMI, reimplement the server from tasks 5 and 6 above. |
Return to the internal page navigation links
Go to the start of the main content
Go to the site navigation links
Further Reading
- Chapter 5 of Distributed Systems, Concepts and Design (4th Edition), by George Coulouris, Jean Dollimore and Tim Kindberg
- Java Tutorial sections on:
- Jerome H. Saltzer, David P. Reed, and David D. Clark, End-to-End Arguments in System Design, ACM Transactions in Computer Systems 2, 4, November 1984
Return to the internal page navigation links
Go to the start of the main content
Go to the site navigation links
This is the end of the content of this page. Everything that follows is a link to another page.
Site Navigation Links
Teaching
- Distributed Systems
- Advanced Internet Development
- Object Oriented Programming
- Projects
- Examinations
- Universal Design