|
In one-way communication mode, the Distributed Mediation Servers establish communication with the Central Server and transfer the data to the Central Server enabling remote management. This type of communication is one-sided and all the communication-related activities is performed by the Distributed Mediation Server at the remote site. Data is transferred to the Central Server at regular intervals by dynamically creating the connections when necessary.
When there is a need for a reliable communication between the Central and remote servers, for reasons, such as scalability, two-way communication is useful. In this mode, data is transferred by both the Central Server and Distributed Mediation Server and the read and write operations take place as and when there is data to be transferred.
One-way communication can be achieved by assigning "1" to the Mode parameter and providing the name of the implementation in the InitImpl parameter in CommunicationInfo.xml present in the <DMS Home>/conf directory.
In this mode, the connection with the Central Server is established only at the configured read and write intervals. Two buffers are initialized at the Distributed Mediation Server to function as the high-priority and low-priority buffers, and the data that need to be transferred to the Central Server are stored in the respective buffers based on the priorities assigned to the data. The data buffer files are saved in highpriority and lowpriority directories present in <DMS Home>/state/communication directory, before being transferred to the Central Server.
The default implementation for this mode is XML over HTTP.

The following is a sample entry for one-way communication at the Distributed Mediation Server:
|
<CommunicationInfo> <Communication> <MainProps Mode="1" InitImpl="com.adventnet.nms.extranet.remote.communication.http.probe.HTTPProbeCommInit" MaxBufferSize="25" WriteInterval="300" ReadInterval="5" /> <UserProps> <Property Name="Servlet" Value="/servlet/com.adventnet.nms.extranet.remote.communication.fw.fe.RegionalListener" /> </UserProps> </Communication> </CommunicationInfo> |
Two-way communication can be achieved by assigning "2"
to the Mode parameter and providing
the name of the implementation in the InitImpl
parameter in CommunicationInfo.xml present
in the <Server-Home>/conf
directory of the respective servers.
The CommunicationInfo.xml file is present at the Distributed Mediation
Server and the Central Server with respective implementation class details.
In this mode, the connection between the Central Server and the Distributed
Mediation Server is established after the Distributed Mediation Server
is initialized. Data buffering
and priority concepts present
in one-way communication are applicable to two-way communication also.
The default implementation for this mode is XML
over TCP.

By default, one-way communication mode is enabled. During installation of the Distributed Mediation Server, the default port for communication with the Central Server is 9090. For enabling two-way communication, the port for two-way communication is specified in the NOCServerPort parameter in <DMS Home>/conf/ NOCServerDetails.xml file. This port number must be the same as ListenPort value given in CommunicationInfo.xml present in the <Central Home>/conf directory.
The following is a sample entry for two-way communication at Central Server:
|
<CommunicationInfo> <Communication> <MainProps Mode="2" InitImpl="com.adventnet.nms.extranet.remote.communication.tcp.server.TCPServerCommInit" MaxBufferSize="25" WriteInterval="-1" ReadInterval="-1" /> <UserProps> <Property Name="ListenPort" Value="7777"/> </UserProps> </Communication> </CommunicationInfo> |
|
|
Note: Two-way Communication in FE Server: If the FE is installed as a separate component (distributed), the entry in the configuration file in the FE will be the same as in the Central Server. |
The read and write intervals can be configured for optimal usage depending on factors such as mode of communication and network usage. The following table illustrates the possible configurations for the read and write intervals and the expected behavior:
|
Interval |
If Value Is 1 or Above |
If Value Is 0 or -1 |
|
write |
The write thread will be invoked after the specified interval independent of the mode of communication. |
In one-way communication, the write thread is invoked after the default write interval which is 300 seconds. |
|
In two-way communication, the write thread is invoked only when data is present in the buffer. | ||
|
read |
The read thread will be invoked after the specified interval independent of the mode of communication. |
In one-way communication, the read thread is invoked after every default write interval (5 seconds). |
|
In two-way communication, the read thread will be waiting for data to be written on the other end. This is handled by the protocol-specific implementation, if not handled, the read thread enters into a loop, trying to read data and returning null. |
Steps to Switch Communication Mode
From one-way to two-way
The default communication mode is one-way. To change to two-way mode,
Open the CommunicationInfo.xml in /conf directory of Central Server and DMS.
Un-comment the entry for Mode2 which is commented by default.
Comment the entry for Mode1
Restart the servers
From two-way to one-way
For reverting to one-way mode,
Open the CommunicationInfo.xml in /conf directory of Central Server and DMS.
Un-comment the entry for Mode1 which you commented.
Comment the entry for Mode2
Restart the servers
|