Embed
Email

Communication

Document Sample

Categories
Tags
Stats
views:
0
posted:
11/1/2011
language:
English
pages:
8
O.C.E.A.N. Project

OCS (Ocean Communication System)

Component Specification



This document is to be maintained as the official reference specification for the OCS

(Ocean Communication System) component of the OCEAN system.



Component's Role in O.C.E.A.N. System Architecture

This module specifies a standard set of primitives that are to be provided by the OCS

in order to maintain a functional OCEAN Node.



The role of the Communication system can be illustrated with the following

functionalities:



1. It is the responsibility of the communication system to send and receive

messages to and from the Ocean Node.

2. It is the responsibility of the communication system to provide secure and

non-secure communication desired by the security system.

3. The communication system should have the ability to broadcast the Ocean

Node’s availability on the network.

4. The communication system should be able to multicast messages to the

selected node list given by PLUM

5. The communication system should be maintaining statistics that can be

used later on by the node operator and configuration operator API.

6. The communication system should have the ability to block/unblock traffic

from a node specified by the node operator and configuration API.



Functional Needs



The main service that is required by ONS is to maintain a Naming Policy and allow other

modules to follow it easily.



1. Generic needs of the modules

a) All the modules will access the communication component through the security

system. It is the responsibility of the security system to decide on what security

primitives should be used and instruct the communication system to employ a

secured communication or not.

b) All the modules rely on communication system to stay on the network and to

communicate with each other.



2. Needs of the security system

a) Secured/unsecured communication primitives

b) Needs to exchange digital signatures and certificates

c) Encrypted/Decrypted data to pass through

3. Needs of the Auction system

a) The auction system sends the auctioning advertisement to the nodes selected by

the PLUM. This functionality of the Auction System requires that we have a

multicast capability in the communication system, because now there is a need to

communicate with all the nodes selected by the PLUM component. The data from

the auctioning system would be primarily XML (text messages).

b) It also needs to communicate the information from the concerning nodes to the

auctioning system.



4. Needs of the Negotiation system

a) The negotiation system negotiates with all of probable traders given by the

auction system. So there is a need to communicate with all these traders. The data

from the negotiation system would be primarily XML (text messages).



5. Needs of the Task spawning and Migration system

a) After negotiation, the TSM would spawn and migrate the job to the node selected

by the negotiation system. The data to be transferred for the TSM would be

Objects.



6. Needs of the Node configuration and Operator API

a) The Node configuration and operator API would require that it can block/unblock

selected nodes from sending traffic to the Ocean Node.

b) The node configuration and operator API would also require detailed statistics to

make decisions.

c) Have a configurable maximum limit on the bandwidth that can be used by an

Ocean node.



7. Needs of the Communication System at other Ocean Nodes

a) Acknowledgements should be sent to the communication system who initiated the

communication.





Functional Requirements



All the functional needs require that the communication system requires sending

and receiving primitives for text and binary data for unicast, multicast and broadcast. It

also requires support for secure and non-secure communication. The OCS should

maintain a list of parameters, which should be maintained for statistics (e.g. packets in,

packets out, bandwidth used for different purposes etc).



Below are the requirements on the OCS. After each one, we indicate which need (or

other requirement) that specific requirement addresses.



1) The OCS should be constantly listening on the network for incoming packets. (Need

1a and 7a)

a) It should be able to discriminate based on the packet received on the network

what type of packet it is i.e. the OCS should be able to discriminate if the packet

is meant for PLUM / Auction / Negotiation / Security components. This can be

identified by the name that is passed by the naming system.

b) It should respond to incoming packets with acknowledgements. There should be a

time out mechanism also.



2) The OCS should provide secure and non-secure primitives for communication. (Need

2a)

a) The component should provide SSL and normal communication based on the

request from the security system.





3) Provide primitives for text and binary data communication. (Need 2b, 3a, 4a, and 5a).

a) For Auction and Negotiation systems, the component should provide primitives to

send and receive data in text.

b) For TSM and security, primitives are required to send and receive data in binary.

4) Store statistics for the node operator and configuration API. (Need 6a, 6b and 6c)

a) Store the statistics on bytes received from and written to network.

b) Maintain a list of blocked nodes.

c) Have a configurable maximum limit on the network bandwidth that can be used

by Ocean messages.





Interface Specification



Statistics:

Communication module keeps statistics related to network, which will be used by

PLUM for making decisions regarding the list of nodes to be kept. These stastics also

allow easy network monitoring. Node operator can configure them to adapt to the

chaging networks.



Here’s the interface for Statistics



Public class OCEANStatistics {

Private PacketStats packetStats; // Statistics about number of packets

// transmitted, lost etc.

Private NodeStats nodeStats; // Statistics about a node. This one contains

// Statistics about a particular node

// While the session in place these stats are

// updated. These stats reflect the statastics

// of the node to which present node is

// talking to

Public PacketStats getPacketStats();

Public NodeStats getNodeStats();

}

Public class PacketStats {

Private int numPacketsSent; // Number of packets sent

Private int numPacketsReceived; // Number of packets received

Private int numPacketsLost; // Number of packets lost



Public int getPacketsSent();

Public int getPacketsReceived();

Public int getPacketsLost();

}



Public class NodeStats {

Private int responseTime; // Specifies the average response time from the node

Private int numHops; // Estimated number of hops that the node require

// This may be updated as more sessions are created



Public int getResponseTime();

Public int getNumHops();

}



The Network Object Class:

The following class is defined for the data that gets exchanged by a OCEAN

sender and receiver or vice versa. This encapsulates the network object that is passed

between different OCEAN Nodes



Public class OCEANNetworkObject implements Serializable {

Private String objectType; // specifies the object type that is sent. This contains

// the string representation of the class to which data

// belongs.

Private Object data; // This is the serialized object given by security or some

// higher level components

Private OCEANName dstName; // It is the destination to which data to be

// sent



Public OCEANNetworkObject createNetworkObject

(OCEANName dstName, Object data);

Public OCEANName getOceanName();

Public Object getData();

Public String getObjectType();

}



The Main OCEANComm class:

This class represents the services provided by Communication module. Other

modules create a OCEANNetworkObject and call functions of this class for transporting

the object to the other side.

Public class OCEANComm implements MessageTypes{

Private int msgId; // Specifies a message id for identification

Private int msgType; // specifies message type. It can have one of the values

// defined in the interface MessageTypes

Public send( int msgType, OCEANNetworkObject networkObject);

Public receive(OCEANNetworkObject networkObject);

}



Public Interface MessageTypes {

Public Static final int UNICAST = 100;

Public static final int BROADCAST = 101;

Public static final int MULTICAST = 102;

}



The Network Receiver Thread class:

This class represents the receiver end of the communication module. It is running

as a thread and waiting for any data on the network. Once it gets the data it might spawn

multiple threads and receive data and pass it to upper layers.



Public class OCEANCommReceiver implements Runnable {



Private OCEANNetworkObject networkObject;

Private OCEANName name;





Public run(); // This thread will be waiting for network input and finds the

// destination module to which the data has to be sent. This

// information is provided by the OCEANName object in the

// networkObject

}

Upper modules



Parse OCEANName Object

and pass data to upper module









OCEANComm Persistent Object



run()

.

run()

receive();

. .

. receive();

run()

end . .

. receive();

end getData();

getName();

passData();

.

end

-End12

Broadcast



*

-End24

-End11 *





Auction * «uses»

-End9

*









Text Messages

«uses»

Negotiation

-End13

* -End18

Acknowledgements «uses»



*



-End15 «uses»



TSM

«uses»

*









-End17 «uses»

-End16

-End22

*

OCEAN Communication Unicast

*

* «uses»









-End23 Object Passing

*

-End21

-End19

«uses»

Security * -End10

* *

-End14

*

-End20



Multicast

*









Use Case Diagram

OCEAN









OCEAN::doc OCEAN::utils









OCEAN::core

OCEAN::naming OCEAN::communication









«interface»

Serializable









OCEANStatistics

-packetStats : PacketStats

-nodeStats : NodeStats OCEANNetworkObject

+getPacketStats() : PacketStats -objectType : String

+getNodeStats() : NodeStats -data : Object

-dstName

-End2 -End4

* +getOCEANName() :

-End1 * *

+getData() : Object

+getObjectType() : String

+createNetworkObject(in dstName, in data : Object) : OCEANNetworkObject

PacketStats

-numPacketsSent : int

-numPacketsReceived : int * -End5

* -End7

-numPacketsLost : int «interface»

+getPacketsSent() : int MessageTypes «interface»

+getPacketsReceived() : int Runnable

+getPacketsLost() : int



-End3 *





NodeStats

* -End8

-responseTime : int * -End6

-numHopes : int

+getResponseTime() : int OCEANComm OCEANCommReceiver

+getNumHops() : int

-msgID : int -NetworkObject : OCEANNetworkObject

-msgType : int -name

+send(in msgType : int, in networkObject : OCEANNetworkObject) : void +run() : void

+receive(in networkObject : OCEANNetworkObject) : void



Related docs
Other docs by Stariya Js @ B...
Info pack - Level 1
Views: 0  |  Downloads: 0
f1098746053
Views: 0  |  Downloads: 0
file_116
Views: 3  |  Downloads: 0
Trade
Views: 0  |  Downloads: 0
McKenzie_Law.April
Views: 0  |  Downloads: 0
110208attachmentEndingtheUseofCoalCampaign
Views: 0  |  Downloads: 0
Titration Curve _CBL_ _AP_
Views: 0  |  Downloads: 0
FSSC cover note
Views: 0  |  Downloads: 0
link_130115
Views: 0  |  Downloads: 0
Index_of_Supplementary_Tables_and_Dataset
Views: 0  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!