The ESB dynamic routing strategy in the low bandwidth network environment

: The ESB is a SOA infrastructure, and provides a loose coupling way of system integration for the Enterprise. The message routing is the core function point of the ESB. This paper firstly introduces the basic concept of SOA and ESB, then introduces the main way of dynamic routing, putting forward the dynamic routing strategy of the ESB which is suitable in the low bandwidth network environment. Finally it is tested in the theory and reality, analyzing the efficiency and reliability of the strategy.


Introduction
SOA (Service Oriented Architecture) puts forwards a new component model.It communicates with different functional units (services) of the application through open standards of neutral component interface, realizes the loose coupling between the Service [1] .However, the emergence of SOA also brings a series of technical challenges, such as information transfer between services, message format match, service registration mechanism, etc.
As an SOA infrastructure, the ESB effectively solves the above problems [2] .The ESB is the core and foundation of SOA [3] .The core functions of ESB mainly include: message routing, format conversion (including message content and the agreement), message enhancement, service regulation and security [4] .
As a container of service integration, The ESB plays the more and more important role in integration of the enterprise information system.As enterprise business processes becomes more and more complex, the number of service nodes is also increasing, and the enterprise internal network environment becomes increasingly complex, especially in low bandwidth network environment, the link state changes very frequently.To ensure the reliability and timeliness of information transmission, a simple and fast convergence dynamic routing strategy is badly needed.

The Research status at home and abroad
Routing protocol as an important part of the TCP/IP protocol family, choosing the path of the fit and unfit quality directly affect the whole performance of the network.In the internal gateway protocol (IGP), the current algorithms for dynamic there are three main types: distance vector routing algorithm, link-state routing algorithm and hybrid routing algorithm.

Distance vector routing algorithm
Distance vector routing protocol based on BellnamFord algorithm, it is a dynamic routing protocol that is commonly used in a routing algorithm, its basic principle is to use the way of vector superposition and computing routing information, RIP is a typical distance vector routing protocol.
RIP (Routing Information Protocol) Routing Protocol is composed of rutgers university c.edrick development in June 1988, is the earlier, the use of common internal gateway Protocol, suitable for small and medium-sized similar networks within an autonomous system (AS) Routing Information [ 5] .

Link-state routing algorithm
Link-state algorithm's theoretical basis is graph theory, with a figure to represent the network topology, and the shortest path algorithm in graph theory is used to calculate the best route between networks, so the link-state algorithm is called a shortest path first algorithm (SPF).
OSPF protocol is a kind of link-state protocols, which has been widely applied at present.The method by using the router itself interacts with each other, obtain routing topology information, and construct the network topology.Based on OSPF protocol for network topology discovery method is passive, not to increase the network load and has no impact on the network behavior, and has good real-time [6] .

Demand analysis
Dynamic routing strategy of this paper is applied to a service bus that based OSGi (Open Service Gateway Initiative), the bus node is divided into super node and ordinary node server.Each node of the whole network routing information is stored on the server table, can according to the destination address of the message, to calculate the optimal routing strategy, to send the message again.Super node server and ordinary node server difference is that the super node is responsible for the additional management functions, including management of nodes and the synchronization of routing table.Super node server through the heartbeat mechanism to sustain the life of the nodes in the topology.
Service bus usually works in the low bandwidth network environment, the communication link between each node server is very unstable, there may be frequent dis-connection and reconnection situation; The consumption of each node server for computer resources have higher limit, can't take up too much CPU, memory, and other resources; Service bus message transmission need timely and reliable.
Dynamic routing protocols described above, it is widely used good agreement, but they also have their own disadvantages: RIP protocol's convergence speed is slow and need a lot of bandwidth resources when the path is too much, so it can't adapt to the large-scale heterogeneous network interconnection; Although OSPF protocol can adapt to the large-scale network and fast convergence speed, but it's too complicated, execution takes up more router resources and network bandwidth.
In order to meet the needs of the enterprise service bus, it is necessary to design a simple, reliable, and has faster convergence of dynamic routing strategy.

Dynamic routing module design
This paper implemented the dynamic routing, as the basis of the ESB module deployment for a module of OSGi unit (Bundle), which is responsible for message receiving and forwarding, be responsible for updating according to the variation of link-state routing information table, to the various nodes and calculate the shortest routing.
System adopts decentralized routing control mechanisms: the bus before the start of pre-configured network communication path, to generate the initial routing information table.Bus operation process, will be according to the routing rules, each service node is responsible for monitoring the nodes as the starting point of the link state, when the state of the link sent to change, will inform to the super node, the super node is responsible for the work routing information table synchronization.Link-state monitoring and routing of synchronization is the key to the dynamic routing algorithm.

The realization of dynamic routing 4.1 The initial routing information table
Initial routing information table refers to the enterprise service bus when it has just started, according to the configuration file to calculate the optimal path information.
Before starting the service, bus need to configure a network topology, which provides the enterprise bus between each node in the network topology structure, pointed out the various nodes of the IP address, as well as the link information between nodes, link information includes link types, link direction and link the cost of the link cost calculated based on factors such as bandwidth, distance.
Service bus at startup, according to the information provided by the network topology and making Dijkstra algorithm to calculate the node to other nodes of the shortest routing for generate the initial routing information table.Before received the super node synchronization routing information table, the node according to the initial routing information table to send and receive messages.
First start the super node server, and then try to quick start the other ordinary node server at the same time, the node routing information for the first time synchronization time can be estimated by the following formula: One for super node server startup time point, for the case of an ordinary node server I received from the super node complete synchronous message routing, and after completion of time synchronization.

Node status monitoring
Node's state monitoring on all registered in the system is super node state detection, node server registration, cancellation, disconnect state changes can cause changes in the routing table information.
Node registration: a new node server to join the current running system, the need to submit itself to the super node server node registration information.Before the new node sends registration message, through to each connected directly to the node sends link detection message, to detect this node as the starting point of all link-state.These links can be obtained from the results of the latest status.This information will be attached to the registration in the message and sent to the super node.The super node is responsible for the latest link-state information to other nodes.
Node logout: Ordinary nodes need to send the cancellation request to super node server, in order to make the node from the current running system.After receiving the cancellation request, super node server will set all the node for the endpoint link status to disconnect, update the routing tables, synchronization to other nodes.After the cancellation of the node, it can send registration request to the super node server at any time and register to the system.

Link status monitoring
At the low bandwidth network environment, the link of the connected state change frequently, this requires the change of the system can quickly detect link-state, make the system work on switch to the new road by the table as soon as possible, to prevent the message delay.Link-state monitoring and routing of synchronization is the key to the dynamic routing algorithm.
This system adopts the sends a message of failure as the basis of link disconnected, detecting state time delay, this way to pursue the fastest message is sent and disconnect the socket when the connection failure, and try to establish a connection.The disadvantage is that may result in frequent new socket connection, but it can through the redundancy messages to improve: message is sent after failing to resend 3 times, if you don't succeed then determine the link disconnected, detecting state time delay, but this increases the need to balance between the two.
Bus operation process, each link state by the link the starting node of maintenance, when the node sends a message via this link failure, then disconnect the socket connection, and try to build a connection, modify the routing table to calculate the shortest path.At this time, whether this node can also be connected to the super node, if can you will link information notice to super node, the super node synchronization; Or shut down the node message receiver four heartbeat time, the reason is that this notification to the super node to link information, make the new road by the information table can not be synchronized to the other node, other nodes will likely continue to Ann remains the same routing table to the node sends a message and cause messages are lost.

Routing reliability
Because of the complexity of the actual network environment, the routing algorithm must be able to a hardware failure and network congestion and so on to be able to correct operation, and can correct operation for a long period of time.Packet loss rate computation formula is as follows: Where n is the bus number of nodes in the server.For the node I packet loss rate, can through the message time stamp and serial number to calculate: That between the time period to node I sent message for a total of N, said node k to receive the message from node I count.Preferable network structure change point in time, desirable routing convergence time delay again for 2 seconds, offset transfer delay, but the receiver must remove the timestamp is not ~ between the news, in order to reduce error.
This system adopts the method of redundancy field: added a "m_Link" in the message field, in order to save the message by the number of nodes, the field only save node number, won't take up too much bytes.
Through the field, message receiver can verify whether the message is sent in accordance with the shortest routing, if verification is not through, it can choose to send the super node routing synchronous request, super node can send registered nodes according to the circumstance of the whole network routing information.
According to "m_Link" field, it also can check the link of the circuit, when the receiver detects the node number is included in the "m_Link" field, means that the message along the loop back to the node, can discard messages at this time, and send the super node routing synchronous request.

Test environment
Within the local area network using sixteen computers, set up network topology and configuration service bus operation environment on each computer.Link is configured to two kinds between nodes: using TCP communication mode of high link bandwidth and narrowband link using a serial port communication simulation.

The test tool
(1) OSGi component management and deployment tools: using to build the service bus.
(2) Topology drawing tools: to provide a graphical operation tools, it's necessary to generate the service bus network topology.
(3) Topology management tools: to provide the current state of the link monitoring function.The tool of network status monitoring view will dynamically display the current network status, displays for the green link for connected state, and black as disconnected state.

The test steps
(1) Configuration each node server node's information; (2) Using topology drawing tool drawing consists of 16 node server communication topology structure, and according to the price of each link, calculate and record the shortest path between nodes, used after verification; (3) On each node server using OSGi component management and deployment tools, to build a distributed operation environment of the enterprise service bus.
(4) Each node server has started, according to the topology management tools to observe every link of the connected; (5) Stop some node Server, observe every link of the connected; (6) Restart the partial node Server, observe every link of the connected situation (7) Changes in the above all sorts of cases, the super node view receives the heart-beat messages from the various nodes, see the "m_Link" fields, validation message if the route is the shortest route; (8) Changes in the above all sorts of cases, the super node view receives the heart-beat messages from the various nodes of time, again according to the change of time, the convergence rate of the approximate calculation routing; (9) In each case, to observe the performance of the system change and the consumption of computer resources

Test results and analysis
The system test results such as shown in table 1. Test results show that the first time synchronization time is longer, this part of time including the OSGi other basic function modules of information synchronization time, such as registered nodes synchronization, synchronization service.The same CPU and memory consumption is also focused on the node management module and service management module.You can see from the above analysis, this paper implemented the dynamic routing strategy is very good reliability, various circumstances can work correctly, and has lower convergence time.

Conclusions
In this paper, the enterprise service bus for low bandwidth network environment is designed and implemented a dynamic routing module.First of all to understand the existing dynamic routing strategy, analyzes the low bandwidth, under special circumstances must have the characteristics of dynamic routing module.And for the implementation of dynamic routing module design and implementation are described.Finally it has carried on the analysis and test, the results show that the dynamic routing strategy implements good reliability, and has a faster convergence, suitable for low bandwidth network environment of the enterprise service bus.

Table 1
The system test results