Docsity

Distributed Computing - Project Phase 1: Specification | CS 4253, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
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.
pf3

Partial preview of the text

Download Distributed Computing - Project Phase 1: Specification | CS 4253 and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

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.

  1. Consider the following 4-port communication system, which supports four processes or machines A, B, C, and D. (See schematic below.) Whenever a character is received at the ports (from the communication line), an interrupt is generated and serviced quickly. The processes read the characters out of the communication ports at a given rate before the next character arrives. To provide quick service, consider the following requirements: i) Port A data arrives at V char per unit time, for some V (test for different values) ii) Port B data arrives at X char per unit time, for some X (test for different values) iii) Port C data arrives at Y char per unit time, for some Y (test for different values) iv) Port D data arrives at Z char per unit time, for some Z (test for different values) v) Port A takes q msec to consume a character (test for different values) vi) Port B takes p msec to consume a character (test for different values) vii) Port C takes r msec to consume a character (test for different values) viii) Port D takes s msec to consume a character (test for different values) ix) Local buffer sizes, bufsize, vary from 1 – 80 bytes

Communication

Port C

Communication

Port B

Queues/buffers for

comm

Communication

Port D

Communication

Port A Queues/buffers for

comm