WO2018059354A1 - 一种处理节点注册通知的方法和系统 - Google Patents
一种处理节点注册通知的方法和系统 Download PDFInfo
- Publication number
- WO2018059354A1 WO2018059354A1 PCT/CN2017/103207 CN2017103207W WO2018059354A1 WO 2018059354 A1 WO2018059354 A1 WO 2018059354A1 CN 2017103207 W CN2017103207 W CN 2017103207W WO 2018059354 A1 WO2018059354 A1 WO 2018059354A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- node
- service
- central
- service node
- central node
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W60/00—Affiliation to network, e.g. registration; Terminating affiliation with the network, e.g. de-registration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/288—Distributed intermediate devices, i.e. intermediate devices for interaction with other intermediate devices on the same level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/2885—Hierarchically arranged intermediate devices, e.g. for hierarchical caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
Definitions
- the present invention relates to the field of mobile communications, and in particular, to a method and system for processing node registration notifications.
- a service provider generally uses a distributed system to construct a service backend, that is, a service backend consists of multiple servers, one server is a service node in a distributed system, and each service node generally provides a small number or a single functional service, so that After the service background receives the service request involving multiple function services, the service nodes corresponding to the function services can communicate with each other and then jointly process the service request.
- a central node in the distributed system for managing service nodes. If a service node needs to join the distributed system, it needs to register at the central node, and then the central node can send the node of the service node to other service nodes. Information (such as ip (Internet Protocol) address, port number, etc.) can also send node information of other service nodes to the service node, and the service node and other service nodes can communicate according to the node information. In addition, when a certain service node exits the distributed system, the central node can also notify other service nodes, so that other service nodes no longer communicate with the service node.
- Information such as ip (Internet Protocol) address, port number, etc.
- the central node can also notify other service nodes, so that other service nodes no longer communicate with the service node.
- the service nodes in the distributed system may be deployed in different regions, and the network providers in different regions are generally different, and the communication quality between the operational networks provided by different network providers is poor, if the service nodes and central nodes in the distributed system are The operating networks used are different (that is, they do not belong to the same network provider). Due to the poor communication quality, the central node may not be able to discover the registration and exit of the service nodes in the distributed system in time, so that the communication between the service nodes will be larger. influences.
- an embodiment of the present invention provides a method and system for processing a node registration notification.
- the technical solution is as follows:
- a method for processing a node registration notification is provided, the method being applied to a distributed system, the distributed system comprising a relay route, a plurality of central nodes, and a plurality of service nodes, each of the central nodes respectively The transit route and the at least one service node are connected.
- the line connecting the transit node to the transit route and the line connecting the service node belong to the same operational network, and the method includes:
- the method further includes:
- the first service node sends a heartbeat message to the first central node based on a first preset period.
- the method further includes:
- the first central node After receiving the heartbeat message sent by the first service node, the first central node sends the heartbeat message sent by the first service node to the other service within the first preset duration after receiving the heartbeat message sent by the first service node. And sending, by the node, the transit route, the offline notification of the first service node, where the first preset duration is greater than the first preset period;
- the other central node separately sends an offline notification of the first service node to the connected service node.
- the method further includes:
- the second central node After receiving the registration confirmation message of the first service node sent by all service nodes connected to the second central node, the second central node sends the first service to the transit route The registration confirmation message of the node;
- the transit route After receiving the registration confirmation message of the first service node sent by all other central nodes except the first central node, the transit route sends a registration confirmation of the first service node to the first central node.
- the first central node After receiving the registration confirmation message of the first service node sent by the transit route and all other service nodes, the first central node sends a registration confirmation message of the first service node to the first service node. .
- the method further includes:
- the second central node does not receive the second And sending, by the service node, the registration confirmation message of the first service node to the second service node to send the node registration notification.
- the method further includes:
- the other central node stores node information of all service nodes connected to the first central node, and sends, by the transit route, all service nodes carrying the connection of the other central node to the first central node. Synchronization confirmation message of node information;
- the first central node stores node information of all service nodes connected to each of the other central nodes.
- the method further includes:
- the first central node determines a second central node corresponding to the second service node
- the second service node performs a service execution process based on the service execution request.
- a system for processing a node registration notification including a relay route, a plurality of central nodes and a plurality of service nodes, each of which is connected to the transit route and the at least one service node, and the line connecting the transit node to the transit route and the line connecting the service node belong to the same operation network, among them:
- a first service node configured to send, to the first central node connected to the first service node, a registration request that carries node information of the first service node;
- the first central node is configured to send, to the transit route, another service node other than the first service node that is connected to the first central node, and send a node that carries the first service node Node registration notification of information;
- the relay route is configured to send the node registration notification to a central node other than the first central node;
- the other central node is configured to send the node registration notification to the respective connected service node, and store the node information of the first central node and the node information of the first service node.
- the first service node is further configured to: send, by the first service node, node information that carries the first service node to a first central node that is connected to the first service node. After the registration request, a heartbeat message is sent to the first central node based on the first preset period.
- the first central node is further configured to: after receiving the heartbeat message sent by the first service node, the heartbeat sent by the first service node is not received again. And sending, to the other service node and the transit route, the offline notification of the first service node, where the first preset duration is greater than the first preset period;
- the transit route is further configured to send the offline notification of the first service node to the other central node;
- the other central node is further configured to send an offline notification of the first service node to each connected service node.
- the second central node is configured to receive, after the other central node sends the node registration notification to each of the connected service nodes, the first node sent by the service node connected to the second central node a registration confirmation message of a service node, after receiving a registration confirmation message of the first service node sent by all the service nodes connected to the second central node, sending the first service node to the transit route Registration confirmation message;
- the relay route is further configured to receive all other central nodes except the first central node After the registration confirmation message of the first service node is sent, the registration confirmation message of the first service node is sent to the first central node;
- the first central node is further configured to send the first service node to the first service node after receiving the registration confirmation message of the first service node sent by the transit route and all other service nodes Registration confirmation message.
- the second central node is further configured to send, within a second preset duration after the node registration notification of the first service node is sent to the second service node connected to the second central node, If the registration confirmation message of the first service node sent by the second service node is not received, the node registration notification is sent to the second service node again.
- the first central node is further configured to send, by using the transit route, all the service nodes that are connected to the first central node by using the transit route according to the second preset period. Synchronization request for node information;
- the other central node is further configured to store node information of all service nodes connected to the first central node, and send, by using the transit route, the other central node connection to be carried by the first central node Synchronization confirmation message of node information of all service nodes;
- the first central node is further configured to store node information of all service nodes connected to each of the other central nodes.
- the first central node is further configured to: when receiving a service execution request that is sent by the first service node and carry the node information of the second service node, determine a second service node corresponding to the second service node a second central node, by using the transit route, to send, to the second central node, a service execution request that carries node information of the second service node;
- the second central node is further configured to send the service execution request to the second service node;
- the second service node is further configured to perform service execution processing based on the service execution request.
- multiple service nodes are connected to one central node, and multiple central nodes are connected to one transit route, and the line connecting the central node to the transit route is the same as the line connecting the service nodes.
- the operation network in this way, when multiple service nodes belonging to different operation networks communicate, the communication message can be sent and received through the central node and the transit route, and the communication quality is good because the service node to the transit route belongs to the same operation network. Different operating networks have less impact on communication between service nodes.
- FIG. 1 is a flowchart of a method for processing a node registration notification according to an embodiment of the present invention
- FIG. 2 is a flowchart of a method for processing a node registration notification according to an embodiment of the present invention
- FIG. 3 is a flowchart of a method for processing a node registration notification according to an embodiment of the present invention
- FIG. 4 is a flowchart of a method for processing a node registration notification according to an embodiment of the present invention
- FIG. 5 is a flowchart of a method for processing a node registration notification according to an embodiment of the present invention
- FIG. 6 is a structural structural diagram of a distributed system according to an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of a server according to an embodiment of the present invention.
- An embodiment of the present invention provides a method for processing a node registration notification, where the method can be applied to a distributed system, where the distributed system includes a transit route, multiple central nodes, and multiple service nodes, and each central node and the transit route respectively At least one service node is connected, and the line connecting the transit node and the line connecting the service node belongs to the same operation network, and the execution entity of the method is the server.
- the transit route, the central node, and the service node in this embodiment may respectively It is a transit routing server, a central node server, and a service node server.
- the central node server and the service node server may be collectively referred to as a node server, and the service server may be a server for receiving a service execution request from a service client, and the node server may be a server for networking between multiple service servers.
- the central node is the management server of multiple service nodes, and the transit route is a transit server that connects multiple central nodes.
- the system framework is shown in Figure 6.
- Step 101 The first service node sends a piggyback to the first central node that is connected to the first service node. A registration request with node information of the first service node.
- the corresponding central node may be first determined according to the line where the service server is located.
- the service provider can further write the node information such as the IP address and the port number of the first central node to the first service node, so that the first service node can establish communication with the first central node according to the node information of the first central node through the TCP protocol. connection.
- the first service node may send a registration request carrying the node information of the first service node to the first central node.
- Step 102 The first central node sends a node registration notification carrying the node information of the first service node to the transit route and the other service nodes except the first service node that are connected to the first central node.
- the first central node may generate a node registration notification of the first service node, where the node registration notification may carry the node information of the first service node. Thereafter, the first central node may send a node registration notification of the first service node to the service node other than the first service node that is connected to the first central node and connected to the first central node.
- the first central node may number the first service node according to a preset numbering rule, that is, assign an ID, so that the subsequent communication messages between the servers are carried.
- the node information of the first service node may include the ID of the first service node.
- the IDs assigned by all the central nodes to the service nodes shall be guaranteed to be non-repetitive, that is, the ID of each service node is unique.
- the first central node may send the node information of all the service nodes in the distributed distributed system to the first service node, so that the first service node stores the node information, and then the first service node performs processing in the subsequent service. In the process, the node information can be interacted with the corresponding service node.
- Step 103 The relay route sends a node registration notification to other central nodes than the first central node.
- the transit route may be configured with multiple IP addresses, and each IP address serves different operating networks, that is, the transit route supports multiple lines, and is connected to the corresponding central node through each line, where the corresponding It means that the line of the central node belongs to the same operating network as the line, so that the transfer
- the route may receive, by using the first IP address, a node registration notification of the first service node sent by the first central node. Thereafter, the transit route may forward the node registration notification to other central nodes other than the first central node connected thereto through other IP addresses.
- Step 104 The other central nodes respectively send node registration notifications to the connected service nodes, and store the node information of the first central node and the node information of the first service node.
- the central node other than the first central node connected to the transit route may receive the node registration notification of the first service node sent by the transit route, and then each of the other central nodes may be The above node registration notification is sent to the service node to which it is connected.
- the other central node may acquire the node information of the first service node and the node information of the first central node that are carried in the node registration notification, and then store the two node information correspondingly.
- the service node connected to the other central node may acquire the node information of the first service node carried therein, and then store the node information locally.
- the other service node connected to the first central node may receive the node registration notification of the first service node sent by the first central node, and may also obtain the node information of the first service node carried therein. The node information is then stored locally and the operational status of the first service node is marked as online.
- the first central node may be periodically notified of the running status, and the corresponding processing may be as follows: the first service node is based on the first preset. The cycle sends a heartbeat message to the first central node.
- the heartbeat message may be a message for helping the message receiver to know the running status of the message sender in time.
- the heartbeat message may be sent to the first central node according to the first preset period, where the heartbeat message may be The node information of the first service node is carried, so that the first central node can obtain the running status of the first service node in time according to the received heartbeat message.
- the offline processing of the first service node may be performed.
- the corresponding processing flow may be as follows:
- Step 201 After receiving the heartbeat message sent by the first service node, the first central node sends the heartbeat message sent by the first service node to the other service node and the relay route. Send the offline notification of the first service node.
- the first preset duration is greater than the first preset period.
- the heartbeat message may be sent to the first central node according to the first preset period, and if the first central node receives the heartbeat message after receiving the heartbeat message, If the heartbeat message sent by the first service node is not received again, the first service node may be determined to be in the offline state, and the first service may be sent to other service nodes and the transit route connected to the first central node.
- the offline notification of the node where the offline notification may carry the node information of the first service node. It can be understood that the offline of the first service node includes the active offline of the service provider or the passive offline due to the fault.
- Step 202 The transit route sends an offline notification of the first service node to other central nodes.
- the transit route may receive the offline notification of the first service node sent by the first central node, and then may send the offline notification to other central nodes connected thereto.
- Step 203 The other central nodes respectively send offline notifications of the first service node to the respective connected service nodes.
- the other central node connected to the transit route and the first central node may receive the offline notification of the first service node sent by the transit route, and then may send the offline notification to the connected service node. .
- the service node may mark the running status of the first service node as the offline state, that is, stop the current and reject the subsequent service execution processing related to the first service node.
- the processing of the other service nodes connected to the first central node in step 201 is the same as the above processing.
- the online processing is basically the same as the processing from step 101 to step 104, and details are not described herein again.
- the central node and the service node may return a registration confirmation message after receiving the node registration notification of the first service node.
- the corresponding processing flow may be as follows:
- Step 105 The second central node receives a registration confirmation message of the first service node sent by the service node connected to the second central node.
- the second central node may return the first service node to the second central node.
- the registration confirmation message correspondingly, the second central node can receive the registration confirmation message.
- the service node may also return a registration confirmation message of the first service node to the first central node.
- Step 106 After receiving the registration confirmation message of the first service node sent by all the service nodes connected to the second central node, the second central node sends a registration confirmation message of the first service node to the transit route.
- Step 107 After receiving the registration confirmation message of the first service node sent by all other central nodes except the first central node, the transit route sends a registration confirmation message of the first service node to the first central node.
- Step 108 After receiving the registration confirmation message of the first service node sent by the transit route and all other service nodes, the first central node sends a registration confirmation message of the first service node to the first service node.
- the first central node may send a registration confirmation message to the first service node, where the first service node receives After the registration confirmation message, you can know that the registration is successful.
- a central node may not receive the previous node registration notification, and the central node needs to send the node again.
- the node registration notification may be processed as follows: in the second preset duration after the node registration notification of the first service node is sent to the second service node connected to the second central node, if the second central node does not receive The registration confirmation message of the first service node sent by the second service node sends the node registration notification to the second service node again.
- the second central node after the second central node sends the node registration notification of the first service node to the second service node connected thereto, if the second central node has not received the return of the second service node in the second preset duration
- the registration confirmation message of the first service node may send the node registration notification to the second service node again. Further, if the registration confirmation message returned by the second service node is not received after the multiple node registration notification is sent to the second service node, the second central node may stop sending the node registration notification and detect the second central node.
- the connection status with the second service node can also send an alarm message.
- multiple central nodes can perform data synchronization periodically, as shown in FIG. 3, and the corresponding processing flow can be as follows:
- Step 301 The first central node passes the relay route to other central sections based on the second preset period.
- the point transmits a synchronization request carrying node information of all the service nodes connected to the first central node.
- the first central node may first detect the running status of all the service nodes connected thereto, and then update the node information of all the service nodes connected to the local storage, and then generate and carry all the connections connected thereto.
- the synchronization request of the node information of the service node so that the synchronization request can be sent to other central nodes through the relay route. It is worth mentioning that the node information of the service node connected to the first central node carried in the synchronization request does not include the node information of the service node connected to other central nodes.
- Step 302 The other central node stores node information of all service nodes connected to the first central node, and sends a synchronization confirmation message carrying node information of all service nodes connected by other central nodes to the first central node through the relay route. .
- the other central node can receive the synchronization request sent by the first central node by using the relay route, and then obtain the node information of all the service nodes connected to the first central node carried in the synchronization request, and then the node information is further obtained.
- the node information of all the service nodes corresponding to the first central node stored locally is updated, and at the same time, the node carrying all the service nodes connected by the other central nodes may be sent to the first central node through the relay route.
- the synchronization confirmation message of the information specifically, the synchronization confirmation message sent by the second central node to the first central node carries the node information of all the service nodes connected to the second central node.
- the first central node stores node information of all service nodes connected to each of the other central nodes.
- the first central node may receive the synchronization confirmation message sent by the other central node through the relay route, and then obtain the node information of the service node carried in the synchronization confirmation message, and then connect the node information of the service node with the node information.
- the node information of the central node is correspondingly stored.
- each central node may be stored correspondingly to the node information of the connected central node, for example, there are three central nodes, and the first central node is connected with 7 Service nodes, 8 service nodes connected to the second central node, and 9 service nodes connected to the third central node, so that the node information of 24 service nodes is stored in the three central nodes, when the first When the central node initiates the synchronization, the synchronization request carries the node information of the seven service nodes, and the synchronization confirmation message returned by the second central node carries the node information of the eight service nodes, and the synchronization confirmation message returned by the third central node carries There are node information for 9 business nodes.
- the embodiment further discloses a processing flow for executing a service request, as shown in FIG. 4,
- the details can be as follows:
- Step 401 When receiving a service execution request that is sent by the first service node and carrying the node information of the second service node, the first central node determines the second central node corresponding to the second service node.
- the first service node may first perform part of the service service supported by the local service, and then determine the node server (such as the second service node) corresponding to the other service service, and then The first central node sends a service execution request carrying the node information of the second service node. After receiving the service execution request, the first central node may acquire node information of the second service node carried therein, and then determine a second central node that is connected to the second service node.
- Step 402 The first central node sends a service execution request carrying the node information of the second service node to the second central node by using the transit route.
- Step 403 The second central node sends a service execution request to the second service node.
- Step 404 The second service node performs service execution processing based on the service execution request.
- multiple service nodes are connected to the central node, and multiple central nodes are connected to the transit route, and the line connecting the central node to the transit route and the line connecting the service node belong to the same operation.
- the network in this way, when multiple service nodes belonging to different operating networks communicate, the communication message can be sent and received through the central node and the transit route. Since the lines from the service node to the transit route belong to the same operational network, the communication quality is good, thus, the operation Different networks have less impact on communication between service nodes.
- an embodiment of the present invention further provides a system for processing a node registration notification, where the system includes a relay route, a plurality of central nodes, and a plurality of service nodes, each of the central nodes and the transit route and At least one service node is connected, and the line connecting the central node to the transit route and the line connecting the service node belong to the same operational network, wherein:
- a first service node configured to send, to the first central node connected to the first service node, a registration request that carries node information of the first service node;
- the first central node is configured to send, to the transit route, another service node other than the first service node that is connected to the first central node, and send a node that carries the first service node Node registration notification of information;
- the relay route is configured to send the node registration notification to a central node other than the first central node;
- the other central node is configured to send the node registration notification to the respective connected service node, and store the node information of the first central node and the node information of the first service node.
- the first service node is further configured to: send, by the first service node, node information that carries the first service node to a first central node that is connected to the first service node. After the registration request, a heartbeat message is sent to the first central node based on the first preset period.
- the first central node is further configured to: after receiving the heartbeat message sent by the first service node, the heartbeat sent by the first service node is not received again. And sending, to the other service node and the transit route, the offline notification of the first service node, where the first preset duration is greater than the first preset period;
- the transit route is further configured to send the offline notification of the first service node to the other central node;
- the other central node is further configured to send an offline notification of the first service node to each connected service node.
- the second central node is configured to receive, after the other central node sends the node registration notification to each of the connected service nodes, the first node sent by the service node connected to the second central node a registration confirmation message of a service node, after receiving a registration confirmation message of the first service node sent by all the service nodes connected to the second central node, sending the first service node to the transit route Registration confirmation message;
- the transit route is further configured to send the first service to the first central node after receiving a registration confirmation message of the first service node sent by all other central nodes except the first central node.
- the first central node is further configured to send the first service node to the first service node after receiving the registration confirmation message of the first service node sent by the transit route and all other service nodes Registration confirmation message.
- the second central node is further configured to send, within a second preset duration after the node registration notification of the first service node is sent to the second service node connected to the second central node, If the registration confirmation message of the first service node sent by the second service node is not received, the node registration notification is sent to the second service node again.
- the first central node is further configured to pass the intermediate path based on the second preset period. And transmitting, to the other central node, a synchronization request carrying node information of all service nodes connected to the first central node;
- the other central node is further configured to store node information of all service nodes connected to the first central node, and send, by using the transit route, the other central node connection to be carried by the first central node Synchronization confirmation message of node information of all service nodes;
- the first central node is further configured to store node information of all service nodes connected to each of the other central nodes.
- the first central node is further configured to: when receiving a service execution request that is sent by the first service node and carry the node information of the second service node, determine a second service node corresponding to the second service node a second central node, by using the transit route, to send, to the second central node, a service execution request that carries node information of the second service node;
- the second central node is further configured to send the service execution request to the second service node;
- the second service node is further configured to perform service execution processing based on the service execution request.
- multiple service nodes are connected to the central node, and multiple central nodes are connected to the transit route, and the line connecting the central node to the transit route and the line connecting the service node belong to the same operation.
- the network in this way, when multiple service nodes belonging to different operating networks communicate, the communication message can be sent and received through the central node and the transit route. Since the lines from the service node to the transit route belong to the same operational network, the communication quality is good, thus, the operation Different networks have less impact on communication between service nodes.
- FIG. 7 is a schematic structural diagram of a central node according to an embodiment of the present invention.
- the central node 700 can be a relatively large difference in configuration or performance, and can include one or more central processing units (CPUs) 722 (eg, one or more processors) and memory 732.
- CPUs central processing units
- the memory 732 and the storage medium 730 may be short-term storage or persistent storage.
- the program stored on storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations in the server.
- central processor 722 can be configured to communicate with storage medium 730 to perform a series of instruction operations in storage medium 730 on central node 700.
- the central node 700 can also include one or more power supplies 726, one or more wired or Wireless network interface 750, one or more input and output interfaces 758, one or more keyboards 756, and/or one or more operating systems 741, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and the like.
- the central node 700 can include a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to execute, by one or more processors, the central node described in the various embodiments above ( It may be related processing of the first central node or other central node.
- the structure of the transit route and the service node is substantially the same as that of the central node, and details are not described herein.
- a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
- the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种处理节点注册通知的方法和系统,属于移动通信领域。所述方法应用于分布式系统,所述分布式系统包括中转路由、多个中心节点和多个业务节点,每个中心节点分别与所述中转路由及至少一个业务节点连接,任一中心节点连接所述中转路由的线路与连接业务节点的线路属于相同的运营网络。采用本发明,可以减少运营网络的不同对业务节点间的通信影响。
Description
本发明涉及移动通信领域,特别涉及一种处理节点注册通知的方法和系统。
随着网络技术的不断发展,网络业务的种类越来越多,功能也越来越丰富。业务提供方一般采用分布式系统来构建业务后台,即业务后台由多个服务器组成,一个服务器即为分布式系统中的一个业务节点,每个业务节点一般提供少量或单一的功能服务,这样,业务后台接收到涉及多种功能服务的业务请求后,各功能服务对应的业务节点可以相互通信,然后共同处理该业务请求。
分布式系统中存在一个用于管理业务节点的中心节点,如果某个业务节点需要加入分布式系统中,则需要在中心节点处进行注册,然后中心节点可以向其它业务节点发送该业务节点的节点信息(如ip(Internet Protocol,网络协议)地址、端口号等),同时可以将其它业务节点的节点信息发送给该业务节点,进而该业务节点和其它业务节点可以根据节点信息进行通信。另外,当某个业务节点退出分布式系统后,中心节点也可以通知其它业务节点,从而其它业务节点不再与该业务节点进行通信。
在实现本发明的过程中,发明人发现现有技术至少存在以下问题:
分布式系统中的业务节点可能部署在不同地区,不同地区的网络提供商一般也不同,而不同网络提供商提供的运营网络间的通信质量较差,如果分布式系统中的业务节点和中心节点使用的运营网络不同(即不属于同一网络提供商),由于通信质量较差,中心节点则可能无法及时发现分布式系统中业务节点的注册和退出,这样,业务节点间的通信会受到较大影响。
发明内容
为了解决现有技术的问题,本发明实施例提供了一种处理节点注册通知的方法和系统。所述技术方案如下:
第一方面,提供了一种处理节点注册通知的方法,所述方法应用于分布式系统,所述分布式系统包括中转路由、多个中心节点和多个业务节点,每个中心节点分别与所述中转路由及至少一个业务节点连接,任一中心节点连接所述中转路由的线路与连接业务节点的线路属于相同的运营网络,所述方法包括:
第一业务节点向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求;
所述第一中心节点向所述中转路由和与所述第一中心节点相连的、除所述第一业务节点之外的其它业务节点,发送携带有所述第一业务节点的节点信息的节点注册通知;
所述中转路由向除所述第一中心节点之外的其它中心节点发送所述节点注册通知;
所述其它中心节点分别向各自连接的业务节点发送所述节点注册通知,并将所述第一中心节点的节点信息和所述第一业务节点的节点信息对应存储。
可选的,在第一业务节点向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求之后,所述方法还包括:
所述第一业务节点基于第一预设周期向所述第一中心节点发送心跳消息。
可选的,所述方法还包括:
在接收到所述第一业务节点发送的心跳消息后的第一预设时长内,所述第一中心节点如果没有再次接收到所述第一业务节点发送的心跳消息,则向所述其它业务节点和所述中转路由,发送所述第一业务节点的下线通知,其中,所述第一预设时长大于所述第一预设周期;
所述中转路由向所述其它中心节点发送所述第一业务节点的下线通知;
所述其它中心节点分别向各自连接的业务节点发送所述第一业务节点的下线通知。
可选的,在所述其它中心节点分别向各自连接的业务节点发送所述节点注册通知之后,所述方法还包括:
第二中心节点接收与所述第二中心节点相连接的业务节点发送的所述第一业务节点的注册确认消息;
在接收到与所述第二中心节点相连接的所有业务节点发送的所述第一业务节点的注册确认消息后,所述第二中心节点向所述中转路由发送所述第一业务
节点的注册确认消息;
在接收到所述第一中心节点外的所有其它中心节点发送的所述第一业务节点的注册确认消息后,所述中转路由向所述第一中心节点发送所述第一业务节点的注册确认消息;
在接收到所述中转路由和所有其它业务节点发送的所述第一业务节点的注册确认消息后,所述第一中心节点向所述第一业务节点发送所述第一业务节点的注册确认消息。
可选的,所述方法还包括:
在向与所述第二中心节点相连接的第二业务节点发送所述第一业务节点的节点注册通知后的第二预设时长内,所述第二中心节点如果未接收到所述第二业务节点发送的所述第一业务节点的注册确认消息,则再次向所述第二业务节点发送所述节点注册通知。
可选的,所述方法还包括:
所述第一中心节点基于第二预设周期,通过所述中转路由,向所述其它中心节点发送携带有与所述第一中心节点相连接的所有业务节点的节点信息的同步请求;
所述其它中心节点存储与所述第一中心节点相连接的所有业务节点的节点信息,并通过所述中转路由,向所述第一中心节点发送携带有所述其它中心节点连接的所有业务节点的节点信息的同步确认消息;
所述第一中心节点存储与每个所述其它中心节点相连接的所有业务节点的节点信息。
可选的,所述方法还包括:
当接收到所述第一业务节点发送的携带有第二业务节点的节点信息的业务执行请求时,所述第一中心节点确定所述第二业务节点对应的第二中心节点;
所述第一中心节点通过所述中转路由向所述第二中心节点发送携带有所述第二业务节点的节点信息的业务执行请求;
所述第二中心节点向所述第二业务节点发送所述业务执行请求;
所述第二业务节点基于所述业务执行请求进行业务执行处理。
第二方面,提供了一种处理节点注册通知的系统,所述系统包括中转路由、
多个中心节点和多个业务节点,每个中心节点分别与所述中转路由及至少一个业务节点连接,任一中心节点连接所述中转路由的线路与连接业务节点的线路属于相同的运营网络,其中:
第一业务节点,用于向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求;
所述第一中心节点,用于向所述中转路由和与所述第一中心节点相连的、除所述第一业务节点之外的其它业务节点,发送携带有所述第一业务节点的节点信息的节点注册通知;
所述中转路由,用于向除所述第一中心节点之外的其它中心节点发送所述节点注册通知;
所述其它中心节点,用于分别向各自连接的业务节点发送所述节点注册通知,并将所述第一中心节点的节点信息和所述第一业务节点的节点信息对应存储。
可选的,所述第一业务节点,还用于在所述第一业务节点向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求之后,基于第一预设周期向所述第一中心节点发送心跳消息。
可选的,所述第一中心节点,还用于在接收到所述第一业务节点发送的心跳消息后的第一预设时长内,如果没有再次接收到所述第一业务节点发送的心跳消息,则向所述其它业务节点和所述中转路由,发送所述第一业务节点的下线通知,其中,所述第一预设时长大于所述第一预设周期;
所述中转路由,还用于向所述其它中心节点发送所述第一业务节点的下线通知;
所述其它中心节点,还用于分别向各自连接的业务节点发送所述第一业务节点的下线通知。
可选的,第二中心节点,用于在所述其它中心节点分别向各自连接的业务节点发送所述节点注册通知之后,接收与所述第二中心节点相连接的业务节点发送的所述第一业务节点的注册确认消息,在接收到与所述第二中心节点相连接的所有业务节点发送的所述第一业务节点的注册确认消息后,向所述中转路由发送所述第一业务节点的注册确认消息;
所述中转路由,还用于在接收到所述第一中心节点外的所有其它中心节点
发送的所述第一业务节点的注册确认消息后,向所述第一中心节点发送所述第一业务节点的注册确认消息;
所述第一中心节点,还用于在接收到所述中转路由和所有其它业务节点发送的所述第一业务节点的注册确认消息后,向所述第一业务节点发送所述第一业务节点的注册确认消息。
可选的,所述第二中心节点,还用于在向与所述第二中心节点相连接的第二业务节点发送所述第一业务节点的节点注册通知后的第二预设时长内,如果未接收到所述第二业务节点发送的所述第一业务节点的注册确认消息,则再次向所述第二业务节点发送所述节点注册通知。
可选的,所述第一中心节点,还用于基于第二预设周期,通过所述中转路由,向所述其它中心节点发送携带有与所述第一中心节点相连接的所有业务节点的节点信息的同步请求;
所述其它中心节点,还用于存储与所述第一中心节点相连接的所有业务节点的节点信息,并通过所述中转路由,向所述第一中心节点发送携带有所述其它中心节点连接的所有业务节点的节点信息的同步确认消息;
所述第一中心节点,还用于存储与每个所述其它中心节点相连接的所有业务节点的节点信息。
可选的,所述第一中心节点,还用于当接收到所述第一业务节点发送的携带有第二业务节点的节点信息的业务执行请求时,确定所述第二业务节点对应的第二中心节点,通过所述中转路由向所述第二中心节点发送携带有所述第二业务节点的节点信息的业务执行请求;
所述第二中心节点,还用于向所述第二业务节点发送所述业务执行请求;
所述第二业务节点,还用于基于所述业务执行请求进行业务执行处理。
本发明实施例提供的技术方案带来的有益效果是:
本发明实施例中,在分布式系统中,多个业务节点与一个中心节点相连接,多个中心节点与一个中转路由相连接,且中心节点连接中转路由的线路与连接业务节点的线路属于相同的运营网络,这样,当属于不同运营网络的多个业务节点进行通信时,可以通过中心节点以及中转路由收发通信消息,由于业务节点到中转路由的线路属于同一运营网络,通信质量较好,这样,运营网络不同对业务节点间的通信影响较小。
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种处理节点注册通知的方法流程图;
图2是本发明实施例提供的一种处理节点注册通知的方法流程图;
图3是本发明实施例提供的一种处理节点注册通知的方法流程图;
图4是本发明实施例提供的一种处理节点注册通知的方法流程图;
图5是本发明实施例提供的一种处理节点注册通知的方法流程图;
图6是本发明实施例提供的一种分布式系统的结构框架图;
图7是本发明实施例提供的一种服务器的结构示意图。
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
本发明实施例提供了一种处理节点注册通知的方法,该方法可以应用于分布式系统,分布式系统包括中转路由、多个中心节点和多个业务节点,每个中心节点分别与中转路由及至少一个业务节点连接,任一中心节点连接中转路由的线路与连接业务节点的线路属于相同的运营网络,该方法的执行主体为服务器,本实施例中的中转路由、中心节点、业务节点可以分别是中转路由服务器、中心节点服务器、业务节点服务器。其中,中心节点服务器、业务节点服务器可以统一称为节点服务器,业务服务器可以是用于接收业务客户端发送业务执行请求的服务器,节点服务器可以是用于多个业务服务器之间进行联网的服务器。中心节点是多个业务节点的管理服务器,中转路由是连接多个中心节点的中转服务器。系统框架如图6所示。
下面将结合具体实施方式,对图1所示的处理流程进行详细的说明,内容可以如下:
步骤101,第一业务节点向与第一业务节点相连接的第一中心节点,发送携
带有第一业务节点的节点信息的注册请求。
在实施中,当业务提供商需要将某个业务服务器(即第一业务节点)添加至分布式系统时,可以首先根据该业务服务器所在的线路确定其对应的中心节点(即第一中心节点),业务提供商可以再将第一中心节点的IP、端口号等节点信息写入第一业务节点,从而第一业务节点可以根据第一中心节点的节点信息通过TCP协议与第一中心节点建立通信连接。之后,第一业务节点可以向第一中心节点发送携带有第一业务节点的节点信息的注册请求。
步骤102,第一中心节点向中转路由和与第一中心节点相连的、除第一业务节点之外的其它业务节点,发送携带有第一业务节点的节点信息的节点注册通知。
在实施中,第一业务节点向第一中心节点发送注册请求之后,第一中心节点可以生成第一业务节点的节点注册通知,该节点注册通知中可以携带有第一业务节点的节点信息。之后,第一中心节点可以向中转路由和第一中心节点相连的、除第一业务节点之外的其它业务节点发送第一业务节点的节点注册通知。
另外,第一中心节点接收到第一业务节点发送的注册请求后,可以根据预设的编号规则给第一业务节点进行编号,即分配ID,这样,之后的各服务器间的通信消息中携带的第一业务节点的节点信息中可以包含有第一业务节点的ID。所有中心节点为业务节点分配的ID应当保证不重复,即每个业务节点的ID具备唯一性,此处,给出了一种可行的编号规则:首先对n个中心节点进行编号,编号从1到n,对于编号为m的中心节点,1<=m<=n,与其相连接的业务节点的ID可以是m+n、m+2n、m+3n…,这样,当中心节点增加或减少时,只需修改编码规则中的n值即可完成编码调整。同时,第一中心节点可以将其存储的分布式系统中所有的业务节点的节点信息发送给第一业务节点,以使第一业务节点存储这些节点信息,进而第一业务节点在后续业务执行处理的过程中可以根据这些节点信息与相应的业务节点进行交互。
步骤103,中转路由向除第一中心节点之外的其它中心节点发送节点注册通知。
在实施中,中转路由可以设置有多个IP地址,每个IP地址服务于不同的运营网络,即中转路由支持多条线路,并通过每条线路与对应的中心节点相连接,此处的对应是指中心节点的线路与该条线路属于相同的运营网络,这样,中转
路由可以通过第一IP地址接收到第一中心节点发送的第一业务节点的节点注册通知。之后,中转路由可以通过其它IP地址,分别向与其相连接的除第一中心节点之外的其它中心节点转发上述节点注册通知。
步骤104,其它中心节点分别向各自连接的业务节点发送节点注册通知,并将第一中心节点的节点信息和第一业务节点的节点信息对应存储。
在实施中,与中转路由相连接的、除第一中心节点之外的其它中心节点可以接收到中转路由发送的第一业务节点的节点注册通知,之后其它中心节点中的每个中心节点都可以将上述节点注册通知发送给与其相连接的业务节点。同时其它中心节点可以获取节点注册通知中携带的第一业务节点的节点信息和第一中心节点的节点信息,进而将上述两个节点信息对应存储。
与其它中心节点相连接的业务节点接收到各自连接的中心节点发送的第一业务节点的节点注册通知后,可以获取其中携带的第一业务节点的节点信息,然后将该节点信息存储在本地。同理,步骤102中,与第一中心节点相连接的其它业务节点可以接收到第一中心节点发送的第一业务节点的节点注册通知,也可以获取其中携带的第一业务节点的节点信息,然后将该节点信息存储在本地,并将第一业务节点的运行状态标记为在线状态。
可选的,在第一业务节点向第一中心节点发送注册请求,并完成注册之后,可以周期性告知第一中心节点其运行情况,相应的处理可以如下:第一业务节点基于第一预设周期向第一中心节点发送心跳消息。
其中,心跳消息可以是用于帮助消息接收方及时获知消息发送方运行状况的消息。
在实施中,第一业务节点在第一中心节点处完成注册(即第一业务节点加入分布式系统)后,可以基于第一预设周期向第一中心节点发送心跳消息,该心跳消息中可以携带有第一业务节点的节点信息,这样,第一中心节点可以根据接收到的心跳消息,及时获取到第一业务节点的运行状况。
可选的,如果第一中心节点长时间未接收到第一业务节点发送的心跳消息,则可以进行第一业务节点的下线处理,如图2所示,相应的处理流程可以如下:
步骤201,在接收到第一业务节点发送的心跳消息后的第一预设时长内,第一中心节点如果没有再次接收到第一业务节点发送的心跳消息,则向其它业务节点和中转路由,发送第一业务节点的下线通知。
其中,第一预设时长大于第一预设周期。
在实施中,第一业务节点在加入分布式系统后,可以基于第一预设周期向第一中心节点发送心跳消息,而如果第一中心节点某次接收到该心跳消息后,在第一预设时长内没有再次接收得到第一业务节点发送的心跳消息,则可以判定第一业务节点处于下线状态,进而可以向与第一中心节点相连接的其它业务节点和中转路由,发送第一业务节点的下线通知,该下线通知中可以携带有第一业务节点的节点信息。可以理解的是,第一业务节点的下线包括业务提供商主动下线或由于故障造成的被动下线。
步骤202,中转路由向其它中心节点发送第一业务节点的下线通知。
在实施中,中转路由可以接收到第一中心节点发送的第一业务节点的下线通知,然后可以向与其相连接的其它中心节点发送该下线通知。
步骤203,其它中心节点分别向各自连接的业务节点发送第一业务节点的下线通知。
在实施中,与中转路由相连接的、除第一中心节点的其它中心节点可以接收到中转路由发送的第一业务节点的下线通知,然后可以将该下线通知发送给各自连接的业务节点。这样,业务节点接收到该下线通知后,可以将第一业务节点的运行状态标记为下线状态,即停止当前并拒绝后续和第一业务节点相关的业务执行处理。同理,步骤201中的与第一中心节点相连接的其它业务节点的处理与上述处理相同。
需要说明的是,第一业务节点在下线后,如果想要重新加入分布式系统,上线处理与步骤101至步骤104的处理基本相同,此处不再赘述。
可选的,在步骤104后,中心节点和业务节点在接收到第一业务节点的节点注册通知后,可以返回注册确认消息,如图5所示,相应的处理流程可以如下:
步骤105,第二中心节点接收与第二中心节点相连接的业务节点发送的第一业务节点的注册确认消息。
在实施中,第二中心节点向与其相连接的业务节点发送第一业务节点的节点注册通知后,如果上述业务节点接收到该节点注册通知,则可以向第二中心节点返回第一业务节点的注册确认消息,相应的,第二中心节点则可以接收到该注册确认消息。同理,与第一中心节点相连接的除第一业务节点之外的其它
业务节点接收到第一中心节点后,也可以向第一中心节点返回第一业务节点的注册确认消息。
步骤106,在接收到与第二中心节点相连接的所有业务节点发送的第一业务节点的注册确认消息后,第二中心节点向中转路由发送第一业务节点的注册确认消息。
步骤107,在接收到第一中心节点外的所有其它中心节点发送的第一业务节点的注册确认消息后,中转路由向第一中心节点发送第一业务节点的注册确认消息。
步骤108,在接收到中转路由和所有其它业务节点发送的第一业务节点的注册确认消息后,第一中心节点向第一业务节点发送第一业务节点的注册确认消息。
在实施中,第一中心节点在接收到中转路由和与其相连接的所有其它业务节点发送的第一业务节点的注册确认消息后,可以向第一业务节点发送注册确认消息,第一业务节点接收到该注册确认消息后,可以获知本次注册成功。
可选的,如果某个中心节点未接收到与其相连的某个业务节点返回的第一业务节点的注册确认消息,则该业务节点可能未接收到之前的节点注册通知,上述中心节点需要再次发送节点注册通知,相应的处理可以如下:在向与第二中心节点相连接的第二业务节点发送第一业务节点的节点注册通知后的第二预设时长内,第二中心节点如果未接收到第二业务节点发送的第一业务节点的注册确认消息,则再次向第二业务节点发送节点注册通知。
在实施中,第二中心节点向与其相连接的第二业务节点发送第一业务节点的节点注册通知后,如果在第二预设时长内第二中心节点一直未接收到第二业务节点返回的第一业务节点的注册确认消息,则可以再次向第二业务节点发送上述节点注册通知。进一步的,如果在向第二业务节点发送多次节点注册通知后,始终未接收到第二业务节点返回的注册确认消息,第二中心节点则可以停止发送节点注册通知,并检测第二中心节点和第二业务节点的连接状态,同时可以发出告警消息。
可选的,多个中心节点可以周期性的进行数据同步,如图3所示,相应的处理流程可以如下:
步骤301,第一中心节点基于第二预设周期,通过中转路由,向其它中心节
点发送携带有与第一中心节点相连接的所有业务节点的节点信息的同步请求。
在实施中,同步前,第一中心节点可以先检测与其相连接的所有业务节点的运行状况,然后更新本地存储的与其相连的所有业务节点的节点信息,之后可以生成携带有与其相连接的所有业务节点的节点信息的同步请求,从而可以通过中转路由,向其它中心节点发送该同步请求。值得一提的是,同步请求中携带的只有和第一中心节点相连接的业务节点的节点信息,不包括与其它中心节点相连接的业务节点的节点信息。
步骤302,其它中心节点存储与第一中心节点相连接的所有业务节点的节点信息,并通过中转路由,向第一中心节点发送携带有其它中心节点连接的所有业务节点的节点信息的同步确认消息。
在实施中,其它中心节点通过中转路由可以接收到第一中心节点发送的同步请求,之后可以获取同步请求中携带的与第一中心节点相连接的所有业务节点的节点信息,进而将这些节点信息存储在本地,即对本地已存储的第一中心节点对应的所有业务节点的节点信息进行更新,同时,可以通过中转路由向第一中心节点发送携带有其它中心节点各自连接的所有业务节点的节点信息的同步确认消息,具体的,第二中心节点向第一中心节点发送的同步确认消息中携带的是与第二中心节点相连接的所有业务节点的节点信息。
步骤303,第一中心节点存储与每个其它中心节点相连接的所有业务节点的节点信息。
在实施中,第一中心节点可以通过中转路由接收到其它中心节点发送的同步确认消息,进而可以获取上述同步确认消息中携带的业务节点的节点信息,然后将业务节点的节点信息和其相连接的中心节点的节点信息对应存储。可以看出,每个中心节点中存储业务节点的节点信息的方式可以是分别与各自连接的中心节点的节点信息对应存储的,例如存在3个中心节点,与第一中心节点相连接的有7个业务节点,与第二中心节点相连接的有8个业务节点,与第三中心节点有9个业务节点,这样,3个中心节点中均存储有24个业务节点的节点信息,当第一中心节点发起同步时,同步请求中携带有7个业务节点的节点信息,第二中心节点返回的同步确认消息中携带有8个业务节点的节点信息,第三中心节点返回的同步确认消息中携带有9个业务节点的节点信息。
可选的,本实施例还公开了一种执行业务请求的处理流程,如图4所示,
具体可以如下:
步骤401,当接收到第一业务节点发送的携带有第二业务节点的节点信息的业务执行请求时,第一中心节点确定第二业务节点对应的第二中心节点。
在实施中,第一业务节点接收到业务客户端发送的业务请求后,可以先执行本地支持的部分业务服务,之后可以确定其它业务服务对应的节点服务器(如第二业务节点),进而可以向第一中心节点发送携带有第二业务节点的节点信息的业务执行请求。第一中心节点接收到业务执行请求后,可以获取其中携带的第二业务节点的节点信息,然后确定与第二业务节点相连接的第二中心节点。
步骤402,第一中心节点通过中转路由向第二中心节点发送携带有第二业务节点的节点信息的业务执行请求。
步骤403,第二中心节点向第二业务节点发送业务执行请求。
步骤404,第二业务节点基于业务执行请求进行业务执行处理。
本发明实施例中,在分布式系统中,多个业务节点与中心节点相连接,多个中心节点与中转路由相连接,且中心节点连接中转路由的线路与连接业务节点的线路属于相同的运营网络,这样,当属于不同运营网络的多个业务节点进行通信时,可以通过中心节点以及中转路由收发通信消息,由于业务节点到中转路由的线路属于同一运营网络,通信质量较好,这样,运营网络不同对业务节点间的通信影响较小。
基于相同的技术构思,本发明实施例还提供了一种处理节点注册通知的系统,所述系统包括中转路由、多个中心节点和多个业务节点,每个中心节点分别与所述中转路由及至少一个业务节点连接,任一中心节点连接所述中转路由的线路与连接业务节点的线路属于相同的运营网络,其中:
第一业务节点,用于向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求;
所述第一中心节点,用于向所述中转路由和与所述第一中心节点相连的、除所述第一业务节点之外的其它业务节点,发送携带有所述第一业务节点的节点信息的节点注册通知;
所述中转路由,用于向除所述第一中心节点之外的其它中心节点发送所述节点注册通知;
所述其它中心节点,用于分别向各自连接的业务节点发送所述节点注册通知,并将所述第一中心节点的节点信息和所述第一业务节点的节点信息对应存储。
可选的,所述第一业务节点,还用于在所述第一业务节点向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求之后,基于第一预设周期向所述第一中心节点发送心跳消息。
可选的,所述第一中心节点,还用于在接收到所述第一业务节点发送的心跳消息后的第一预设时长内,如果没有再次接收到所述第一业务节点发送的心跳消息,则向所述其它业务节点和所述中转路由,发送所述第一业务节点的下线通知,其中,所述第一预设时长大于所述第一预设周期;
所述中转路由,还用于向所述其它中心节点发送所述第一业务节点的下线通知;
所述其它中心节点,还用于分别向各自连接的业务节点发送所述第一业务节点的下线通知。
可选的,第二中心节点,用于在所述其它中心节点分别向各自连接的业务节点发送所述节点注册通知之后,接收与所述第二中心节点相连接的业务节点发送的所述第一业务节点的注册确认消息,在接收到与所述第二中心节点相连接的所有业务节点发送的所述第一业务节点的注册确认消息后,向所述中转路由发送所述第一业务节点的注册确认消息;
所述中转路由,还用于在接收到所述第一中心节点外的所有其它中心节点发送的所述第一业务节点的注册确认消息后,向所述第一中心节点发送所述第一业务节点的注册确认消息;
所述第一中心节点,还用于在接收到所述中转路由和所有其它业务节点发送的所述第一业务节点的注册确认消息后,向所述第一业务节点发送所述第一业务节点的注册确认消息。
可选的,所述第二中心节点,还用于在向与所述第二中心节点相连接的第二业务节点发送所述第一业务节点的节点注册通知后的第二预设时长内,如果未接收到所述第二业务节点发送的所述第一业务节点的注册确认消息,则再次向所述第二业务节点发送所述节点注册通知。
可选的,所述第一中心节点,还用于基于第二预设周期,通过所述中转路
由,向所述其它中心节点发送携带有与所述第一中心节点相连接的所有业务节点的节点信息的同步请求;
所述其它中心节点,还用于存储与所述第一中心节点相连接的所有业务节点的节点信息,并通过所述中转路由,向所述第一中心节点发送携带有所述其它中心节点连接的所有业务节点的节点信息的同步确认消息;
所述第一中心节点,还用于存储与每个所述其它中心节点相连接的所有业务节点的节点信息。
可选的,所述第一中心节点,还用于当接收到所述第一业务节点发送的携带有第二业务节点的节点信息的业务执行请求时,确定所述第二业务节点对应的第二中心节点,通过所述中转路由向所述第二中心节点发送携带有所述第二业务节点的节点信息的业务执行请求;
所述第二中心节点,还用于向所述第二业务节点发送所述业务执行请求;
所述第二业务节点,还用于基于所述业务执行请求进行业务执行处理。
本发明实施例中,在分布式系统中,多个业务节点与中心节点相连接,多个中心节点与中转路由相连接,且中心节点连接中转路由的线路与连接业务节点的线路属于相同的运营网络,这样,当属于不同运营网络的多个业务节点进行通信时,可以通过中心节点以及中转路由收发通信消息,由于业务节点到中转路由的线路属于同一运营网络,通信质量较好,这样,运营网络不同对业务节点间的通信影响较小。
图7是本发明实施例提供的中心节点的结构示意图。该中心节点700可以是可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)722(例如,一个或一个以上处理器)和存储器732,一个或一个以上存储应用程序742或数据744的存储介质730(例如一个或一个以上海量存储设备)。其中,存储器732和存储介质730可以是短暂存储或持久存储。存储在存储介质730的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器722可以设置为与存储介质730通信,在中心节点700上执行存储介质730中的一系列指令操作。
中心节点700还可以包括一个或一个以上电源726,一个或一个以上有线或
无线网络接口750,一个或一个以上输入输出接口758,一个或一个以上键盘756,和/或,一个或一个以上操作系统741,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
中心节点700可以包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行上述各个实施例中所述的中心节点(可以是第一中心节点或者其他中心节点)的相关处理。
另外,中转路由和业务节点的结构与中心节点的结构大致相同,此处不再进行赘述。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Claims (14)
- 一种处理节点注册通知的方法,其特征在于,所述方法应用于分布式系统,所述分布式系统包括中转路由、多个中心节点和多个业务节点,每个中心节点分别与所述中转路由及至少一个业务节点连接,任一中心节点连接所述中转路由的线路与连接业务节点的线路属于相同的运营网络,所述方法包括:第一业务节点向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求;所述第一中心节点向所述中转路由和与所述第一中心节点相连的、除所述第一业务节点之外的其它业务节点,发送携带有所述第一业务节点的节点信息的节点注册通知;所述中转路由向除所述第一中心节点之外的其它中心节点发送所述节点注册通知;所述其它中心节点分别向各自连接的业务节点发送所述节点注册通知,并将所述第一中心节点的节点信息和所述第一业务节点的节点信息对应存储。
- 根据权利要求1所述的方法,其特征在于,在第一业务节点向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求之后,所述方法还包括:所述第一业务节点基于第一预设周期向所述第一中心节点发送心跳消息。
- 根据权利要求2所述的方法,其特征在于,所述方法还包括:在接收到所述第一业务节点发送的心跳消息后的第一预设时长内,所述第一中心节点如果没有再次接收到所述第一业务节点发送的心跳消息,则向所述其它业务节点和所述中转路由,发送所述第一业务节点的下线通知,其中,所述第一预设时长大于所述第一预设周期;所述中转路由向所述其它中心节点发送所述第一业务节点的下线通知;所述其它中心节点分别向各自连接的业务节点发送所述第一业务节点的下线通知。
- 根据权利要求1所述的方法,其特征在于,在所述其它中心节点分别向各自连接的业务节点发送所述节点注册通知之后,所述方法还包括:第二中心节点接收与所述第二中心节点相连接的业务节点发送的所述第一 业务节点的注册确认消息;在接收到与所述第二中心节点相连接的所有业务节点发送的所述第一业务节点的注册确认消息后,所述第二中心节点向所述中转路由发送所述第一业务节点的注册确认消息;在接收到所述第一中心节点外的所有其它中心节点发送的所述第一业务节点的注册确认消息后,所述中转路由向所述第一中心节点发送所述第一业务节点的注册确认消息;在接收到所述中转路由和所有其它业务节点发送的所述第一业务节点的注册确认消息后,所述第一中心节点向所述第一业务节点发送所述第一业务节点的注册确认消息。
- 根据权利要求4所述的方法,其特征在于,所述方法还包括:在向与所述第二中心节点相连接的第二业务节点发送所述第一业务节点的节点注册通知后的第二预设时长内,所述第二中心节点如果未接收到所述第二业务节点发送的所述第一业务节点的注册确认消息,则再次向所述第二业务节点发送所述节点注册通知。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:所述第一中心节点基于第二预设周期,通过所述中转路由,向所述其它中心节点发送携带有与所述第一中心节点相连接的所有业务节点的节点信息的同步请求;所述其它中心节点存储与所述第一中心节点相连接的所有业务节点的节点信息,并通过所述中转路由,向所述第一中心节点发送携带有所述其它中心节点连接的所有业务节点的节点信息的同步确认消息;所述第一中心节点存储与每个所述其它中心节点相连接的所有业务节点的节点信息。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:当接收到所述第一业务节点发送的携带有第二业务节点的节点信息的业务执行请求时,所述第一中心节点确定所述第二业务节点对应的第二中心节点;所述第一中心节点通过所述中转路由向所述第二中心节点发送携带有所述第二业务节点的节点信息的业务执行请求;所述第二中心节点向所述第二业务节点发送所述业务执行请求;所述第二业务节点基于所述业务执行请求进行业务执行处理。
- 一种处理节点注册通知的系统,其特征在于,所述系统包括中转路由、多个中心节点和多个业务节点,每个中心节点分别与所述中转路由及至少一个业务节点连接,任一中心节点连接所述中转路由的线路与连接业务节点的线路属于相同的运营网络,其中:第一业务节点,用于向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求;所述第一中心节点,用于向所述中转路由和与所述第一中心节点相连的、除所述第一业务节点之外的其它业务节点,发送携带有所述第一业务节点的节点信息的节点注册通知;所述中转路由,用于向除所述第一中心节点之外的其它中心节点发送所述节点注册通知;所述其它中心节点,用于分别向各自连接的业务节点发送所述节点注册通知,并将所述第一中心节点的节点信息和所述第一业务节点的节点信息对应存储。
- 根据权利要求8所述的系统,其特征在于,所述第一业务节点,还用于在所述第一业务节点向与所述第一业务节点相连接的第一中心节点,发送携带有所述第一业务节点的节点信息的注册请求之后,基于第一预设周期向所述第一中心节点发送心跳消息。
- 根据权利要求9所述的系统,其特征在于,所述第一中心节点,还用于在接收到所述第一业务节点发送的心跳消息后的第一预设时长内,如果没有再次接收到所述第一业务节点发送的心跳消息,则向所述其它业务节点和所述中转路由,发送所述第一业务节点的下线通知,其中,所述第一预设时长大于所述第一预设周期;所述中转路由,还用于向所述其它中心节点发送所述第一业务节点的下线通知;所述其它中心节点,还用于分别向各自连接的业务节点发送所述第一业务节点的下线通知。
- 根据权利要求8所述的系统,其特征在于,第二中心节点,用于在所 述其它中心节点分别向各自连接的业务节点发送所述节点注册通知之后,接收与所述第二中心节点相连接的业务节点发送的所述第一业务节点的注册确认消息,在接收到与所述第二中心节点相连接的所有业务节点发送的所述第一业务节点的注册确认消息后,向所述中转路由发送所述第一业务节点的注册确认消息;所述中转路由,还用于在接收到所述第一中心节点外的所有其它中心节点发送的所述第一业务节点的注册确认消息后,向所述第一中心节点发送所述第一业务节点的注册确认消息;所述第一中心节点,还用于在接收到所述中转路由和所有其它业务节点发送的所述第一业务节点的注册确认消息后,向所述第一业务节点发送所述第一业务节点的注册确认消息。
- 根据权利要求11所述的系统,其特征在于,所述第二中心节点,还用于在向与所述第二中心节点相连接的第二业务节点发送所述第一业务节点的节点注册通知后的第二预设时长内,如果未接收到所述第二业务节点发送的所述第一业务节点的注册确认消息,则再次向所述第二业务节点发送所述节点注册通知。
- 根据权利要求8所述的系统,其特征在于,所述第一中心节点,还用于基于第二预设周期,通过所述中转路由,向所述其它中心节点发送携带有与所述第一中心节点相连接的所有业务节点的节点信息的同步请求;所述其它中心节点,还用于存储与所述第一中心节点相连接的所有业务节点的节点信息,并通过所述中转路由,向所述第一中心节点发送携带有所述其它中心节点连接的所有业务节点的节点信息的同步确认消息;所述第一中心节点,还用于存储与每个所述其它中心节点相连接的所有业务节点的节点信息。
- 根据权利要求8所述的系统,其特征在于,所述第一中心节点,还用于当接收到所述第一业务节点发送的携带有第二业务节点的节点信息的业务执行请求时,确定所述第二业务节点对应的第二中心节点,通过所述中转路由向所述第二中心节点发送携带有所述第二业务节点的节点信息的业务执行请求;所述第二中心节点,还用于向所述第二业务节点发送所述业务执行请求;所述第二业务节点,还用于基于所述业务执行请求进行业务执行处理。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/336,682 US11343787B2 (en) | 2016-09-28 | 2017-09-25 | Method and system for processing node registration notification |
EP17854804.6A EP3522496B1 (en) | 2016-09-28 | 2017-09-25 | Method and system for processing node registration notification |
RU2019110880A RU2712813C1 (ru) | 2016-09-28 | 2017-09-25 | Способ и система для обработки уведомления о регистрации узла |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610868265.2 | 2016-09-28 | ||
CN201610868265.2A CN106453539B (zh) | 2016-09-28 | 2016-09-28 | 一种处理节点注册通知的方法和系统 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018059354A1 true WO2018059354A1 (zh) | 2018-04-05 |
Family
ID=58172452
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/103207 WO2018059354A1 (zh) | 2016-09-28 | 2017-09-25 | 一种处理节点注册通知的方法和系统 |
Country Status (5)
Country | Link |
---|---|
US (1) | US11343787B2 (zh) |
EP (1) | EP3522496B1 (zh) |
CN (1) | CN106453539B (zh) |
RU (1) | RU2712813C1 (zh) |
WO (1) | WO2018059354A1 (zh) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106453539B (zh) | 2016-09-28 | 2019-04-05 | 广州市百果园网络科技有限公司 | 一种处理节点注册通知的方法和系统 |
CN107087312A (zh) * | 2017-05-23 | 2017-08-22 | 迈普通信技术股份有限公司 | 全连通网络建立方法及装置 |
CN109104351B (zh) * | 2017-06-21 | 2020-08-25 | 比亚迪股份有限公司 | 列车网络节点和基于CANopen协议的列车网络节点监测方法 |
CN107483310B (zh) * | 2017-08-25 | 2021-04-30 | 深圳市盛路物联通讯技术有限公司 | 一种终端与转发节点之间组网的方法和系统 |
CN113646751B (zh) * | 2019-04-01 | 2024-05-28 | 宜日网络有限公司 | 通讯系统、信息提供装置、程序及信息提供方法 |
CN110971702A (zh) * | 2019-12-10 | 2020-04-07 | 中国建设银行股份有限公司 | 服务调用方法、装置、计算机设备及存储介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060271681A1 (en) * | 2005-05-31 | 2006-11-30 | Microsoft Corporation | Re-establishing a connection for an application layer via a service layer |
CN101677324A (zh) * | 2008-09-17 | 2010-03-24 | 华为技术有限公司 | 业务管理方法、终端、网络系统及相关设备 |
US20120239727A1 (en) * | 2011-03-16 | 2012-09-20 | Kddi Corporation | Multimedia service network and method for providing the same |
CN103051551A (zh) * | 2011-10-13 | 2013-04-17 | 中兴通讯股份有限公司 | 一种分布式系统及其自动维护方法 |
CN105959349A (zh) * | 2016-04-22 | 2016-09-21 | 上海瀚之友信息技术服务有限公司 | 一种分布式服务端运行系统及方法 |
CN106453539A (zh) * | 2016-09-28 | 2017-02-22 | 广州市百果园网络科技有限公司 | 一种处理节点注册通知的方法和系统 |
Family Cites Families (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040063451A1 (en) * | 2002-09-27 | 2004-04-01 | Bonta Jeffrey D. | Relaying information within an ad-hoc cellular network |
US7464168B1 (en) | 2004-10-19 | 2008-12-09 | Sun Microsystems, Inc. | Mechanism for decentralized entity presence |
CA2615659A1 (en) * | 2005-07-22 | 2007-05-10 | Yogesh Chunilal Rathod | Universal knowledge management and desktop search system |
US7839815B2 (en) * | 2006-02-10 | 2010-11-23 | Alcatel-Lucent Usa Inc. | Triggering migration of a network access agent associated with an access terminal |
US20070294596A1 (en) * | 2006-05-22 | 2007-12-20 | Gissel Thomas R | Inter-tier failure detection using central aggregation point |
US7904551B2 (en) * | 2007-03-29 | 2011-03-08 | Oracle International Corporation | Unicast clustering messaging |
US20080285540A1 (en) * | 2007-05-18 | 2008-11-20 | International Business Machines Corporation | Using presence proxies to constrain local presence information to a sub-network while using a presence server external to the sub-network to handle other presence information |
EP2171919A1 (en) * | 2007-06-29 | 2010-04-07 | Telefonaktiebolaget LM Ericsson (PUBL) | Method of processing event notifications and event subscriptions |
CN101335724B (zh) * | 2007-06-29 | 2011-07-06 | 华为技术有限公司 | 一种基于家庭网关的通讯系统、方法和通讯设备 |
JP5103524B2 (ja) * | 2007-07-13 | 2012-12-19 | テレフオンアクチーボラゲット エル エム エリクソン(パブル) | 通信システムのサービス妨害からの保護を提供するシステム及び方法 |
CN101453730B (zh) * | 2007-12-04 | 2010-07-28 | 中国科学院声学研究所 | 一种支持多运营支撑系统的装置和方法 |
JP4925130B2 (ja) * | 2007-12-14 | 2012-04-25 | Kddi株式会社 | 通信制御方法およびシステム |
US8576845B2 (en) * | 2008-08-22 | 2013-11-05 | Telefonaktiebolaget L M Ericsson (Publ) | Method and apparatus for avoiding unwanted data packets |
EP2538719B1 (en) * | 2011-06-24 | 2020-03-11 | Vodafone IP Licensing limited | Telecommunication networks |
US10749711B2 (en) * | 2013-07-10 | 2020-08-18 | Nicira, Inc. | Network-link method useful for a last-mile connectivity in an edge-gateway multipath system |
US9398058B2 (en) * | 2013-10-28 | 2016-07-19 | Instamedica Inc. | Systems and methods for video-conference network system suitable for scalable, private tele-consultation |
US10135789B2 (en) * | 2015-04-13 | 2018-11-20 | Nicira, Inc. | Method and system of establishing a virtual private network in a cloud service for branch networking |
US10057126B2 (en) * | 2015-06-17 | 2018-08-21 | Extreme Networks, Inc. | Configuration of a network visibility system |
JP6250595B2 (ja) * | 2015-07-01 | 2017-12-20 | e−Janネットワークス株式会社 | 通信システム及びプログラム |
US10476820B2 (en) * | 2015-08-27 | 2019-11-12 | Verizon Patent And Licensing Inc. | Proxy presence server |
US9986578B2 (en) * | 2015-12-04 | 2018-05-29 | Time Warner Cable Enterprises Llc | Apparatus and methods for selective data network access |
-
2016
- 2016-09-28 CN CN201610868265.2A patent/CN106453539B/zh active Active
-
2017
- 2017-09-25 US US16/336,682 patent/US11343787B2/en active Active
- 2017-09-25 RU RU2019110880A patent/RU2712813C1/ru active
- 2017-09-25 EP EP17854804.6A patent/EP3522496B1/en active Active
- 2017-09-25 WO PCT/CN2017/103207 patent/WO2018059354A1/zh unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060271681A1 (en) * | 2005-05-31 | 2006-11-30 | Microsoft Corporation | Re-establishing a connection for an application layer via a service layer |
CN101677324A (zh) * | 2008-09-17 | 2010-03-24 | 华为技术有限公司 | 业务管理方法、终端、网络系统及相关设备 |
US20120239727A1 (en) * | 2011-03-16 | 2012-09-20 | Kddi Corporation | Multimedia service network and method for providing the same |
CN103051551A (zh) * | 2011-10-13 | 2013-04-17 | 中兴通讯股份有限公司 | 一种分布式系统及其自动维护方法 |
CN105959349A (zh) * | 2016-04-22 | 2016-09-21 | 上海瀚之友信息技术服务有限公司 | 一种分布式服务端运行系统及方法 |
CN106453539A (zh) * | 2016-09-28 | 2017-02-22 | 广州市百果园网络科技有限公司 | 一种处理节点注册通知的方法和系统 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3522496A4 * |
Also Published As
Publication number | Publication date |
---|---|
US20200389863A1 (en) | 2020-12-10 |
CN106453539B (zh) | 2019-04-05 |
CN106453539A (zh) | 2017-02-22 |
EP3522496A1 (en) | 2019-08-07 |
EP3522496A4 (en) | 2019-10-16 |
EP3522496B1 (en) | 2020-11-04 |
RU2712813C1 (ru) | 2020-01-31 |
US11343787B2 (en) | 2022-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018059354A1 (zh) | 一种处理节点注册通知的方法和系统 | |
EP3586530B1 (en) | Methods, systems and computer readable media for providing service capability exposure function (scef) as a diameter routing agent(dra) feature | |
US9515920B2 (en) | Name-based neighbor discovery and multi-hop service discovery in information-centric networks | |
CN102263704B (zh) | 一种支持数据中心二层互联的拓扑构建方法和装置 | |
WO2020233430A1 (zh) | Tsn中控制器间通信的方法、装置及系统 | |
US8121136B2 (en) | Dynamic discovery mechanisms via inter-domain routing protocol | |
US7978631B1 (en) | Method and apparatus for encoding and mapping of virtual addresses for clusters | |
JP5691703B2 (ja) | マルチキャストネットワークシステム | |
US20150033321A1 (en) | Construct large-scale dvpn | |
CN101778113B (zh) | 组播网中rp状态检测方法、装置、rp装置和组播系统 | |
CN103873373A (zh) | 一种组播数据报文转发方法及设备 | |
US9984158B2 (en) | Finding services in a service-oriented architecture (SOA) network | |
US8102846B2 (en) | Method and apparatus for managing a multicast tree using a multicast tree manager and a content server | |
US9450914B2 (en) | Distributed proxy addressing operations | |
CN101800742B (zh) | 路由设备上游信息的更新处理方法、路由设备及网络系统 | |
CN104144124B (zh) | 数据转发方法、装置及系统 | |
US20230353479A1 (en) | Edge Computing Data and Service Discovery Using an Interior Gateway Protocol (IGP) | |
CN105516658B (zh) | 一种监控设备控制方法及装置 | |
WO2013166911A1 (zh) | 一种处理网络中设备组标识符冲突的方法和路由网桥 | |
WO2023169374A1 (zh) | 一种路由方法及系统、节点 | |
CN109412942B (zh) | 云网传输路由方法和系统 | |
CN107276774B (zh) | 一种组播报文传输方法以及转发设备 | |
JP2015192391A (ja) | ネットワークシステム、パケット伝送装置、パケット伝送方法、及び情報処理プログラム | |
CN114979037B (zh) | 一种组播方法、装置、交换机和存储介质 | |
WO2022194193A1 (zh) | 用于获取路径的方法和装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17854804 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2017854804 Country of ref document: EP Effective date: 20190429 |