Chapter 3 The Problem of Measuring
3.4 The NaradaBrokering Transport Framework
In the distributed NaradaBrokering environment, there could be different types of underlying protocols deployed for communications when an event travels on an end- to-end channel across multiple broker hops or links. The transport framework aims to abstract the operations which will enable efficient communication between nodes. These include support for:
• Deployment of specialized links for specific data types
• Negotiating the best available communication protocol between two
nodes.
• Responding the changing network conditions which will allow
adaptability in communications.
• Accumulating performance data measured by different underlying
protocol implementations.
There are important components that make up the transport framework. The
TransportHandler provides an interface between the protocol and transport layers at a
node. The TransportHandler manages all registered LinkFactorys. The LinkFactory
is responsible for enabling communications for a specific type and managing the Links created in the process. The Link implementation can monitor and report performance
data in a specialized class called LinkPerformaceData. Figure 4 provides a brief
overview of the main components in the transport framework. We will explain these main components in detail now.
Figure 4 : Transport Framework: Main Components.
3.4.1 Link Structure
Operations that need to be supported between two communication endpoints are encapsulated within the Link primitive in the transport framework. A Link is an
abstraction that hides the details regarding communications. An implementation of the Link interface can incorporate its own handshaking protocols for setting up communications. Links can perform the following functions.
• Security Information: it can report whether the communication over the link is
secure and what type of security/encryption mechanism is used.
• Failure detection: It can check the status of the underlying communication
mechanism and report the communication losses.
• Garbage Collection: It collects the resources associated with the concept of
alternate links.
• Transport protocol migrations: A link allows the specification of a constraint
and the link type that communications migrate to, when the constraint is satisfied.
• Performance measurements: Each implementation of the link interface can
measure a set of performance factors.
3.4.2 Administrative Link
As explained above, different broker nodes may incorporate support for link implementations with different underlying protocols in distributed NaradaBrokering setting. The problem is that there is a need for information exchange between the nodes before determining the possibility of communications over different protocols for them. This information, which could be used to dynamically load services, can be encapsulated in an URI. This information can be exchanged over an
AdministrativeLink. The information that is exchanged over an AdministrativeLink is related to supported protocols such as hosts, ports, multicast group etc.
Communications over AdministrativeLink is generally HTTP based which is
LinkNegotiators are used by the AdministrativeLink to determine the best available link to create between the nodes. For this purpose, they use the information that is exchanged over the AdministrativeLink.
3.4.3 Link Factory
A LinkFactory is responsible for managing the links that are created in the broker. These links can belong to different communications type. Link factory provides three different capabilities. First, it manages the creation of links (inbound and outbound) from and to other nodes. For example in the case of a NIO TCP
communication link, The NioTCPLinkFactory needs to setup a ServerSocket which
allows NIO TCP links to be setup based on the socket connections that are enabled by the ServerSocket.accept(). Second, it manages the migration of communications from
a different communication protocols. Each implementation of the LinkFactory
provides a list of communication types, for which, it can manage the migrations. The last capability is that the LinkFactory can enable or disable failure detection and performance monitoring, and change the measurement intervals associated with these important functions on managed Links.
3.4.4 TransportHandler
The TransportHandler interface is used by protocol layers to invoke methods
for communications with other NaradaBrokering nodes. The TransportHandler
manages LinkFactorys and Links. A reference to the TransportHandler is passed on
Each link uses the TransportHandler interface to report data streams, loss of communications and requests to migrate to a different communication protocol. The
TransportHandler deals with these notifications within the transport layer and also sends necessary notifications and encapsulated data to the protocol layer.
The TransportHandler also handles the creation of alternate links which is an important feature of NaradaBrokering to enable efficient communications. It is possible for an event routing protocol to specify the creation of alternate
communication links while routing events/messages between two NaradaBrokering brokers. For example, an RTP event router, in the protocol layer, could request an RTP based Links for a certain period of time for communication. There is a mechanism that allows you to create a timer for specific links to keep them alive for a certain period of time. After this timer expires the link is destroyed and the necessary garbage collection of all the resources related to link is done.