Publish-Subscribe System
The introduction of a redundant broker route adjustment system with multiple lines and relay control units addresses the lack of redundancy in publish-subscribe systems, ensuring continued processing and enhanced availability even if part of the communication path is disconnected.
Patent Information
- Application Number
- JP2021025133
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-19
- Publication Date
- 2025-03-19
- Estimated Expiration
- 2041-02-19
AI Technical Summary
Existing publish-subscribe systems lack redundancy in the communication path between client devices and broker devices, leading to system unavailability if the single physical path is disconnected.
Implementing a redundant broker route adjustment system with multiple lines between client devices and broker devices, and using relay control units to manage message transmission and redundancy, ensuring continued processing even if part of the line is disconnected.
The solution enhances system availability by allowing continued processing through remaining lines if any part of the communication path is disconnected, thereby improving overall system reliability.
Smart Images

Figure 0007649162000001 
Figure 0007649162000002 
Figure 0007649162000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a publish-subscribe system. To This is related to. [Background technology]
[0002] In the publish-subscribe model, client devices on the publishing and subscribing sides each connect to a broker device, and when the publishing side sends a message and topic information related to that message to the broker device, the message is then sent to client devices that have previously requested the broker device to receive messages for that topic information.
[0003] As a means of applying availability to communication methods based on a publish-subscribe model, a configuration has been proposed in which multiple broker devices are connected between a publishing client device and a subscribing client device, creating a redundant configuration for the connected paths (see Patent Document 1).
[0004] However, the communication path between the client device and the broker device is not covered by the path redundancy means disclosed in Patent Document 1. For example, in the configuration disclosed in Patent Document 1, since there is only one physical path connecting the client device and the broker device, even if the path between the broker devices is configured redundantly, if the path between the client device and the broker device is cut off, the client device cannot perform processing. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2007-287148 A Summary of the Invention [Problem to be solved by the invention]
[0006] The present invention has been made to solve the above problems, and is capable of increasing the availability of the entire system. Rupa Brish Subscribe System M The purpose is to provide. [Means for solving the problem]
[0008] The publish-subscribe system of the present invention includes a first client device on the publishing side, a second client device on the subscribing side, a broker device which is a relay device configured to distribute a message from the first client device to the second client device, and a first communication partner is the first client device and a second communication partner is another relay device. First redundant broker path adjustment, which is a relay device device, a first communication partner is the broker device, and a second communication partner is the First redundant broker route adjustment Designed to be a device Second redundant broker path adjustment, which is a relay device a first communication partner is the second client device, and a second communication partner is another relay device. Third redundant broker path adjustment, which is a relay device device, a first communication partner is the broker device, and a second communication partner is the Third redundant broker route adjustment Designed to be a device Fourth redundant broker path adjustment, which is a relay device The device is provided with The first, second, third, and fourth redundant broker path adjustment devices each include a first relay control unit configured to transmit a message received from a first communication partner using each of a plurality of lines between the first communication partner and a second communication partner, and a second relay control unit configured to transmit one of a plurality of identical messages received from the second communication partner via the plurality of lines to the first communication partner to which the message is addressed, and to discard the remaining messages that are the same as the message to be transmitted. It is characterized by the above. Effect of the Invention
[0010] According to the present invention, since the lines between the first and second communication partners can be configured redundantly, even if some of the lines between the first and second communication partners are disconnected, the remaining lines can be used to continue processing between the first and second communication partners. As a result, the present invention can increase the availability of the entire system. [Brief description of the drawings]
[0011] [Figure 1]FIG. 1 is a block diagram showing a configuration of a publish-subscribe system according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a block diagram showing a configuration of a publishing client device according to an embodiment of the present invention. [Diagram 3] FIG. 3 is a block diagram showing a configuration of a subscribing client device according to an embodiment of the present invention. [Figure 4] FIG. 4 is a block diagram showing a configuration of a broker device according to an embodiment of the present invention. [Diagram 5] FIG. 5 is a block diagram showing a configuration of a client-side redundant broker path adjustment device according to an embodiment of the present invention. [Figure 6] FIG. 6 is a block diagram showing a configuration of a redundant broker path adjuster on the broker side according to an embodiment of the present invention. [Figure 7] FIG. 7 is a block diagram showing a configuration of a client-side redundant broker path adjustment device according to an embodiment of the present invention. [Figure 8] FIG. 8 is a block diagram showing a configuration of a redundant broker path adjuster on the broker side according to an embodiment of the present invention. [Figure 9] FIG. 9 is a flowchart illustrating the operation of the client-side redundant broker path adjuster according to an embodiment of the present invention. [Figure 10] FIG. 10 is a flowchart illustrating the operation of the redundant broker path adjuster on the broker side according to an embodiment of the present invention. [Figure 11] FIG. 11 is a flowchart illustrating the operation of the broker device according to the embodiment of the present invention. [Figure 12] FIG. 12 is a block diagram showing an example of the configuration of a computer that realizes a publish-subscribe system according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] [Principle of the invention] In the present invention, a plurality of lines are provided between the client device and the broker device, and a redundant broker path adjustment device is provided to conceal the redundant configuration of the lines from the client device.
[0013] [Example] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a publish-subscribe system according to an embodiment of the present invention. The publish-subscribe system includes client devices 1-1 to 1-3 on the publishing side, client devices 2-1 to 2-3 on the subscribing side, a broker device 3 which is a relay device that distributes messages from the client devices 1-1 to 1-3 to the client devices 2-1 to 2-3, a redundant broker path adjustment device 4 (relay device) connected to the client devices 1-1 to 1-3 on the publishing side, a redundant broker path adjustment device 5 (relay device) connected to the broker device 3 and connected to the redundant broker path adjustment device 4 via multiple lines, a redundant broker path adjustment device 6 (relay device) connected to the client devices 2-1 to 2-3 on the subscribing side, and a redundant broker path adjustment device 7 (relay device) connected to the broker device 3 and connected to the redundant broker path adjustment device 6 via multiple lines.
[0014] In this embodiment, a plurality of (three in this embodiment) client devices 1-1 to 1-3 are connected to the redundant broker path adjustment device 4, but the number of client devices on the publishing side may be one. Similarly, in this embodiment, a plurality of (three in this embodiment) client devices 2-1 to 2-3 are connected to the redundant broker path adjustment device 6, but the number of client devices on the subscribing side may be one.
[0015] 2 is a block diagram showing the configuration of client device 1-1 on the publishing side. Client device 1-1 includes a communication unit 10 that communicates with redundant broker path adjustment device 4, and a message providing unit 11 that instructs communication unit 10 to send a message to broker device 3, to which topic information specifying the registration topic is added. Client devices 1-2 and 1-3 have the same configuration as client device 1-1.
[0016] 3 is a block diagram showing the configuration of a subscribing client device 2-1. The client device 2-1 includes a communication unit 20 that communicates with the redundant broker path adjustment device 6, a registration request unit 21 that instructs the communication unit 20 to make a registration request for a topic to be distributed to the broker device 3, and a message receiving unit 22 that receives distributed messages via the communication unit 20. The configurations of the client devices 2-2 and 2-3 are the same as those of the client device 1-1.
[0017] 4 is a block diagram showing the configuration of the broker device 3. The broker device 3 includes a communication unit 30 that communicates with the redundant broker path adjustment device 5, a communication unit 31 that communicates with the redundant broker path adjustment device 7, a message storage unit 32 that stores, for each topic, messages to which topic information is added, received from the publishing client devices 1-1 to 1-3, a registration information storage unit 33 that stores, for each client device, registration information that specifies the topic to which the subscribing client devices 2-1 to 2-3 wish to be distributed, and a message relay unit 34 that instructs the communication unit 31 to transmit a message related to the topic to the client device based on the registration information.
[0018] 5 is a block diagram showing the configuration of the client-side redundant broker path adjustment device 4. The redundant broker path adjustment device 4 includes a communication unit 40 that communicates with the client devices 1-1 to 1-3, a communication unit 41 that communicates with the redundant broker path adjustment device 5, and relay control units 42 and 43 that treat the client devices 1-1 to 1-3 as first communication partners and treat the redundant broker path adjustment device 5 as a second communication partner.
[0019] 6 is a block diagram showing the configuration of the redundant broker path adjustment device 5 on the broker side. The redundant broker path adjustment device 5 includes a communication unit 50 that communicates with the redundant broker path adjustment device 4, a communication unit 51 that communicates with the broker device 3, and relay control units 52 and 53 that treat the broker device 3 as a first communication partner and treat the redundant broker path adjustment device 4 as a second communication partner.
[0020] 7 is a block diagram showing the configuration of the client-side redundant broker path adjustment device 6. The redundant broker path adjustment device 6 includes a communication unit 60 that communicates with the client devices 2-1 to 2-3, a communication unit 61 that communicates with the redundant broker path adjustment device 7, and relay control units 62 and 63 that treat the client devices 2-1 to 2-3 as first communication partners and treat the redundant broker path adjustment device 7 as a second communication partner.
[0021] 8 is a block diagram showing the configuration of the redundant broker path adjustment device 7 on the broker side. The redundant broker path adjustment device 7 includes a communication unit 70 that communicates with the redundant broker path adjustment device 6, a communication unit 71 that communicates with the broker device 3, and relay control units 72 and 73 that treat the broker device 3 as a first communication partner and treat the redundant broker path adjustment device 6 as a second communication partner.
[0022] Next, the operation of the publish-subscribe system of this embodiment will be described. The message provider 11 of the publishing client devices 1-1 to 1-3 instructs the communication unit 10 to send a message to which topic information specifying the registration topic is added, to the broker device 3. In response to the instruction from the message provider 11, the communication unit 10 of the client devices 1-1 to 1-3 sends the message to which the topic information is added, to the redundant broker path adjustment device 4.
[0023] 9 is a flowchart for explaining the operation of the client-side redundant broker path adjustment device 4. The communication unit 40 of the redundant broker path adjustment device 4 receives messages from the client devices 1-1 to 1-3 (step S100 in FIG. 9).
[0024] When the relay control unit 42 of the redundant broker path control device 4 receives a message from the client devices 1-1 to 1-3, it instructs the communication unit 41 to transmit the received message using all lines between the redundant broker path control device 5. At this time, the relay control unit 42 adds a message identifier to the message to be transmitted. In response to the instruction from the relay control unit 42, the communication unit 41 transmits the message to the redundant broker path control device 5 via all lines between the redundant broker path control device 5 (step S101 in FIG. 9).
[0025] 10 is a flowchart for explaining the operation of the broker-side redundant broker path adjustment device 5. The communication unit 50 of the redundant broker path adjustment device 5 receives the message transmitted from the redundant broker path adjustment device 4 (Step S200 in FIG. 10).
[0026] The relay control unit 52 of the redundant broker route adjustment device 5 instructs the communication unit 51 to transmit one of the multiple identical messages received from the redundant broker route adjustment device 4 via multiple lines (for example, the first received message) to the broker device 3, and discards the remaining messages that are the same as the message to be transmitted. In response to the instruction from the relay control unit 52, the communication unit 51 transmits the message to the broker device 3 (step S201 in FIG. 10).
[0027] As described above, since a message identifier is added to a received message, the relay control unit 52 can determine whether the message is the same or not based on the message identifier.
[0028] Fig. 11 is a flow chart for explaining the operation of the broker device 3. The communication unit 30 of the broker device 3 receives the message transmitted from the redundant broker route adjustment device 5 (Step S300 in Fig. 11).
[0029] The message storage unit 32 of the broker device 3 stores the message received from the redundant broker route adjustment device 5 for each topic specified in the topic information added to this message (FIG. 11, step S301).
[0030] On the other hand, the registration request unit 21 of the subscribing client devices 2-1 to 2-3 instructs the communication unit 20 to send a registration request message for a topic desired to be distributed to the broker device 3, for example, in response to a request from the user of the client devices 2-1 to 2-3. In response to the instruction from the registration request unit 21, the communication unit 20 of the client devices 2-1 to 2-3 sends the registration request message to the redundant broker path adjustment device 6.
[0031] The process of the redundant broker path adjustment device 6 is similar to that of the redundant broker path adjustment device 4, so the operation will be described with reference to Fig. 9. The communication unit 60 of the redundant broker path adjustment device 6 receives messages from the client devices 2-1 to 2-3 (step S100 in Fig. 9).
[0032] When the relay control unit 62 of the redundant broker path control device 6 receives a message from the client devices 2-1 to 2-3, it instructs the communication unit 61 to transmit the received message using all lines between the redundant broker path control device 7. At this time, the relay control unit 62 adds a message identifier to the message to be transmitted. In response to the instruction from the relay control unit 62, the communication unit 61 transmits the message to the redundant broker path control device 7 via all lines between the redundant broker path control device 7 (step S101 in FIG. 9).
[0033] The process of the redundant broker path control device 7 is similar to that of the redundant broker path control device 5, so the operation will be described with reference to Fig. 10. The communication unit 70 of the redundant broker path control device 7 receives the message transmitted from the redundant broker path control device 6 (Step S200 in Fig. 10).
[0034] The relay control unit 72 of the redundant broker path adjustment device 7 instructs the communication unit 71 to transmit one of the multiple identical messages received from the redundant broker path adjustment device 6 via multiple lines (for example, the first received message) to the broker device 3, and discards the remaining messages that are the same as the message to be transmitted. In response to the instruction from the relay control unit 72, the communication unit 71 transmits the message to the broker device 3 (step S201 in FIG. 10). As with the redundant broker path adjustment device 5, the identity of the message is determined based on the message identifier.
[0035] The communication unit 31 of the broker device 3 receives the message sent from the redundant broker route adjustment device 7 (Step S302 in FIG. 11). When the message received from the redundant broker path adjustment device 7 is a registration request message, the registration information storage unit 33 of the broker device 3 stores the registration information indicating the topic specified in the registration request message together with the client identifier of the sender of the registration request message (Figure 11, step S303).
[0036] If registration information specifying a topic is stored in the registration information storage unit 33 (YES in step S304 in FIG. 11), the message relay unit 34 of the broker device 3 retrieves a message related to the topic specified in the registration information from the message storage unit 32, and instructs the communication unit 31 to transmit the message to the client device having the client identifier included in the registration information. The communication unit 31 transmits the message received from the message relay unit 34 to the redundant broker path adjustment device 7 (step S305 in FIG. 11).
[0037] The communication unit 71 of the redundant broker route adjustment device 7 receives the message sent from the broker device 3 (Step S202 in FIG. 10). When the relay control unit 73 of the redundant broker path control device 7 receives a message from the broker device 3, it instructs the communication unit 70 to transmit the received message using all lines between the redundant broker path control device 6. At this time, the relay control unit 73 adds a message identifier to the message to be transmitted. In response to the instruction from the relay control unit 73, the communication unit 70 transmits the message to the redundant broker path control device 6 via all lines between the redundant broker path control device 6 (step S203 in FIG. 10).
[0038] The communication unit 61 of the redundant broker route control device 6 receives the message transmitted from the redundant broker route control device 7 (Step S102 in FIG. 9). The relay control unit 63 of the redundant broker path adjustment device 6 instructs the communication unit 60 to transmit one of the multiple identical messages received from the redundant broker path adjustment device 7 via multiple lines (for example, the first received message) to the client devices 2-1 to 2-3 that are the destinations of this message, and discards the remaining messages that are the same as the message to be transmitted. The communication unit 60 transmits the message to the client device instructed by the relay control unit 63 among the client devices 2-1 to 2-3 (step S103 in FIG. 9). As with the redundant broker path adjustment device 4, the identity of the message is determined based on the message identifier.
[0039] When the communication unit 20 of the client devices 2-1 to 2-3 receives a message transmitted from the redundant broker path adjustment device 6, the communication unit 20 passes the received message to the message receiving unit 22.
[0040] Thus, in this embodiment, the lines between client devices 1-1 to 1-3 and broker device 3, and the lines between client devices 2-1 to 2-3 and broker device 3 can each be configured redundantly, so that even if some of the lines between client devices 1-1 to 1-3, 2-1 to 2-3 and broker device 3 are disconnected, processing between client devices 1-1 to 1-3, 2-1 to 2-3 and broker device 3 can be continued using the remaining lines.
[0041] In this embodiment, as an example of a process of transmitting a message from the broker side to the client side, a process of transmitting a message related to a topic from the broker device 3 to the client devices 2-1 to 2-3 is described as an example. However, it goes without saying that a process of transmitting a response message, which is a processing result for a message from the client devices 1-1 to 1-3 and 2-1 to 2-3, from the broker device 3 to the client devices 1-1 to 1-3 and 2-1 to 2-3 can also be realized in the same manner as the process of transmitting a message related to a topic. The operation of the relay control unit 43 of the redundant broker path adjustment device 4 is similar to the operation of the relay control unit 63 of the redundant broker path adjustment device 6. Moreover, the operation of the relay control unit 53 of the redundant broker path adjustment device 5 is similar to the operation of the relay control unit 73 of the redundant broker path adjustment device 7.
[0042] Furthermore, in this embodiment, a topic-based method has been given as an example of a method for filtering messages, but the present invention is not limited to this, and may be applied to systems using other filtering methods.
[0043] Each of the client devices 1-1 to 1-3, 2-1 to 2-3, the broker device 3, and the redundant broker path adjustment devices 4 to 7 in this embodiment can be realized by a computer equipped with a CPU (Central Processing Unit), a storage device, and an interface with the outside, and a program that controls these hardware resources. An example of the configuration of this computer is shown in Fig. 12. The computer is equipped with a CPU 300, a storage device 301, and an interface device (I / F) 302.
[0044] Hardware such as communication units 10, 20, 30, 31, 40, 41, 50, 51, 60, 61, 70, and 71 are connected to the I / F 302. A program for implementing the communication method of the present invention is stored in the storage device 301. The CPU 300 of each device executes the processing described in this embodiment according to the program stored in the storage device 301. [Industrial Applicability]
[0045] The present invention can be applied to publish-subscribe systems. [Explanation of symbols]
[0046] 1-1 to 1-3, 2-1 to 2-3...client devices, 3...broker device, 4 to 7...redundant broker route adjustment devices, 10, 20, 30, 31, 40, 41, 50, 51, 60, 61, 70, 71...communication units, 11...message providing units, 21...registration request units, 22...message receiving units, 32...message storage units, 33...registration information storage units, 34...message relay units, 42, 43, 52, 53, 62, 63, 72, 73...relay control units.
Claims
[Claim 1] a first client device on the publishing side; a subscribing second client device; a broker device that is a relay device configured to deliver messages from the first client device to the second client device; a first redundant broker path adjustment device, which is a relay device arranged such that a first communication counterpart is the first client device and a second communication counterpart is another relay device; a second redundant broker path adjustment device which is a relay device provided so that a first communication counterpart is the broker device and a second communication counterpart is the first redundant broker path adjustment device; a third redundant broker path adjustment device, which is a relay device arranged such that a first communication counterpart is the second client device and a second communication counterpart is another relay device; a fourth redundant broker path adjustment device which is a relay device provided so that a first communication partner is the broker device and a second communication partner is the third redundant broker path adjustment device; The first, second, third, and fourth redundant broker path adjustment devices, A first relay control unit configured to transmit a message received from a first communication partner using each of a plurality of lines between the first communication partner and a second communication partner; and a second relay control unit configured to transmit one of the multiple identical messages received from the second communication partner via the multiple lines to the first communication partner to which the message is addressed, and to discard remaining messages identical to the message to be transmitted.
Citation Information
Patent Citations
Dynamic access control in content-based publish / subscribe system with delivery guarantee
JP2007287148A
Fault-tolerant switch architecture
US20030065974A1