Virtual Communication Layer
The VCL encapsulates the communication between all components and is responsible to deliver all messages that need to be exchanged. It provides funtions to determine which message has to be received and wrapps Sensor World Messages (basic message type used in the simulation) into a format for sending via the network. The VCL should provide high performance to allow multiple working components like sensors or phenomenons. It simulates the conditions that exist in reality by using the CommunicationSimulation
Main components of the simulation
The interface to the virtual communication layer is a Common Connector which provides methods for receiving and sending messages. Important tasks for the Common Connectors are:
- convertion of the messages between Sensor World Messages used in the simulation and communication system specific formats for the transfer in the messaging system
- messaging mapping: the Common Connector distinguishes messages according to their destinations
Every component in the simulation possesses a link to an associated common connector through its specific connector, which acts as a bridge between the component itself and the communication system.
For the message transport the virtual communication layer relies on the messaging system MantaRay
is a implementation of JMS (Java Message Service - http://java.sun.com/products/jms/
) and will be used to make messaging traffic possible in SensorWorld
JMS provides two different communication model:
- Topics allow one to many messaging, a publish and subscribe principle
- Queues are used for one to one, i.e. send and receive, communication.
During the work in - phase we did some performance tests with MantaRay
. The Result (german only
and shows that MantaRay
offers a good performance. However it is imaginable to change the messaging system for future scenarios. Since the main functionality of the messaging is encapsulated in the Common Connector class it is easily possible to exchange the system.
Every component within the simulation possesses a dictionary to deal with one important task of the virtual communcation layer: mapping the messages depending on the message type to the correct destination. More precisely a dictionary contains information about components in the system and their destinations at every time. The dictionary control component forms the centralised communication , which was chosen because of the difficulty to guarantee that all instances have the same knowledge at every time about the sensor network.
Regarding the differences between sensor, phenomenon and communication it is necessary to differ between 3 types of dictionaries.
- Sensor Dictionary
- Phenomenon Dictionary
- Communication Simulation Dictionary
The functionality for managing and updating these dictionaries to guarantee a consistent view for all components is provided by the dictionary control. It provides methods to publish new dictionaries when a new component registers in the system and accordingly update dictionaries for the others. To react to the different events the dictionary control receives a dictionay message with a specific task for creating/ updating/ deleting the dictionaries and destinations.
Virtual Communication Layer Structure
- VCL - root package for Virtual Communication layer contains the dictionary control and main class of the vcl
- Common package contains all other important classes for the virtual communication layer
- ConnectorPackage - contains connecting classes between components and communication layer
- DictionaryPackage contains classes and messages for management of destinations (topics and queues), especially dictionaries for every component
A short description of UseCases
within the virtual communication layer, contains images an detailed descriptions.