CMSC 417-0101 

PROJECT 2 -- PRELIMINARY

October 11, 1999

Due: October 31, 10:00pm (via submit)


Introduction

This project deals with achieving reliable data transfer over LRD network channels. (Recall that an LRD channel can lose, reorder, and duplicate messages in transit, subject to a maximum message lifetime). You are provided a specification of the data transfer service and a specification of the LRD network layer service. You are to implement a data transfer protocol that provides the data transfer service using  the network layer service.

Specifically, the project consists of two interacting programs, a Source and a Sink. The Source consists of three threads: SourceTester, _417_SourceTransportEntity, and _417_NetworkEntity. The Sink consists of three threads: SinkTester, _417_SinkTransportEntity, and _417_NetworkEntity. You are to implement _417_SourceTransportEntity and _417_SinkTransportEntity. You will be provided the others. SourceTester and SinkTester are the users of the transport entities. The pair of 417_NetworkEntity provide LRD channels.

Network Layer Service

You are provided a class called _417_NetworkEntity that is used by transport entities to communicate with each other, instead of the usual sockets.

Class _417_NetworkEntity has the following interface:

Transport Data Transfer Service

You are to implement two classes, _417_SourceTransportEntity and _417_SinkTransportEntity, that provide reliable byte stream transfer. These classes can interact only via the LRD channels defined above.

Class _417_SourceTransportEntity must have the following interface:

Class _417_SinkTransportEntity must have the following interface:

Consider the execution of a corresponding pair of Source and Sink entities. At the source, the activity consists of a sequence of Initialize, Send, and Acked calls (issued by SourceTester).  At the sink, the activity consists of a sequence of Initialize and Receive calls (issued by SinkTester). Assume that for every Initialize at the Source, there is a corresponding Initialize at the Sink and that until the Source does not do a send before the Sink does its initialize. Given this, your protocol must ensure that between any two successive initializes, the aggregate byte stream sent by the source user (i.e., concatenation of the byte streams in the Send calls) is equal to the aggregate byte stream received at the sink user (i.e., concatenation of the byte streams in the Receive  calls).