
CS 4253 – Distributed Computing
Project Phase 1 - Specification
Due: October 9, 2007
PART I:
Assume the following scenario:
Two machines are independently running two processes, one on each
machine, which are communicating in solving a common problem under the
following protocol.
1. Machine A’s process receives streams of characters from a file, one
character at a time.
2. The process on machine A buffers the streams locally and, when it has
received a maximum of 80 characters (or until a carriage-return
character or end-of-line marker is received), it then sends the buffer
content to Machine B’s process.
3. Machine B’s process simply displays the stream it receives from
Machine A, and sends an acknowledgement back to A’s process to
trigger the next stream.
Consider A as a Client and B as a Server.
The above scenario describes a simple system for two communicating
processes.
Using Java’s facilities and API for networking and communication, e.g.,
Socket class for TCP protocol or
DatagramSocket class for UDP protocol
Remote object ‘Remote’ Interface
java.io.Serializable Interface
java.rmi.server, including interfaces for remote method invocation
RemoteServer class
UnicastRemoteObject class or MulticastRemoteObject class
Write a simple program to realize the above scenario using only two
computers (NT, Linux, etc). You may research any java environments or
resources that will be helpful. (For Linux/C implementation, a sample socket-
code is attached for your perusal.)
PART II:
Extend or modify the basic solution in PART I to solve the following problem.