WO2018096641A1 - クライアント、ブローカ、通信システム、通信方法及びプログラム - Google Patents
クライアント、ブローカ、通信システム、通信方法及びプログラム Download PDFInfo
- Publication number
- WO2018096641A1 WO2018096641A1 PCT/JP2016/084909 JP2016084909W WO2018096641A1 WO 2018096641 A1 WO2018096641 A1 WO 2018096641A1 JP 2016084909 W JP2016084909 W JP 2016084909W WO 2018096641 A1 WO2018096641 A1 WO 2018096641A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- connection
- message
- broker
- topic
- client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- 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/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/562—Brokering proxy services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/214—Monitoring or handling of messages using selective forwarding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/226—Delivery according to priorities
-
- 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/50—Network services
- H04L67/55—Push-based network services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/222—Monitoring or handling of messages using geographical location information, e.g. messages transmitted or received in proximity of a certain spot or area
-
- 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/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
Definitions
- the present invention relates to a client, a broker, a communication system, a communication method, and a program.
- a broker collects vehicle information acquired by a client such as an in-vehicle device and transmits the vehicle information to the server.
- a communication system for distributing a message transmitted from the client to each client is disclosed.
- the broker stores messages sent from the server while communication with the client is disconnected. , It has a function of batch distributing messages stored immediately after reconnecting communication with the client.
- the transmission / reception of a message that requires immediate transmission and delivery confirmation such as authentication processing between the client and the server, is requested during the batch delivery of the accumulated messages, the request is kept until the batch delivery is completed. The corresponding message cannot be sent and received.
- the stored message capacity is large, transmission / reception of messages that require immediate transmission and delivery confirmation may be delayed, and authentication processing may not be performed within the required time.
- the present invention has been made in view of such a problem, and suppresses delay in transmission / reception of a message that requires immediate transmission by a batch distribution process of accumulated messages executed at the time of reconnection.
- client, broker, communication system, communication method and program Provided are client, broker, communication system, communication method and program.
- the client (10) is a client that is connectable to the broker (20) and transmits / receives messages associated with the topic to / from the server (30) via the broker.
- a connection processing unit that establishes a first connection for transmitting / receiving a first message among the messages and a second connection for transmitting / receiving a second message to / from the broker ( 101) and requesting the broker to designate a first topic and subscribe to the first message associated with the first topic using the first connection; And subscribing to the second message associated with the second topic using the second connection.
- Subscription request unit that determined (102), The first message associated with a third topic is transmitted to the broker using the first connection, and the second message associated with a fourth topic is transmitted using the second connection.
- a message transmission unit (103) for transmission By having such a configuration, even when the broker performs batch delivery processing of the accumulated messages after the broker and the client are reconnected, the client can perform one of the first connection and the second connection. Subscribes to (receives) messages distributed in a batch using, and uses the other to send and receive messages that require immediate transmission in parallel. Therefore, the client can suppress a delay in transmission / reception of a message that requires immediate transmission due to a process of receiving the collectively distributed message.
- the connection processing unit sends the second message requesting subscription to the broker to the second connection. Requests to accumulate in the broker while being cut.
- the client can accumulate the second message in the broker while the second connection with the broker is disconnected. Then, after the second connection is reconnected, the client receives batch delivery of the second message accumulated from the broker, thereby preventing the second message from being missed.
- the client further includes an authentication processing unit (104) that performs authentication with the server, and the authentication processing unit includes: After the first connection is established with the broker, the first message associated with the topic used for authentication with the server is transmitted / received using the first connection.
- the client needs immediate transmission used for authentication processing with the server even if the second message distributed from the broker is being received using the second connection.
- the first message to be transmitted can be transmitted and received using the first connection. Thereby, transmission / reception of the message regarding the authentication process with the server is not delayed, and the failure of the process such as the authentication process not being completed within the requested time can be suppressed.
- the broker is a broker that is connectable to a client and a server via a network and mediates transmission / reception of messages associated with each topic between the client and the server.
- the connection information used when connecting with the client includes, as the connection information, the connection information of the first connection for transmitting / receiving the first message, and the second for transmitting / receiving the second message.
- Connection information storage unit (201) that stores connection information of each connection for each client, subscription information that links the first topic and the connection information of the first connection based on the request of the client, Subscription information associated with the second topic and the connection information of the second connection; And storing the first message associated with the first topic while the first connection is established based on the subscription information and the subscription information storage unit (202) for storing the first connection And the second message associated with the second topic is distributed using the second connection while the second connection is established, and the second connection A message delivery unit (203) for storing the second message associated with the second topic while the connection is disconnected.
- the broker does not accumulate the first message while the first connection and the second connection with the client are disconnected, and accumulates the second message.
- the broker can perform the batch delivery of the second message without performing the batch delivery of the first message after the client and the first connection and the second connection are reconnected.
- the broker continues the collective delivery of the second message accumulated using the second connection, and continues with the first connection. Can be used to deliver the first message that requires immediate transmission in parallel. Therefore, the broker can suppress delay in transmission / reception of the first message requiring immediate transmission by the batch delivery process of the accumulated second message.
- a communication system for transmitting messages between the client according to any one of the above aspects, the broker according to the above aspect, and the client via the broker.
- a server that performs transmission and reception.
- a communication method is a communication method for transmitting and receiving messages according to topics between a client and a server via a broker, wherein the message is transmitted between the broker and the client.
- a program that functions as a client computer that is connectable to a broker and that transmits and receives messages by topic to and from a server via the broker.
- a connection processing unit that establishes a first connection for transmitting and receiving a first message and a second connection for transmitting and receiving a second message.
- a first topic is specified, the first message associated with the first topic is requested to be subscribed using the first connection, a second topic is specified, and the second message is specified.
- a subscription request requesting that the second message associated with the topic be subscribed using the second connection.
- the first message associated with a third topic is transmitted to the broker using the first connection, and the second message associated with a fourth topic is transmitted to the broker through the second connection. It is made to function as a message transmission part to transmit using.
- FIG. 1 is a diagram illustrating an overall configuration of a communication system according to an embodiment of the present invention. It is a figure which shows the function structure of the client and broker which concern on one Embodiment of this invention. It is a figure which shows the example of the subscription list of the client which concerns on one Embodiment of this invention. It is a figure which shows the example of the issue list
- FIG. 1 is a diagram showing an overall configuration of a communication system according to an embodiment of the present invention.
- the communication system 1 is a publish / subscribe communication system using, for example, MQTT.
- the communication system 1 includes a plurality of clients 10 a, 10 b, 10 c..., A broker 20, and a server 30.
- the plurality of clients 10a, 10b, 10c,... are also collectively referred to as clients 10.
- the client 10 is, for example, a mobile communication terminal such as a smartphone, an in-vehicle device mounted on a vehicle, or the like.
- the client 10 can be connected to the broker 20 by wireless communication, and transmits / receives a message to / from the server 30 via the broker 20.
- the broker 20 is installed in the information center 2, can be connected to the client 10 by wireless communication, and is always connected to the server 30 by wired communication.
- the broker 20 mediates message transmission / reception between the client 10 and the server 30.
- the server 30 is always connected to the broker 20 by wired communication or the like, and transmits and receives messages to and from the client 10 via the broker 20.
- the server 30 includes a server 30 a installed in the same information center 2 as the broker 20.
- the server 30 may have a server (external server) 30b installed outside the information center 2.
- the server 30a and the server 30b may have different functions.
- the server 30a may have a function of charging a usage fee when the client 10 uses a toll road
- the server 30b may have a function of transmitting traffic information for each road.
- the server 30 may have only one server 30a, and the server 30a may have a plurality of functions.
- the vehicle-mounted device 10 and the server 30 function as a publisher that transmits (issues) a message to the broker 20 and also functions as a subscriber (client) that receives (subscribes) a message from the broker 20.
- the broker 20 collects messages from the in-vehicle device 10 and the server 30, and distributes the message requested by the in-vehicle device 10 and the server 30 to the on-vehicle device 10 and the server 30, thereby the on-vehicle device 10 and the server 30. It mediates the transmission and reception of messages with 30.
- the on-vehicle device 10 and the server 30 When the on-vehicle device 10 and the server 30 transmit a message to the broker 20 and request the broker 20 to subscribe to the message, the on-vehicle device 10 and the server 30 specify a topic, and transmit and subscribe messages related to the topic. Make a request.
- the broker 20 identifies the in-vehicle device 10 and the server 30 to which each message is distributed by comparing the topic associated with the message with the topic specified at the time of the subscription request from the in-vehicle device 10 and the server 30. .
- the topic indicates an attribute of information included in the message, and one topic is designated for each message.
- topics specified when the client 10 transmits a message include a topic indicating the current position of the client 10, a topic indicating the moving speed, and a topic indicating acceleration.
- the client 10 designates a topic indicating the current position, and transmits a message including information (latitude, longitude, etc.) of the current position of the client 10 to the broker 20.
- topics specified when the server 30 transmits a message include a topic indicating traffic information by road, a topic indicating facility information such as a service area, a topic indicating event information by region, and the like.
- the server 30 designates a topic indicating the traffic information on the road X and transmits a message including the traffic information (congestion status, traffic flow, etc.) on the road X to the broker 20.
- FIG. 2 is a diagram illustrating a functional configuration of the client and the broker according to the embodiment of the present invention.
- the client 10 includes a connection processing unit 101, a subscription request unit 102, a message transmission unit 103, an authentication processing unit 104, a connection state monitoring unit 105, and a storage medium 110. .
- connection processing unit 101 performs wireless communication connection with the broker 20.
- the connection processing unit 101 establishes two wireless communication connections between the broker 20, a connection A (first connection) and a connection B (second connection).
- connection A is used for sending and receiving a message that requires immediate transmission, delivery confirmation, and encryption.
- the necessary message is not transmitted / received within a predetermined period. And processing fails. That is, a necessary message is immediately transmitted between the server 30 and the client 10 so that the authentication process can be completed within a predetermined period, and the message is delivered to confirm whether the message has surely arrived between the server 30 and the client 10. Confirmation is required.
- connection A is used for transmitting and receiving messages associated with authentication information topics, billing information topics, and the like that require immediate transmission, delivery confirmation, and encryption.
- messages that require immediate transmission, delivery confirmation, and encryption are collectively referred to as “urgent message (first message)”, and the topic attached to the urgent message is “urgent topic”. Called.
- connection B is used for transmitting and receiving a message that does not require immediate transmission, delivery confirmation, and encryption.
- the client 10 periodically acquires movement information indicating the movement state of the client 10 such as the current position, movement speed, and acceleration (for example, every 10 seconds), and acquires movement information topics for each client (current position topic, movement speed).
- a message associated with a topic, an acceleration topic, etc.) is transmitted to the broker 20.
- the server 30 subscribes and collects messages associated with the movement information topic of each client 10, and generates traffic congestion information for each road based on the movement information every predetermined period (for example, one hour) and transmits it to the broker 20. To do.
- the client 10 subscribes to a message associated with a traffic jam information topic on a road included in the travel route, and proposes a new travel route as necessary.
- a message associated with such a movement information topic and a traffic jam information topic it is not necessary to confirm whether or not the message has surely arrived at the client 10 and the server 30. Further, even when such message transmission / reception is delayed, there is no inconvenience such as processing failure in the client 10 and the server 30.
- the connection B is used to transmit and receive messages associated with a mobile information topic, a traffic jam information topic, and the like that do not require immediate transmission, delivery confirmation, and encryption.
- normal message second message
- normal topic the topic attached to the normal message
- a message associated with each topic may be changed for each communication system 1.
- a message associated with the current location topic may be treated as an “urgent message” as it requires encryption.
- the subscription request unit 102 designates a topic to the broker 20 and requests subscription of a message associated with the topic.
- topics are determined in advance between the server 30 and the client 10, and the subscription request unit 102 designates a necessary topic from the predetermined topics and requests subscription. May be performed.
- FIG. 3 is a diagram illustrating an example of a client subscription list according to an embodiment of the present invention.
- the subscription request unit 102 includes a “topic” that specifies information for requesting subscription and a “connection type” that is used when subscribing a message associated with the topic. Is stored in the storage medium 110. “Connection type” is information indicating which of connection A and connection B is used to subscribe to a message.
- the subscription request unit 102 sets the connection type based on the content of the message. For example, when the subscription request unit 102 requests subscription of a message for performing authentication processing, billing processing, and the like, these messages are urgent messages that need to be subscribed without delay. Therefore, the subscription request unit 102 sets connection A as the connection type for the urgent topic (first topic) used for urgent message subscription. In addition, for example, the subscription request unit 102 sets connection B as the connection type for a normal topic (second topic) used for subscribing a normal message such as road-specific traffic jam information. That is, when making a subscription request to the broker 20 by designating an urgent topic (first topic), the subscription request unit 102 subscribes the urgent message associated with the urgent topic using the connection A. Request.
- the subscription request unit 102 when the subscription request unit 102 makes a subscription request to the broker 20 by designating a normal topic (second topic), the subscription request unit 102 subscribes a normal message associated with the normal topic using the connection B. Request. Note that the subscription request unit 102 may delete a topic that no longer requires subscription from the subscription list D11.
- the subscription request unit 102 specifies a topic and connection information for the broker 20 at least one of when establishing connection A and connection B, and at the time of updating the subscription list D11, and is associated with each topic. Request to subscribe to a message.
- the message transmission unit 103 transmits a message in which a topic is associated with each message to the broker 20 using a connection type (connection A and connection B) according to the content of the message.
- a topic is determined in advance between the server 30 and the client 10, and the message transmitting unit 103 transmits a message that associates a necessary topic from a predetermined topic, Send to broker 20.
- the message transmission unit 103 encrypts a message to be transmitted using the connection A and transmits the message without encrypting a message to be transmitted using the connection B. .
- FIG. 4 is a diagram showing an example of a client issue list according to an embodiment of the present invention.
- the message transmission unit 103 uses a “topic” predetermined according to the content of the message to be transmitted and a “connection type” used when transmitting a message associated with the topic. ”Is stored in the storage medium 110. For example, when transmitting messages for performing authentication processing, billing processing, etc., these messages are urgent messages that need to be transmitted without delay. For this reason, the message transmission unit 103 sets connection A as the connection type for the urgent topic (third topic) used for urgent message transmission.
- the message transmission unit 103 sets connection B as the connection type for a normal topic (fourth topic) used for transmission of a normal message such as the moving speed of the client 10. That is, the message transmission unit 103 transmits an urgent message associated with the urgent topic (third topic) to the broker 20 using the connection A. Further, the message transmission unit 103 transmits a normal message associated with the normal topic (fourth topic) to the broker 20 using the connection B. Note that the message transmission unit 103 may delete a topic that is no longer required from the issue list D12.
- the authentication processing unit 104 performs processing for requesting authentication for accessing the server 30 or authentication for accessing a function of the server 30 as necessary after the connection processing unit 101 completes the connection with the broker 20. I do.
- the authentication processing unit 104 treats a topic related to the authentication process with the server 30 as an “urgent topic”. For this reason, all messages transmitted by the authentication processing unit 104 are transmitted using the connection A after being encrypted. All messages subscribed by the authentication processing unit 104 are subscribed using the connection A, and decrypted by the authentication processing unit 104.
- connection state monitoring unit 105 monitors the state of wireless communication connection with the broker in connection A and the state of wireless communication connection with the broker 20 in connection B. In the present embodiment, the connection state monitoring unit 105 monitors whether the connection A and the connection B are normally connected.
- the storage medium 110 stores various information related to communication with the broker 20.
- the storage medium 110 stores a subscription list D11 updated by the subscription request unit 102 and an issue list D12 updated by the message transmission unit 103.
- the broker 20 includes an MQTT function unit 200 and a storage medium 210.
- the MQTT function unit 200 includes a connection information storage unit 201, a subscription information storage unit 202, a message distribution unit 203, and a client connection monitoring unit 204.
- FIG. 5 is a diagram showing an example of a broker connection information table according to an embodiment of the present invention.
- the connection information storage unit 201 adds connection information used for connection with the client 10 to the connection information table D ⁇ b> 21 and stores the connection information in the storage medium 210.
- the connection information table D21 includes a “client ID” that can identify the client 10, a “connection type”, a “connection ID” and a “password” used for connection with the client 10, and “message storage necessity”. , A table for accumulating connection information associated with “necessity of storing subscription information” for each client.
- the “connection type” is a connection type designated by the client 10, and either connection A or connection B is set.
- “Connection ID” and “Password” are information for identifying a combination of the client 10 and the connection type, and different IDs and passwords are set for the respective combinations.
- “Message accumulation necessity” is a setting designated by the client 10, and among messages collected by the broker 20 while the connection with the client 10 is disconnected, a message for which the client 10 is requesting a subscription. This is a setting indicating whether or not to collectively transmit (collectively deliver) messages accumulated when the client 10 is reconnected with the client 10.
- “Subscription information storage necessity” is a setting designated by the client 10, and when the connection between the client 10 and the broker 20 is disconnected, subscription information including a topic requested by the client 10 to be subscribed is stored. This is a setting indicating whether or not to perform.
- connection information storage unit 201 does not recognize that one client (for example, the client 10a) connects to the broker 20 using two connection types, but only recognizes that a different connection is performed for each connection ID. It may be.
- FIG. 6 is a diagram showing an example of a broker subscription information table according to an embodiment of the present invention.
- the subscription information storage unit 202 stores subscription information that links a topic and connection information that can identify the client 10 and the server 30 that are delivery destinations that request subscription of the topic. In addition to the subscription information table D22, it is stored in the storage medium 210. Further, the subscription information storage unit 202, when the connection with the client 10 is disconnected, and when the “subscription setting storage necessity” of the client 10 is “unnecessary” in the connection information table D21, the subscription information table D22. The subscription information related to the client 10 is deleted.
- the subscription information table D22 is a table that accumulates the connection information that can identify the client 10 and the server 30 in association with the “topic” that the client 10 and the server 30 request to subscribe to.
- part of the connection information specifically, “client ID” and “connection type” are recorded in the subscription information table D22.
- other information (“connection ID”, “password”, etc.) of connection information may be further recorded in the subscription information table D22. Note that when the “client ID” indicates the server 30, the “connection type” may not be set. In another embodiment, “connection ID” may be stored instead of “client ID” and “connection type”.
- the message distribution unit 203 distributes the message transmitted (issued) from the client 10 and the server 30 to the client 10 and the server 30 that are distribution destinations requesting the subscription of the message based on the subscription information table D22. .
- the message delivery unit 203 searches and extracts the delivery destinations that have requested subscription of each message from the subscription information table D22 using the topic specified in each message as a key. Then, the message delivery unit 203 delivers the message associated with the topic to the extracted delivery destination. If the delivery destination is the client 10, a message is transmitted to the client 10 using either the connection A or the connection B based on the subscription information table D22.
- the message delivery unit 203 is set to “necessary” when the connection with the client 10 requesting to subscribe to the message is disconnected, and “message accumulation necessity” in the connection information table D21 is set.
- the storage medium 210 stores and accumulates a message for the topic for which the client requests subscription.
- the message delivery unit 203 reads the accumulated message from the storage medium 210 and delivers it in a batch.
- the client connection monitoring unit 204 monitors the connection status with the client 10. In this embodiment, the client connection monitoring unit 204 monitors whether the connection A and the connection B of the client 10 are normally connected.
- the storage medium 210 stores messages transmitted from the client 10 and the server 30, and includes a connection information table D21 updated by the connection information storage unit 201 and a subscription information table D22 updated by the subscription information storage unit 202. It is remembered.
- FIG. 7 is a processing flow for explaining a client connection process according to an embodiment of the present invention.
- FIG. 8 is a process flow for explaining a client subscription process according to an embodiment of the present invention.
- the client 10 when the client 10 is activated or enters the wireless communication area, the client 10 enters a wireless communication enabled state (S101).
- the connection processing unit 101 of the client 10 performs a connection process between the broker 20 and the connection A (step S102).
- connection processing unit 101 connects the connection A connection information (“client ID”, “connection type (connection A)”, “connection ID”, “password”, “message storage necessity”, and “subscription information”).
- a connection request message including “necessity of storage”) is transmitted to the broker 20.
- “message accumulation necessity” of connection A is always set to “unnecessary (no message is accumulated)”.
- the broker 20 does not accumulate messages, and the accumulated messages are not delivered in a lump, so that messages can be sent and received urgently without delay.
- the connection process part 101 will complete
- the subscription request unit 102 of the client 10 performs a subscription process for a message to be subscribed using the connection A based on the subscription list D11 (FIG. 3) stored in the storage medium 106 (step S103). ). Specifically, as shown in FIG. 8, the subscription request unit 102 first determines whether or not the connection A with the broker 20 is the first connection (step S111). If the connection A is not the first connection with the broker 20 (step S111: NO), the subscription request unit 102 has the “subscription information storage necessity” of the connection A set to “unnecessary (not stored)”. It is determined whether or not (step S112).
- step S112 NO
- the subscription information related to the connection A of the client 10 is stored in the broker 20;
- the unit 102 ends the subscription process.
- connection A with broker 20 is the first connection (step S111: YES)
- “subscription information storage necessity” of connection A is set to “unnecessary” (step S112: YES). Since the broker 20 does not store the subscription information related to the connection A of the client 10, the subscription request unit 102 transmits a subscription request message to the broker 20 (step S113).
- the subscription request unit 102 extracts topics whose “connection type” is “connection A” from the topics stored in the subscription list D11. Then, the subscription request unit 102 transmits a subscription request message including the extracted “topic”, “client ID”, and “connection type (connection A)” to the broker 20. In the example of FIG. 3, the subscription request unit 102 extracts an authentication information topic and an accounting information topic from the subscription list D11 as topics whose “connection type” is “connection A”. Then, the subscription request unit 102 designates the extracted authentication information topic and billing information topic, and transmits a message requesting to subscribe to the message associated with each topic using the connection A to the broker 20. When the subscription request unit 102 receives a response message to the subscription request message from the broker 20, the subscription request unit 102 ends the subscription process for the connection A and proceeds to the next step.
- the authentication processing unit 104 performs an authentication process for accessing the server 30 or for accessing a function of the server 30 (step S104). Specifically, the authentication processing unit 104 designates the authentication information topic of the client 10 based on the issue list D12 stored in the storage medium 110 and transmits a message using the connection A. At this time, the authentication processing unit 104 encrypts and transmits the message. Further, when receiving a message (response message transmitted from the server 30) associated with the authentication information topic of the client 10 from the broker 20, the authentication processing unit 104 decrypts the message and analyzes the content of the message.
- a message response message transmitted from the server 30
- the authentication processing unit 104 further encrypts the message associated with the authentication information topic and transmits it using the connection A. As described above, the authentication processing unit 104 performs authentication processing with the server 30 by transmitting and receiving messages to the topic related to the authentication of the client 10 to and from the server via the broker 20. When the authentication processing unit 104 completes the authentication process, the process proceeds to the next step.
- connection processing unit 101 of the client 10 performs a connection process between the broker 20 and the connection B (step S105). Specifically, the connection processing unit 101 connects the connection information of connection B (“client ID”, “connection type (connection B)”, “connection ID”, “password”, “message storage necessity” and “subscription information”). A connection request message including “necessity of storage”) is transmitted to the broker 20. In this embodiment, “message accumulation necessity” of connection B will be described as “necessary (accumulated)” is set. As a result, the client 10 causes the broker 20 to store a message associated with the topic requested by the client 10 among the messages transmitted while the connection B with the broker 20 is disconnected.
- Messages accumulated after B reconnection can be received at once.
- the setting of “message storage necessity” may be changed for each client.
- the connection process part 101 will complete
- the subscription request unit 102 of the client 10 performs a subscription process for a topic to be subscribed using the connection B based on the subscription list D11 stored in the storage medium 106 (step S106). Specifically, the subscription request unit 102 determines whether or not the connection B with the broker 20 shown in FIG. 8 is the first connection (step S111), as in the connection A subscription process (step S103). Then, it is determined whether or not “subscription information storage necessity” of the connection B is set to “unnecessary (not stored)” (step S112).
- connection B with broker 20 is not the first connection (step S111: NO), and when “subscription information storage necessity” of connection B is set to “necessary” (step S112: NO), broker Since the subscription information related to the connection B of the client 10 is stored in 20, the subscription request unit 102 ends the subscription process.
- connection B with broker 20 is the first connection (step S111: YES), or when “subscription information storage necessity” of connection B is set to “unnecessary” (step S112: YES). Since the broker 20 does not store subscription information related to the connection B of the client 10, the subscription request unit 102 transmits a subscription request message to the broker 20 (step S113).
- the subscription request unit 102 extracts topics whose “connection type” is “connection B” from the topics stored in the subscription list D11. Then, the subscription request unit 102 transmits a subscription request message including the extracted topic, “client ID”, and “connection type (connection B)” to the broker 20.
- the subscription request unit 102 extracts the traffic congestion information topic of the road X and the service area (SA) information topic of the road X as topics whose “connection type” is “connection B” from the subscription list D11. .
- SA service area
- the subscription request unit 102 designates the extracted traffic information topic of the road X and the SA information topic of the road X, and requests a message requesting to subscribe the message associated with each topic using the connection B. Send to broker 20.
- the subscription request unit 102 ends the connection B subscription process.
- the subscription request unit 102 performs the subscription process in each of the connection A and the connection B, so that the “urgent message” is subscribed to the connection A and the “normal message” is subscribed to the connection B. Depending on the content of the message, you can subscribe to the message using different connections.
- the subscription process may be performed a plurality of times instead of only once after the connection A and the connection B are established. That is, the subscription request unit 102 may change the topic to be subscribed according to the state of the client 10 and perform a subscription process and send a subscription request message to the broker 20 each time the change is made. Specifically, the subscription request unit 102 adds the congestion information topic of the road Y where the client 10 is located to the subscription list D11 based on the current position of the client 10, and the congestion information of the road X that the client 10 has already passed. The topic may be deleted from the subscription list D11 to change the subscription list D11. When the subscription request unit 102 changes the subscription list D11, the subscription request unit 102 transmits a subscription request message to the broker 20.
- the subscription request unit 102 when receiving a message from the server 30 in order to perform charging processing for a toll road, the subscription request unit 102 adds a charging information topic related to the charging processing to the subscription list D11. At this time, the subscription request unit 102 determines that the charging information topic is “urgent topic”, and sets the connection type to “connection A”. In this way, the client 10 associates with the traffic jam information topic accumulated from the broker 20 at the same timing as the billing process when the connection with the broker 20 is established immediately before the toll road billing process is performed. Even when the received message is distributed in bulk, the message associated with the accounting information topic is transmitted / received using connection A, and the message associated with the traffic jam information topic is transmitted using connection B. Done.
- FIG. 9 is a process flow for explaining the connection monitoring process of the client and the broker according to the embodiment of the present invention.
- the connection monitoring process for the connection A of the client 10 will be described as an example, but the same connection monitoring process is performed for the connection B of the client 10.
- Pattern 1 in FIG. 9 is an example showing a flow of connection monitoring processing when the client 10 is located in the wireless communication area.
- the connection state monitoring unit 105 of the client 10 transmits a connection confirmation message to the broker 20 using the connection A every predetermined connection determination time (for example, 60 seconds) ( Step S201).
- the client connection monitoring unit 204 of the broker 20 connects to the client 10 based on whether a connection confirmation message is received using the connection A within the connection determination time. The state is confirmed (step S202).
- the client connection monitoring unit 204 of the broker 20 determines that the connection with the client 10 is normally maintained.
- the client connection monitoring unit 204 of the broker 20 transmits a response message to the connection confirmation message to the client 10 (step S203).
- the client 10 determines that the connection A is normally connected by receiving the response message from the broker 20 within a predetermined response determination time (for example, 5 seconds) after transmitting the connection confirmation message (Step S10). S204).
- pattern 2 in FIG. 9 is an example showing a flow of connection monitoring processing when the client 10 is located outside the wireless communication area such as underground.
- the connection state monitoring unit 105 of the client 10 transmits a connection confirmation message (step S201), but the connection confirmation message does not reach the broker 20 because it is out of the wireless communication area. For this reason, since a response message is not returned from the broker 20 within the response determination time, the connection state monitoring unit 105 of the client 10 determines that the connection A has been disconnected (step S204).
- the client connection monitoring unit 204 of the broker 20 confirms the connection state with the client 10 based on whether or not a connection confirmation message is received using the connection A within the connection determination time (step S202).
- a connection confirmation message is received using the connection A within the connection determination time.
- the broker 20 since the broker 20 cannot receive the connection confirmation message from the client 10 within the connection determination time, it is determined that the connection A of the client 10 is not normally connected, and the connection A of the client 10 is disconnected.
- Step S205 The client 10 and the broker 20 determine whether or not the connection A and the connection B are normally connected by repeating the connection monitoring process described above for each of the connection A and the connection B.
- FIG. 10 is a first processing flow for explaining message processing of the broker according to the embodiment of the present invention.
- message processing in a state where the client 10 and the broker 20 are normally connected will be described with reference to FIG.
- message processing is performed as follows.
- the message transmission unit 103 of the client 10 specifies a topic and a connection type (connection A and connection B) set for the topic based on the issue list D12 (FIG. 4), and transmits a message to the broker 20. (Step S211).
- the message transmission unit 103 of the client 10 transmits the “message A1” to the broker 20 using the connection A based on the issue list D12 ( Step S211_A). At this time, the message transmitting unit 103 of the client 10 transmits the message after encrypting the “message A1” transmitted using the connection A.
- the message delivery unit 203 of the broker 20 specifies the delivery destination of the “message A1” based on the subscription information table D22 (FIG. 6) (step S212).
- Step S213 When the message delivery unit 203 of the broker 20 identifies a delivery destination (for example, the server 30) requesting subscription of the billing information topic specified in the “message A1”, whether or not the delivery destination 203 is normally connected to the delivery destination. (Step S213).
- the message delivery unit 203 of the broker 20 When the message delivery unit 203 of the broker 20 is normally connected to the delivery destination, the message delivery unit 203 delivers “message A1” to the delivery destination (server 30) (step S214).
- the message transmission unit 103 of the client 10 transmits “message B1” associated with the current location topic of the client 10, transmits the “message B1” to the broker 20 using the connection B based on the issue list D12. Transmit (step S211_B). At this time, the message transmission unit 103 of the client 10 transmits the message without encrypting the “message B1” transmitted using the connection B.
- the message delivery unit 203 of the broker 20 specifies the delivery destination of the “message B1” based on the subscription information table D22 (step S212).
- the message delivery unit 203 of the broker 20 When the message delivery unit 203 of the broker 20 identifies a delivery destination (for example, the server 30) requesting subscription of the current location topic of the client 10 specified in the “message B1”, the message delivery unit 203 is normally connected to the delivery destination. (Step S213). When the message delivery unit 203 of the broker 20 is normally connected to the delivery destination, the message delivery unit 203 delivers “message B1” to the delivery destination (server 30) (step S214).
- a delivery destination for example, the server 30
- the message delivery unit 203 delivers “message B1” to the delivery destination (server 30) (step S214).
- message processing is performed as follows.
- the server 30 transmits “message X1” associated with the accounting information topic as a response to the previously received “message A1” (step S215).
- the message delivery unit 203 of the broker 20 identifies the delivery destination of the “message X1” based on the subscription information table D22 (FIG. 6) (step S212).
- the message delivery unit 203 of the broker 20 identifies a delivery destination (for example, connection A of the client 10) that requests subscription of the client billing information topic specified in the “message X1”, the message delivery unit 203 normally connects to the delivery destination.
- step S223 When the message delivery unit 203 of the broker 20 is normally connected to the delivery destination, the message delivery unit 203 delivers “message X1” to the delivery destination (connection A of the client 10) (step S214).
- the message delivery unit 203 of the broker 20 may omit step S213 for confirming the connection state when the delivery destination is the server 30. Good.
- FIG. 11 is a second processing flow for explaining broker message processing according to an embodiment of the present invention.
- message processing in a state where the connection between the client 10 and the broker 20 is disconnected will be described with reference to FIG. For example, it is assumed that the client 10 moves out of the wireless communication area such as underground and the connection A and the connection B are disconnected.
- the server 30 transmits “message Y1” associated with the traffic jam information topic (step S215)
- the message delivery unit 203 of the broker 20 sends the delivery destination of the “message Y1” as in the flow of FIG. Identification (step S212) and confirmation of the connection state of the distribution destination (step S213).
- the message delivery unit 203 of the broker 20 stores and accumulates the “message Y1” in the storage medium 210 when the connection B of the client 10 that is the delivery destination of the “message Y1” is disconnected (Step S1). S216).
- the server 30 transmits “message Z1” associated with the service area (SA) information topic (step S215)
- the message delivery unit 203 of the broker 20 performs the same processing (steps S212 to S213). If the distribution destination (connection B of the client 10) is disconnected, the “message Z1” is stored and stored in the storage medium 210 (step S216).
- connection processing unit 101 of the client 10 When the client 10 moves into the wireless communication area, the connection processing unit 101 of the client 10 performs connection processing and subscription processing for the connection A and connection B (steps S102 to S103 and steps S105 to S106 in FIG. 7). In FIG. 11, the subscription process is not shown.
- the authentication processing unit 104 of the client 10 transmits “message A2” associated with the authentication information topic of the client 10 as an authentication process (step S104 in FIG. 7) (step S104). S211).
- the message delivery unit 203 of the broker 20 specifies the delivery destination of the “message A2” (step S212) and confirms the connection status of the delivery destination (step S213), similarly to the flow of FIG.
- “Message A2” is distributed to the distribution destination (server 30) (step S214).
- “message X2” associated with the authentication information topic is transmitted from the server 30 as a response to “message A2” (step S215)
- the message delivery unit 203 of the broker 20 performs the same processing as described above
- the “message X2” is distributed to the client 10 using the connection A (steps S212 to S214).
- the message delivery unit 203 of the broker 20 performs batch delivery of normal messages stored in the storage medium 210 in parallel with delivery of the message (“message X2”) associated with the authentication information topic of the connection A of the client 10. I do. Specifically, when the connection B of the client 10 is established, the message distribution unit 203 of the broker 20 sets a topic that the client 10 requests to subscribe using the connection B among the messages stored in the storage medium 210. The associated messages (“message Y1” and “message Z1”) are read out, and the accumulated messages are collectively delivered (step S217).
- the client 10 subscribes to the normal message batch-distributed using the connection B even when the normal message accumulated from the broker 20 is batch-delivered, and the connection A
- the urgent message such as the message associated with the authentication information topic can be transmitted and received in parallel.
- FIG. 12 is a diagram illustrating an example of a hardware configuration of a client and a broker according to an embodiment of the present invention.
- the computer 900 includes a CPU 901, a main storage device 902, an auxiliary storage device 903, an input / output interface 904, and a communication interface 905.
- the client 10 described above is mounted on the computer 900.
- the above-described broker 20 is mounted on a computer 900 different from the client 10.
- the operations of the processing units of the client 10 and the broker 20 described above are stored in the auxiliary storage device 903 of each computer 900 in the form of a program.
- the CPU 901 reads a program from the auxiliary storage device 903, develops it in the main storage device 902, and executes the above processing according to the program.
- the CPU 901 of the client 10 secures a storage area corresponding to the storage medium 110 in the main storage device 902 according to the program, and the CPU 901 of the broker 20 allocates a storage area corresponding to the storage medium 210 according to the program. To ensure. In addition, the CPU 901 ensures a storage area for storing data being processed in the auxiliary storage device 903 according to the program.
- the computer 900 is connected to the external storage device 910 via the input / output interface 904, and a storage area corresponding to the storage medium 110 of the client 10 or the storage medium 210 of the broker 20 is secured in the external storage device 910. May be.
- the computer 900 is connected to the external storage device 920 via the communication interface 905, and a storage area corresponding to the storage medium 110 of the client 10 or the storage medium 210 of the broker 20 is secured in the external storage device 920. Also good.
- the auxiliary storage device 903 is an example of a tangible medium that is not temporary.
- Other examples of the tangible medium that is not temporary include a magnetic disk, a magneto-optical disk, a CD-ROM, a DVD-ROM, and a semiconductor memory connected via the input / output interface 904.
- this program is distributed to the computer 900 via a communication line, the computer 900 that has received the distribution may develop the program in the main storage device 902 and execute the above processing.
- the program may be for realizing a part of the functions described above. Further, the program may be a so-called difference file (difference program) that realizes the above-described function in combination with another program already stored in the auxiliary storage device 903.
- difference file difference program
- the broker 20 and the server 30 may be configured by a single computer 900, or may be configured by a plurality of computers connected so as to be communicable.
- the client 10 has the connection processing unit 101 that establishes the connection A for transmitting and receiving the urgent message and the connection B for transmitting and receiving the normal message with the broker 20.
- the messages received from the broker 20 an urgent message received using the connection A and a normal message received using the connection B are sent to the subscription request unit 102 specifying the topic and a message transmitted to the broker 20.
- a message transmitting unit 103 that specifies an urgent message transmitted using the connection A and a normal message transmitted using the connection B for each topic is provided.
- the client 10 uses the connection B to perform batch delivery processing. While subscribing to the delivered normal message, it is possible to send and receive an urgent message in parallel using connection A. Therefore, the client 10 can suppress delays in the urgent message transmission / reception due to the process of receiving the normally distributed normal messages.
- connection processing unit 101 of the client 10 described above subscribes to the broker 20 by setting “message storage necessity” included in the connection information of connection B to “necessary” in the connection B connection processing. Is requested to be accumulated in the broker 20 while the connection B is disconnected.
- the client 10 can receive a normal message transmitted from the server 30 or the like while the connection B with the broker 20 is disconnected due to the client 10 entering the wireless communication area such as underground. It can be accumulated in the broker 20. Then, after the client 10 moves to a place where the state of the wireless communication is stable and the connection B is reconnected, the client 10 receives batch distribution of the normal messages accumulated from the broker 20, thereby suppressing the normal message from being missed. It becomes possible.
- the connection processing unit 101 sets “message accumulation necessity” included in the connection information of the connection A to “unnecessary”, so that no urgent message is accumulated in the broker 20. For this reason, since the broker 20 does not perform batch delivery of the accumulated messages after the connection A is reconnected, the client 10 immediately sends and receives an urgent message in the connection A without being interrupted by the batch delivery. It can be carried out.
- the client 10 described above further includes an authentication processing unit 104 that performs authentication with the server 30.
- the authentication processing unit 104 transmits and receives a message associated with the authentication information topic with the server 30 using the connection A.
- the client 10 uses the connection A for the urgent message used for the authentication process with the server even if the normal message distributed from the broker 20 is being received using the connection B. Can be sent and received. Thereby, transmission / reception of an urgent message related to the authentication process with the server 30 is not delayed, and a process failure such as the authentication process not being completed within the requested time can be suppressed.
- the broker 20 described above can be connected to the client 10 and the server 30 via a network, and mediates transmission / reception of messages associated with each topic between the client 10 and the server 30.
- the broker 20 uses connection information (client I and connection type) for sending and receiving an urgent message as connection information used when connecting to the client 10 and connection B for sending and receiving a normal message.
- a connection information storage unit 201 that stores connection information (client I and connection type) for each client 10, subscription information that links connection information of an urgent topic and connection A based on a request from the client 10, a normal topic, and
- the subscription information storage unit 202 for storing the subscription information associated with the connection information of the connection B, and the urgent message associated with the urgent topic while the connection A is established based on the subscription information.
- a message delivery unit 203 that distributes a normal message associated with the normal topic using the connection B while the connection B is disconnected, and accumulates a normal message associated with the normal topic while the connection B is disconnected.
- the broker 20 does not accumulate an urgent message while the connection A and the connection B with the client 10 are disconnected, and accumulates a normal message.
- the broker 29 can perform batch delivery of normal messages without performing batch delivery of urgent messages.
- the broker 29 continues to distribute the normal messages accumulated using the connection B, and distributes the urgent message using the connection A. Can be done in parallel. Therefore, the broker 20 can suppress delays in transmission and reception of urgent messages used for authentication processing, billing processing, and the like due to batch distribution processing of accumulated normal messages.
- connection A and connection B may be performed between the broker 20 and the server 30.
- the server 30 may send and receive the urgent message using the connection A and the normal message may be sent and received using the connection B according to the content of the message.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
しかしながら、蓄積されたメッセージの一括配信中に、例えばクライアントとサーバとの間の認証処理等、即時送信及び送達確認が必要なメッセージの送受信が要求された場合、一括配信が完了するまで当該要求に応じたメッセージの送受信を行うことができない。この結果、蓄積されたメッセージの容量が大きいと、即時送信及び送達確認が必要なメッセージの送受信が遅延して、要求される時間内に認証処理等を行うことができなくなる可能性がある。
前記ブローカに対し、第3のトピックに関連付けた前記第1のメッセージを前記第1のコネクションを用いて送信し、第4のトピックに関連付けた前記第2のメッセージを前記第2のコネクションを用いて送信するメッセージ送信部(103)と、を備える。
このような構成を有することにより、ブローカとクライアントとの再接続後に、ブローカが蓄積されたメッセージの一括配信処理を行う場合であっても、クライアントは、第1のコネクション及び第2のコネクションの一方を用いて一括配信されたメッセージを購読(受信)するとともに、他方を用いて即時送信が必要とされるメッセージの送受信を並行して行うことができる。従って、クライアントは、一括配信されたメッセージの受信処理により、即時送信が必要とされるメッセージの送受信が遅延することを抑制することができる。
このような構成を有することにより、クライアントは、ブローカとの第2のコネクションが切断されている間、第2のメッセージをブローカに蓄積させることができる。そして、クライアントは、第2のコネクションが再接続された後に、ブローカから蓄積された第2のメッセージの一括配信を受けることにより、第2のメッセージの取りこぼしを抑制することが可能となる。
このような構成を有することにより、クライアントは、ブローカから一括配信された第2のメッセージを第2のコネクションを用いて受信中であっても、サーバとの認証処理に用いられる即時送信が必要とされる第1のメッセージを、第1のコネクションを用いて送受信することができる。これにより、サーバとの認証処理に関するメッセージの送受信が遅延することがなく、要求された時間内に認証処理が完了しない等の処理の失敗を抑制することができる。
このような構成を有することにより、ブローカは、クライアントとの第1のコネクション及び第2のコネクションが切断されている間、第1のメッセージは蓄積せず、第2のメッセージを蓄積する。このため、ブローカは、クライアントと第1のコネクション及び第2のコネクションが再接続された後、第1のメッセージの一括配信は行わず、第2のメッセージの一括配信を行うことができる。この結果、ブローカは、クライアントと第1のコネクション及び第2のコネクションが再接続された後、第2のコネクションを用いて蓄積された第2のメッセージの一括配信を継続したまま、第1のコネクションを用いて即時送信が必要とされる第1のメッセージの配信を並行して行うことができる。従って、ブローカは、蓄積された第2のメッセージの一括配信処理により、即時送信が必要とされる第1のメッセージの送受信が遅延することを抑制することができる。
以下、本発明の一実施形態に係る通信システム1について、図1を参照しながら説明する。
図1は、本発明の一実施形態に係る通信システムの全体構成を示す図である。
本実施形態において、通信システム1は、例えばMQTTを用いたPublish/subscribe型の通信システムである。
図1に示すように、通信システム1は、複数のクライアント10a、10b、10c・・・と、ブローカ20と、サーバ30とを備えている。なお、以下の説明において、複数のクライアント10a、10b、10c・・・を総称して、クライアント10とも記載する。
なお、サーバ30は、図1に示すように、ブローカ20と同じ情報センタ2内に設置されたサーバ30aを有している。また、サーバ30は、情報センタ2外に設置されたサーバ(外部サーバ)30bを有していてもよい。このとき、サーバ30a及びサーバ30bは、それぞれ異なる機能を有していてもよい。例えば、サーバ30aはクライアント10が有料道路を使用した際の使用料を課金する機能を有し、サーバ30bは道路別の渋滞情報を送信する機能を有していてもよい。
更に、サーバ30は一つのサーバ30aのみを有し、サーバ30aが複数の機能を有するようにしてもよい。
なお、車載器10及びサーバ30は、ブローカ20へメッセージを送信する際、及び、メッセージの購読をブローカ20へ要求する際、トピックを指定して、当該トピックに関連付けられたメッセージの送信及び購読の要求を行う。ブローカ20は、メッセージと関連付けられたトピックと、車載器10及びサーバ30から購読の要求時に指定されたトピックとを照らし合わせることにより、各メッセージの配信先となる車載器10及びサーバ30を特定する。
トピックとは、メッセージに含まれる情報の属性を示すものであり、メッセージごとに一つのトピックが指定される。例えば、クライアント10がメッセージを送信する際に指定するトピックとしては、クライアント10の現在位置を示すトピック、移動速度を示すトピック、加速度を示すトピック等がある。クライアント10は、例えば、現在位置を示すトピックを指定して、クライアント10の現在位置の情報(緯度、経度等)を含むメッセージをブローカ20へ送信する。
また、例えば、サーバ30がメッセージを送信する際に指定するトピックとしては、道路別の渋滞情報を示すトピック、サービスエリア等の施設情報を示すトピック、地域別のイベント情報を示すトピック等がある。サーバ30は、例えば、道路Xの渋滞情報を示すトピックを指定して、当該道路Xの渋滞情報(混雑状況、交通流等)を含むメッセージをブローカ20へ送信する。
次に、図2~図4を参照して、クライアント10の機能構成を説明する。
図2は、本発明の一実施形態に係るクライアント及びブローカの機能構成を示す図である。
図2に示すように、クライアント10は、接続処理部101と、購読要求部102と、メッセージ送信部103と、認証処理部104と、接続状態監視部105と、記憶媒体110とを備えている。
本実施形態において、接続処理部101は、ブローカ20と間にコネクションA(第1のコネクション)と、コネクションB(第2のコネクション)との二つの無線通信の接続を行う。
なお、各トピックに関連付けられたメッセージを「至急メッセージ」及び「通常メッセージ」の何れで扱うかは、通信システム1別に変更してもよい。例えば、他の実施形態では、現在位置トピックに関連付けられたメッセージには暗号化が必要であるとして、「至急メッセージ」として扱ってもよい。
図3は、本発明の一実施形態に係るクライアントの購読リストの例を示す図である。
本実施形態では、購読要求部102は、図3に示すように、購読を要求する情報を指定する「トピック」と、当該トピックに関連付けられたメッセージの購読を行う際に用いる「接続種別」とを紐付けた購読リストD11を記憶媒体110に記憶している。
「接続種別」とは、コネクションA及びコネクションBの何れを用いてメッセージを購読するかを示す情報である。購読要求部102は、メッセージの内容に基づいて接続種別を設定する。購読要求部102は、例えば、認証処理、課金処理等を行うためのメッセージの購読を要求する場合は、これらメッセージは遅延なく購読する必要がある至急メッセージである。このため、購読要求部102は、至急メッセージの購読に使われる至急トピック(第1のトピック)については、接続種別にコネクションAを設定する。また、例えば、購読要求部102は、道路別の渋滞情報等の通常メッセージの購読に使われる通常トピック(第2のトピック)については、接続種別にコネクションBを設定する。即ち、購読要求部102は、ブローカ20に対し、至急トピック(第1のトピック)を指定して購読要求を行う場合、当該至急トピックに関連付けられた至急メッセージをコネクションAを用いて購読することを要求する。また、購読要求部102は、ブローカ20に対し、通常トピック(第2のトピック)を指定して購読要求を行う場合、当該通常トピックに関連付けられた通常メッセージをコネクションBを用いて購読することを要求する。
なお、購読要求部102は、購読が不要となったトピックを購読リストD11から削除するようにしてもよい。
購読要求部102は、コネクションA及びコネクションBの確立時、及び、購読リストD11の更新時の少なくとも一方において、ブローカ20に対してトピックと、接続情報とを指定して、各トピックに関連付けられたメッセージの購読を要求する。
本実施形態では、メッセージ送信部103は、図4に示すように、送信するメッセージの内容に応じて予め定められた「トピック」と、当該トピックを関連付けたメッセージを送信する際に用いる「接続種別」とを紐付けた発行リストD12を記憶媒体110に記憶している。
例えば、認証処理、課金処理等を行うためのメッセージを送信する場合は、これらメッセージは遅延なく送信する必要がある至急メッセージである。このため、メッセージ送信部103は、至急メッセージの送信に使われる至急トピック(第3のトピック)については、接続種別にコネクションAを設定する。また、例えば、メッセージ送信部103は、クライアント10の移動速度等の通常メッセージの送信に使われる通常トピック(第4のトピック)については、接続種別にコネクションBを設定する。即ち、メッセージ送信部103は、ブローカ20に対し、至急トピック(第3のトピック)を関連付けた至急メッセージをコネクションAを用いて送信する。また、メッセージ送信部103は、ブローカ20に対し、通常トピック(第4のトピック)を関連付けた通常メッセージをコネクションBを用いて送信する。
なお、メッセージ送信部103は、送信が不要となったトピックを発行リストD12から削除するようにしてもよい。
なお、本実施形態において、認証処理部104は、サーバ30との認証処理に関連するトピックは「至急トピック」として扱う。このため、認証処理部104が送信するメッセージは、全てコネクションAを用いて、暗号化された上で送信される。また、認証処理部104が購読するメッセージは、全てコネクションAを用いて購読され、認証処理部104において復号化される。
次に、図2及び図5~図6を参照して、ブローカ20の機能構成を説明する。
図2に示すように、ブローカ20は、MQTT機能部200と、記憶媒体210とを備えている。また、MQTT機能部200は、接続情報記憶部201と、購読情報記憶部202と、メッセージ配信部203と、クライアント接続監視部204と、を有している。
接続情報記憶部201は、図5に示すように、クライアント10との接続に用いられる接続情報を接続情報テーブルD21に追加して、記憶媒体210に記憶する。
接続情報テーブルD21は、クライアント10を特定可能な「クライアントID」と、「接続種別」と、当該クライアント10との接続に用いられる「接続ID」及び「パスワード」と、「メッセージ蓄積要否」と、「購読情報記憶要否」とを関連付けた接続情報を、クライアント別に蓄積するテーブルである。「接続種別」は、クライアント10が指定する接続種別であって、コネクションA及びコネクションBの何れかが設定される。「接続ID」及び「パスワード」は、クライアント10と接続種別との組み合わせを識別するための情報であり、当該組み合わせ別に異なるID及びパスワードが設定されている。「メッセージ蓄積要否」は、クライアント10が指定する設定であって、クライアント10との接続が切断されている間にブローカ20が収集したメッセージのうち、クライアント10が購読を要求しているメッセージを蓄積し、当該クライアント10と再接続されたときに蓄積されたメッセージを一括送信(一括配信)するか否かを示す設定である。「購読情報記憶要否」は、クライアント10が指定する設定であって、クライアント10とブローカ20との接続が切断された場合、クライアント10から購読要求されたトピックを含む購読情報(後述)を記憶するか否かを示す設定である。
なお、他の実施形態では、「クライアントID」及び「接続種別」を省略し、「接続ID」のみを記憶する態様であってもよい。この場合、接続情報記憶部201は、一のクライアント(例えばクライアント10a)が二つの接続種別によりブローカ20との接続を行うことを認識せず、接続ID別に異なる接続を行うことのみを認識するようにしてもよい。
購読情報記憶部202は、図6に示すように、トピックと、当該トピックの購読を要求している配信先であるクライアント10及びサーバ30を特定可能な接続情報と、を紐付けた購読情報を購読情報テーブルD22に追加して、記憶媒体210に記憶する。また、購読情報記憶部202は、クライアント10との接続が切断された場合、且つ、接続情報テーブルD21において当該クライアント10の「購読設定記憶要否」が「不要」である場合、購読情報テーブルD22から当該クライアント10に関連する購読情報を削除する。
購読情報テーブルD22は、クライアント10及びサーバ30を特定可能な接続情報と、当該クライアント10及びサーバ30が購読を要求している「トピック」とを関連付けて蓄積するテーブルである。なお、本実施形態において、購読情報テーブルD22には、接続情報の一部、具体的には、「クライアントID」と「接続種別」とが記録されている。また、他の実施形態においては、購読情報テーブルD22には、接続情報の他の情報(「接続ID」、「パスワード」等)が更に記録されていてもよい。
なお、「クライアントID」がサーバ30を示す場合、「接続種別」は設定されていなくてもよい。また、他の実施形態では、「クライアントID」及び「接続種別」に代えて、「接続ID」を記憶する態様であってもよい。
また、メッセージ配信部203は、メッセージの購読を要求しているクライアント10との接続が切断されている場合、且つ、接続情報テーブルD21の「メッセージ蓄積要否」が「要」に設定されている場合、当該クライアントが購読を要求しているトピックに対するメッセージを記憶媒体210に記憶して蓄積する。そして、メッセージ配信部203は、当該クライアント10と再接続されたときに、蓄積されたメッセージを記憶媒体210から読み出して一括配信する。
次に、図7~図8を参照してクライアント10の接続処理の一連の流れを説明する。
図7は、本発明の一実施形態に係るクライアントの接続処理を説明するための処理フローである。
図8は、本発明の一実施形態に係るクライアントの購読処理を説明するための処理フローである。
図7に示すように、クライアント10が起動、または無線通信圏内に進入すると、クライアント10は無線通信可能状態となる(S101)。
クライアント10が無線通信可能状態となると、クライアント10の接続処理部101は、ブローカ20とコネクションAの接続処理を行う(ステップS102)。
具体的には、接続処理部101は、コネクションAの接続情報(「クライアントID」、「接続種別(コネクションA)」、「接続ID」、「パスワード」、「メッセージ蓄積要否」及び「購読情報記憶要否」)を含む接続要求メッセージをブローカ20へ送信する。なお、本実施形態において、コネクションAの「メッセージ蓄積要否」は常に「不要(メッセージを蓄積しない)」に設定される。これにより、コネクションAでは、ブローカ20はメッセージの蓄積を行わず、また、蓄積されたメッセージの一括配信が行われることがないので、至急メッセージの送受信を遅延なく行うことができるようになる。そして、接続処理部101は、ブローカ20から接続要求メッセージに対する応答メッセージを受信すると、コネクションAの接続処理を終了して次のステップへ進む。
具体的には、購読要求部102は、図8に示すように、まず、ブローカ20とのコネクションAの接続が初めてであるか否かを判断する(ステップS111)。ブローカ20とのコネクションAの接続が初めてではない場合(ステップS111:NO)、購読要求部102は、当該コネクションAの「購読情報記憶要否」が「不要(記憶しない)」に設定されているか否かを判断する(ステップS112)。コネクションAの「購読情報記憶要否」が「要」に設定されている場合(ステップS112:NO)、ブローカ20にはクライアント10のコネクションAに関連する購読情報が記憶されているため、購読要求部102は購読処理を終了する。
一方、ブローカ20とのコネクションAの接続が初めてである場合(ステップS111:YES)、または、コネクションAの「購読情報記憶要否」が「不要」に設定されている場合(ステップS112:YES)、ブローカ20にはクライアント10のコネクションAに関連する購読情報が記憶されていないため、購読要求部102は、購読要求メッセージをブローカ20へ送信する(ステップS113)。このとき、購読要求部102は、購読リストD11に記憶されているトピックのうち、「接続種別」が「コネクションA」であるトピックを抽出する。そして、購読要求部102は、抽出した「トピック」と、「クライアントID」及び「接続種別(コネクションA)」とを含む購読要求メッセージをブローカ20へ送信する。
図3の例では、購読要求部102は、購読リストD11から「接続種別」が「コネクションA」であるトピックとして、認証情報トピック、課金情報トピックを抽出する。そして、購読要求部102は、抽出した認証情報トピック、課金情報トピックを指定して、各トピックに関連付けられたメッセージをコネクションAを用いて購読することを要求するメッセージを、ブローカ20へ送信する。
購読要求部102は、ブローカ20から購読要求メッセージに対する応答メッセージを受信すると、コネクションAの購読処理を終了して次のステップへ進む。
具体的には、認証処理部104は、記憶媒体110に記憶されている発行リストD12に基づいて、クライアント10の認証情報トピックを指定して、コネクションAを用いてメッセージを送信する。このとき、認証処理部104は、当該メッセージを暗号化して送信する。
また、認証処理部104は、ブローカ20からクライアント10の認証情報トピックに関連付けられたメッセージ(サーバ30から送信された応答メッセージ)を受信すると、当該メッセージを復号化してメッセージの内容を解析する。認証処理部104は、サーバ30からのメッセージに対する応答が必要である場合は、更に認証情報トピックに関連付けられたメッセージを、暗号化した上で、コネクションAを用いて送信する。
このように、クライアント10の認証に関連するトピックに対するメッセージを、ブローカ20を介してサーバとの間で送受信することにより、認証処理部104はサーバ30との認証処理を行う。認証処理部104が認証処理を完了すると、次のステップへ進む。
具体的には、接続処理部101は、コネクションBの接続情報(「クライアントID」、「接続種別(コネクションB)」、「接続ID」、「パスワード」、「メッセージ蓄積要否」及び「購読情報記憶要否」)を含む接続要求メッセージをブローカ20へ送信する。なお、本実施形態では、コネクションBの「メッセージ蓄積要否」は「要(蓄積される)」が設定されている態様で説明する。これにより、クライアント10は、ブローカ20とのコネクションBが切断されている間に送信されたメッセージのうち、クライアント10が購読を要求したトピックに関連付けられたメッセージをブローカ20に蓄積させておき、コネクションBの再接続後に蓄積されたメッセージを一括受信することができる。なお、他の実施形態では、クライアント別に「メッセージ蓄積要否」の設定を変えてもよい。
そして、接続処理部101は、ブローカ20から接続要求メッセージに対する応答メッセージを受信すると、コネクションBの接続処理を終了して次のステップへ進む。
具体的には、購読要求部102は、コネクションAの購読処理(ステップS103)と同様に、図8に示すブローカ20とのコネクションBの接続が初めてであるか否かの判断(ステップS111)、及び、当該コネクションBの「購読情報記憶要否」が「不要(記憶しない)」に設定されているか否かの判断(ステップS112)を行う。ブローカ20とのコネクションBの接続が初めてではない場合(ステップS111:NO)、且つ、コネクションBの「購読情報記憶要否」が「要」に設定されている場合(ステップS112:NO)、ブローカ20にはクライアント10のコネクションBに関連する購読情報が記憶されているため、購読要求部102は購読処理を終了する。
一方、ブローカ20とのコネクションBの接続が初めてである場合(ステップS111:YES)、または、コネクションBの「購読情報記憶要否」が「不要」に設定されている場合(ステップS112:YES)、ブローカ20にはクライアント10のコネクションBに関連する購読情報が記憶されていないため、購読要求部102は、購読要求メッセージをブローカ20へ送信する(ステップS113)。このとき、購読要求部102は、購読リストD11に記憶されているトピックのうち、「接続種別」が「コネクションB」であるトピックを抽出する。そして、購読要求部102は、抽出したトピックと、「クライアントID」及び「接続種別(コネクションB)」とを含む購読要求メッセージをブローカ20へ送信する。
図3の例では、購読要求部102は、購読リストD11から「接続種別」が「コネクションB」であるトピックとして、道路Xの渋滞情報トピック、道路Xのサービスエリア(SA)情報トピックを抽出する。そして、購読要求部102は、抽出した道路Xの渋滞情報トピック、道路XのSA情報トピックを指定して、各トピックに関連付けられたメッセージをコネクションBを用いて購読することを要求するメッセージを、ブローカ20へ送信する。
購読要求部102は、ブローカ20から購読要求メッセージに対する応答メッセージを受信すると、コネクションBの購読処理を終了する。
次に、図9を参照して、クライアント10及びブローカ20の接続監視処理について説明する。
図9は、本発明の一実施形態に係るクライアント及びブローカの接続監視処理を説明するための処理フローである。
以下、クライアント10のコネクションAの接続監視処理を例として説明するが、クライアント10のコネクションBについても同様の接続監視処理が行われる。
クライアント10の接続状態監視部105は、ブローカ20との間でコネクションAが確立すると、所定の接続判定時間(例えば60秒)ごとに、コネクションAを用いてブローカ20へ接続確認メッセージを送信する(ステップS201)。
クライアント10は、接続確認メッセージを送信してから所定の応答判定時間(例えば5秒)以内にブローカ20から当該応答メッセージを受信することにより、コネクションAが正常に接続されていると判断する(ステップS204)。
クライアント10が無線通信圏外に進入した場合、クライアント10の接続状態監視部105は、接続確認メッセージを送信する(ステップS201)が、無線通信圏外であるためブローカ20へ当該接続確認メッセージが届かない。このため、応答判定時間以内にブローカ20から応答メッセージが返されないので、クライアント10の接続状態監視部105は、コネクションAが切断されたと判断する(ステップS204)。
クライアント10及びブローカ20は、コネクションA及びコネクションBのそれぞれについて、上述の接続監視処理を繰り返すことにより、コネクションA及びコネクションBが正常に接続されているか否かを判断する。
次に、図10~図11を参照して、ブローカ20のメッセージ処理について説明する。
図10は、本発明の一実施形態に係るブローカのメッセージ処理を説明するための第1の処理フローである。
始めに、図10を参照して、クライアント10とブローカ20とが正常に接続されている状態におけるメッセージ処理について説明する。
クライアント10からメッセージが送信された場合は、以下のようにメッセージ処理が行われる。
クライアント10のメッセージ送信部103は、発行リストD12(図4)に基づいて、トピックと、当該トピックに設定された接続種別(コネクションA及びコネクションB)を指定して、ブローカ20へメッセージを送信する(ステップS211)。例えば、クライアント10のメッセージ送信部103は、課金情報トピックに関連付けられた「メッセージA1」を送信する場合、発行リストD12に基づき、当該「メッセージA1」をコネクションAを用いてブローカ20へ送信する(ステップS211_A)。このとき、クライアント10のメッセージ送信部103は、コネクションAを用いて送信する「メッセージA1」を暗号化した上で、メッセージの送信を行う。
ブローカ20のメッセージ配信部203は、クライアント10から「メッセージA1」を受信すると、購読情報テーブルD22(図6)に基づいて、当該「メッセージA1」の配信先を特定する(ステップS212)。
ブローカ20のメッセージ配信部203は、当該「メッセージA1」において指定された課金情報トピックの購読を要求している配信先(例えばサーバ30)を特定すると、当該配信先と正常に接続されているか否かを確認する(ステップS213)。
そして、ブローカ20のメッセージ配信部203は、配信先と正常に接続されている場合は、当該配信先(サーバ30)へ「メッセージA1」を配信する(ステップS214)。
ブローカ20のメッセージ配信部203は、クライアント10から「メッセージB1」を受信すると、購読情報テーブルD22に基づいて、当該「メッセージB1」の配信先を特定する(ステップS212)。
ブローカ20のメッセージ配信部203は、当該「メッセージB1」において指定されたクライアント10の現在位置トピックの購読を要求している配信先(例えばサーバ30)を特定すると、当該配信先と正常に接続されていることを確認する(ステップS213)。
そして、ブローカ20のメッセージ配信部203は、配信先と正常に接続されている場合は、当該配信先(サーバ30)へ「メッセージB1」を配信する(ステップS214)。
サーバ30は、例えば、先に受信した「メッセージA1」に対する応答として、課金情報トピックに関連付けられた「メッセージX1」を送信する(ステップS215)。
ブローカ20のメッセージ配信部203は、サーバ30から「メッセージX1」を受信すると、購読情報テーブルD22(図6)に基づいて、当該「メッセージX1」の配信先を特定する(ステップS212)。
ブローカ20のメッセージ配信部203は、当該「メッセージX1」において指定されたクライアント課金情報トピックの購読を要求している配信先(例えばクライアント10のコネクションA)を特定すると、当該配信先と正常に接続されていることを確認する(ステップS213)。
そして、ブローカ20のメッセージ配信部203は、配信先と正常に接続されている場合は、当該配信先(クライアント10のコネクションA)へ「メッセージX1」を配信する(ステップS214)。
次に、図11を参照して、クライアント10とブローカ20との接続が切断されている状態におけるメッセージ処理について説明する。
例えば、クライアント10が地下等の無線通信圏外に移動して、コネクションA及びコネクションBが切断されているとする。このとき、サーバ30が渋滞情報トピックに関連付けられた「メッセージY1」を送信すると(ステップS215)、ブローカ20のメッセージ配信部203は、図10のフローと同様に、当該「メッセージY1」の配信先の特定(ステップS212)と、当該配信先の接続状態の確認(ステップS213)とを行う。そして、ブローカ20のメッセージ配信部203は、当該「メッセージY1」の配信先であるクライアント10のコネクションBが切断されている場合、当該「メッセージY1」を記憶媒体210に記憶して蓄積する(ステップS216)。
同様に、サーバ30がサービスエリア(SA)情報トピックに関連付けられた「メッセージZ1」を送信すると(ステップS215)、ブローカ20のメッセージ配信部203は、同様の処理(ステップS212~ステップS213)を行い、配信先(クライアント10のコネクションB)が切断されている場合は、当該「メッセージZ1」を記憶媒体210に記憶して蓄積する(ステップS216)。
そして、コネクションA及びコネクションBが確立すると、クライアント10の認証処理部104は、認証処理(図7のステップS104)として、クライアント10の認証情報トピックに関連付けられた「メッセージA2」を送信する(ステップS211)。
ブローカ20のメッセージ配信部203は、図10のフローと同様に、当該「メッセージA2」の配信先の特定(ステップS212)と、当該配信先の接続状態の確認(ステップS213)とを行い、当該配信先(サーバ30)へ「メッセージA2」を配信する(ステップS214)。
「メッセージA2」に対する応答として、サーバ30から認証情報トピックに関連付けられた「メッセージX2」が送信(ステップS215)されると、ブローカ20のメッセージ配信部203は、上述と同様の処理を行って、「メッセージX2」をクライアント10へコネクションAを用いて配信する(ステップS212~ステップS214)。
具体的には、ブローカ20のメッセージ配信部203は、クライアント10のコネクションBが確立すると、記憶媒体210に蓄積されたメッセージのうち、クライアント10がコネクションBを用いて購読を要求しているトピックに関連付けられたメッセージ(「メッセージY1」及び「メッセージZ1」)を読み出して、これら蓄積メッセージの一括配信を行う(ステップS217)。
このようにすることで、クライアント10は、ブローカ20から蓄積された通常メッセージの一括配信が行われた場合であっても、コネクションBを用いて一括配信された通常メッセージを購読するとともに、コネクションAを用いて認証情報トピックに関連付けられたメッセージのような至急メッセージの送受信を並行して行うことができる。これにより、通常メッセージの一括配信により至急メッセージの送受信が遅延して、認証処理等の即時性が求められる処理が失敗することを抑制することができる。
次に、図12を参照して、本実施形態のクライアント10及びブローカ20のハードウェア構成について説明する。
図12は、本発明の一実施形態に係るクライアント及びブローカのハードウェア構成の例を示す図である。
上述のクライアント10は、コンピュータ900に実装される。また、同様に、上述のブローカ20は、クライアント10とは異なるコンピュータ900に実装される。そして、上述したクライアント10及びブローカ20の各処理部の動作は、プログラムの形式でそれぞれのコンピュータ900が有する補助記憶装置903に記憶されている。CPU901は、プログラムを補助記憶装置903から読み出して主記憶装置902に展開し、当該プログラムに従って上記処理を実行する。また、クライアント10のCPU901は、プログラムに従って、記憶媒体110に対応する記憶領域を主記憶装置902に確保し、ブローカ20のCPU901は、プログラムに従って、記憶媒体210に対応する記憶領域を主記憶装置902に確保する。また、CPU901は、プログラムに従って、処理中のデータを記憶する記憶領域を補助記憶装置903に確保する。なお、コンピュータ900は、入出力インタフェース904を介して、外部記憶装置910と接続されており、クライアント10の記憶媒体110またはブローカ20の記憶媒体210に対応する記憶領域は外部記憶装置910に確保されてもよい。また、コンピュータ900は、通信インタフェース905を介して、外部記憶装置920と接続されており、クライアント10の記憶媒体110またはブローカ20の記憶媒体210に対応する記憶領域は外部記憶装置920に確保されてもよい。
以上のように、本実施形態に係るクライアント10は、ブローカ20との間で、至急メッセージを送受信するためのコネクションAと、通常メッセージを送受信するためのコネクションBとを確立する接続処理部101と、ブローカ20から受信するメッセージのうち、コネクションAを用いて受信する至急メッセージと、コネクションBを用いて受信する通常メッセージとを、トピック別に指定する購読要求部102と、ブローカ20へ送信するメッセージのうち、コネクションAを用いて送信する至急メッセージと、コネクションBを用いて送信する通常メッセージとを、トピック別に指定するメッセージ送信部103と、を備える。
このような構成を有することにより、ブローカ20とクライアント10との再接続後に、ブローカ20が蓄積された通常メッセージの一括配信処理を行う場合であっても、クライアント10は、コネクションBを用いて一括配信された通常メッセージを購読するとともに、コネクションAを用いて至急メッセージの送受信を並行して行うことができる。従って、クライアント10は、一括配信された通常メッセージの受信処理により、至急メッセージの送受信が遅延することを抑制することができる。
このような構成を有することにより、クライアント10は、クライアント10が地下等の無線通信圏外に進入したことによりブローカ20とのコネクションBが切断されている間、サーバ30等から送信された通常メッセージをブローカ20に蓄積させることができる。そして、クライアント10は、無線通信の状態が安定する場所に移動してコネクションBが再接続された後に、ブローカ20から蓄積された通常メッセージの一括配信を受けることにより、通常メッセージの取りこぼしを抑制することが可能となる。
一方、接続処理部101は、コネクションAの接続処理において、コネクションAの接続情報に含まれる「メッセージ蓄積要否」を「不要」に設定することにより、ブローカ20には至急メッセージが蓄積されない。このため、コネクションAが再接続された後は、ブローカ20は蓄積されたメッセージの一括配信が行わないため、クライアント10は、コネクションAでは、一括配信に妨げられることなく、至急メッセージの送受信を直ちに行うことができる。
このような構成を有することにより、クライアント10は、ブローカ20から一括配信された通常メッセージをコネクションBを用いて受信中であっても、サーバとの認証処理に用いられる至急メッセージをコネクションAを用いて送受信することができる。これにより、サーバ30との認証処理に関する至急メッセージの送受信が遅延することがなく、要求された時間内に認証処理が完了しない等の処理の失敗を抑制することができる。
このような構成を有することにより、ブローカ20は、クライアント10とのコネクションA及びコネクションBが切断されている間、至急メッセージは蓄積せず、通常メッセージを蓄積する。このため、ブローカ29は、クライアント10とコネクションA及びコネクションBが再接続された後、至急メッセージの一括配信は行わず、通常メッセージの一括配信を行うことができる。この結果、ブローカ29は、クライアント10とコネクションA及びコネクションBが再接続された後、コネクションBを用いて蓄積された通常メッセージの一括配信を継続したまま、コネクションAを用いて至急メッセージの配信を並行して行うことができる。従って、ブローカ20は、蓄積された通常メッセージの一括配信処理により、認証処理、課金処理等に用いられる至急メッセージの送受信が遅延することを抑制することができる。
例えば、上述の実施形態において、ブローカ20とサーバ30とは、一つの有線通信を接続する態様について説明したが、これに限られることはない。ブローカ20とサーバ30との間に、コネクションA及びコネクションBの二つの有線通信の接続を行うようにしてもよい。この場合、サーバ30においても、メッセージの内容に応じて、至急メッセージはコネクションAを用いて送受信を行い、通常メッセージはコネクションBを用いて送受信を行うようにしてもよい。このようにすることで、至急メッセージの送受信の遅延を更に抑制することができる。
10、10a、10b、10c クライアント
101 接続処理部
102 購読要求部
103 メッセージ送信部
104 認証処理部
105 接続状態監視部
110 記憶媒体
2 情報センタ
20 ブローカ
200 MQTT機能部
201 接続情報記憶部
202 購読情報記憶部
203 メッセージ配信部
204 クライアント接続監視部
30、30a、30b サーバ
Claims (7)
- ブローカと接続可能であり、当該ブローカを介してサーバとの間でトピック別に関連付けられているメッセージを送受信するクライアントであって、
前記ブローカとの間で、前記メッセージのうち第1のメッセージを送受信するための第1のコネクションと、第2のメッセージを送受信するための第2のコネクションとを確立する接続処理部と、
前記ブローカに対し、第1のトピックを指定して、当該第1のトピックに関連付けられた前記第1のメッセージを前記第1のコネクションを用いて購読することを要求し、第2のトピックを指定して、当該第2のトピックに関連付けられた前記第2のメッセージを、前記第2のコネクションを用いて購読することを要求する購読要求部と、
前記ブローカに対し、第3のトピックに関連付けた前記第1のメッセージを前記第1のコネクションを用いて送信し、第4のトピックに関連付けた前記第2のメッセージを前記第2のコネクションを用いて送信するメッセージ送信部と、
を備えるクライアント。 - 前記接続処理部は、前記ブローカに対して購読を要求している前記第2のメッセージを、前記第2のコネクションが切断されている間、前記ブローカに蓄積することを要求する、
請求項1に記載のクライアント。 - 前記サーバとの間で認証を行う認証処理部を更に備え、
前記認証処理部は、前記ブローカとの間で前記第1のコネクションが確立された後、前記第1のコネクションを用いて前記サーバとの認証に用いられるトピックに関連付けられた前記第1のメッセージを送受信する、
請求項1または2に記載のクライアント。 - クライアント及びサーバとネットワークを介して接続可能とされ、前記クライアント及び前記サーバの間におけるトピック別に関連付けられているメッセージの送受信を仲介するブローカであって、
前記クライアントとの接続を行う際に用いられる接続情報として、前記メッセージのうち、第1のメッセージを送受信するための第1のコネクションの接続情報と、第2のメッセージを送受信するための第2のコネクションの接続情報とを前記クライアント別に記憶する接続情報記憶部と、
前記クライアントの要求に基づいて、第1のトピック及び前記第1のコネクションの接続情報を紐付けた購読情報と、第2のトピック及び前記第2のコネクションの接続情報を紐付けた購読情報と、を記憶する購読情報記憶部と、
前記購読情報に基づいて、前記第1のコネクションが確立されている間、前記第1のトピックに関連付けられた前記第1のメッセージを前記第1のコネクションを用いて前記クライアントへ配信し、前記第2のコネクションが確立されている間、前記第2のトピックに関連付けられた前記第2のメッセージを前記第2のコネクションを用いて配信し、前記第2のコネクションが切断されている間、前記第2のトピックに関連付けられた前記第2のメッセージを蓄積するメッセージ配信部と、
を備えるブローカ。 - 請求項1から3の何れか一項に記載のクライアントと、
請求項4に記載のブローカと、
前記ブローカを介して前記クライアントとの間でメッセージの送受信を行うサーバと、
を備える通信システム。 - ブローカを介してクライアントとサーバとの間でトピック別にメッセージを送受信する通信方法であって、
前記ブローカと前記クライアントとの間で、前記メッセージのうち第1のメッセージを送受信するための第1のコネクションと、第2のメッセージを送受信するための第2のコネクションとを確立するステップと、
前記ブローカに対し、第1のトピックを指定して、当該第1のトピックに関連付けられた前記第1のメッセージを前記第1のコネクションを用いて購読することを要求し、第2のトピックを指定して、当該第2のトピックに関連付けられた前記第2のメッセージを、前記第2のコネクションを用いて購読することを要求するステップと、
前記ブローカに対し、第3のトピックに関連付けた前記第1のメッセージを前記第1のコネクションを用いて送信し、第4のトピックに関連付けた前記第2のメッセージを前記第2のコネクションを用いて送信するステップと、
を有する通信方法。 - ブローカと接続可能であり、当該ブローカを介してサーバとの間でトピック別にメッセージを送受信するクライアントのコンピュータを機能させるプログラムであって、当該プログラムは当該コンピュータを、
前記ブローカとの間で、前記メッセージのうち第1のメッセージを送受信するための第1のコネクションと、第2のメッセージを送受信するための第2のコネクションとを確立する接続処理部、
前記ブローカに対し、第1のトピックを指定して、当該第1のトピックに関連付けられた前記第1のメッセージを前記第1のコネクションを用いて購読することを要求し、第2のトピックを指定して、当該第2のトピックに関連付けられた前記第2のメッセージを、前記第2のコネクションを用いて購読することを要求する購読要求部、
前記ブローカに対し、第3のトピックに関連付けた前記第1のメッセージを前記第1のコネクションを用いて送信し、第4のトピックに関連付けた前記第2のメッセージを前記第2のコネクションを用いて送信するメッセージ送信部、
として機能させるプログラム。
Priority Applications (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| GB1907078.8A GB2570427B (en) | 2016-11-25 | 2016-11-25 | Client, broker, communication system, communication method, and program |
| PCT/JP2016/084909 WO2018096641A1 (ja) | 2016-11-25 | 2016-11-25 | クライアント、ブローカ、通信システム、通信方法及びプログラム |
| JP2018552344A JP6727329B2 (ja) | 2016-11-25 | 2016-11-25 | クライアント、ブローカ、通信システム、通信方法及びプログラム |
| KR1020197014674A KR102209175B1 (ko) | 2016-11-25 | 2016-11-25 | 클라이언트, 브로커, 통신 시스템, 통신 방법 및 프로그램 |
| US16/462,396 US10911391B2 (en) | 2016-11-25 | 2016-11-25 | Client, broker, communication system, communication method, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2016/084909 WO2018096641A1 (ja) | 2016-11-25 | 2016-11-25 | クライアント、ブローカ、通信システム、通信方法及びプログラム |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018096641A1 true WO2018096641A1 (ja) | 2018-05-31 |
Family
ID=62194966
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2016/084909 Ceased WO2018096641A1 (ja) | 2016-11-25 | 2016-11-25 | クライアント、ブローカ、通信システム、通信方法及びプログラム |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US10911391B2 (ja) |
| JP (1) | JP6727329B2 (ja) |
| KR (1) | KR102209175B1 (ja) |
| GB (1) | GB2570427B (ja) |
| WO (1) | WO2018096641A1 (ja) |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110113381A (zh) * | 2019-04-09 | 2019-08-09 | 深圳前海微众银行股份有限公司 | 一种区块链中订阅主题的方法及装置 |
| JP2020201952A (ja) * | 2019-06-10 | 2020-12-17 | フィッシャー−ローズマウント システムズ,インコーポレイテッド | リアルタイムプロセス制御のためのパブリッシュ/サブスクライブプロトコル |
| JP2022513769A (ja) * | 2018-12-13 | 2022-02-09 | オッポ広東移動通信有限公司 | 購読メッセージの処理方法、装置、コンピュータ装置及び記憶媒体 |
| JPWO2022034684A1 (ja) * | 2020-08-14 | 2022-02-17 | ||
| JP2023037418A (ja) * | 2021-09-03 | 2023-03-15 | キヤノン株式会社 | 制御装置、制御方法、制御プログラム |
| US11960270B2 (en) | 2019-06-10 | 2024-04-16 | Fisher-Rosemount Systems, Inc. | Automatic load balancing and performance leveling of virtual nodes running real-time control in process control systems |
| US12019431B2 (en) | 2019-06-10 | 2024-06-25 | Fisher-Rosemount Systems, Inc. | Ease of node switchovers in process control systems |
| US12061464B2 (en) | 2019-06-10 | 2024-08-13 | Fisher-Rosemount Systems, Inc. | Publish/subscribe protocol for real-time process control |
| US12189379B2 (en) | 2019-06-10 | 2025-01-07 | Fisher-Rosemount Systems, Inc. | Virtualized real-time I/O in process control systems |
| US20250047625A1 (en) * | 2023-07-31 | 2025-02-06 | Cariad Se | Messaging system for computing devices |
| US12386343B2 (en) | 2019-06-10 | 2025-08-12 | Fisher-Rosemount Systems, Inc. | Industrial control system architecture for real-time simulation and process control |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190173951A1 (en) * | 2017-12-01 | 2019-06-06 | GM Global Technology Operations LLC | Vehicle communication using publish-subscribe messaging protocol |
| US11196731B2 (en) * | 2019-06-28 | 2021-12-07 | T-Mobile Usa, Inc. | Network-authentication control |
| US11563823B2 (en) * | 2019-11-27 | 2023-01-24 | Verifone, Inc. | Systems and methods for device connectivity management |
| US11184266B1 (en) * | 2020-05-14 | 2021-11-23 | PubNub, Inc. | Method and system for detecting latency in a wide area network |
| US11888728B1 (en) | 2020-05-14 | 2024-01-30 | PubNub, Inc. | Method and system for detecting latency in a wide area network |
| US12003492B2 (en) * | 2020-09-11 | 2024-06-04 | Mutualink, Inc. | Method and apparatus for internet of things (IoT) dynamic policy management |
| US11811884B1 (en) * | 2020-12-11 | 2023-11-07 | Amazon Technologies, Inc. | Topic subscription provisioning for communication protocol |
| KR20240082836A (ko) * | 2022-12-02 | 2024-06-11 | 삼성에스디에스 주식회사 | 양자 내성 암호 기반 mqtt 통신 방법, 장치, 시스템 및 컴퓨터 프로그램 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015500520A (ja) * | 2011-11-18 | 2015-01-05 | トムソン ライセンシングThomson Licensing | エンドユーザデバイス、およびそれぞれのエンドユーザデバイスの遠隔管理のためのパブリッシュ/サブスクライブブローカを備えるシステム |
| JP2015130092A (ja) * | 2014-01-08 | 2015-07-16 | セイコーエプソン株式会社 | Pos制御システム、印刷装置、及びpos制御システムの制御方法 |
| WO2016014516A1 (en) * | 2014-07-21 | 2016-01-28 | Convida Wireless, Llc | Service layer interworking using mqtt protocol |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7388839B2 (en) * | 2003-10-22 | 2008-06-17 | International Business Machines Corporation | Methods, apparatus and computer programs for managing performance and resource utilization within cluster-based systems |
| US8095598B2 (en) | 2004-04-30 | 2012-01-10 | Sap Ag | Methods and apparatus for subscribing/publishing messages in an enterprising computing environment |
| JP2014081872A (ja) | 2012-10-18 | 2014-05-08 | Denso Corp | 車両情報処理装置 |
| JP6559587B2 (ja) * | 2016-01-28 | 2019-08-14 | 株式会社東芝 | 通信装置、通信システムおよび通信プログラム |
| US10637960B2 (en) * | 2016-10-21 | 2020-04-28 | Infiswift Technologies, Inc. | Method for bridging publish/subscribe brokers for guaranteed low-latency delivery |
-
2016
- 2016-11-25 US US16/462,396 patent/US10911391B2/en active Active
- 2016-11-25 KR KR1020197014674A patent/KR102209175B1/ko active Active
- 2016-11-25 WO PCT/JP2016/084909 patent/WO2018096641A1/ja not_active Ceased
- 2016-11-25 GB GB1907078.8A patent/GB2570427B/en active Active
- 2016-11-25 JP JP2018552344A patent/JP6727329B2/ja active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2015500520A (ja) * | 2011-11-18 | 2015-01-05 | トムソン ライセンシングThomson Licensing | エンドユーザデバイス、およびそれぞれのエンドユーザデバイスの遠隔管理のためのパブリッシュ/サブスクライブブローカを備えるシステム |
| JP2015130092A (ja) * | 2014-01-08 | 2015-07-16 | セイコーエプソン株式会社 | Pos制御システム、印刷装置、及びpos制御システムの制御方法 |
| WO2016014516A1 (en) * | 2014-07-21 | 2016-01-28 | Convida Wireless, Llc | Service layer interworking using mqtt protocol |
Cited By (23)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7166463B2 (ja) | 2018-12-13 | 2022-11-07 | オッポ広東移動通信有限公司 | 購読メッセージの処理方法、装置、コンピュータ装置及び記憶媒体 |
| JP2022513769A (ja) * | 2018-12-13 | 2022-02-09 | オッポ広東移動通信有限公司 | 購読メッセージの処理方法、装置、コンピュータ装置及び記憶媒体 |
| US11991779B2 (en) | 2018-12-13 | 2024-05-21 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Subscription message processing method and apparatus, and computer device and storage medium |
| CN110113381A (zh) * | 2019-04-09 | 2019-08-09 | 深圳前海微众银行股份有限公司 | 一种区块链中订阅主题的方法及装置 |
| CN110113381B (zh) * | 2019-04-09 | 2023-04-07 | 深圳前海微众银行股份有限公司 | 一种区块链中订阅主题的方法及装置 |
| US12019431B2 (en) | 2019-06-10 | 2024-06-25 | Fisher-Rosemount Systems, Inc. | Ease of node switchovers in process control systems |
| JP7563901B2 (ja) | 2019-06-10 | 2024-10-08 | フィッシャー-ローズマウント システムズ,インコーポレイテッド | リアルタイムプロセス制御のためのパブリッシュ/サブスクライブプロトコル |
| US12498707B2 (en) | 2019-06-10 | 2025-12-16 | Fisher-Rosemount Systems, Inc. | Automatic load balancing and performance leveling of virtual nodes running real-time control in process control systems |
| US11960270B2 (en) | 2019-06-10 | 2024-04-16 | Fisher-Rosemount Systems, Inc. | Automatic load balancing and performance leveling of virtual nodes running real-time control in process control systems |
| US12386343B2 (en) | 2019-06-10 | 2025-08-12 | Fisher-Rosemount Systems, Inc. | Industrial control system architecture for real-time simulation and process control |
| JP2020201952A (ja) * | 2019-06-10 | 2020-12-17 | フィッシャー−ローズマウント システムズ,インコーポレイテッド | リアルタイムプロセス制御のためのパブリッシュ/サブスクライブプロトコル |
| US12061464B2 (en) | 2019-06-10 | 2024-08-13 | Fisher-Rosemount Systems, Inc. | Publish/subscribe protocol for real-time process control |
| US12085925B2 (en) | 2019-06-10 | 2024-09-10 | Fisher-Rosemount Systems, Inc. | Centralized virtualization management node in process control systems |
| US12321161B2 (en) | 2019-06-10 | 2025-06-03 | Fisher-Rosemount Systems, Inc. | Publish/subscribe protocol for real-time process control |
| US12189379B2 (en) | 2019-06-10 | 2025-01-07 | Fisher-Rosemount Systems, Inc. | Virtualized real-time I/O in process control systems |
| JP7549909B2 (ja) | 2020-08-14 | 2024-09-12 | 株式会社アイルソフト | 端末装置、コンピュータプログラム |
| JPWO2022034684A1 (ja) * | 2020-08-14 | 2022-02-17 | ||
| WO2022034684A1 (ja) * | 2020-08-14 | 2022-02-17 | 株式会社アイルソフト | 端末装置、コンピュータプログラム、通信システム、および、通信方法 |
| JP2023037418A (ja) * | 2021-09-03 | 2023-03-15 | キヤノン株式会社 | 制御装置、制御方法、制御プログラム |
| JP7734535B2 (ja) | 2021-09-03 | 2025-09-05 | キヤノン株式会社 | 通信装置、情報処理装置、配信システム、制御方法、及びプログラム |
| US20250047625A1 (en) * | 2023-07-31 | 2025-02-06 | Cariad Se | Messaging system for computing devices |
| US12363059B2 (en) * | 2023-07-31 | 2025-07-15 | Cariad Se | Messaging system for computing devices |
| US12580880B2 (en) | 2023-07-31 | 2026-03-17 | Volkswagen Aktiengesellschaft | Messaging system with one-to-many communication |
Also Published As
| Publication number | Publication date |
|---|---|
| US20190288975A1 (en) | 2019-09-19 |
| KR102209175B1 (ko) | 2021-01-28 |
| KR20190067894A (ko) | 2019-06-17 |
| JP6727329B2 (ja) | 2020-07-22 |
| JPWO2018096641A1 (ja) | 2019-10-17 |
| GB201907078D0 (en) | 2019-07-03 |
| US10911391B2 (en) | 2021-02-02 |
| GB2570427B (en) | 2021-11-17 |
| GB2570427A (en) | 2019-07-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6727329B2 (ja) | クライアント、ブローカ、通信システム、通信方法及びプログラム | |
| JP7432686B2 (ja) | ブロックチェーンネットワークにおける効率的な伝播のための確率的リレー | |
| US11388005B2 (en) | Connected gateway server system for real-time vehicle control service | |
| Mershad et al. | Finding a STAR in a Vehicular Cloud | |
| US9379953B2 (en) | Intelligent management of application connectivity | |
| US20110191581A1 (en) | Method and system for use in managing vehicle digital certificates | |
| JP2019194856A (ja) | 効率を高めるためにサービス層サブスクリプションおよび通知を分析しグループ化する方法および装置 | |
| KR102692967B1 (ko) | Mec 아키텍처에서 지리적 서비스에 가입하는 방법 | |
| CN102546743A (zh) | 使用授权、提取和共享算法的智能远程信息处理的信息传播 | |
| TWI454917B (zh) | Access control method, access control device and access control program | |
| US20060271617A1 (en) | Network data distribution system and method | |
| US20170273006A1 (en) | Service level agreement violation warning and service suspension | |
| EP2634994A1 (en) | Network system, certificate management method, and certificate management program | |
| JP4875742B2 (ja) | メッセージ配信システム及びメッセージ配信方法 | |
| JP2009105787A (ja) | コンテンツ配信システムおよびコンテンツ配信システムのコンテンツ配信方法 | |
| US20170195940A1 (en) | Digital message delivery using ad-hoc distributed device networking | |
| EP1997285B1 (en) | Managing message distribution | |
| EP3968602B1 (en) | An online connectivity unit in an electronic control unit of a vehicle, corresponding method and corresponding computer program product | |
| JP4944278B2 (ja) | アクセス制御方法、アクセス制御装置およびアクセス制御プログラム | |
| KR20150067041A (ko) | 부하 분산을 위한 m2m 시스템에서의 등록을 제어하는 방법 및 장치 | |
| HK40006085A (en) | Client, broker, communication system, communication method, and program | |
| KR102054828B1 (ko) | 전술환경에서 블록체인에 기반한 명령 전송 방법 | |
| CN105247818A (zh) | 对等设备运动通信 | |
| KR101547141B1 (ko) | 키를 전송하기 위한 방법 및 장치 | |
| US9594819B2 (en) | Wireless system with database transfer mechanism and method of operation thereof |
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: 16922131 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2018552344 Country of ref document: JP Kind code of ref document: A |
|
| ENP | Entry into the national phase |
Ref document number: 201907078 Country of ref document: GB Kind code of ref document: A Free format text: PCT FILING DATE = 20161125 |
|
| ENP | Entry into the national phase |
Ref document number: 20197014674 Country of ref document: KR Kind code of ref document: A |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16922131 Country of ref document: EP Kind code of ref document: A1 |