E-Ching Lee and Susan Bibeault
CS 851 - Multicast Communication on the Internet
Term Project Status
8 November 1999

Changes to Hypercast source:

Additions to HyperNode class

  1. add a pool of TcpSockets to the hypernode class (similar to the unicast and mulitcast UDP sockets)

    	socket myTcpSockets[NumNeighbors]; 
    		/*max number of sockets needed will be equal to the number of neighbors of this hypernode.  
    		  sockets will be dynamically created on a as-needed basis.*/
    
    note: initial implementation will always set up a TCP connection to dest, if one has not been established for that dest for this source. (we later intend to improve this by ensuring no redundant channels per source/dst pair regardless of which side initiated the connection).

  2. add the necessary buffers:
    	tcpSocketBuffer[NumNeighbors];
     		/*array of buffers, one for each socket, that hold the data from incoming sockets according to 
    		their nextHop tcpSocket.  (a pool of worker threads will be associated with these buffers, 
    		moving the data to the appropriate sockets).*/
    

  3. a method called by the originating sender, to multicast information to the group
    /* this is called by the external layer by the initial sender */
    /* note: our external class is responsible for chunking the data, this handles the transport of these chunks*/
    
    	reliableMultSend(string reliableChunk) 				      
    
    	{
    	myHyperNode.setChildren(myAddress, Hroot);
    
    	for each chunk in mychunks
    		bufferWrite( message, socketIndex );
    	}
    

  4. method to ensure connections are ready before transmission
    	setChildren(LogicalAddress thisAddress, LogicalAddress Hroot) 
    	{
    	for each child
    		myHyperNode.tcpSocketCheck( /* ip, and port of child */);   // for each child
    		if (socket doesn't exist)
    			myHyperNode.tcpSocketEstablish( /* ip, and port of neighbor */);
    	}
    

  5. /* have a datastructure that keeps track of what has been established */
    	tcpSocketCheck () determines if a socket from source to neighbor exists, returns socketIndex
    

  6. method to connect a new socket
    	tcpSocketEstablish( socketIndex, /* ip, and port of neighbor */ ) 
    
    	{
    	myTcpSockets[socketIndex] = new Socket( /* connection info */);
    		/*establish a socket to destination using java.net.Socket*/
    
            RMThread = new Thread(new tcpReceiver(myTcpSockets[socketIndex], 
                                                   MyPhysicalAddress, 
    					       ChildHyperNode) );
    
            FMThread = new Thread(new tcpForwarder(socketIndex, MyPhysicalAddress, 
    					       ChildHyperNode) );
    	}
    

  7. method to write a message to the output buffer associated with a particular socket (socketIndex)
    	bufferWrite( message, socketIndex )
    	/* 
    	we will need a semaphore to handle race conditions 
    	(this will be called by both reliableMultSend and the thread tcpReciever)
    	*/
    

Additional classes for Hypercast

The following threads will be responsible for handling the tcp connections and transmissions:

  1. thread to read from a socket and write packets to the buffer pool
    	class tcpReceiver implements Runnable{ Socket Input, PhysicalAddress SrcAddress, HyperNode Parent)
    
    	...
    	} 
    
  2. thread to take packets from buffer pool and forward to child nodes
    	class tcpForwarder implements Runnable{...}
    	{
    	- waits until data in buffer for socketIndex
    	-- peeks into reliableChunk to get source
    	myHyperNode.setChildren(srcAddress, Hroot);
    
    
    	for each chunk in mychunks
    		bufferWrite( message, socketIndex );
    	}
    	
    

Note

We are also working on a class that will be called at the application layer, for a group member to initiate a multicast ftp transmission. This will involve breaking the file into chunks and encapsulating the data for reconstruction at each group node. The reconstruction of chunks into f iles will also occur at this layer. Right now, we are concentrating on getting the TCP connections within the hypercube working.