JP2020017118A - Broker device, client device, communication system, communication method, and program - Google Patents

Broker device, client device, communication system, communication method, and program Download PDF

Info

Publication number
JP2020017118A
JP2020017118A JP2018140330A JP2018140330A JP2020017118A JP 2020017118 A JP2020017118 A JP 2020017118A JP 2018140330 A JP2018140330 A JP 2018140330A JP 2018140330 A JP2018140330 A JP 2018140330A JP 2020017118 A JP2020017118 A JP 2020017118A
Authority
JP
Japan
Prior art keywords
broker
data
publication data
unit
topic
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.)
Granted
Application number
JP2018140330A
Other languages
Japanese (ja)
Other versions
JP7163093B2 (en
Inventor
遵 金井
Jun Kanai
遵 金井
直哉 大西
Naoya Onishi
直哉 大西
徹 高仲
Toru Takanaka
徹 高仲
拓紀 松山
Hiroki Matsuyama
拓紀 松山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Toshiba Infrastructure Systems and Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Infrastructure Systems and Solutions Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Toshiba Corp, Toshiba Infrastructure Systems and Solutions Corp filed Critical Toshiba Corp
Priority to JP2018140330A priority Critical patent/JP7163093B2/en
Publication of JP2020017118A publication Critical patent/JP2020017118A/en
Application granted granted Critical
Publication of JP7163093B2 publication Critical patent/JP7163093B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

To provide a broker device that can secure availability without providing new redundancy.SOLUTION: According to an embodiment, the broker device includes: a self-subscription information receiving unit that receives a subscription request for a topic subscribed by a second client device, from the second client device; a self-publishing data receiving unit that receives publishing data concerning the topic from a first client device; a self-publishing data transmission unit that transmits the publishing data received by the self-publishing data receiving unit to the second client device; and another publishing data transmission unit that transmits the publishing data received by the self-publishing data receiving unit to another broker device.SELECTED DRAWING: Figure 1

Description

本発明の実施形態は、出版・購読型(パブリッシュ・サブスクライブ)モデルに基づく通信に適用されるブローカ装置、クライアント装置、通信システム、通信方法、およびプログラムに関する。   An embodiment of the present invention relates to a broker device, a client device, a communication system, a communication method, and a program applied to communication based on a publish / subscribe type (publish / subscribe) model.

近年、分散アプリケーションにおいて非同期での出版データ授受が可能な通信方式として、出版・購読型(パブリッシュ・サブスクライブ)モデルと呼ばれる通信方式が知られている。   2. Description of the Related Art In recent years, a communication method called a publish / subscribe type (publish / subscribe) model has been known as a communication method capable of asynchronously transferring publication data in a distributed application.

出版・購読型モデルによれば、特許文献1に開示されているように、情報の購読者は、所望する情報のみを効率的に受信することが可能となる。   According to the publish / subscribe model, as disclosed in Patent Literature 1, a subscriber of information can efficiently receive only desired information.

特許文献1で開示されている技術によれば、出版・購読型モデルに基づく通信において、ブローカ装置の冗長化により信頼性を担保することができ、さらにコンテンツへのアクセスを制御することによってセキュリティ確保も実現することができる。   According to the technology disclosed in Patent Literature 1, in communication based on the publish / subscribe model, reliability can be ensured by making a broker device redundant, and security is ensured by controlling access to content. Can also be realized.

特開2007−287148号公報JP 2007-287148 A

しかしながら、特許文献1で開示されている技術では、ブローカ装置の役割が細分化されており、冗長化する場合には各ブローカ装置についてそれぞれ冗長化する必要がある。さらに、特定の役割を担うブローカ装置に障害が発生した場合には、他のブローカ装置が正常であっても可用性を担保することが不可能となる。   However, in the technique disclosed in Patent Literature 1, the role of the broker device is subdivided, and in the case of performing redundancy, it is necessary to make each broker device redundant. Further, when a failure occurs in a broker device that plays a specific role, it becomes impossible to ensure availability even if another broker device is normal.

本発明が解決しようとする課題は、新たな冗長化を講じることなく、可用性を担保することができるブローカ装置、ブローカ装置と出版・購読型モデルに基づく通信を行うクライアント装置、ブローカ装置とクライアント装置とを含む通信システム、および通信システムにおいて適用される通信方法、ならびにプログラムを提供することである。   The problem to be solved by the present invention is to provide a broker device capable of ensuring availability without taking new redundancy, a client device performing communication with the broker device based on a publish / subscribe model, a broker device and a client device And a communication method and a program applied to the communication system.

実施形態のブローカ装置は、第1のクライアント装置から受信した出版データを、第2のクライアント装置および他ブローカ装置へ送信するブローカ装置であって、第2のクライアント装置によって購読されるトピックに対する購読要求を、第2のクライアント装置から受信する自購読情報受信部と、第1のクライアント装置から、トピックに関連する出版データを受信する自出版データ受信部と、自出版データ受信部によって受信された出版データを、第2のクライアント装置へ送信する自出版データ送信部と、自出版データ受信部によって受信された出版データを、他ブローカ装置へ送信する他出版データ送信部とを備える。   A broker device according to an embodiment is a broker device that transmits publishing data received from a first client device to a second client device and another broker device, and a subscription request for a topic subscribed by the second client device. From the second client device, a self-publishing data receiving unit receiving publishing data related to the topic from the first client device, and a publishing received by the self-publishing data receiving unit. It includes a self-published data transmitting unit for transmitting data to the second client device, and another published data transmitting unit for transmitting the published data received by the self-published data receiving unit to another broker device.

第1の実施形態の通信システムの構成例を示す概念図である。FIG. 1 is a conceptual diagram illustrating a configuration example of a communication system according to a first exemplary embodiment. 他ブローカ装置購読情報管理表の一例を示す図である。FIG. 14 is a diagram illustrating an example of another broker device subscription information management table. 第1の実施形態の通信システムに適用されるブローカ装置の構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of a broker device applied to the communication system according to the first embodiment. 自ブローカ装置購読情報管理表の一例を示す図である。FIG. 11 is a diagram illustrating an example of a management information table of the own broker device. クライアント装置からの購読要求受信時における自ブローカ装置による処理手順の一例を示すフローチャートである。9 is a flowchart illustrating an example of a processing procedure performed by a local broker device when a subscription request is received from a client device. 購読情報購読数管理表の一例を示す図である。It is a figure showing an example of a subscription information subscription number management table. ブローカ装置購読数管理表の一例を示す図である。It is a figure showing an example of a broker device subscription number management table. 他ブローカ装置からの購読要求受信時における自ブローカ装置による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the processing procedure by the own broker apparatus at the time of receiving the subscription request from another broker apparatus. クライアント装置からの出版データ出版要求時における自ブローカ装置による処理手順の一例を示すフローチャートである。9 is a flowchart illustrating an example of a processing procedure performed by the own broker device when a publication data publication request is issued from the client device. 他ブローカ装置からの出版データ送信時における自ブローカ装置による処理手順の一例を示すフローチャートである。11 is a flowchart illustrating an example of a processing procedure performed by the own broker device when transmitting publication data from another broker device. 他ブローカ装置の終了時および異常検出時における処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the processing procedure at the time of termination of another broker apparatus, and the time of abnormality detection. 第1の実施形態の通信システムの変形例を示す概念図である。FIG. 3 is a conceptual diagram illustrating a modification of the communication system according to the first embodiment. 第1の実施形態の通信システムの変形例に適用されるブローカ装置およびサブブローカ装置の構成例を示すブロック図である。It is a block diagram showing the example of composition of the broker device and the sub-broker device applied to the modification of the communication system of a 1st embodiment. 第2の実施形態の通信システムに適用されるブローカ装置の構成例を示すブロック図である。FIG. 9 is a block diagram illustrating a configuration example of a broker device applied to a communication system according to a second embodiment. 他購読情報管理表の一例を示す図である。It is a figure showing an example of other subscription information management tables. 自購読情報管理表の一例を示す図である。It is a figure showing an example of a self-subscription information management table. クライアント装置からの購読要求受信時における自ブローカ装置による処理手順の一例を示すフローチャートである。9 is a flowchart illustrating an example of a processing procedure performed by a local broker device when a subscription request is received from a client device. 他ブローカ装置からの購読要求受信時における自ブローカ装置による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the processing procedure by the own broker apparatus at the time of receiving the subscription request from another broker apparatus. 第3の実施形態の通信システムに適用されるブローカ装置の構成例を示すブロック図である。FIG. 14 is a block diagram illustrating a configuration example of a broker device applied to a communication system according to a third embodiment. 送信待機リストの一例を示す図である。It is a figure showing an example of a transmission waiting list. 最大待機時間リストおよび時間条件の一例を示す図である。It is a figure showing an example of a maximum waiting time list and time conditions. 圧縮集約済出版データのパケット形式を例示するデータ構造図である。FIG. 4 is a data structure diagram illustrating a packet format of compressed and aggregated publication data. クライアント装置からの出版データの出版要求受信時における処理手順の一例を示すフローチャートである。9 is a flowchart illustrating an example of a processing procedure at the time of receiving a publication request for publication data from a client device. 出版要求に応じた出版データ送信時における処理手順の一例を示すフローチャートである。9 is a flowchart illustrating an example of a processing procedure when transmitting publication data in response to a publication request. 他ブローカ装置からの出版データ送信時における処理手順の一例を示すフローチャートである。9 is a flowchart illustrating an example of a processing procedure when publishing data is transmitted from another broker device. 第3の実施形態の通信システムの変形例に適用されるクライアント装置の構成例を示す概念図である。It is a conceptual diagram showing the example of composition of the client device applied to the modification of the communication system of a 3rd embodiment. 最大待機時間リストの一例を示す図である。It is a figure showing an example of a maximum waiting time list. 送信待機リストの一例を示す図である。It is a figure showing an example of a transmission waiting list. 圧縮集約済データのパケット形式を例示するデータ構造図である。FIG. 4 is a data structure diagram illustrating a packet format of compressed and aggregated data. クライアント装置からの出版データの出版要求受信時における処理手順の一例を示すフローチャートである。9 is a flowchart illustrating an example of a processing procedure at the time of receiving a publication request for publication data from a client device. 購読情報(トピック)毎にパケットの集約・圧縮および送信処理を行う際における処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the processing procedure at the time of performing aggregation / compression and transmission processing of a packet for every subscription information (topic). ブローカ装置からの出版データ送信時における処理手順の一例を示すフローチャートである。9 is a flowchart illustrating an example of a processing procedure when transmitting publication data from a broker device.

以下に、本発明の各実施形態の通信システムを、図面を参照して説明する。   Hereinafter, a communication system according to each embodiment of the present invention will be described with reference to the drawings.

なお、以下の各実施形態の説明において、同一部分については、同一符号を用いて示し、重複説明を避ける。   In the following description of each embodiment, the same portions are denoted by the same reference numerals, and redundant description will be avoided.

(第1の実施形態)
図1は、第1の実施形態の通信システムの構成例を示す概念図である。
(First embodiment)
FIG. 1 is a conceptual diagram illustrating a configuration example of a communication system according to the first embodiment.

通信システム1は、ネットワーク20を介して互いに通信可能に接続された複数のブローカ装置10と、複数のブローカ装置10のうちの何れかとネットワーク20を介して通信可能に接続された任意の数のクライアント装置30とからなる。   The communication system 1 includes a plurality of broker devices 10 communicably connected to each other via a network 20, and an arbitrary number of clients communicably connected to any one of the plurality of broker devices 10 via the network 20. Device 30.

図1に示す例では、ネットワーク20を介して互いに通信可能に接続された4つのブローカ装置10(#0〜#3)と、これらブローカ装置10(#0〜#3)のうちの何れかにネットワーク20を介して通信可能に接続されたクライアント装置30(#1〜#6)とが図示されている。   In the example shown in FIG. 1, four broker devices 10 (# 0 to # 3) communicably connected to each other via a network 20 and one of these broker devices 10 (# 0 to # 3) The client devices 30 (# 1 to # 6) communicably connected via the network 20 are illustrated.

図1に示す例ではまた、ブローカ装置10(#1)に、クライアント装置30(#1)、(#2)、(#3)が通信可能に接続され、ブローカ装置10(#2)に、クライアント装置30(#4)、(#5)が通信可能に接続され、ブローカ装置10(#3)に、クライアント装置30(#6)が通信可能に接続されている。   In the example illustrated in FIG. 1, the client devices 30 (# 1), (# 2), and (# 3) are communicably connected to the broker device 10 (# 1), and are connected to the broker device 10 (# 2). The client devices 30 (# 4) and (# 5) are communicably connected, and the client device 30 (# 6) is communicably connected to the broker device 10 (# 3).

ネットワーク20は、例えばLAN等のローカルな回線であってもよいし、インターネットや専用回線等の広域な有線通信回線や、3G等の広域な無線通信回線とすることができる。   The network 20 may be a local line such as a LAN, a wide-area wired communication line such as the Internet or a dedicated line, or a wide-area wireless communication line such as 3G.

ブローカ装置10とクライアント装置30との間で授受される情報群は「トピック」によって分類される。クライアント装置30は、受信したいトピックを、接続しているブローカ装置10に登録する。以降、この登録動作を「購読」と称する。   The information group exchanged between the broker device 10 and the client device 30 is classified by “topic”. The client device 30 registers the topic to be received in the connected broker device 10. Hereinafter, this registration operation is referred to as “subscription”.

また、クライアント装置30は、接続しているブローカ装置10へ、トピックに関連する出版データを送信することができる。以降、この送信動作を「出版」と称する。   In addition, the client device 30 can transmit publishing data related to the topic to the connected broker device 10. Hereinafter, this transmission operation is referred to as “publishing”.

ブローカ装置10は、クライアント装置30からトピックとともに出版データが出版された場合、このトピックを購読しているクライアント装置30へ、出版データを送信する。例えば図1において、クライアント装置30(#1)が、情報群Aというトピックを購読している場合、ブローカ装置10(#1)は、クライアント装置30(#2)から情報群Aというトピックに関連する出版データが出版されると、この出版データをクライアント装置30(#1)のみへ転送する。このように、クライアント装置30(#1)は、購読している出版データのみを受信することができる。   When publication data is published together with a topic from the client device 30, the broker device 10 transmits the publication data to the client device 30 subscribed to the topic. For example, in FIG. 1, when the client device 30 (# 1) has subscribed to the topic of the information group A, the broker device 10 (# 1) transmits the information related to the topic of the information group A from the client device 30 (# 2). When the publishing data is published, the publishing data is transferred only to the client device 30 (# 1). Thus, the client device 30 (# 1) can receive only the subscribed publication data.

複数のブローカ装置10が存在する場合、各ブローカ装置10は、例えば、図2に示すような他ブローカ装置購読情報管理表200を保持することによって、各ブローカ装置10において購読されているトピックに関する情報を共有する。   When a plurality of broker devices 10 exist, each broker device 10 stores information on topics subscribed to by each broker device 10 by holding, for example, another broker device subscription information management table 200 as shown in FIG. To share.

図2は、他ブローカ装置購読情報管理表の一例を示す図である。   FIG. 2 is a diagram illustrating an example of another broker device subscription information management table.

他ブローカ装置購読情報管理表200(以下、単に「管理表200」と称する)は、一例として、購読されるブローカ装置10を示す購読ブローカ装置m1と、購読ブローカ装置m1で指定されたブローカ装置10において購読されるトピックを示す購読情報(トピック)m2との2つの項目から構成されるレコードが積まれたデータテーブルである。管理表200は、ブローカ装置10内の図示しないストレージに記憶されており、ブローカ装置10内の各部位によって参照されることが可能である。   The other broker device subscription information management table 200 (hereinafter, simply referred to as “management table 200”) includes, for example, a subscription broker device m1 indicating the broker device 10 to be subscribed, and a broker device 10 designated by the subscription broker device m1. 3 is a data table in which records composed of two items of subscription information (topic) m2 indicating a topic to be subscribed are stacked. The management table 200 is stored in a storage (not shown) in the broker device 10 and can be referred to by each unit in the broker device 10.

図2に例示する管理表200では、ブローカ装置10(#1)において情報群A、情報群B、情報群Cというトピックが購読され、ブローカ装置10(#2)において情報群A、情報群Cというトピックが購読され、ブローカ装置10(#3)において情報群Bというトピックが購読されることが示されている。   In the management table 200 illustrated in FIG. 2, topics such as the information group A, the information group B, and the information group C are subscribed in the broker apparatus 10 (# 1), and the information group A and the information group C are subscribed in the broker apparatus 10 (# 2). This indicates that the topic “information group B” is subscribed to in the broker device 10 (# 3).

管理表200を参照することによって、ブローカ装置10は、クライアント装置30から出版データが出版された場合、この出版データがどのトピックに関連しているのかに基づいて、他のどのブローカ装置10へ転送すべきかを判定する。   By referring to the management table 200, when the publication data is published from the client device 30, the broker device 10 transfers the publication data to any other broker device 10 based on which topic the publication data relates to. Determine if you should.

例えば、クライアント装置30(#3)が、情報群Bというトピックに関連する出版データをブローカ装置10(#1)へ出版した場合、ブローカ装置10(#1)は、管理表200より、ブローカ装置10(#3)がこの出版データを必要としていると判定し、ブローカ装置10(#3)へ転送する。   For example, when the client device 30 (# 3) publishes the publication data related to the topic of the information group B to the broker device 10 (# 1), the broker device 10 (# 1) 10 (# 3) determines that the publication data is needed, and transfers it to the broker device 10 (# 3).

このように、通信システム1は、必要最小限の出版データしか転送しないので、ネットワーク帯域を効率的に利用する。   As described above, the communication system 1 transfers only the minimum necessary publication data, and thus uses the network bandwidth efficiently.

また、MQTT(Message Queue Telemetry Transport)等の出版・購読型モデルを採用するプロトコルの中には、各ブローカ装置10が、トピック毎に最新の出版データを保持する機能(以下、「リテイン機能」と称する)を有するものがある。   Also, among protocols adopting a publish / subscribe model such as MQTT (Message Queue Telemetry Transport), each broker device 10 has a function of holding the latest publication data for each topic (hereinafter referred to as a “retain function”). ).

リテイン機能によれば、クライアント装置30は、出版データが出版された後に購読を開始した場合であっても、購読するトピックに関連する最新の出版データを常に取得することが可能となる。   According to the retain function, the client device 30 can always acquire the latest publication data related to the topic to be subscribed even if the subscription is started after the publication data is published.

また、例えば、クライアント装置30は、バッテリ駆動タイプであれば、常に通信セッションを保持できる訳ではない。しかしながら、リテイン機能によれば、バッテリ駆動タイプのクライアント装置30のみならず、間歇的に起動するタイプのクライアント装置30であっても、ブローカ装置10に対して毎回通信セッションを張り、購読要求を行い、最新の出版データを取得し、所定の処理を実施した後に通信セッションを切断し、省電力状態に移行することも可能である。   Also, for example, if the client device 30 is a battery-driven type, it cannot always hold a communication session. However, according to the retain function, not only the battery-driven client device 30 but also the intermittently activated type client device 30 establishes a communication session with the broker device 10 every time and issues a subscription request. It is also possible to obtain the latest publication data, execute a predetermined process, disconnect the communication session, and shift to the power saving state.

リテイン機能によればさらに、クライアント装置30が異常終了した場合であっても、再起動後に最新の出版データを取得することもできる。   According to the retain function, even if the client device 30 ends abnormally, the latest publication data can be acquired after the restart.

ところで、すべてのブローカ装置10に対して、最新の出版データを保持させようとすると、出版時にすべての出版データを、すべてのブローカ装置10へ転送する必要がある。しかしながら、すべてのブローカ装置10が、すべての出版データを必ずしも必要とするとは限らない。このため、出版されたすべての出版データを、すべてのブローカ装置10へ転送することは、通信リソースの浪費となり、非効率的である。そこで、通信システム1は、通信効率向上のために、出版データに関連するトピックの購読者であるクライアント装置30が接続されているブローカ装置10のみへ出版データを転送する。   By the way, in order to make all the broker devices 10 hold the latest publication data, it is necessary to transfer all the publication data to all the broker devices 10 at the time of publication. However, not all broker devices 10 need all publishing data. For this reason, transferring all published data to be published to all the broker devices 10 wastes communication resources and is inefficient. Therefore, the communication system 1 transfers the publication data only to the broker device 10 to which the client device 30 that is a subscriber of the topic related to the publication data is connected in order to improve communication efficiency.

例えば、購読ブローカ装置と、購読情報(トピック)との関係が、管理表200に例示されるような場合、ブローカ装置10(#1)へ、情報群Bというトピックに関連する出版データが出版されると、ブローカ装置10(#1)は、この出版データを、ブローカ装置10(#3)のみへ転送する。ブローカ装置10(#3)は、転送された出版データを保持する。   For example, when the relationship between the subscription broker device and the subscription information (topic) is exemplified in the management table 200, the publication data related to the information group B is published to the broker device 10 (# 1). Then, the broker device 10 (# 1) transfers this publication data only to the broker device 10 (# 3). The broker device 10 (# 3) holds the transferred publication data.

一方、情報群Bというトピックが、ブローカ装置10(#1)以外の複数のブローカ装置10において購読されている場合、情報群Bというトピックに関連する出版データが、ブローカ装置10(#1)へ出版されると、ブローカ装置10(#1)は、この出版データを、情報群Bが購読されているすべてのブローカ装置10へ転送する。出版データを転送された各ブローカ装置10は、各々出版データを保持する。   On the other hand, when the topic of the information group B is subscribed to a plurality of broker apparatuses 10 other than the broker apparatus 10 (# 1), the publication data related to the topic of the information group B is sent to the broker apparatus 10 (# 1). When published, the broker device 10 (# 1) transfers this publication data to all the broker devices 10 to which the information group B is subscribed. Each broker device 10 to which the publishing data has been transferred holds the publishing data.

ところで、最新の出版データが、1つのブローカ装置10にしか保持されていない場合、このブローカ装置10に異常が生じると、最新の出版データが喪失される恐れがある。これは信頼性の観点から好ましくない。そこで通信システム1では、以下に説明するように、通信の効率性を維持しつつ、信頼性をも向上させながら、出版データの保持状態に応じて、出版データの冗長性を担保する機能を有するブローカ装置10を採用している。   By the way, when the latest publication data is held only in one broker device 10, if an abnormality occurs in the broker device 10, the latest publication data may be lost. This is not desirable from the viewpoint of reliability. Therefore, as described below, the communication system 1 has a function of maintaining the efficiency of communication and improving the reliability, and has a function of ensuring the redundancy of the publication data according to the holding state of the publication data. A broker device 10 is employed.

図3は、本実施形態の通信システムに適用されるブローカ装置の構成例を示すブロック図である。   FIG. 3 is a block diagram illustrating a configuration example of a broker device applied to the communication system of the present embodiment.

ブローカ装置10は、通信部102、通信部104、自購読情報受信部106、自購読情報管理部108、自出版データ受信部110、自出版データ送信部112、最新出版データ保持部114、他出版データ送信部116、他出版データ受信部118、他購読情報管理部120、および終了検知部122を備える。   The broker device 10 includes a communication unit 102, a communication unit 104, a self-subscription information reception unit 106, a self-subscription information management unit 108, a self-published data reception unit 110, a self-published data transmission unit 112, a latest publication data holding unit 114, and other publications. It includes a data transmission unit 116, another publication data reception unit 118, another subscription information management unit 120, and an end detection unit 122.

通信部102は、ネットワーク20を介して、自ブローカ装置10以外の他ブローカ装置10と通信し、自ブローカ装置10内の各部位からの情報を、ネットワーク20を介して他ブローカ装置10へ送信したり、逆に、他ブローカ装置10から送信された情報をネットワーク20を介して受信し、自ブローカ装置10内の各部位へ出力する。   The communication unit 102 communicates with the other broker device 10 other than the own broker device 10 via the network 20, and transmits information from each part in the own broker device 10 to the other broker device 10 via the network 20. Or, conversely, it receives the information transmitted from the other broker device 10 via the network 20 and outputs it to each part in the own broker device 10.

通信部104は、ネットワーク20を介して、クライアント装置30と通信し、自ブローカ装置10内の各部位からの情報を、ネットワーク20を介してクライアント装置30へ送信したり、逆に、クライアント装置30から送信された情報をネットワーク20を介して受信し、自ブローカ装置10内の各部位へ出力する。   The communication unit 104 communicates with the client device 30 via the network 20, transmits information from each part in the own broker device 10 to the client device 30 via the network 20, and conversely, the client device 30 Of the broker 10 via the network 20 and outputs the information to each part in the own broker device 10.

なお、以下の説明では、例として、自ブローカ装置10をブローカ装置10(#0)とし、他ブローカ装置10をブローカ装置10(#1)、(#2)、(#3)とする。さらに、説明の容易のために、他ブローカ装置10(#1)、(#2)、(#3)については、単に他ブローカ装置10として表す。   In the following description, as an example, the own broker device 10 is referred to as a broker device 10 (# 0), and the other broker devices 10 are referred to as broker devices 10 (# 1), (# 2), and (# 3). Further, for ease of explanation, the other broker devices 10 (# 1), (# 2), and (# 3) are simply represented as other broker devices 10.

自購読情報受信部106は、クライアント装置30によって購読される情報群であるトピックに対する購読要求KRを、通信部104を介して、購読要求元のクライアント装置30(例えば、クライアント装置30(#2))から受信する。   The self-subscription information receiving unit 106 sends a subscription request KR to a topic, which is a group of information to be subscribed by the client device 30, to the client device 30 of the subscription request source (for example, the client device 30 (# 2) via the communication unit 104. ).

自購読情報受信部106は、購読要求KRが購読登録要求である場合には、自購読情報管理部108に対して、購読要求KRで指定されたトピックと、購読要求元のクライアント装置30とを、例えば図4に例示される自ブローカ装置購読情報管理表205を使用して管理させる。   When the subscription request KR is a subscription registration request, the self-subscription information receiving unit 106 sends the topic specified by the subscription request KR and the client device 30 of the subscription request source to the self-subscription information management unit 108. For example, the management is performed using the own broker apparatus subscription information management table 205 illustrated in FIG.

図4は、自ブローカ装置購読情報管理表の一例を示す図である。   FIG. 4 is a diagram showing an example of the own broker device subscription information management table.

自ブローカ装置購読情報管理表205(以下、単に「管理表205」と称する)は、自ブローカ装置10(#0)において購読される購読情報(トピック)を示す自ブローカ装置購読情報m3と、自ブローカ装置購読情報m3で指定された購読情報を購読するクライアント装置30を示す購読クライアント装置m4との2つの項目から構成されるレコードが積まれたデータテーブルである。管理表205は、ブローカ装置10内の図示しないストレージに記憶されており、ブローカ装置10内の各部位によって参照されることが可能である。   The own broker apparatus subscription information management table 205 (hereinafter, simply referred to as “management table 205”) includes own broker apparatus subscription information m3 indicating subscription information (topic) subscribed in the own broker apparatus 10 (# 0), This is a data table in which records composed of two items, a subscription client device m4 indicating the client device 30 that subscribes to the subscription information specified by the broker device subscription information m3, are stacked. The management table 205 is stored in a storage (not shown) in the broker device 10 and can be referred to by each unit in the broker device 10.

図4に例示する管理表205では、自ブローカ装置10(#0)において、情報群Aというトピックが、クライアント装置30(#1)によって購読されることが示されている。   The management table 205 illustrated in FIG. 4 indicates that the topic called the information group A is subscribed by the client device 30 (# 1) in the own broker device 10 (# 0).

自出版データ受信部110は、出版元のクライアント装置30(例えば、クライアント装置30(#1))から、通信部104を介して、トピックおよびその出版データSDを受信する。   The self-published data receiving unit 110 receives the topic and its published data SD from the publisher client device 30 (for example, the client device 30 (# 1)) via the communication unit 104.

また、自購読情報受信部106が受信した購読要求KRが、購読解除要求である場合には、自購読情報管理部108は、管理表205から、購読要求元のクライアント装置30が購読クライアント装置m4に書き込まれているレコードを削除する。このように、管理表205は、自ブローカ装置10(#0)に接続されたクライアント装置30の購読情報(トピック)を管理するために使用される。   If the subscription request KR received by the self-subscription information receiving unit 106 is a subscription cancellation request, the self-subscription information management unit 108 determines from the management table 205 that the client device 30 that has issued the subscription request has the subscription client device m4 Delete the record written in. As described above, the management table 205 is used to manage the subscription information (topic) of the client device 30 connected to the own broker device 10 (# 0).

自購読情報受信部106が受信した購読要求KRが、購読解除要求である場合にはさらに、自購読情報管理部108が、他ブローカ装置10の購読状況を考慮して、他ブローカ装置10への購読解除の通知可否を決定する。この決定の際、自購読情報管理部108は、例えば、管理表200を使用して、購読解除の対象とされたトピックを購読している他ブローカ装置10(購読ブローカ装置)の数を判定し、判定された数が2以上の場合にのみ購読解除を行うアルゴリズムを適用する。これによって、購読ブローカ装置10の数が1である場合には、購読解除されても購読解除は行われないので、出版データSDの冗長性を引き続き確保できる。   If the subscription request KR received by the self-subscribe information receiving unit 106 is a subscription release request, the self-subscribe information management unit 108 further considers the subscription status of the other broker device 10 and sends the request to the other broker device 10. Decide whether to notify you of unsubscription. At the time of this determination, the self-subscription information management unit 108 determines, for example, using the management table 200, the number of other broker devices 10 (subscriber broker devices) that have subscribed to the topic subject to unsubscription. Apply an algorithm for unsubscribing only when the determined number is 2 or more. Accordingly, when the number of the subscription broker apparatuses 10 is 1, the subscription is not released even if the subscription is released, so that the redundancy of the publication data SD can be continuously maintained.

また、このアルゴリズムでは、自ブローカ装置10(#0)が、大量のトピックを購読している場合、トラフィックの偏りが生じる可能性が高い。一方、購読しているトピックが最も少ないブローカ装置10が、当該トピックを購読すると、トラフィックを効率的に分散させることができる。そこで、購読ブローカ装置10の数が2以上ではない場合、自購読情報管理部108は、他ブローカ装置10と自ブローカ装置10(#0)との購読数を比較し、自ブローカ装置10(#0)の購読数が最も少ない場合にのみ購読を継続するようにしてもよい。   Further, in this algorithm, when the own broker apparatus 10 (# 0) has subscribed to a large number of topics, there is a high possibility that a traffic bias will occur. On the other hand, when the broker device 10 that has the least subscribed topics subscribes to the topic, traffic can be efficiently distributed. Therefore, when the number of the subscribed broker apparatuses 10 is not two or more, the own subscription information management unit 108 compares the number of subscriptions between the other broker apparatus 10 and the own broker apparatus 10 (# 0), and checks the own broker apparatus 10 (# Subscription may be continued only when the number of subscriptions in 0) is the smallest.

自出版データ送信部112は、自出版データ受信部110によって受信された出版データSDを、通信部104を介して、購読要求元のクライアント装置30(例えば、クライアント装置30(#2))へ送信する。出版データSDの送信先であるクライアント装置30は、例えば管理表205を参照して決定される。管理表205によれば、自ブローカ装置購読情報m3として指定されたトピックが情報群Aである場合、送信先は、クライアント装置30(#1)であると決定される。   The self-published data transmitting unit 112 transmits the published data SD received by the self-published data receiving unit 110 to the client device 30 (for example, the client device 30 (# 2)) that has issued the subscription request via the communication unit 104. I do. The client device 30 to which the publication data SD is transmitted is determined with reference to, for example, the management table 205. According to the management table 205, when the topic specified as the own broker apparatus subscription information m3 is the information group A, it is determined that the transmission destination is the client apparatus 30 (# 1).

他出版データ送信部116は、自出版データ受信部110によって受信された出版データSDを、通信部102を介して、他ブローカ装置10へ送信する。送信元のブローカ装置10を決定する際には、例えば管理表200が使用される。管理表200から、出版データSDに関連する購読情報(トピック)m2を把握し、対応する購読ブローカ装置m1を読み取ることによって、送信先のブローカ装置10が決定される。   The other publication data transmission unit 116 transmits the publication data SD received by the own publication data reception unit 110 to the other broker device 10 via the communication unit 102. When the broker device 10 of the transmission source is determined, for example, the management table 200 is used. By grasping the subscription information (topic) m2 related to the publishing data SD from the management table 200 and reading the corresponding subscription broker device m1, the destination broker device 10 is determined.

他出版データ受信部118は、他ブローカ装置10から、通信部102を介して、トピックおよびその出版データSDを受信する。   The other publication data receiving unit 118 receives the topic and its publication data SD from the other broker device 10 via the communication unit 102.

他購読情報管理部120は、他ブローカ装置10が必要とするトピック(他ブローカ装置10に接続するクライアント装置30が購読しているトピック)を受信し、例えば管理表200を使用して管理する。   The other subscription information management unit 120 receives a topic required by the other broker device 10 (a topic to which the client device 30 connected to the other broker device 10 is subscribed) and manages the received topic using the management table 200, for example.

最新出版データ保持部114は、前述したリテイン機能を実現するために、自出版データ受信部110および他出版データ受信部118によって受信された出版データSDから、最新の出版データSDをトピック毎に抽出し、保持する。   The latest published data holding unit 114 extracts the latest published data SD for each topic from the published data SD received by the own published data receiving unit 110 and the other published data receiving unit 118 in order to realize the retain function described above. And hold.

他購読情報管理部120はさらに、新規の購読要求KRを、他ブローカ装置10から受信した場合、それが購読登録要求であれば、管理表200に登録するとともに、最新出版データ保持部114が、最新の出版データSDを保持している場合には、他出版データ送信部116に対して、その最新の出版データSDを、最新出版データ保持部114から取得させ、取得した出版データSDを、この出版データSDの購読を開始した他ブローカ装置10へ送信させる。   When the new subscription request KR is received from the other broker device 10 and is a subscription registration request, the other subscription information management unit 120 further registers the new subscription request KR in the management table 200, and the latest publication data holding unit 114 When the latest publication data SD is held, the other publication data transmission unit 116 is made to acquire the latest publication data SD from the latest publication data holding unit 114, and the acquired publication data SD is The subscription to the publishing data SD is transmitted to the other broker device 10 which has started the subscription.

なお、複数の他ブローカ装置10から最新の出版データSDが送信されることを回避するため、他購読情報管理部120は、各ブローカ装置10に単なる整理番号としてブローカ番号を振っておき、最新の出版データSDを保持するブローカ装置10のうち、最小のブローカ番号を振られたブローカ装置10のみの出版データSDの送信を許可するなど、1つのブローカ装置10のみが最新の出版データSDを送信する仕組みを採用してよい。   In order to prevent the latest publication data SD from being transmitted from a plurality of other broker devices 10, the other subscription information management unit 120 assigns a broker number as a simple reference number to each broker device 10 and updates the latest broker data. Only one broker device 10 transmits the latest publication data SD, such as permitting transmission of the publication data SD only to the broker device 10 with the smallest broker number among the broker devices 10 holding the publication data SD. A mechanism may be adopted.

また、他購読情報管理部120は、ブローカ番号を、整理番号として単純に付番することに限らず、ブローカ装置10の能力に応じて付番するようにしてもよい。例えば、能力の高いブローカ番号10ほど小さいブローカ番号を付番するようにすれば、最新の出版データSDを保持するブローカ装置10のうち、最も能力の高いブローカ装置10のみの出版データSDの送信を許可できるようになる。   Further, the other subscription information management unit 120 is not limited to simply assigning the broker number as the serial number, but may assign the number according to the capability of the broker device 10. For example, if a smaller broker number is assigned to a broker number 10 having a higher capability, transmission of the publication data SD only from the broker device 10 having the highest capability among the broker devices 10 holding the latest publication data SD is performed. You will be able to authorize.

さらに、購読クライアント装置30が存在しないにも関わらず出版データSDを受信し続けることを回避するため、他購読情報管理部120は、他ブローカ装置10が購読開始したトピックの購読数が2(自ブローカ装置10(#0)は含まない)になった時点で、自ブローカ装置10(#0)がそのトピックを購読しており、かつ購読クライアント装置30が存在しない場合には、購読情報を削除し、購読解除要求である購読要求KRを送信するようにしてもよい。   Further, in order to avoid continuing to receive the publication data SD even though the subscription client device 30 does not exist, the other subscription information management unit 120 determines that the number of subscriptions of the topic started by the other broker device 10 is 2 (automatically). When the broker device 10 (# 0) does not include), the own broker device 10 (# 0) has subscribed to the topic, and if there is no subscription client device 30, the subscription information is deleted. Then, a subscription request KR which is a subscription cancellation request may be transmitted.

さらにまた、他購読情報管理部120は、他ブローカ装置10からの購読要求KRが、購読解除要求である場合に購読ブローカ装置10の数が2以下になることを回避するために、購読ブローカ装置10の数が1になる場合には、自ブローカ装置10(#0)が購読数最小の場合で、かつ購読数最小のブローカ装置10の中で最も小さいブローカ番号を有する場合に、そのトピックを購読することとし、購読要求KRを、他ブローカ装置10へ送信するようにしてもよい。   Furthermore, in order to prevent the number of the subscribed broker apparatuses 10 from becoming two or less when the subscribe request KR from the other broker apparatus 10 is the unsubscribe request, the subscribe broker apparatus 10 If the number of 10 is 1, if the own broker device 10 (# 0) has the smallest number of subscriptions and has the smallest broker number among the broker devices 10 with the smallest number of subscriptions, the topic is changed. A subscription may be made, and the subscription request KR may be transmitted to the other broker device 10.

自出版データ送信部112は、購読要求KRで指定されたトピックの最新の出版データSDを、最新出版データ保持部114から取得し、購読要求元のクライアント装置30(例えば、クライアント装置30(#2))へ送信する。出版データSDの転送先であるクライアント装置30は、前述したように、例えば管理表205を参照して決定される。   The self-published data transmission unit 112 acquires the latest publication data SD of the topic specified by the subscription request KR from the latest publication data holding unit 114, and acquires the client device 30 (for example, the client device 30 (# 2 )). As described above, the client device 30 to which the publishing data SD is transferred is determined with reference to the management table 205, for example.

なお、最新出版データ保持部114に最新の出版データSDが保持されていない場合、すなわち、どのクライアント装置30も出版データSDを出版していない場合、自出版データ送信部112は、上述した送信処理を行わない。   If the latest publication data SD is not stored in the latest publication data holding unit 114, that is, if no client device 30 publishes the publication data SD, the own publication data transmission unit 112 performs the above-described transmission processing. Do not do.

他購読情報管理部120は、他ブローカ装置10によって購読される情報群であるトピックに対する購読要求KRを、通信部102を介して他ブローカ装置10から受信する。そして、受信した購読要求KRに応じて、管理表200の内容を更新する。例えば、購読要求元のブローカ装置10を、購読ブローカ装置m1として書き込み、購読要求KRで指定されたトピックを、購読情報(トピック)m2として書き込む。   The other subscription information management unit 120 receives a subscription request KR for a topic, which is a group of information to be subscribed by the other broker device 10, from the other broker device 10 via the communication unit 102. Then, the content of the management table 200 is updated according to the received subscription request KR. For example, the broker device 10 of the subscription request source is written as the subscription broker device m1, and the topic specified by the subscription request KR is written as the subscription information (topic) m2.

他購読情報管理部120によって受信された購読要求KRが、購読登録要求であれば、他出版データ送信部116は、購読要求KRで指定されたトピックに関連する最新の出版データSDを、最新出版データ保持部114から取得し、取得した出版データSDを、購読要求元の他ブローカ装置10へ送信する。購読要求元の他ブローカ装置10は、例えば管理表200を使用して決定される。   If the subscription request KR received by the other subscription information management unit 120 is a subscription registration request, the other publication data transmission unit 116 updates the latest publication data SD related to the topic designated by the subscription request KR with the latest publication. The publishing data SD acquired from the data holding unit 114 and transmitted is transmitted to the other broker device 10 that has issued the subscription request. The other broker device 10 that has issued the subscription request is determined using, for example, the management table 200.

自購読情報管理部108は、自ブローカ装置10(#0)によって購読される情報群であるトピックを管理するとともに、管理しているトピックに変化があった場合には、このトピックを、通信部102を介して、他ブローカ装置10へ送信する。   The self-subscribed information management unit 108 manages a topic that is a group of information subscribed by the self-broker device 10 (# 0), and when there is a change in the managed topic, transmits this topic to the communication unit. The data is transmitted to the other broker device 10 via 102.

他出版データ受信部118は、自購読情報管理部108によって管理されているトピックを購読するクライアント装置30が存在しない場合には、新たな購読登録要求である購読要求KRを、自購読情報管理部108へ出力する。   If there is no client device 30 that subscribes to the topic managed by the self-subscription information management unit 108, the other publication data reception unit 118 transmits a subscription request KR that is a new subscription registration request to the self-subscription information management unit. Output to 108.

他出版データ受信部118は、他購読情報管理部120によって受信された購読要求KRによって指定されたトピックのうち、2つ以上のブローカ装置10で購読されているトピックと、自購読情報管理部108によって管理されているトピックとを購読するクライアント装置30が存在しない場合には、購読解除要求である購読要求KRを自購読情報管理部108へ出力する。   The other-published-data receiving unit 118 includes, among the topics specified by the subscription request KR received by the other-subscribed information managing unit 120, the topics subscribed to by two or more broker apparatuses 10, and the self-subscribed information managing unit 108. If there is no client device 30 that subscribes to the topic managed by the client, the client device 30 outputs a subscription request KR, which is a subscription cancellation request, to the self-subscription information management unit 108.

他出版データ受信部118は、ブローカ装置10毎に購読されるトピックの数を計算し、その最小値が自購読情報管理部108によって管理されるトピックの数の合計値を上回る場合にのみ、新たな購読登録要求である購読要求KRを、自購読情報管理部108へ出力する。   The other-published-data receiving unit 118 calculates the number of topics subscribed for each broker device 10, and only when the minimum value exceeds the total value of the number of topics managed by the self-subscribed information management unit 108, a new topic is calculated. A subscription request KR, which is a subscription registration request, is output to the own subscription information management unit 108.

自購読情報管理部108は、他出版データ受信部118から出力された新たな購読登録要求である購読要求KRや、購読解除要求である購読要求KRを、通信部102を介して、他ブローカ装置10へ転送する。自購読情報管理部108は、この転送を、すべてのブローカ装置10へ行ってもよいし、ネットワークトポロジを考慮して特定のブローカ装置10のみへ行ってもよい。特定のブローカ装置10のみに転送した場合には、そのブローカ装置10のみから、購読要求KRで指定されたトピックに関連する出版データSDが返送される。   The self-subscription information management unit 108 transmits the new subscription registration request KR or the new subscription request KR output from the other publication data receiving unit 118 to the other broker device via the communication unit 102. Transfer to 10. The self-subscription information management unit 108 may perform this transfer to all the broker devices 10 or only to a specific broker device 10 in consideration of the network topology. When the transfer is performed only to a specific broker device 10, the publication data SD related to the topic specified by the subscription request KR is returned from only the broker device 10.

終了検知部122は、他ブローカ装置10の終了および異常のうちの少なくとも何れかを検知する。この検知のために、終了検知部122は、例えば、通信部102を介して、定期的にハートビートを他ブローカ装置10へ送信し、他ブローカ装置10がそのハートビートを受信ができなくなった段階で他ブローカ装置10の異常を検知する。また、他ブローカ装置10の終了時に自発的に送信された終了通知を検出した段階で他ブローカ装置10の終了を検知する。終了検知部122によって終了または異常が検知されると、管理表200から、終了または異常を検知されたブローカ装置10が購読ブローカ装置m1として書き込まれたレコードが削除される。   The end detection unit 122 detects at least one of the end of the other broker device 10 and an abnormality. For this detection, the end detection unit 122 periodically transmits a heartbeat to the other broker device 10 via the communication unit 102, for example, and the stage in which the other broker device 10 cannot receive the heartbeat. To detect an abnormality of the other broker device 10. Further, the end of the other broker device 10 is detected at the stage when the end notification transmitted voluntarily at the time of the end of the other broker device 10 is detected. When the end detection unit 122 detects the end or the abnormality, the record in which the broker device 10 in which the end or the abnormality is detected is written as the subscription broker device m1 is deleted from the management table 200.

これによって、他購読情報管理部120は、終了検知部122によって終了または異常を検知された他ブローカ装置10から購読要求KRを受信しないようになる。   As a result, the other subscription information management unit 120 does not receive the subscription request KR from the other broker device 10 whose termination or abnormality has been detected by the termination detection unit 122.

次に、以上のように構成した第1の実施形態の通信システムの動作例について説明する。   Next, an operation example of the communication system according to the first embodiment configured as described above will be described.

図5は、クライアント装置からの購読要求受信時における自ブローカ装置による処理手順の一例を示すフローチャートである。   FIG. 5 is a flowchart illustrating an example of a processing procedure performed by the own broker device when a subscription request is received from a client device.

自ブローカ装置10(#0)では、クライアント装置30から送信された購読要求KRが、通信部104を介して、自購読情報受信部106によって受信される(S1)と、購読要求KRが、購読登録要求または購読解除要求であるかが判定される(S2)。購読登録要求であれば(S2:購読登録)、自購読情報管理部108によって、管理表205が参照され、購読登録要求された購読情報(例えば、情報群A)が、自ブローカ装置購読情報m3として書き込まれ、要求元のクライアント装置30が、購読クライアント装置m4として書き込まれることによって、購読情報が登録される(S3)。   In the own broker device 10 (# 0), when the subscription request KR transmitted from the client device 30 is received by the own subscription information receiving unit 106 via the communication unit 104 (S1), the subscription request KR is subscribed. It is determined whether the request is a registration request or a subscription release request (S2). If it is a subscription registration request (S2: subscription registration), the self-subscribe information management unit 108 refers to the management table 205, and the subscription information (for example, information group A) for which the subscription registration request has been made becomes the own broker device subscription information m3. The subscription information is registered by writing the requesting client device 30 as the subscription client device m4 (S3).

さらに自購読情報管理部108では、登録された購読情報が、自ブローカ装置10(#0)内で新規に購読するトピックであるか否かが判定される(S4)。新規に購読するトピックであると判定されると(S4:Yes)、他出版データ送信部116によって、通信部102を介して、他のブローカ装置10へ、新規購読を開始したトピックに関連する出版データSDが送信される(S5)。   Further, the own subscription information management unit 108 determines whether the registered subscription information is a topic to be newly subscribed in the own broker apparatus 10 (# 0) (S4). If it is determined that the topic is a topic to be newly subscribed (S4: Yes), the publishing related to the topic for which the new subscription is started is transmitted to the other broker device 10 via the communication unit 102 by the other publication data transmitting unit 116. The data SD is transmitted (S5).

その後、他ブローカ装置10から、当該トピックの最新の出版データSDが送信され、通信部102を介して他出版データ受信部118によって受信されると(S6:Yes)、この出版データSDは、他出版データ受信部118から、最新出版データ保持部114へ出力され、最新出版データ保持部114において保持される(S7)。また、最新出版データ保持部114において保持されている出版データSDは、自出版データ送信部112へ出力され、自出版データ送信部112から、通信部104を経由して、当該トピックの購読を開始したクライアント装置30へ送信され(S8)、処理を終了する。   Thereafter, when the latest publication data SD of the topic is transmitted from the other broker device 10 and received by the other publication data receiving unit 118 via the communication unit 102 (S6: Yes), the publication data SD is It is output from the publication data receiving unit 118 to the latest publication data holding unit 114, and is held in the latest publication data holding unit 114 (S7). Further, the publication data SD held in the latest publication data holding unit 114 is output to the self-published data transmission unit 112, and the self-published data transmission unit 112 starts to subscribe to the topic via the communication unit 104. Is transmitted to the client device 30 (S8), and the process ends.

一方、ステップS6において、他ブローカ装置10から当該トピックの最新の出版データSDが送信されない場合(S6:No)、すなわち、当該トピックの出版データSDがまだ一度も出版されていない場合には、処理を終了する。   On the other hand, in step S6, when the latest publication data SD of the topic is not transmitted from the other broker device 10 (S6: No), that is, when the publication data SD of the topic has not been published yet, the processing is performed. To end.

一方、ステップS4において、新たに登録要求されたトピックが、既に別のクライアント装置30によって購読されていた場合(S4:No)、最新出版データ保持部114に最新の出版データSDが保持されているか否かが、他出版データ受信部118によって確認され(S9)、保持されている場合(S9:Yes)、自出版データ送信部112から、通信部104を介して、クライアント装置30へ最新の出版データが送信される(S10)。一方、最新の出版データが保持されていない場合(S9:No)には、処理を終了する。   On the other hand, in step S4, if the topic for which registration is newly requested is already subscribed by another client device 30 (S4: No), whether the latest publication data SD is held in the latest publication data holding unit 114? It is confirmed by the other publication data receiving unit 118 (S9), and if it is held (S9: Yes), the latest publication is transmitted from the own publication data transmission unit 112 to the client device 30 via the communication unit 104. The data is transmitted (S10). On the other hand, if the latest publication data is not held (S9: No), the process ends.

一方、ステップS2において、購読要求KRが、購読解除要求であれば(S2:購読解除)、自購読情報管理部108によって、管理表205から、この購読要求KRで指定されたトピック(例えば、情報群A)が自ブローカ装置購読情報m3として書き込まれているレコードが削除される(S11)。   On the other hand, in step S2, if the subscription request KR is a subscription release request (S2: subscription release), the self-subscription information management unit 108 reads the topic (for example, information The record in which the group A) is written as the own broker apparatus subscription information m3 is deleted (S11).

その後、管理表205に、当該トピック(例えば、情報群A)に購読クライアント装置30が関連付けられているレコードが残っている(S12:Yes)のであれば、処理を終了する。   Thereafter, if there is a record in the management table 205 in which the subscribed client device 30 is associated with the topic (for example, the information group A) (S12: Yes), the process ends.

一方、管理表205に、当該トピックに購読クライアント装置30が関連付けらえているレコードが残っていない(S12:No)のであれば、自購読情報管理部108によって、管理表200に基づいて、図6に示すような購読情報購読数管理表210が作成され、さらに、管理表200、205に基づいて、図7に示すようなブローカ装置購読数管理表215が作成されることによって、各ブローカ装置10のブローカ装置購読数状況が把握される(S13)。   On the other hand, if there is no record in the management table 205 in which the subscription client device 30 is associated with the topic (S12: No), the self-subscription information management unit 108 uses the management table 200 based on the management table 200 as shown in FIG. The subscription information subscription number management table 210 shown in FIG. 7 is created, and the broker device subscription number management table 215 shown in FIG. 7 is created based on the management tables 200 and 205. (S13).

図6は、購読情報購読数管理表の一例を示す図である。   FIG. 6 is a diagram illustrating an example of a subscription information subscription number management table.

図7は、ブローカ装置購読数管理表の一例を示す図である。   FIG. 7 is a diagram illustrating an example of a broker device subscription number management table.

購読情報購読数管理表210(以下、単に「管理表210」と称する)は、購読されるトピックを示す購読情報(トピック)m5と、購読情報(トピック)m5で指定されたトピックが購読される他ブローカ装置10の数を示す購読数m6との2つの項目から構成されるレコードが積まれたデータテーブルである。管理表200によれば、情報群Aというトピックの購読ブローカ装置は、ブローカ装置10(#1)と、ブローカ装置10(#2)との2つである。これに応じて、管理表210では、情報群Aというトピックに対応する購読数が2と示される。同様に、管理表200では、情報群Bというトピックの購読ブローカ装置が2つであり、情報群Cというトピックの購読ブローカ装置が2つであるので、管理表210では、情報群Bに対応する購読数が2、情報群Cに対応する購読数が2と示される。管理表210は、ブローカ装置10内の図示しないストレージに記憶されており、ブローカ装置10内の各部位によって参照されることが可能である。   The subscription information subscription number management table 210 (hereinafter, simply referred to as “management table 210”) includes subscription information (topic) m5 indicating a topic to be subscribed, and a topic specified by the subscription information (topic) m5. This is a data table in which records composed of two items of the number of subscriptions m6 indicating the number of other broker devices 10 are stacked. According to the management table 200, the two subscribed broker devices for the topic of the information group A are the broker device 10 (# 1) and the broker device 10 (# 2). Accordingly, the management table 210 indicates that the number of subscriptions corresponding to the topic of the information group A is 2. Similarly, in the management table 200, there are two subscription broker devices for the topic of the information group B, and there are two subscription broker devices for the topic of the information group C. Therefore, the management table 210 corresponds to the information group B. The number of subscriptions is indicated as 2, and the number of subscriptions corresponding to the information group C is indicated as 2. The management table 210 is stored in a storage (not shown) in the broker device 10 and can be referred to by each unit in the broker device 10.

ブローカ装置購読数管理表215(以下、単に「管理表215」と称する)は、ブローカ装置が記載されたブローカ装置m7と、各ブローカ装置において購読されるトピックの数を示す購読数m8との2つの項目から構成されるレコードが積まれたデータテーブルである。管理表205では、自ブローカ装置10(#0)は、情報群Aという1つのトピックを購読することが示されている。これに応じて、管理表215では、自ブローカ装置10(#0)の購読数が1と示される。また、管理表200では、ブローカ装置10(#1)は、情報群A、情報群B、情報群Cという3つのトピックを購読することが示されている。したがって、管理表215では、ブローカ装置10(#1)の購読数が3と示される。同様に、管理表200における情報に基づいて、管理表215では、ブローカ装置10(#2)の購読数が2と、ブローカ装置10(#3)の購読数が1と示される。管理表215は、ブローカ装置10内の図示しないストレージに記憶されており、ブローカ装置10内の各部位によって参照されることが可能である。   The broker device subscription number management table 215 (hereinafter, simply referred to as a “management table 215”) includes a broker device m7 in which a broker device is described and a subscription number m8 indicating the number of topics subscribed in each broker device. It is a data table in which records composed of two items are stacked. The management table 205 indicates that the own broker device 10 (# 0) subscribes to one topic called the information group A. Accordingly, the management table 215 indicates that the number of subscriptions of the own broker apparatus 10 (# 0) is 1. Further, the management table 200 indicates that the broker device 10 (# 1) subscribes to three topics of the information group A, the information group B, and the information group C. Therefore, the management table 215 indicates that the number of subscriptions of the broker apparatus 10 (# 1) is 3. Similarly, based on the information in the management table 200, the management table 215 indicates that the number of subscriptions of the broker device 10 (# 2) is 2 and the number of subscriptions of the broker device 10 (# 3) is 1. The management table 215 is stored in a storage (not shown) in the broker device 10 and can be referred to by each part in the broker device 10.

なお、管理表200、205の内容が更新された場合、自購読情報管理部108によって、管理表210、215もまたその更新内容に応じて更新される。   When the contents of the management tables 200 and 205 are updated, the management tables 210 and 215 are also updated by the self-subscription information management unit 108 in accordance with the updated contents.

ステップS13において、当該トピック(例えば、情報群A)を購読している他ブローカ装置10の数が2以上である場合(S13:Yes)、自購読情報管理部108によって、管理表205から、自ブローカ装置購読情報m3として当該トピック(例えば、情報群A)が書き込まれているレコードが削除され(S16)、当該トピックの購読解除要求が、通信部102を介して、他ブローカ装置10へと送信される(S17)。   In step S13, if the number of other broker devices 10 subscribing to the topic (for example, information group A) is two or more (S13: Yes), the self-subscription information management unit 108 reads the self-subscription information from the management table 205 from the management table 205. The record in which the topic (for example, the information group A) is written as the broker device subscription information m3 is deleted (S16), and the unsubscribe request for the topic is transmitted to the other broker device 10 via the communication unit 102. Is performed (S17).

一方、ステップS13において、当該トピックを購読しているブローカ装置10の数が2未満である場合(S13:No)、管理表215に基づいて、他購読情報管理部120によって、各ブローカ装置10の購読数が把握され、さらに、自ブローカ装置10(#0)の購読数が、最小か否かが判定される(S14)。   On the other hand, in step S13, when the number of broker apparatuses 10 subscribed to the topic is less than 2 (S13: No), the other subscription information management unit 120 performs the management of each broker apparatus 10 based on the management table 215. The number of subscriptions is grasped, and it is determined whether the number of subscriptions of the own broker apparatus 10 (# 0) is the minimum (S14).

例えば、管理表215には、各ブローカ装置10の購読数は、自ブローカ装置10(#0)が1、ブローカ装置10(#1)が3、ブローカ装置10(#2)が2、ブローカ装置10(#3)が1であると示されている。この場合、自ブローカ装置10(#0)は、ブローカ装置11(#3)とともに、購読数が最小である(S14:Yes)。   For example, in the management table 215, the number of subscriptions of each broker device 10 is 1 for the own broker device 10 (# 0), 3 for the broker device 10 (# 1), 2 for the broker device 10 (# 2), and 2 for the broker device. 10 (# 3) is indicated as 1. In this case, the own broker apparatus 10 (# 0) has the minimum number of subscriptions together with the broker apparatus 11 (# 3) (S14: Yes).

購読数が最小ではない場合(S14:No)には、前述したステップS16へ進む。   If the number of subscriptions is not the minimum (S14: No), the process proceeds to step S16 described above.

一方、ステップS14において、購読数が最小である場合(S14:Yes)、購読数最小のブローカ装置10のうち、自ブローカ装置10のブローカ番号が最も小さいか否かが、他購読情報管理部120によって判定される(S15)。   On the other hand, if the number of subscriptions is the smallest in step S14 (S14: Yes), the other subscription information management unit 120 determines whether or not the broker number of the own broker device 10 is the smallest among the broker devices 10 with the smallest number of subscriptions. Is determined (S15).

管理表215に示されるように、購読数最小のブローカ装置10は、購読数が1である自ブローカ装置10(#0)とブローカ装置10(#3)であり、そのうち、自ブローカ装置10(#0)のブローカ番号が0であり最小である(S15:Yes)ので、処理を終了する。   As shown in the management table 215, the broker devices 10 with the minimum number of subscriptions are the own broker device 10 (# 0) and the broker device 10 (# 3) with the number of subscriptions being one, and among them, the own broker device 10 (# 3). Since the broker number of # 0) is 0 and the minimum (S15: Yes), the process ends.

一方、ステップS15において、最小ではない場合(S15:No)には、前述したステップS16へ進む。   On the other hand, if it is not the minimum in step S15 (S15: No), the process proceeds to step S16 described above.

図8は、他ブローカ装置からの購読要求受信時における自ブローカ装置による処理手順の一例を示すフローチャートである。   FIG. 8 is a flowchart illustrating an example of a processing procedure performed by the own broker device when a subscription request is received from another broker device.

他ブローカ装置10から購読要求KRが送信された場合、この購読要求KRは、通信部102を介して、他購読情報管理部120によって受信される(S21)。   When the subscription request KR is transmitted from the other broker device 10, the subscription request KR is received by the other subscription information management unit 120 via the communication unit 102 (S21).

購読要求KRが、購読登録要求であれば(S22:購読登録)、他購読情報管理部120において、管理表200の購読ブローカ装置m1として、購読要求元のブローカ装置10が書き込まれ、購読情報(トピック)m2として、購読要求KRで指定された購読情報(トピック)が書き込まれることによって、登録がなされる(S23)。   If the subscription request KR is a subscription registration request (S22: subscription registration), in the other subscription information management unit 120, the broker device 10 of the subscription request source is written as the subscription broker device m1 of the management table 200, and the subscription information ( Registration is performed by writing the subscription information (topic) specified in the subscription request KR as the topic) m2 (S23).

購読要求KRで指定されたトピックが、自ブローカ装置10(#0)で購読されており(S24:Yes)、そのトピックの最新の出版データSDが、最新出版データ保持部114に保持されており(S25:Yes)、自ブローカ装置10(#0)が、購読ブローカ装置10のうち、最も小さいブローカ番号である場合(S26:Yes)には、最新の出版データSDが、他出版データ送信部116によって、通信部102を介して、要求元のブローカ装置10へ送信される(S27)。   The topic specified by the subscription request KR is subscribed to the own broker device 10 (# 0) (S24: Yes), and the latest publication data SD of the topic is held in the latest publication data holding unit 114. (S25: Yes), when the own broker apparatus 10 (# 0) has the smallest broker number among the subscribed broker apparatuses 10 (S26: Yes), the latest publication data SD is transmitted to the other publication data transmission unit. The data is transmitted to the requesting broker device 10 via the communication unit 102 by the communication unit 116 (S27).

ステップS25において、そのトピックの最新の出版データSDが、最新出版データ保持部114に保持されていない場合(S25:No)や、ステップS26において、購読ブローカ装置10のブローカ番号が、最も小さいブローカ番号ではない場合(S26:No)や、ステップ27の後は、ステップS28へ進む。   In step S25, if the latest publication data SD of the topic is not held in the latest publication data holding unit 114 (S25: No), or in step S26, the broker number of the subscribed broker device 10 is the smallest broker number. If not (S26: No) or after step 27, the process proceeds to step S28.

ステップS28では、自購読情報管理部108によって、管理表205が参照されることによって、自ブローカ装置10(#0)内で当該トピックを購読するクライアント装置30が存在するか否かが判定され、存在すると判定される(S28:Yes)と、処理を終了する。   In step S28, the self-subscription information management unit 108 refers to the management table 205 to determine whether or not there is a client device 30 that subscribes to the topic in the own broker device 10 (# 0). If it is determined that the file exists (S28: Yes), the process ends.

一方、存在すると判定されない場合(S28:No)には、他購読情報管理部120によって、管理表210から、当該トピック(例えば、情報群A)を購読する他購読ブローカ装置10の数(購読数)が判定され、その数が2以上であれば(S29:Yes)、管理表205から、当該トピック(例えば、情報群A)が自ブローカ装置購読情報m3として書き込まれているレコードが削除され(S30)、自購読情報管理部108から、当該トピックに対する購読解除要求が、通信部102を介して、他ブローカ装置10へ送信される(S31)。   On the other hand, when it is not determined that the topic exists (S28: No), the number of other subscribed broker apparatuses 10 subscribing to the topic (for example, information group A) from the management table 210 by the other subscription information management unit 120 (the number of subscriptions) ) Is determined, and if the number is 2 or more (S29: Yes), the record in which the topic (for example, the information group A) is written as the own broker apparatus subscription information m3 is deleted from the management table 205 (S29: Yes). S30), the self-subscription information management unit 108 transmits a subscription release request for the topic to the other broker device 10 via the communication unit 102 (S31).

一方、ステップS29において、購読ブローカ装置10の数が、2以上でない場合(S29:No)、自ブローカ装置10(#0)内で当該トピックを購読するクライアント装置30は存在しないものの、出版データSDの冗長化のために、自ブローカ装置10(#0)での購読を継続するために、何れの処理もなされずに、処理は終了する。   On the other hand, in step S29, if the number of subscribing broker devices 10 is not two or more (S29: No), although there is no client device 30 that subscribes to the topic in the own broker device 10 (# 0), the publication data SD In order to continue the subscription in the own broker apparatus 10 (# 0) for the redundancy of, the processing ends without any processing.

ステップS24において、トピックが、自ブローカ装置10(#0)で購読されておらず(S24:No)、さらに他購読ブローカ装置10の数が1であり(S33:Yes)、自ブローカ装置10(#0)が、トピック購読数最小のブローカ装置であり(S34:Yes)、自ブローカ装置10(#0)のブローカ番号が、購読数最小のブローカ装置10の中で最も小さければ(S35:Yes)、出版データSDの冗長化のためにトピックを購読するために、自購読情報管理部108によって、管理表205の自ブローカ装置購読情報m3として該トピックの購読情報(例えば、情報群A)が書き込まれ(S36)、その後、通信部102を介して、該トピックを指定した購読要求KRが、他のブローカ装置10へ送信される(S37)。   In step S24, the topic is not subscribed to the own broker device 10 (# 0) (S24: No), the number of other subscribed broker devices 10 is 1 (S33: Yes), and (# 0) is the broker device with the smallest number of topic subscriptions (S34: Yes), and if the broker number of the own broker device 10 (# 0) is the smallest among the broker devices 10 with the smallest number of subscriptions (S35: Yes) In order to subscribe to a topic for redundancy of the publication data SD, the self-subscription information management unit 108 sets the topic subscription information (for example, information group A) as the own broker apparatus subscription information m3 in the management table 205. Written (S36), and then a subscription request KR specifying the topic is transmitted to another broker device 10 via the communication unit 102 (S37).

さらに、他ブローカ装置10から出力された最新の出版データSDが、通信部102を介して他出版データ受信部118によって受信された場合(S38:Yes)には、受信された最新の出版データSDが、最新出版データ保持部114へ出力され、保持され(S39)、処理が終了する。   Further, when the latest publication data SD output from the other broker device 10 is received by the other publication data receiving unit 118 via the communication unit 102 (S38: Yes), the received latest publication data SD is received. Is output to the latest publication data holding unit 114 and held (S39), and the process ends.

なお、ステップS33において、他ブローカ装置10の購読数が1ではない場合(S33:No)、ステップS34において、自ブローカ装置10(#0)の購読数が最小ではない場合(S34:No)、ステップS35において、自ブローカ装置10(#0)のブローカ番号が、最も小さいブローカ番号でない場合(S35:No)、ステップS38において、最新の出版データSDが送信されない場合(S38:No)には、何れの処理もなされず、処理が終了する。   If the number of subscriptions of the other broker device 10 is not 1 in step S33 (S33: No), if the number of subscriptions of the own broker device 10 (# 0) is not minimum (S34: No) in step S34, In step S35, if the broker number of the own broker apparatus 10 (# 0) is not the smallest broker number (S35: No), if the latest publication data SD is not transmitted in step S38 (S38: No), No processing is performed, and the processing ends.

なお、ステップS22において、他ブローカ装置10から送信された購読要求KRが、購読解除要求である場合(S22:購読解除)には、他購読情報管理部120によって、管理表200から、購読要求KRで指定されたトピックが購読情報(トピック)m2として書き込まれているレコードが削除され(S32)、その後、ステップS33へ進む。   In step S22, when the subscription request KR transmitted from the other broker device 10 is a subscription release request (S22: subscription release), the subscription request KR is transmitted from the management table 200 by the other subscription information management unit 120 from the management table 200. The record in which the topic specified in is written as the subscription information (topic) m2 is deleted (S32), and thereafter, the process proceeds to step S33.

なお、本実施形態では、ステップS15、S26、S35における判定のために使用される判定基準に、最小のブローカ番号であるか否かが使用されている。しかしながら、判定基準はこれに限定されず、代わりに、最大のブローカ番号であるか否かを使用してもよい。あるいは、ブローカ番号によらず、直近の通信量が最も少ないブローカ装置10の購読を継続する等のようなアルゴリズムを使用してもよい。   In the present embodiment, whether or not the number is the minimum broker number is used as a criterion used for the determination in steps S15, S26, and S35. However, the criterion is not limited to this, and whether or not it is the largest broker number may be used instead. Alternatively, an algorithm such as continuing to subscribe to the broker device 10 having the least recent communication amount may be used regardless of the broker number.

図9は、クライアント装置からの出版データ出版要求時における自ブローカ装置による処理手順の一例を示すフローチャートである。   FIG. 9 is a flowchart illustrating an example of a processing procedure by the own broker device when a publication data publication request is issued from the client device.

自ブローカ装置10(#0)では、クライアント装置30(例えば、クライアント装置30(#1))から、トピックおよびその出版データSDが送信されると、出版データSDは、通信部104を介して、自出版データ受信部110によって受信され、さらに自出版データ送信部112へ出力される(S41)。自出版データ送信部112では、管理表205が参照され、出版データSDに関連するトピックを購読しているクライアント装置(購読クライアント装置)30が存在するか否かが判定される(S42)。   In the own broker device 10 (# 0), when the topic and its publication data SD are transmitted from the client device 30 (for example, the client device 30 (# 1)), the publication data SD is transmitted via the communication unit 104. The self-published data is received by the self-published data receiving unit 110, and further output to the self-published data transmitting unit 112 (S41). The self-published data transmission unit 112 refers to the management table 205 and determines whether or not there is a client device (subscribed client device) 30 that has subscribed to a topic related to the published data SD (S42).

購読クライアント装置30が存在すると判定される(S42:Yes)と、判定されたクライアント装置30(例えば、クライアント装置30(#2))へ、自出版データ送信部112から、通信部104を介して、出版データSDが送信され(S43)、ステップS44へ進む。   If it is determined that the subscription client device 30 exists (S42: Yes), the self-published data transmission unit 112 sends the determined client device 30 (for example, the client device 30 (# 2)) via the communication unit 104. The publishing data SD is transmitted (S43), and the process proceeds to step S44.

一方、購読しているクライアント装置30が存在しない場合(S42:No)は直接ステップS44へ進む。   On the other hand, if there is no subscribed client device 30 (S42: No), the process directly proceeds to step S44.

ステップS44では、他購読情報管理部120において、例えば管理表200が参照されることによって、出版データSDに関連するトピックを購読する他ブローカ装置10が存在するか否かが判定される(S44)。   In step S44, the other subscription information management unit 120 determines whether or not there is another broker device 10 that subscribes to a topic related to the publication data SD by referring to, for example, the management table 200 (S44). .

存在すると判定される(S44:Yes)と、判定されたブローカ装置10に向けて、他出版データ送信部116から、通信部102を介して、その出版データSDが送信される(S45)とともに、その出版データSDが最新出版データ保持部114に保持される(S46)。   If it is determined that it exists (S44: Yes), the publication data SD is transmitted from the other publication data transmission unit 116 via the communication unit 102 to the determined broker device 10 (S45), The publication data SD is held in the latest publication data holding unit 114 (S46).

一方、ステップS44において、存在しないと判定される(S44:No)と、ステップS46へ進み、その出版データSDが、最新出版データ保持部114に保持される(S46)。   On the other hand, if it is determined in step S44 that it does not exist (S44: No), the process proceeds to step S46, and the publication data SD is held in the latest publication data holding unit 114 (S46).

なお、図9には示されていないが、自ブローカ装置10(#0)、他ブローカ装置10共に購読していないトピックに関連する出版データSDがある場合(S42、S44の判定が共にNoである場合)には、そのトピックの購読登録要求が、他ブローカ装置10へ送信される。   Although not shown in FIG. 9, when there is publishing data SD related to a topic that is not subscribed to both the own broker apparatus 10 (# 0) and the other broker apparatus 10 (both determinations in S42 and S44 are No). In some cases), a subscription registration request for the topic is transmitted to the other broker device 10.

図10は、他ブローカ装置からの出版データ送信時における自ブローカ装置による処理手順の一例を示すフローチャートである。   FIG. 10 is a flowchart illustrating an example of a processing procedure by the own broker device when transmitting the publication data from another broker device.

他ブローカ装置10から送信された出版データSDは、通信部102を介して、他出版データ受信部118によって受信される(S51)。   The publication data SD transmitted from the other broker device 10 is received by the other publication data receiving unit 118 via the communication unit 102 (S51).

これに応じて、自購読情報管理部108によって、管理表205が参照され、出版データSDに関連するトピックを購読するクライアント装置(購読クライアント装置)30が、自ブローカ装置10に接続されているか否かが判定される(S52)。   In response, the self-subscription information management unit 108 refers to the management table 205, and determines whether the client device (subscriber client device) 30 that subscribes to the topic related to the publication data SD is connected to the own broker device 10. Is determined (S52).

接続されていると判定された場合(S52:Yes)には、自出版データ送信部112によって、通信部104を介して、判定されたクライアント装置30(例えば、クライアント装置30(#2))へ、出版データSDが送信される(S53)。また、この出版データSDが、最新出版データ保持部114に保持され(S54)、その後、処理を終了する。   When it is determined that the connection is established (S52: Yes), the self-published data transmission unit 112 sends the determined client device 30 (for example, the client device 30 (# 2)) via the communication unit 104. Then, the publication data SD is transmitted (S53). Further, the publication data SD is held in the latest publication data holding unit 114 (S54), and thereafter, the processing is terminated.

一方、接続されていないと判定された場合(S52:No)には、ステップS54へ進み、その出版データSDが、最新出版データ保持部114に保持される(S54)。   On the other hand, when it is determined that the connection is not established (S52: No), the process proceeds to step S54, and the publication data SD is held in the latest publication data holding unit 114 (S54).

図11は、他ブローカ装置の終了時および異常検出時における処理手順の一例を示すフローチャートである。   FIG. 11 is a flowchart illustrating an example of a processing procedure at the time of termination of another broker device and detection of an abnormality.

他ブローカ装置10から、自ブローカ装置10(#0)の終了検知部122へ、自発的な終了通知が到着した場合(S61:Yes)、または、自ブローカ装置10(#0)の終了検知部122によって、他ブローカ装置10の異常が検知された場合(S62:Yes)、他購読情報管理部120によって、終了または異常を起こしたブローカ装置10が購読しているトピックが、管理表200の購読情報(トピック)m2として書き込まれているか否が確認される(S63)。   When a spontaneous end notification arrives from another broker apparatus 10 to the end detection unit 122 of the own broker apparatus 10 (# 0) (S61: Yes), or the end detection unit of the own broker apparatus 10 (# 0) When the abnormality of the other broker device 10 is detected by the 122 (S62: Yes), the topic subscribed by the broker device 10 that has ended or caused the abnormality by the other subscription information management unit 120 is subscribed to the management table 200. It is confirmed whether or not the information (topic) m2 has been written (S63).

自発的な終了通知が到着せず(S61:No)、その後、他ブローカ装置10の異常も検知されない場合(S62:No)には、ステップS61の処理へ戻る。また、ステップS63において、書き込まれていないと判定された場合、すなわち、終了または異常を起こしたブローカ装置10が購読しているトピックが存在しない場合(S63:No)にもまた、ステップS61の処理へ戻る。   If no spontaneous end notification has arrived (S61: No) and no abnormality of the other broker device 10 is detected thereafter (S62: No), the process returns to step S61. Further, when it is determined in step S63 that the topic has not been written, that is, when there is no topic subscribed to by the broker device 10 that has ended or has an error (S63: No), the process of step S61 is also performed. Return to

一方、ステップS63において、書き込まれている判定された場合、すなわち、終了または異常を起こしたブローカ装置10が購読しているトピックが存在する場合(S63:Yes)には、他購読情報管理部120によって、終了または異常を起こしたブローカ装置10が購読しているトピックが購読情報(トピック)m2として書き込まれているレコードが、管理表200から削除される(S64)。   On the other hand, if it is determined in step S63 that the information has been written, that is, if there is a topic subscribed to by the broker device 10 that has ended or failed (S63: Yes), the other subscription information management unit 120 As a result, the record in which the topic subscribed to by the broker device 10 that has ended or failed is written as the subscription information (topic) m2 from the management table 200 (S64).

さらに、そのトピックが自ブローカ装置10(#0)でも購読されておらず(S65:No)、他購読ブローカ装置10の数が1であり(S66:Yes)、かつ自ブローカ装置10(#0)の購読数が最小であり(S67:Yes)、購読数最小のブローカ装置10の中で自ブローカ装置10(#0)のブローカ番号が最も小さい場合(S68:Yes)、そのトピックは、自ブローカ装置10での冗長化のために購読登録され(S69)、このトピックが、自購読情報管理部108から、通信部102を介して、他ブローカ装置10へ送信される(S70)。   Further, the topic is not subscribed even to the own broker apparatus 10 (# 0) (S65: No), the number of other subscribed broker apparatuses 10 is 1 (S66: Yes), and the own broker apparatus 10 (# 0). )) Is the smallest (S67: Yes), and the broker number of the own broker device 10 (# 0) is the smallest among the broker devices 10 with the smallest number of subscriptions (S68: Yes). The subscription is registered for redundancy in the broker device 10 (S69), and this topic is transmitted from the self-subscription information management unit 108 to the other broker device 10 via the communication unit 102 (S70).

それ以外(S65:Yes、S66:No、S67:No、S68:No)の場合にはステップS63へ戻る。   Otherwise (S65: Yes, S66: No, S67: No, S68: No), the process returns to step S63.

ステップS70の後、自ブローカ装置10(#0)が、最新の出版データSDを受信した場合(S71:Yes)には、最新の出版データSDが、最新出版データ保持部114に保持され(S72)、その後ステップS63へ戻る。   After step S70, when the own broker device 10 (# 0) receives the latest publication data SD (S71: Yes), the latest publication data SD is held in the latest publication data holding unit 114 (S72). ), And then return to step S63.

一方、ステップS70の後、自ブローカ装置10(#0)が、最新の出版データSDを受信しない場合(S71:No)には、ステップS63へ戻る。   On the other hand, if the own broker device 10 (# 0) does not receive the latest publication data SD after step S70 (S71: No), the process returns to step S63.

以上の構成により、自ブローカ装置10(#0)は、出版データSDの冗長性を確保できるので、他ブローカ装置10の異常発生時にも出版データSDは喪失されない。これにより、出版・購読型モデルの通信プロトコルを採用するシステムにおいて、信頼性の向上を図ることが可能となる。またブローカ装置10が購読する出版データSDのデータ量に応じて、冗長化のための出版データSDの送信先を変更することもできるので、適切な負荷分散を実現することが可能となる。   With the above configuration, the own broker device 10 (# 0) can ensure the redundancy of the publishing data SD, so that the publishing data SD is not lost even when an abnormality occurs in the other broker device 10. This makes it possible to improve the reliability of a system that employs the communication protocol of the publish / subscribe model. Also, the destination of the publication data SD for redundancy can be changed according to the data amount of the publication data SD to which the broker device 10 subscribes, so that it is possible to realize appropriate load distribution.

(変形例)
第1の実施形態の通信システムの変形例について説明する。
(Modification)
A modification of the communication system according to the first embodiment will be described.

図3に例示するブローカ装置10では、出版データSDの冗長化のために、トピックを購読するか否かを判定する機能を備えている。本変形例では、そのような機能を、ブローカ装置の外部に、サブブローカ装置として設ける。   The broker device 10 illustrated in FIG. 3 has a function of determining whether to subscribe to a topic in order to make the publication data SD redundant. In this modification, such a function is provided as a sub-broker device outside the broker device.

図12は、第1の実施形態の通信システムの変形例を示す概念図である。   FIG. 12 is a conceptual diagram illustrating a modification of the communication system according to the first embodiment.

すなわち、本変形例の通信システム2では、図12に示すように、ブローカ装置11の外部に、ネットワーク21を介して、サブブローカ装置40を接続している。図12に示す例では、各ブローカ装置11に対して、サブブローカ装置40を1対1で設けているが、このような構成に限定されず、特定のブローカ装置11にのみサブブローカ装置40を設けてもよい。また、1つのサブブローカ装置40を、複数のブローカ装置11へ接続し、複数のブローカ装置11について1つのサブブローカ装置40が共通して機能するようにしてもよい。   That is, in the communication system 2 of the present modification, as shown in FIG. 12, the sub-broker device 40 is connected to the outside of the broker device 11 via the network 21. In the example shown in FIG. 12, the sub-broker device 40 is provided for each of the broker devices 11 in a one-to-one manner. However, the present invention is not limited to such a configuration, and the sub-broker device 40 is provided only for a specific broker device 11. Is also good. In addition, one sub-broker device 40 may be connected to a plurality of broker devices 11 so that one sub-broker device 40 functions in common for the plurality of broker devices 11.

ネットワーク21もまた、ネットワーク20と同様に、例えばLAN等のローカルな回線であってもよいし、インターネットや専用回線等の広域な有線通信回線や、3G等の広域な無線通信回線とすることができる。   Similarly to the network 20, the network 21 may be a local line such as a LAN, a wide-area wired communication line such as the Internet or a dedicated line, or a wide-area wireless communication line such as 3G. it can.

図13は、第1の実施形態の通信システムの変形例に適用されるブローカ装置およびサブブローカ装置の構成例を示すブロック図である。   FIG. 13 is a block diagram illustrating a configuration example of a broker device and a sub-broker device applied to a modified example of the communication system of the first embodiment.

ブローカ装置11は、ブローカ装置10から終了検知部122を削除した構成をしている。   The broker device 11 has a configuration in which the end detection unit 122 is deleted from the broker device 10.

サブブローカ装置40は、終了検知部402および購読決定部404を備える。   The sub-broker device 40 includes an end detection unit 402 and a subscription determination unit 404.

終了検知部402は、終了検知部122と同様の機能を有する。   The end detection unit 402 has the same function as the end detection unit 122.

購読決定部404は、ブローカ装置11の自購読情報管理部108および他購読情報管理部120から、購読要求KRの購読変更要求を受信する。購読決定部404は、自購読情報管理部108と他購読情報管理部120との両方から購読変更要求を受信することに代えて、通信を監視すること等により、購読変更要求を認識するようにしてもよい。   The subscription determination unit 404 receives a subscription change request of the subscription request KR from the self-subscription information management unit 108 and the other subscription information management unit 120 of the broker device 11. The subscription determining unit 404 recognizes the subscription change request by monitoring communication instead of receiving the subscription change request from both the self-subscription information management unit 108 and the other subscription information management unit 120. You may.

購読決定部404はさらに、購読変更要求の受信時に、購読変更要求元のブローカ装置11が、購読要求KRに関連付けられたトピックの新規購読要求なのか、購読解除要求なのか、購読継続要求なのか、購読解除継続要求なのかを判定する。   When receiving the subscription change request, the subscription determination unit 404 further determines whether the broker device 11 that has issued the subscription change request is a new subscription request, a subscription cancellation request, or a subscription continuation request for the topic associated with the subscription request KR. It is determined whether the request is a subscription cancellation continuation request.

この判定基準としては、例えば、管理表205の購読情報(トピック)m2として、当該トピック(例えば、情報群A)に購読クライアント装置30が関連付けられているレコードが残っているのであれば、購読を継続し、残っていない場合には、他ブローカ装置11の購読数や自ブローカ装置11(#0)の購読数に応じて、このトピックの購読を継続するか否かを判定することができる。   As a criterion for this, for example, if a record in which the subscription client device 30 is associated with the topic (for example, the information group A) remains as the subscription information (topic) m2 of the management table 205, the subscription is performed. If it is continued and there is no remaining one, it is possible to determine whether or not to continue the subscription for this topic according to the number of subscriptions of the other broker device 11 and the number of subscriptions of the own broker device 11 (# 0).

購読決定部404はさらに、新規購読要求や、購読解除要求のために、購読要求KRを、ブローカ装置11の自購読情報管理部108へ出力する。   The subscription determination unit 404 further outputs a subscription request KR to the self-subscription information management unit 108 of the broker device 11 for a new subscription request or a subscription release request.

以上説明したように、変形例によれば、サブブローカ装置40を設けることによって、新たな冗長化機能を設けていないブローカ装置11を使用した場合であっても、高い冗長化機能を実現することが可能な通信システム2を実現することが可能となる。   As described above, according to the modified example, by providing the sub-broker device 40, a high redundancy function can be realized even when the broker device 11 having no new redundancy function is used. A possible communication system 2 can be realized.

(第2の実施形態)
MQTTのような一部の出版・購読型モデルを採用するプロトコルでは、QoS機能を有する。QoS機能を利用することにより、必ず到着が保証されるべき出版データSD、到着が保証されなくともよい出版データSD等を区別するために、出版データSDにラベル付けすることができる。
(Second embodiment)
Some protocols, such as MQTT, that adopt a publish / subscribe model have a QoS function. By using the QoS function, it is possible to label the publication data SD in order to distinguish between the publication data SD whose arrival should be guaranteed and the publication data SD whose arrival does not need to be guaranteed.

第1の実施形態では、すべての出版データSDの冗長性の確保を前提としていたが、QoSの値によっては必ずしも冗長性を確保する必要はない。これに着目し、本実施形態では、通信量やブローカ装置10への負荷の低減を図るために、到着を保証する必要のない出版データSDについては、冗長性を確保しない。   In the first embodiment, it is assumed that the redundancy of all the publication data SD is secured, but it is not always necessary to secure the redundancy depending on the QoS value. Focusing on this, in the present embodiment, in order to reduce the amount of communication and the load on the broker device 10, redundancy is not ensured for the publication data SD that does not need to be guaranteed to arrive.

図14は、第2の実施形態の通信システムに適用されるブローカ装置の構成例を示すブロック図である。   FIG. 14 is a block diagram illustrating a configuration example of a broker device applied to the communication system according to the second embodiment.

ブローカ装置12の構成は、ブローカ装置10の構成と類似しているが、ブローカ装置12は、ブローカ装置10が備えていないQoS管理部124を、他購読情報管理部120と自購読情報管理部108との間に備えていることが異なる。従って、以下では、ブローカ装置10と異なる点について説明する。   Although the configuration of the broker device 12 is similar to the configuration of the broker device 10, the broker device 12 replaces the QoS management unit 124 that the broker device 10 does not have with the other subscription information management unit 120 and the own subscription information management unit 108. Is different between the two. Therefore, only the differences from the broker device 10 will be described below.

他購読情報管理部120は、第1の実施形態で説明した機能に加えて、他ブローカ装置10から、購読解除要求である購読要求KRを受信すると、受信した購読解除要求に基づいて、図15に例示する他購読情報管理表220の内容を更新する。   When receiving the subscription request KR, which is a subscription release request, from the other broker device 10 in addition to the functions described in the first embodiment, the other subscription information management unit 120 performs, based on the received subscription release request, FIG. Is updated in the other subscription information management table 220 illustrated in FIG.

図15は、他購読情報管理表の一例を示す図である。   FIG. 15 is a diagram illustrating an example of the other subscription information management table.

他購読情報管理表220(以下、単に「管理表220」と称する)は、管理表200の変形例であり、購読ブローカ装置m1および購読情報(トピック)m2に、新たにQoSm9を加えた3つの項目から構成されるレコードが積まれたデータテーブルである。管理表220は、ブローカ装置12内の図示しないストレージに記憶されており、ブローカ装置12内の各部位によって参照されることが可能である。   The other subscription information management table 220 (hereinafter, simply referred to as “management table 220”) is a modified example of the management table 200, and includes three types of newly added QoSm9 to the subscription broker device m1 and the subscription information (topic) m2. This is a data table in which records composed of items are stacked. The management table 220 is stored in a storage (not shown) in the broker device 12, and can be referred to by each unit in the broker device 12.

QoS管理部124は、出版データSDの送受信に要求される信頼性の指標値であるQoS値を算出し、管理表220のQoSm9として書き込むことによって、購読情報(トピック)毎にQoS値を管理する。また、管理表220を使って、出版データSDの複製が必要か否かを判定する。   The QoS management unit 124 manages the QoS value for each subscription information (topic) by calculating a QoS value that is an index value of reliability required for transmitting and receiving the publication data SD and writing the QoS value as the QoSm9 in the management table 220. . Further, it is determined whether or not the publication data SD needs to be copied using the management table 220.

他購読情報管理部120は、QoS管理部124によって出版データSDの複製が必要であると判定された場合にのみ、購読登録要求である購読要求KRを、自購読情報管理部108へ出力する。   The other subscription information management unit 120 outputs the subscription request KR, which is a subscription registration request, to the own subscription information management unit 108 only when the QoS management unit 124 determines that the publication data SD needs to be copied.

これに応じて、自購読情報管理部108は、第1の実施形態で説明したアルゴリズムに従って、その出版データSDの購読を、自ブローカ装置12(#0)内で実施するか否かを判定する。   In response, the own subscription information management unit 108 determines whether to subscribe to the publication data SD in the own broker device 12 (# 0) according to the algorithm described in the first embodiment. .

自購読情報管理部108は、第1の実施形態で説明した機能に加えて、図16に例示するような自購読情報管理表225を管理する。   The self-subscription information management unit 108 manages a self-subscription information management table 225 as illustrated in FIG. 16 in addition to the functions described in the first embodiment.

図16は、自購読情報管理表の一例を示す図である。   FIG. 16 is a diagram illustrating an example of the self-subscription information management table.

自購読情報管理表225(以下、単に「管理表225」と称する)は、管理表205の変形例であり、自ブローカ装置購読情報m3および購読クライアント装置m4に、新たにQoSm9を加えた3つの項目から構成されるレコードが積まれたデータテーブルである。管理表225は、ブローカ装置12内の図示しないストレージに記憶されており、ブローカ装置12内の各部位によって参照されることが可能である。   The self-subscription information management table 225 (hereinafter, simply referred to as “management table 225”) is a modified example of the management table 205, and includes three new QoS m9 added to the own broker apparatus subscription information m3 and the subscription client apparatus m4. This is a data table in which records composed of items are stacked. The management table 225 is stored in a storage (not shown) in the broker device 12, and can be referred to by each part in the broker device 12.

自購読情報管理部108は、QoS管理部124によって出版データSDの複製が必要であると判定された場合、第1の実施形態で説明したアルゴリズムに従って、購読を継続するか否かを判定する。また、管理表225の変更内容を、他ブローカ装置10へ送信する際に、対応するQoS情報も併せて送信することができる。   When the QoS management unit 124 determines that the publication data SD needs to be copied, the self-subscription information management unit 108 determines whether to continue the subscription according to the algorithm described in the first embodiment. Further, when the content of the change of the management table 225 is transmitted to the other broker device 10, the corresponding QoS information can be transmitted together.

QoS管理部124は、他購読情報管理部120もしくは自購読情報管理部108からトピックを出力されることによって呼び出され、そのトピックに関連する出版データSDが、冗長性を担保すべき情報であるか否かを判定する。   The QoS management unit 124 is called by outputting a topic from the other subscription information management unit 120 or the self-subscription information management unit 108, and determines whether the publication data SD related to the topic is information for which redundancy should be ensured. Determine whether or not.

例えば、QoSが0または1の二値を取り、0が到着を保証しなくてもよい出版データSDであり、1が到着を保証すべき出版データSDを意味するとする。この場合、QoS管理部124は、管理表220、225を参照し、当該トピックのQoSの最大値を算出する。   For example, suppose that the QoS takes a binary value of 0 or 1, where 0 is the publication data SD that does not have to guarantee the arrival and 1 means the publication data SD that should guarantee the arrival. In this case, the QoS management unit 124 refers to the management tables 220 and 225 and calculates the maximum value of the QoS of the topic.

例えば、管理表220より、購読情報(トピック)が情報群Aの場合には、ブローカ装置10(#1)がQoS=0、ブローカ装置10(#2)がQoS=1となり、管理表225より、自ブローカ装置12(#0)購読情報が情報群Aの場合には、QoS=1であり、QoSの最大値は1となる。   For example, from the management table 220, when the subscription information (topic) is the information group A, the broker device 10 (# 1) has QoS = 0 and the broker device 10 (# 2) has QoS = 1. When the own broker apparatus 12 (# 0) subscription information is the information group A, QoS = 1, and the maximum value of QoS is 1.

一方、情報群Cの場合には、管理表220より、ブローカ装置10(#1)がQoS=0、ブローカ装置10(#2)もQoS=0であり、最大値は0となる。   On the other hand, in the case of the information group C, from the management table 220, the broker device 10 (# 1) has QoS = 0, the broker device 10 (# 2) also has QoS = 0, and the maximum value is 0.

QoS管理部124は、最大値が1の場合には、冗長化を行うべき出版データSDであると判定し、最大値が0の場合には、冗長化を行う必要のない出版データSDであると判定する。   When the maximum value is 1, the QoS management unit 124 determines that the data is the publication data SD to be subjected to redundancy, and when the maximum value is 0, it is the publication data SD that does not need to be subjected to redundancy. Is determined.

なお、QoSが、前述した二値以外を取る場合にも、例えば最大値が1以上であれば、冗長化を行うべき出版データSDであると判定する等、同様のアルゴリズムで冗長化の要否判定を行うことができる。   If the QoS takes a value other than the above-described binary value, for example, if the maximum value is 1 or more, the necessity of the redundancy is determined by a similar algorithm, such as determining that the publication data SD should be subjected to the redundancy. A determination can be made.

例えば、管理表220に示される例では、情報群Bはブローカ装置10(#1)およびブローカ装置10(#3)で購読されている。情報群BのQoSの最大値は1であり、冗長化を行うべき出版データSDであるが、元々ブローカ装置10(#1)とブローカ装置10(#3)で購読されているため、既に冗長化されている。   For example, in the example shown in the management table 220, the information group B is subscribed to the broker device 10 (# 1) and the broker device 10 (# 3). The maximum value of the QoS of the information group B is 1, which is the publication data SD to be subjected to redundancy. However, since it is originally subscribed by the broker 10 (# 1) and the broker 10 (# 3), the redundancy is already set. Has been

ここで、ブローカ装置10(#1)が購読解除要求を行うとする。すると、情報群Bはブローカ装置10(#3)のみが購読することになる。この場合、第1の実施形態では、最も購読数が少なくブローカ番号も小さな自ブローカ装置12(#0)は、情報群Bを購読するクライアント装置30が存在しないにも関わらず、ブローカ装置10(#1)に代わって情報群Bを購読する。   Here, it is assumed that the broker device 10 (# 1) issues a subscription release request. Then, the information group B is subscribed only by the broker device 10 (# 3). In this case, in the first embodiment, the own broker device 12 (# 0) having the smallest number of subscriptions and the smallest broker number has the broker device 10 (# 0) despite the fact that there is no client device 30 that subscribes to the information group B. Subscribe to the information group B in place of # 1).

しかしながら、第2の実施形態では、QoSの最大値が0となり、冗長化を行う必要のない出版データSDとなる。この場合には、ブローカ装置10(#3)のみが購読を継続し、自ブローカ装置12(#0)では購読を行わないため、通信帯域を効率的に利用できることに加え、自ブローカ装置12(#0)の処理負荷を低減する。   However, in the second embodiment, the maximum value of the QoS is 0, and the publication data SD does not need to be redundant. In this case, only the broker device 10 (# 3) continues to subscribe, and the own broker device 12 (# 0) does not subscribe, so that the communication band can be used efficiently and the own broker device 12 (# 3) can be used. The processing load of # 0) is reduced.

次に、以上のように構成した第2の実施形態の通信システムの動作例について説明する。   Next, an operation example of the communication system according to the second embodiment configured as described above will be described.

図17は、クライアント装置からの購読要求受信時における自ブローカ装置による処理手順の一例を示すフローチャートである。   FIG. 17 is a flowchart illustrating an example of a processing procedure by the own broker device when receiving a subscription request from the client device.

図17に示すフローチャートは、図5に示すフローチャートの、ステップS12と、ステップS13との間に、ステップS12aを追加したものである。   The flowchart shown in FIG. 17 is different from the flowchart shown in FIG. 5 in that step S12a is added between step S12 and step S13.

したがって、以下では、ステップS12aに関連する処理について説明し、重複説明を避ける。   Therefore, the process related to step S12a will be described below, and redundant description will be avoided.

ステップS12において、購読クライアント装置30が存在せず、購読解除時に他ブローカ装置10によって購読されている場合(S12:No)、ステップS12aでは、出版データSDの冗長化の必要性の可否を判定するために、QoS管理部124によって、QoS最大値がゼロであるか否かが判定される(S12a)。   In step S12, when the subscription client device 30 does not exist and is subscribed by another broker device 10 when the subscription is canceled (S12: No), in step S12a, it is determined whether the publication data SD needs to be made redundant. Therefore, the QoS management unit 124 determines whether or not the QoS maximum value is zero (S12a).

QoS最大値がゼロであると判定された場合(S12a:Yes)、ステップS16へ進み、ゼロであると判定されなかった場合(S12a:No)、ステップS13へ進む。   When it is determined that the QoS maximum value is zero (S12a: Yes), the process proceeds to step S16, and when it is not determined that the QoS maximum value is zero (S12a: No), the process proceeds to step S13.

図18は、他ブローカ装置からの購読要求受信時における自ブローカ装置による処理手順の一例を示すフローチャートである。   FIG. 18 is a flowchart illustrating an example of a processing procedure performed by the own broker device when a subscription request is received from another broker device.

図18に示すフローチャートは、図8に示すフローチャートの、ステップS28と、ステップS29との間に、ステップS28aを追加し、ステップS32と、ステップS33との間に、ステップS32aを追加したものである。   The flowchart shown in FIG. 18 is obtained by adding step S28a between steps S28 and S29 and adding step S32a between steps S32 and S33 in the flowchart shown in FIG. .

したがって、以下では、ステップS28aとステップS32aとに関連する処理について説明し、重複説明を避ける。   Therefore, in the following, processing related to step S28a and step S32a will be described, and redundant description will be avoided.

ステップS28において、購読登録時に当該トピックの購読を行っているクライアント装置30が存在すると判定されない場合(S28:No)、ステップS12aと同様に、QoS管理部124によって、QoS最大値がゼロであるか否かが判定される(S28a)。   In step S28, when it is not determined that there is a client device 30 subscribing to the topic at the time of subscription registration (S28: No), the QoS management unit 124 determines whether the QoS maximum value is zero as in step S12a. It is determined whether or not it is (S28a).

QoS最大値がゼロであると判定された場合(S28a:Yes)、ステップS30へ進み、ゼロであると判定されなかった場合(S28a:No)、ステップS29へ進む。   When it is determined that the QoS maximum value is zero (S28a: Yes), the process proceeds to step S30, and when it is not determined that the QoS maximum value is zero (S28a: No), the process proceeds to step S29.

また、ステップS32の後も、ステップS12aと同様に、QoS管理部124によって、QoS最大値がゼロであるか否かが判定される(S32a)。   After step S32, similarly to step S12a, the QoS management unit 124 determines whether or not the QoS maximum value is zero (S32a).

そして、QoS最大値がゼロであると判定された場合(S32a:Yes)、処理は終了し、ゼロであると判定されなかった場合(S32a:No)、ステップS33へ進む。   Then, when it is determined that the QoS maximum value is zero (S32a: Yes), the process ends, and when it is not determined that it is zero (S32a: No), the process proceeds to step S33.

また、自ブローカ装置12(#0)に接続されたクライアント装置30から出版データSDの出版要求があった場合の処理手順の一例は、図9のフローチャートに示す通りであり、他ブローカ装置10から、出版データSDが送信された場合における処理手順の一例は、図10のフローチャートに示す通りである。   Further, an example of a processing procedure when a publication request of the publication data SD is issued from the client apparatus 30 connected to the own broker apparatus 12 (# 0) is as shown in the flowchart of FIG. An example of the processing procedure when the publication data SD is transmitted is as shown in the flowchart of FIG.

上述したように、第2の実施形態の通信システムによれば、QoSの値に応じて冗長化の必要性の可否を判定するために、すべての出版データSDについて冗長性を確保する必要はなくなるので、通信量やブローカ装置への負荷の低減を図ることが可能となる。   As described above, according to the communication system of the second embodiment, it is not necessary to ensure the redundancy for all the publication data SD in order to determine whether the redundancy is necessary according to the QoS value. Therefore, it is possible to reduce the amount of communication and the load on the broker device.

(第3の実施形態)
第1および第2の実施形態では、出版データSDの出版時には、個々の出版データSDを個々のパケットとして送信する。IoT(Internet of things)用途でMQTTを利用する場合、パケット送信がなされると、センサ出版データ等の出版データが大量に発生して大量の通信パケットが送受信されることとなる。一般にルータ等のネットワーク機器の性能限界は、パケット数と出版データ総量で決まる。つまりパケット数および通信出版データの総量を減らすことが、より多くの出版データを送受信できるようにするために肝要である。第3の実施形態は、MQTTのパケットの総量および送信出版データ量を、通信の信頼性を保ったまま減らす技術を提供する。
(Third embodiment)
In the first and second embodiments, when the publishing data SD is published, the individual publishing data SD is transmitted as individual packets. When MQTT is used for IoT (Internet of things), if packet transmission is performed, a large amount of publication data such as sensor publication data is generated, and a large amount of communication packets are transmitted and received. Generally, the performance limit of a network device such as a router is determined by the number of packets and the total amount of published data. That is, it is important to reduce the number of packets and the total amount of communication publication data so that more publication data can be transmitted and received. The third embodiment provides a technique for reducing the total amount of MQTT packets and the amount of publishing data to be transmitted while maintaining communication reliability.

図19は、第3の実施形態の通信システムに適用されるブローカ装置の構成例を示すブロック図である。   FIG. 19 is a block diagram illustrating a configuration example of a broker device applied to the communication system according to the third embodiment.

ブローカ装置13の構成は、ブローカ装置10の構成と類似しているが、ブローカ装置13は、ブローカ装置10が備えていない集約・圧縮部126と、リアルタイム性判定部128と、分割・展開部130とを備えている。従って、以下では、ブローカ装置10と異なる点について説明する。   Although the configuration of the broker device 13 is similar to the configuration of the broker device 10, the broker device 13 includes an aggregation / compression unit 126 not provided in the broker device 10, a real-time determination unit 128, and a division / decompression unit 130. And Therefore, only the differences from the broker device 10 will be described below.

リアルタイム性判定部128は、周期的に送信すべき出版データSDを決定するために、他出版データ送信部116に接続され、現在時刻から一定時間経過した時刻と、受信時刻との差が、トピック毎に定められた最大待機時間を超える出版データSDを、集約・圧縮部126による集約の対象であると判定する。   The real-time property determination unit 128 is connected to the other publication data transmission unit 116 to determine the publication data SD to be transmitted periodically, and determines the difference between the time at which a certain time has elapsed from the current time and the reception time by using the topic. It is determined that the publication data SD that exceeds the maximum standby time set for each of the publication data SD is to be aggregated by the aggregation / compression unit 126.

このため、自出版データ受信部110は、本実施形態ではさらに、クライアント装置30(例えば、クライアント装置30(#1))から受信した出版データSDの受信時刻を記録する。   For this reason, in the present embodiment, the self-published data receiving unit 110 further records the reception time of the published data SD received from the client device 30 (for example, the client device 30 (# 1)).

図20は、送信待機リストの一例を示す図である。   FIG. 20 is a diagram illustrating an example of the transmission waiting list.

送信待機リスト230には、一例として、出版データの宛先m10、購読情報(トピック)m11、出版データm12、受信日時m13、および処理済みフラグm14からなる各項目から構成されるレコードが積まれたデータテーブルである。送信待機リスト230は、ブローカ装置13内の図示しないストレージに記憶されており、ブローカ装置13内の各部位によって参照されることが可能である。   In the transmission waiting list 230, as an example, data in which records including items including a destination m10 of publication data, subscription information (topic) m11, publication data m12, reception date and time m13, and a processed flag m14 are stacked. It is a table. The transmission waiting list 230 is stored in a storage (not shown) in the broker device 13, and can be referred to by each unit in the broker device 13.

リアルタイム性判定部128は、クライアント装置30から、出版データSDに対する要求があった場合、送信待機リスト230のレコードの内容を更新する。   When there is a request for the publication data SD from the client device 30, the real-time property determination unit 128 updates the contents of the record in the transmission waiting list 230.

図21は、最大待機時間リストおよび時間条件の一例を示す図である。   FIG. 21 is a diagram illustrating an example of a maximum standby time list and time conditions.

最大待機時間リスト235は、購読情報(トピック)m15および最大待機時間m16からなる2項目から構成されるレコードが積まれたデータテーブルである。最大待機時間リスト235および時間条件240は、ブローカ装置13内の図示しないストレージに記憶されており、ブローカ装置13内の各部位によって参照されることが可能である。   The maximum waiting time list 235 is a data table in which records including two items of subscription information (topic) m15 and maximum waiting time m16 are stacked. The maximum waiting time list 235 and the time condition 240 are stored in a storage (not shown) in the broker device 13 and can be referred to by each part in the broker device 13.

時間条件240には、一例として、パケット送信周期T=10ms(ミリ秒)、現在時刻=2017/12/01 00:00:01.090が示されている。   The time condition 240 indicates, for example, a packet transmission cycle T = 10 ms (millisecond) and a current time = 2017/12/01 00: 00: 01.090.

送受信に要求されるリアルタイム性は、出版データSD毎に異なるため、リアルタイム性判定部128はさらに、最大待機時間リスト235を使用して、購読情報(トピック)m15毎に、最大待機時間m16として書き込まれた送信までの最大待機時間を管理する。   Since the real-time property required for transmission / reception differs for each piece of publication data SD, the real-time property determining unit 128 further writes, as a maximum waiting time m16, for each piece of subscription information (topic) m15 using the maximum waiting time list 235. Manages the maximum wait time before sending.

例えば、時間条件240に示されているように、T=10ミリ秒毎にパケット送信が行われる場合、10ミリ秒毎にリアルタイム性判定部128が呼びされ、次回呼出時刻において、リアルタイム性判定部128は、最大待機時間リスト235に示される最大待機時間m16を超過するパケットを取り出す。   For example, as shown in the time condition 240, when a packet is transmitted every T = 10 milliseconds, the real-time determining unit 128 is called every 10 milliseconds, and at the next calling time, the real-time determining unit 128 is called. 128 retrieves packets that exceed the maximum waiting time m16 shown in the maximum waiting time list 235.

例えば、時間条件240に示されるように、「現在時刻」が「2017/12/01 00:00:01.090」である場合、次回のパケット送信時刻は、現在時刻にパケット送信周期T=10ミリ秒を加えた「2017/12/01 00:00:01.100」となる。すると、送信待機リスト230において次回パケット送信時刻において最大待機時間m16として書き込まれた最大待機時間を超過するパケットは、図20に例示される送信待機リスト230における上から1、2、4番目のレコードに相当するパケットとなる。   For example, as shown in the time condition 240, when the “current time” is “2017/12/01 00: 00: 01.090”, the next packet transmission time becomes the packet transmission cycle T = 10 The result is “2017/12/01 00: 00: 01.100” after adding the millisecond. Then, the packets exceeding the maximum standby time written as the maximum standby time m16 at the next packet transmission time in the transmission standby list 230 are the first, second, and fourth records from the top in the transmission standby list 230 illustrated in FIG. Becomes a packet corresponding to

送信待機リスト230において、1番目のレコードに相当するパケットの購読情報(トピック)m11は情報群Aであるため、受信日時m13に、最大待機時間リスト235に示される情報群Aの最大待機時間m16である100ミリ秒を加算しても「00:00:01.095」としかならず、次回パケット送信時刻である「2017/12/01 00:00:01.100」には至らないために、待機時間は、最大待機時間m16を超過する。同様に、2番目のレコードに相当するパケットの購読情報(トピック)m11は情報群Bであるため、受信日時m13に、情報群Bの最大待機時間m16である15ミリ秒を加算しても「00:00:01.097」としかならず、次回パケット送信時刻である「2017/12/01 00:00:01.100」には至らないために、やはり、待機時間は、最大待機時間m16を超過する。また同様に、4番目のレコードに相当するパケットの購読情報(トピック)m11は情報群Cであるため、受信日時m13に、情報群Cの最大待機時間m16である50ミリ秒を加算しても「00:00:01.095」としかならず、次回パケット送信時刻である「2017/12/01 00:00:01.100」には至らないために、待機時間は、最大待機時間m16を超過する。   In the transmission waiting list 230, since the subscription information (topic) m11 of the packet corresponding to the first record is the information group A, the reception date / time m13 includes the maximum waiting time m16 of the information group A indicated in the maximum waiting time list 235. Even if 100 milliseconds is added, the result is only "00: 00: 01.095" and does not reach "2017/12/01 00: 00: 01.100" which is the next packet transmission time, so it is on standby. The time exceeds the maximum waiting time m16. Similarly, since the subscription information (topic) m11 of the packet corresponding to the second record is the information group B, even if the maximum standby time m16 of the information group B of 15 milliseconds is added to the reception date and time m13, “ 00: 00: 01.097 "and the next packet transmission time" 2017/12/01 00: 00: 01.100 ", so that the standby time also exceeds the maximum standby time m16. I do. Similarly, since the subscription information (topic) m11 of the packet corresponding to the fourth record is the information group C, the maximum standby time m16 of the information group C of 50 milliseconds is added to the reception date and time m13. The waiting time exceeds the maximum waiting time m16 because it becomes “00: 00: 01.095” and does not reach “2017/12/01 00: 00: 01.100” which is the next packet transmission time. .

一方、それ以外のパケットは、次回パケット送信時刻において、待機時間は、最大待機時間m16を超過しないため、送信は見送られる。   On the other hand, other packets are not sent at the next packet transmission time because the waiting time does not exceed the maximum waiting time m16.

集約・圧縮部126は、他出版データ送信部116に接続され、他ブローカ装置10へ送信される出版データSDを、他ブローカ装置10別に、一定時間毎に1つの集約済出版データに集約する。集約・圧縮部126はさらに、集約済出版データを、予め定められたアルゴリズムに従って圧縮する。   The aggregation / compression unit 126 is connected to the other publication data transmission unit 116, and aggregates the publication data SD transmitted to the other broker device 10 into one aggregated publication data for each other broker device 10 at regular time intervals. The aggregation / compression unit 126 further compresses the aggregated publication data according to a predetermined algorithm.

具体的には、集約・圧縮部126は、リアルタイム性判定部128が取り出した他のブローカ装置10へ送信する複数の出版データSDを、送信待機リスト230の宛先m10で指定されたブローカ装置10毎に1つのパケットにまとめ、圧縮する。   Specifically, the consolidation / compression unit 126 transmits a plurality of pieces of publication data SD to be transmitted to the other broker devices 10 extracted by the real-time property determination unit 128 for each of the broker devices 10 specified by the destination m10 of the transmission standby list 230. Into one packet and compress it.

例えば図20および図21を用いて説明した例は、「現在時刻」である「2017/12/01 00:00:01.090」において、送信待機リスト230における上から1、2、4番目のレコードに相当するパケットを送信するが、送信待機リスト230の宛先m10は、1番目と2番目のレコードに相当するパケットがブローカ装置10(#1)であり、4番目のレコードに相当するパケットがブローカ装置10(#2)である。このため、集約・圧縮部126は、1番目と2番目のレコードに相当するパケットを1つのパケットにまとめ、圧縮する。また、4番目のレコードに相当するパケットを、1つのパケットとして圧縮する。圧縮されたパケット形式の一例は、図22に示す通りである。   For example, in the example described with reference to FIGS. 20 and 21, in the “current time” “2017/12/01 00: 00: 01.090”, the first, second, and fourth positions from the top in the transmission standby list 230 are displayed. The packet corresponding to the record is transmitted. The destination m10 of the transmission waiting list 230 is such that the packet corresponding to the first and second records is the broker device 10 (# 1), and the packet corresponding to the fourth record is This is the broker device 10 (# 2). Therefore, the aggregation / compression unit 126 combines the packets corresponding to the first and second records into one packet and compresses it. Also, a packet corresponding to the fourth record is compressed as one packet. An example of the compressed packet format is as shown in FIG.

図22は、圧縮集約済出版データのパケット形式を例示するデータ構造図である。   FIG. 22 is a data structure diagram illustrating a packet format of the compressed and aggregated publication data.

圧縮集約済出版データ245は、集約・圧縮部126によって、集約された複数の出版データSDが、さらに圧縮されたものである。   The compressed and aggregated publication data 245 is obtained by further compressing the plurality of publication data SD aggregated by the aggregation and compression unit 126.

図22に示す例では、圧縮集約済出版データ245は、出版データSD1と出版データSD2とが並べられて1つの出版データとして集約された後に圧縮された構成をしている。出版データSD1は、購読情報(トピック)j1、データヘッダ(出版データサイズ等)h1、およびデータ本体b1を含み、出版データSD2は、購読情報(トピック)j2、データヘッダ(出版データサイズ等)h2、およびデータ本体b2を含む。なお、圧縮集約済出版データ245において集約される出版データSDの数は2つに限定されず、任意の数であってよい。   In the example illustrated in FIG. 22, the compressed and aggregated publication data 245 has a configuration in which the publication data SD1 and the publication data SD2 are arranged, aggregated as one publication data, and then compressed. The publishing data SD1 includes subscription information (topic) j1, a data header (publishing data size, etc.) h1, and a data body b1, and the publishing data SD2 includes subscription information (topic) j2, a data header (publishing data size, etc.) h2. , And the data body b2. In addition, the number of publication data SD aggregated in the compressed aggregated publication data 245 is not limited to two, and may be any number.

分割・展開部130は、他出版データ受信部118に接続され、他ブローカ装置10から送信された圧縮集約済出版データ245を展開して集約済出版データへ復元し、集約済出版データを分割して、各出版データSD1、SD2へ復元し、復元された各出版データSD1、SD2を、他出版データ受信部118へ出力する。   The division / decompression unit 130 is connected to the other publication data reception unit 118, decompresses the compressed / aggregated publication data 245 transmitted from the other broker device 10, restores the aggregated publication data, and divides the aggregated publication data. The publication data SD1 and SD2 are restored to the respective publication data SD1 and SD2, and the restored publication data SD1 and SD2 are output to the other publication data receiving unit 118.

分割・展開部130はさらに、他ブローカ装置10から出力された圧縮集約済出版データを、予め定められたアルゴリズムに従って展開することによって、圧縮集約済出版データから、集約済出版データを復元する。さらに、集約済出版データを分割することによって、集約済出版データから、複数の出版データを復元する。   The dividing / decompressing unit 130 further restores the aggregated publication data from the compressed and aggregated publication data by expanding the compressed and aggregated publication data output from the other broker device 10 according to a predetermined algorithm. Further, by dividing the aggregated publication data, a plurality of publication data is restored from the aggregated publication data.

次に、以上のように構成した第3の実施形態の通信システムの動作例について説明する。   Next, an operation example of the communication system according to the third embodiment configured as described above will be described.

先ず、クライアント装置30からの出版データSDの出版要求受信時における処理について説明する。   First, a process at the time of receiving a publication request of the publication data SD from the client device 30 will be described.

図23は、クライアント装置からの出版データの出版要求受信時における処理手順の一例を示すフローチャートである。   FIG. 23 is a flowchart illustrating an example of a processing procedure when a publication request for publication data is received from a client device.

クライアント装置30から送信された出版要求が受信される(S81)と、自購読情報管理部108によって、管理表205が参照され、出版要求があったトピックを自ブローカ装置購読情報m3とするクライアント装置30が、購読クライアント装置m4として書き込まれているレコードが存在するか否かが確認される(S82)。   When the publishing request transmitted from the client device 30 is received (S81), the self-subscription information management unit 108 refers to the management table 205, and sets the topic for which the publishing request was made as the own broker device subscription information m3. 30, it is confirmed whether or not there is a record written as the subscription client device m4 (S82).

購読クライアント装置30が、購読クライアント装置m4として書き込まれているレコードが存在すると判定された場合(S82:Yes)、そのクライアント装置30へ、出版データSDが送信され(S83)、ステップS84へ進む。   If the subscription client device 30 determines that there is a record written as the subscription client device m4 (S82: Yes), the publication data SD is transmitted to the client device 30 (S83), and the process proceeds to step S84.

ステップS82において、存在しないと判定された場合(S82:No)には、直接ステップS84へ進む。   If it is determined in step S82 that the information does not exist (S82: No), the process directly proceeds to step S84.

ステップS84では、管理表200が参照され、出版要求があった購読情報(トピック)を購読する他ブローカ装置30が、購読ブローカ装置m1として書き込まれたレコードが存在するか否が判定される(S84)。   In step S84, the management table 200 is referred to, and it is determined whether or not there is a record written as the subscription broker device m1 by another broker device 30 that subscribes to the subscription information (topic) for which the publication request has been made (S84). ).

存在すると判定された場合(S84:Yes)には、図20に示すような送信待機リスト230における各項目に該当する情報が書き込まれることによって登録がなされ(S85)、最終的な出版データSDが最新出版データ保持部114へ保持され、処理を終了する(S86)。なお、複数のブローカ装置10が、単一の出版データSDのトピックを購読している場合には、送信待機リスト230に、宛先ブローカ装置10毎に出版データSDが保持される。   If it is determined that the data exists (S84: Yes), registration is performed by writing information corresponding to each item in the transmission waiting list 230 as shown in FIG. 20 (S85), and the final publication data SD is stored. The data is held in the latest publication data holding unit 114, and the process ends (S86). When a plurality of brokers 10 subscribe to a single topic of the publication data SD, the publication data SD is stored in the transmission standby list 230 for each destination broker 10.

一方、ステップS84において、存在しないと判定された場合(S84:No)には、最新の出版データSDの最新出版データ保持部114への保持だけが行われた後、処理を終了する。   On the other hand, if it is determined in step S84 that the latest publication data SD does not exist (S84: No), only the latest publication data SD is stored in the latest publication data storage unit 114, and the process is terminated.

次に、出版要求に応じて出版データを送信する際における処理について説明する。   Next, a process when transmitting publication data in response to a publication request will be described.

図24は、出版要求に応じた出版データ送信時における処理手順の一例を示すフローチャートである。   FIG. 24 is a flowchart illustrating an example of a processing procedure when transmitting publication data in response to a publication request.

先ず、自ブローカ装置13(#0)以外のブローカ装置10毎に送信するパケットを生成するために、未処理の宛先があるか否かが確認される(S91)。   First, in order to generate a packet to be transmitted for each broker device 10 other than the own broker device 13 (# 0), it is confirmed whether or not there is an unprocessed destination (S91).

未処理の宛先がない場合(S92:No)には、一定時間(例えば、T=10ミリ秒)待機した後(S99)、送信待機リスト230における対応する処理済みフラグm14に書き込まれたフラグがクリアされ(S100)、ステップS91に戻る。   If there is no unprocessed destination (S92: No), after waiting for a certain time (for example, T = 10 milliseconds) (S99), the flag written in the corresponding processed flag m14 in the transmission standby list 230 is set. Cleared (S100), and the process returns to step S91.

一方、ステップS91において、未処理の宛先がある場合(S91:Yes)には、その宛先が取得される(S92)。   On the other hand, if there is an unprocessed destination in step S91 (S91: Yes), the destination is acquired (S92).

続いて、図20に示す送信待機リスト230が参照され、取得された宛先が宛先m10に指定された未処理の、すなわち処理済みフラグm14が付いていない出版データSDが存在するか否かが判定される(S93)。   Subsequently, by referring to the transmission standby list 230 shown in FIG. 20, it is determined whether or not there is unprocessed publication data SD having the acquired destination designated as the destination m10, that is, without the processed flag m14. Is performed (S93).

出版データSDが存在すると判定された場合(S93:Yes)、その出版データSDが取り出され、送信待機リスト230の該当レコードの処理済みフラグm14にフラグが付与される(S94)。   When it is determined that the publication data SD exists (S93: Yes), the publication data SD is extracted and a flag is added to the processed flag m14 of the record in the transmission waiting list 230 (S94).

さらに、その購読情報(トピック)の最大待機時間(例えば、最大待機時間M)が、最大待機時間リスト235から取得される(S95)。なお、最大待機時間リスト235は、あらかじめ準備されたものでも、あるいは、クライアント装置30等からの要求により動的に生成されたものでもよい。   Further, the maximum standby time (for example, the maximum standby time M) of the subscription information (topic) is obtained from the maximum standby time list 235 (S95). The maximum waiting time list 235 may be prepared in advance or may be dynamically generated by a request from the client device 30 or the like.

さらに、実行日時が登録日時から最大待機時間Mを経過した後になるか否か、すなわち、(現在時刻+T)>(登録日時+M)となるか否かが判定される(S96)。   Further, it is determined whether or not the execution date and time is after a lapse of the maximum standby time M from the registration date and time, that is, whether or not (current time + T)> (registration date and time + M) (S96).

実行日時が、登録日時から最大待機時間Mを経過した後になると判定された場合(S96:Yes)、今回の出版データSDを送信するために、当該出版データSDが、送信待機リスト230と同一の構成をしている送信リストに登録され(S97)、これに応じて、当該出版データSDが送信待機リスト230から削除され(S98)、ステップS93へ戻る。なお、送信リストは、送信待機リスト230と同一の構成をしているので、図示を省略する。   When it is determined that the execution date and time is after the maximum standby time M has elapsed from the registration date and time (S96: Yes), the current publication data SD is transmitted in the same manner as the transmission standby list 230 in order to transmit the current publication data SD. The publication data SD is registered in the configured transmission list (S97). In response, the publication data SD is deleted from the transmission standby list 230 (S98), and the process returns to step S93. Note that the transmission list has the same configuration as the transmission standby list 230, and is not shown.

一方、ステップS96において、実行日時が登録日時から最大待機時間Mを経過した後にならないと判定された場合(S96:No)もまた、ステップS93へ戻る。   On the other hand, when it is determined in step S96 that the execution date and time is not after the maximum standby time M has elapsed from the registration date and time (S96: No), the process also returns to step S93.

一方、ステップS93において、出版データSDが存在すると判定されなかった場合(S93:No)、送信リストに、保持した出版データSDが結合され(S101)、圧縮され(S102)、宛先ブローカ装置30へパケットが送信され(S103)、送信リストがクリアされ(S104)、ステップS91へ戻る。   On the other hand, when it is not determined in step S93 that the publication data SD exists (S93: No), the held publication data SD is combined with the transmission list (S101), compressed (S102), and sent to the destination broker device 30. The packet is transmitted (S103), the transmission list is cleared (S104), and the process returns to step S91.

次に、他ブローカ装置10から出版データが送信された場合における処理について説明する。   Next, a process performed when publication data is transmitted from another broker device 10 will be described.

図25は、他ブローカ装置からの出版データ送信場合における処理手順の一例を示すフローチャートである。   FIG. 25 is a flowchart illustrating an example of a processing procedure in a case where publication data is transmitted from another broker device.

他ブローカ装置10から送信された出版データSDが、自ブローカ装置13(#0)によって受信される(S111)と、圧縮されているパケットが、分割・展開部130によって展開され、展開されたパケットに、複数の出版データSDが含まれている場合には、さらに展開されたパケットが分割され、各出版データSDが復元される(S112)。   When the publishing data SD transmitted from the other broker device 10 is received by the own broker device 13 (# 0) (S111), the compressed packet is decompressed by the division / decompression unit 130 and the decompressed packet is decompressed. If a plurality of pieces of publication data SD are included, the expanded packet is further divided, and each piece of publication data SD is restored (S112).

分割されたパケットに、未処理の出版データSDが存在しないと判定された場合(ステップS113:No)には、処理を終了する。   When it is determined that the unprocessed publication data SD does not exist in the divided packets (step S113: No), the process ends.

一方、分割されたパケットに、未処理の出版データSDがあると判定された場合(ステップS113:Yes)には、未処理の出版データSDが1件取り出され(S114)、管理表205の購読ブローカ装置m1に、当該トピックの購読クライアント装置30が存在するか否かが判定される(S115)。   On the other hand, when it is determined that unprocessed publication data SD is included in the divided packets (step S113: Yes), one unprocessed publication data SD is extracted (S114), and the management table 205 is subscribed. It is determined whether or not the subscribed client device 30 of the topic exists in the broker device m1 (S115).

購読クライアント装置30が存在すると判定された場合(S115:Yes)、そのクライアント装置30へ、出版データSDが送信され(S116)、最新の出版データSDが、最新出版データ保持部114に保持され(S117)、ステップS113へ戻る。   If it is determined that the subscription client device 30 exists (S115: Yes), the publication data SD is transmitted to the client device 30 (S116), and the latest publication data SD is held in the latest publication data holding unit 114 ( S117), returning to step S113.

一方、ステップS115において、購読クライアント装置30が存在しないと判定された場合(S115:No)、ステップS117へ進む。   On the other hand, if it is determined in step S115 that the subscription client device 30 does not exist (S115: No), the process proceeds to step S117.

なお、自ブローカ装置13(#0)がクライアント装置30から購読要求を受信した際の処理手順は、図5のフローチャートを用いて説明した通りであり、自ブローカ装置13(#0)が他ブローカ装置10から購読要求を受信した際の処理手順は、図8のフローチャートを用いて説明した通りであり、他ブローカ装置10の終了時および異常検出時における処理手順は、図11のフローチャートを用いて説明した通りである。   The processing procedure when the own broker device 13 (# 0) receives the subscription request from the client device 30 is as described with reference to the flowchart of FIG. The processing procedure when a subscription request is received from the apparatus 10 is as described with reference to the flowchart in FIG. 8, and the processing procedure when the other broker apparatus 10 terminates and when an abnormality is detected is described with reference to the flowchart in FIG. 11. As described.

このように、第3の実施形態によれば、パケットの総量および送信出版データ量を、通信の信頼性を保ったまま減らすことが可能となる。   Thus, according to the third embodiment, it is possible to reduce the total amount of packets and the amount of transmitted publication data while maintaining the reliability of communication.

(変形例)
第3の実施形態の通信システムの変形例について説明する。
(Modification)
A modification of the communication system according to the third embodiment will be described.

第3の実施形態では、図19に示すように、パケットの集約・圧縮および分割・展開は、集約・圧縮部126および分割・展開部130を備えたブローカ装置13によって実行されているが、本変形例では、ブローカ装置13ではなく、クライアント装置によって実行される。   In the third embodiment, as shown in FIG. 19, aggregation / compression and division / expansion of packets are executed by the broker device 13 including the aggregation / compression unit 126 and the division / expansion unit 130. In a modified example, the process is executed by the client device, not the broker device 13.

図26は、第3の実施形態の通信システムの変形例に適用されるクライアント装置の構成例を示す概念図である。   FIG. 26 is a conceptual diagram illustrating a configuration example of a client device applied to a modified example of the communication system of the third embodiment.

変形例のクライアント装置31は、ブローカ装置10に、ネットワーク20を介して接続されている。ブローカ装置10の構成は、図3に示す通りであるので、重複説明を避ける。   The client device 31 of the modified example is connected to the broker device 10 via the network 20. The configuration of the broker device 10 is as shown in FIG.

クライアント装置31は、通信部302、分割・展開部304、購読・出版要求部306、集約・圧縮部308、異常検出部310、および負荷検出部312を備える。   The client device 31 includes a communication unit 302, a division / decompression unit 304, a subscription / publishing request unit 306, an aggregation / compression unit 308, an abnormality detection unit 310, and a load detection unit 312.

集約・圧縮部308は、同一のトピックに関連する複数の出版データSDを集約して1つの集約済出版データを生成し、生成された集約済出版データを圧縮し、集約圧縮済出版データを生成する。しかしながら、集約・圧縮部308は、各ブローカ装置10が購読しているトピックがわからないため、宛先ブローカ装置10毎にパケットを圧縮することができない。そこで、トピック毎に出版データSDを集約して圧縮する。   The aggregation / compression unit 308 aggregates a plurality of publication data SD related to the same topic to generate one aggregated publication data, compresses the generated aggregated publication data, and generates aggregated compressed publication data. I do. However, since the aggregation / compression unit 308 does not know the topic to which each broker device 10 has subscribed, it cannot compress the packet for each destination broker device 10. Therefore, the publication data SD is aggregated and compressed for each topic.

図27は、最大待機時間リストの一例を示す図である。   FIG. 27 is a diagram illustrating an example of the maximum standby time list.

図28は、送信待機リストの一例を示す図である。   FIG. 28 is a diagram illustrating an example of the transmission waiting list.

図27に示す最大待機時間リスト250および時間条件255は、図21に示す最大待機時間リスト235および時間条件240と同一である。最大待機時間リスト250および時間条件255は、クライアント装置31内の図示しないストレージに記憶されており、クライアント装置31内の各部位によって参照されることが可能である。   The maximum standby time list 250 and the time condition 255 shown in FIG. 27 are the same as the maximum standby time list 235 and the time condition 240 shown in FIG. The maximum standby time list 250 and the time condition 255 are stored in a storage (not shown) in the client device 31, and can be referred to by each unit in the client device 31.

図28に示す送信待機リスト260は、図20に示す送信待機リスト230から、宛先m10を削除した構成となっている。送信待機リスト260もまた、クライアント装置31内の図示しないストレージに記憶されており、クライアント装置31内の各部位によって参照されることが可能である。   The transmission waiting list 260 shown in FIG. 28 has a configuration in which the destination m10 is deleted from the transmission waiting list 230 shown in FIG. The transmission waiting list 260 is also stored in a storage (not shown) in the client device 31 and can be referred to by each unit in the client device 31.

例えば、各購読情報(トピック)m15毎の最大待機時間m16が図27に示す通りであり、T=10ミリ秒毎にパケット送信が行われる場合、図28に示す送信待機リスト260において、次回呼出時に最大待機時間を経過する購読情報(トピック)m1は、上から1〜4番目のレコードに相当する情報群A、情報群B、情報群B、および情報群Cとなる。そこで、集約・圧縮部308は、情報群Aのパケット、情報群Bのパケット、情報群Cのパケットそれぞれを集約して圧縮する。情報群Aのデータは1番目のレコードのみ、情報群Cのデータは4番目のレコードのみであるためそのまま圧縮する。一方、情報群Bのパケットは2、3番目のレコードに相当するデータがあるため、2つのデータを集約してから圧縮する。   For example, when the maximum standby time m16 for each piece of subscription information (topic) m15 is as shown in FIG. 27 and packet transmission is performed every T = 10 milliseconds, the next call in the transmission standby list 260 shown in FIG. The subscription information (topic) m1 that sometimes passes the maximum standby time becomes an information group A, an information group B, an information group B, and an information group C corresponding to the first to fourth records from the top. Therefore, the aggregation / compression unit 308 aggregates and compresses the information group A packet, the information group B packet, and the information group C packet. Since the data of the information group A is only the first record and the data of the information group C is only the fourth record, the data is compressed as it is. On the other hand, since the packet of the information group B has data corresponding to the second and third records, the two data are aggregated and then compressed.

図29は、圧縮集約済データのパケット形式を例示するデータ構造図である。   FIG. 29 is a data structure diagram illustrating a packet format of the compressed and aggregated data.

圧縮集約済出版データ265は、集約・圧縮部308によって、集約された複数の出版データSDが、さらに圧縮されたものである。   The compressed and aggregated publication data 265 is obtained by further compressing the plurality of publication data SD aggregated by the aggregation and compression unit 308.

図29に示す例では、圧縮集約済出版データ265は、出版データSD1と出版データSD2とが1つの出版データとして集約された後に圧縮された構成をしている。ここで、出版データSD1と出版データSD2とは同じ購読情報(トピック)であるので、先頭に購読情報(トピック)jを出版データSD1と出版データSD2とに共通した情報として備え、その後、出版データSD1のデータヘッダh1およびデータ本体b1が続き、その後、出版データSD2のデータヘッダh2およびデータ本体b2が続くような形式であって良い。なお、圧縮集約済出版データ265において集約される出版データSDの数は2つに限定されず、任意の数であってよい。 ブローカ装置10側では、受信したパケットのトピック情報が参照されることによって、転送するクライアント装置31およびブローカ装置10が決定される。他ブローカ装置10へ転送する際には、さらに図19の構成と組み合わせて、宛先ブローカ装置10毎にさらに出版データSDを集約してから送信してもよい。   In the example illustrated in FIG. 29, the compressed and aggregated publication data 265 has a configuration in which the publication data SD1 and the publication data SD2 are aggregated as one publication data and then compressed. Here, the publishing data SD1 and the publishing data SD2 are the same subscription information (topic), so that the subscription information (topic) j is provided at the beginning as information common to the publishing data SD1 and the publishing data SD2, and thereafter, The format may be such that a data header h1 and a data body b1 of SD1 follow, followed by a data header h2 and a data body b2 of the publication data SD2. In addition, the number of publication data SD aggregated in the compressed aggregated publication data 265 is not limited to two, and may be an arbitrary number. On the broker device 10 side, the client device 31 and the broker device 10 to be transferred are determined by referring to the topic information of the received packet. When transferring to another broker apparatus 10, the publication data SD may be further aggregated for each destination broker apparatus 10 and then transmitted in combination with the configuration of FIG.

一方、ブローカ装置10から送信された出版データSDが、クライアント装置31によって受信された場合には、トピック毎に出版データSDが集約・圧縮されているため、分割・展開部304は、トピック毎に出版データSDが集約・圧縮されている集約圧縮済出版データを、個々の出版データに分割する機能を有する。   On the other hand, when the publishing data SD transmitted from the broker device 10 is received by the client device 31, the publishing data SD is aggregated and compressed for each topic. It has a function of dividing the aggregated and compressed publication data in which the publication data SD is aggregated and compressed into individual publication data.

すなわち、分割・展開部304は、集約圧縮済出版データを展開して、圧縮前の集約済出版データを復元し、復元された集約済出版データを分割して、複数の出版データSDを復元する。   That is, the division / decompression unit 304 decompresses the aggregated compressed publication data, restores the aggregated publication data before compression, divides the restored aggregated publication data, and restores a plurality of publication data SD. .

異常検出部310は、接続されたブローカ装置10の異常を検出すると、異常検出されたブローカ装置10から、別のブローカ装置10(例えば、ブローカ装置10(#1))へ接続先を変更する。   When detecting an abnormality in the connected broker device 10, the abnormality detection unit 310 changes the connection destination from the broker device 10 in which the abnormality is detected to another broker device 10 (for example, the broker device 10 (# 1)).

負荷検出部312は、ブローカ装置10の負荷増大を検出すると、負荷増大を検出されたブローカ装置10から、別のブローカ装置10(例えば、ブローカ装置10(#1))へ接続先を変更する。   Upon detecting an increase in the load of the broker device 10, the load detection unit 312 changes the connection destination from the broker device 10 that has detected the increase in the load to another broker device 10 (for example, the broker device 10 (# 1)).

通信部302は、異常検出部310および負荷検出部312によって接続先として変更されたブローカ装置10(例えば、ブローカ装置10(#1))へ、集約圧縮済出版データを送信するとともに、ブローカ装置10から送信された集約圧縮済出版データを、分割・展開部304へ出力する。   The communication unit 302 transmits the aggregated compressed publishing data to the broker device 10 (for example, the broker device 10 (# 1)) whose connection destination has been changed by the abnormality detection unit 310 and the load detection unit 312, and also transmits the broker device 10 The aggregated compressed publishing data transmitted from is output to the division / decompression unit 304.

なお、本変形例において、ブローカ装置10は、第1の実施形態で説明した機能に加えて、集約・圧縮されたパケットの購読情報(トピック)等を管理する機能を有する。   In this modified example, the broker device 10 has a function of managing subscription information (topics) of aggregated and compressed packets, in addition to the functions described in the first embodiment.

図30は、クライアント装置からの出版データの出版要求受信時における処理手順の一例を示すフローチャートである。   FIG. 30 is a flowchart illustrating an example of a processing procedure when receiving a publication request for publication data from a client device.

クライアント装置31が、出版要求を行う場合(S121)には、図28に示すような送信待機リスト260に出版データSDの購読情報(トピック)m11、データm12、登録日時m13を保持して終了する(S122)。   When the client device 31 issues a publishing request (S121), the subscription information (topic) m11, the data m12, and the registration date and time m13 of the publication data SD are stored in the transmission waiting list 260 as shown in FIG. (S122).

一方で、クライアント装置31は、定期的にブローカ装置10に対して出版データSDを送信するため、購読情報(トピック)毎にパケットの集約・圧縮および送信処理を行う。   On the other hand, in order to periodically transmit the publication data SD to the broker device 10, the client device 31 performs aggregation / compression and transmission processing of the packet for each subscription information (topic).

図31は、購読情報(トピック)毎にパケットの集約・圧縮および送信処理を行う際における処理手順の一例を示すフローチャートである。   FIG. 31 is a flowchart illustrating an example of a processing procedure when aggregating / compressing and transmitting a packet for each piece of subscription information (topic).

図31に示すフローチャートは、図24に示すフローチャートに類似しているので、重複説明を避け、相違点について説明する。   The flowchart shown in FIG. 31 is similar to the flowchart shown in FIG. 24, and therefore, a duplicate description will be avoided and only differences will be described.

すなわち、図24では、宛先ブローカ装置10毎にパケットの集約・圧縮処理を行うが、図31では、トピック毎にパケットの集約・圧縮処理を行う。このため、図31では、ステップS131において、未処理の購読情報(トピック)が存在するか否かが判定され、存在すると判定された場合には、ステップS132において、未処理の購読情報(トピック)が取得され、ステップS133において、取得された購読情報(トピック)に合致する送信待機データが存在するか否かが判定され、存在すると判定された場合には、ステップS134において、取得された購読情報に合致する送信待機データが取り出される。   That is, in FIG. 24, packet aggregation / compression processing is performed for each destination broker device 10, but in FIG. 31, packet aggregation / compression processing is performed for each topic. For this reason, in FIG. 31, it is determined whether or not unprocessed subscription information (topic) exists in step S131. If it is determined that the subscription information does not exist, in step S132, the unprocessed subscription information (topic) is determined. Is determined, and in step S133, it is determined whether there is transmission standby data that matches the obtained subscription information (topic). If it is determined that transmission standby data is present, in step S134, the obtained subscription information is determined. Is retrieved.

ステップS131において、存在すると判定されなかった場合(S131:No)には、図24におけるステップS99以降の処理がなされ、ステップS133において、存在すると判定されなかった場合(S133:No)には、図24におけるステップS101以降の処理がなされ、ステップS134の後は、図24におけるステップS95以降の処理がなされる。   If it is not determined in step S131 that there is any data (S131: No), the processing after step S99 in FIG. 24 is performed. If it is not determined in step S133 that there is any data (S133: No), the process proceeds to step S131. The processing after step S101 in FIG. 24 is performed, and the processing after step S95 in FIG. 24 is performed after step S134.

図32は、ブローカ装置からの出版データ送信時における処理手順の一例を示すフローチャートである。   FIG. 32 is a flowchart illustrating an example of a processing procedure when transmitting publication data from the broker device.

クライアント装置31では、ブローカ装置10から送信された出版データSDが、通信部302によって受信される(S141)と、その出版データSDが分割・展開部304によって展開された後に、分割される(S142)。さらに個々の出版データSD毎に処理を行うため、分割された出版データSDに、未処理の出版データSDが存在するか否が判定される(S143)。   In the client device 31, when the publishing data SD transmitted from the broker device 10 is received by the communication unit 302 (S141), the publishing data SD is developed by the dividing / developing unit 304 and then divided (S142). ). Further, in order to perform processing for each individual publication data SD, it is determined whether or not unprocessed publication data SD exists in the divided publication data SD (S143).

未処理の出版データSDが存在しなければ(S143:No)、そのまま処理を終了し、未処理の出版データSDが存在すれば(S143:Yes)、1件の出版データSDが取り出され、処理が実行された後に、S144へ戻る。   If there is no unprocessed publication data SD (S143: No), the process is terminated. If there is any unprocessed publication data SD (S143: Yes), one piece of publication data SD is extracted and processed. Is executed, the process returns to S144.

なお、購読要求時の処理手順は、ブローカ装置10に購読要求を送信するのみであるため、ここでは省略する。また、ブローカ装置10側での処理手順は、第1の実施形態において説明済みであるので、重複説明を避ける。   Note that the processing procedure at the time of the subscription request only transmits the subscription request to the broker device 10, and thus the description is omitted here. In addition, the processing procedure on the broker device 10 side has been described in the first embodiment, and thus redundant description will be avoided.

このような変形例によっても、パケットの総量および送信出版データ量を通信の信頼性を保ったまま減らすことが可能となる。   According to such a modification, the total amount of packets and the amount of transmitted publication data can be reduced while maintaining the reliability of communication.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。   Although several embodiments of the present invention have been described, these embodiments are provided by way of example and are not intended to limit the scope of the invention. These embodiments can be implemented in other various forms, and various omissions, replacements, and changes can be made without departing from the gist of the invention. These embodiments and their modifications are included in the scope and gist of the invention, and are also included in the invention described in the claims and equivalents thereof.

1 通信システム、2 通信システム、10 ブローカ装置、11 ブローカ装置、12 ブローカ装置、13 ブローカ装置、20 ネットワーク、21 ネットワーク、30 クライアント装置、31 クライアント装置、40 サブブローカ装置、102 通信部、104 通信部、106 自購読情報受信部、108 自購読情報管理部、110 自出版データ受信部、112 自出版データ送信部、114 最新出版データ保持部、116 他出版データ送信部、118 他出版データ受信部、120 他購読情報管理部、122 終了検知部、124 QoS管理部、126 集約・圧縮部、128 リアルタイム性判定部、130 分割・展開部、200 他ブローカ装置購読情報管理表、205 自ブローカ装置購読情報管理表、210 購読情報購読数管理表、215 ブローカ装置購読数管理表、220 他購読情報管理表、225 自購読情報管理表、230 送信待機リスト、235 最大待機時間リスト、240 時間条件、245 圧縮集約済出版データ、250 最大待機時間リスト、255 時間条件、260 送信待機リスト、265 圧縮集約済出版データ、302 通信部、304 分割・展開部、306 購読・出版要求部、308 集約・圧縮部、310 異常検出部、312 負荷検出部、402 終了検知部、404 購読決定部。   DESCRIPTION OF SYMBOLS 1 Communication system, 2 communication systems, 10 broker apparatuses, 11 broker apparatuses, 12 broker apparatuses, 13 broker apparatuses, 20 networks, 21 networks, 30 client apparatuses, 31 client apparatuses, 40 sub broker apparatuses, 102 communication sections, 104 communication sections, 106 Self-subscription information receiving unit, 108 Self-subscription information management unit, 110 Self-published data receiving unit, 112 Self-published data transmitting unit, 114 Latest published data holding unit, 116 Other published data transmitting unit, 118 Other published data receiving unit, 120 Other subscription information management unit, 122 end detection unit, 124 QoS management unit, 126 aggregation / compression unit, 128 real-time property determination unit, 130 division / decompression unit, 200 other broker device subscription information management table, 205 own broker device subscription information management Table, 210 subscription information Subscription Number Management Table, 215 Broker Equipment Subscription Number Management Table, 220 Other Subscription Information Management Table, 225 Own Subscription Information Management Table, 230 Transmission Wait List, 235 Maximum Waiting Time List, 240 Time Conditions, 245 Compressed Aggregated Publishing Data, 250 Maximum waiting time list, 255 time condition, 260 transmission waiting list, 265 compressed and aggregated publication data, 302 communication unit, 304 division / expansion unit, 306 subscription / publishing request unit, 308 aggregation / compression unit, 310 abnormality detection unit, 312 load detector, 402 end detector, 404 subscription determiner.

Claims (16)

第1のクライアント装置から受信した出版データを、第2のクライアント装置および他ブローカ装置へ送信するブローカ装置であって、
前記第2のクライアント装置によって購読されるトピックに対する購読要求を、前記第2のクライアント装置から受信する自購読情報受信部と、
前記第1のクライアント装置から、前記トピックに関連する出版データを受信する自出版データ受信部と、
前記自出版データ受信部によって受信された出版データを、前記第2のクライアント装置へ送信する自出版データ送信部と、
前記自出版データ受信部によって受信された出版データを、前記他ブローカ装置へ送信する他出版データ送信部とを備えた、ブローカ装置。
A broker device for transmitting publication data received from a first client device to a second client device and another broker device,
A self-subscribe information receiving unit that receives a subscription request for a topic to be subscribed by the second client device from the second client device;
A self-published data receiving unit that receives published data related to the topic from the first client device;
A self-publishing data transmitting unit that transmits the publication data received by the self-publishing data receiving unit to the second client device;
A broker for transmitting the publication data received by the self-published data receiver to the other broker device;
前記他ブローカ装置から、前記トピックに関連する出版データを受信する他出版データ受信部と、
前記自出版データ受信部および前記他出版データ受信部によって受信された前記出版データから、最新の出版データを前記トピック毎に抽出し保持する最新出版データ保持部とを備え、
前記自出版データ送信部は、前記購読要求に関連するトピックの最新の出版データを、前記最新出版データ保持部から取得し、前記第2のクライアント装置へ送信する、請求項1に記載のブローカ装置。
From the other broker device, another publication data receiving unit that receives publication data related to the topic,
The latest publication data holding unit that extracts and holds the latest publication data for each topic from the publication data received by the self-published data reception unit and the other publication data reception unit,
2. The broker device according to claim 1, wherein the self-published data transmitting unit acquires the latest published data of a topic related to the subscription request from the latest published data holding unit and transmits the latest published data to the second client device. 3. .
前記他ブローカ装置によって購読されるトピックに対する購読要求を、前記他ブローカ装置から受信する他購読情報管理部を備え、
前記他出版データ送信部は、前記他購読情報管理部によって受信された購読要求に関連するトピックに関連する最新の出版データを、前記最新出版データ保持部から取得し、前記他ブローカ装置へ送信する、請求項2に記載のブローカ装置。
A subscribe request for a topic subscribed to by the other broker device, comprising a subscribe information management unit that receives from the other broker device;
The other publication data transmission unit acquires the latest publication data related to the topic related to the subscription request received by the other subscription information management unit from the latest publication data holding unit, and transmits the latest publication data to the other broker device. The broker device according to claim 2.
前記ブローカ装置によって購読されるトピックを管理するとともに、前記管理しているトピックに変化があった場合には、このトピックを前記他ブローカ装置へ送信する自購読情報管理部をさらに備え、
前記他出版データ受信部は、前記自購読情報管理部によって管理されているトピックを購読するクライアント装置が存在しない場合には、新たな購読登録の購読要求を、前記自購読情報管理部へ出力する、請求項3に記載のブローカ装置。
While managing the topic to be subscribed by the broker device, further includes a self-subscription information management unit that transmits this topic to the other broker device when there is a change in the managed topic,
The other publication data receiving unit outputs a subscription request for new subscription registration to the self-subscribed information management unit when there is no client device that subscribes to a topic managed by the self-subscribed information management unit. The broker device according to claim 3.
前記他出版データ受信部は、前記他購読情報管理部によって受信された購読要求に関連するトピックのうち、2つ以上のブローカ装置で購読されているトピックと、前記自購読情報管理部によって管理されている前記トピックとを購読するクライアント装置が存在しない場合には、購読解除の購読要求を前記自購読情報管理部へ出力する、請求項4に記載のブローカ装置。   The other publication data receiving unit manages the topic related to the subscription request received by the other subscription information management unit, the topic being subscribed by two or more broker devices, and the self-subscription information management unit. The broker device according to claim 4, wherein when there is no client device that subscribes to the topic, the broker device outputs a subscription request for unsubscription to the self-subscription information management unit. 前記他出版データ受信部は、ブローカ装置毎に購読される前記トピックの数を計算し、その最小値が前記自購読情報管理部によって管理される前記トピックの数の合計値を上回る場合、新たな購読登録の購読要求を、前記自購読情報管理部へ出力する、請求項4に記載のブローカ装置。   The other publication data receiving unit calculates the number of the topics subscribed for each broker device, and when the minimum value exceeds the total value of the number of the topics managed by the self-subscription information management unit, a new value is added. The broker device according to claim 4, wherein a subscription request for subscription registration is output to the self-subscription information management unit. 前記他ブローカ装置の終了または異常を検知する終了検知部をさらに備え、
前記終了検知部によって前記他ブローカ装置の終了または異常が検知された場合、前記他購読情報管理部は、前記他ブローカ装置から、前記購読要求を受信しない、請求項3に記載のブローカ装置。
Further comprising an end detection unit for detecting the end or abnormality of the other broker device,
The broker device according to claim 3, wherein the other subscription information management unit does not receive the subscription request from the other broker device when the termination detection unit detects the termination or abnormality of the other broker device.
前記トピック毎に、前記出版データの送受信に要求される信頼性の指標値を管理するとともに、前記出版データの複製が必要か否かを判定する指標値管理部をさらに備え、
前記他購読情報管理部は、前記他ブローカ装置から、購読解除の購読要求があった前記トピックについて、前記指標値管理部によって、前記出版データの複製が必要であると判定された場合に、購読登録の購読要求を、前記自購読情報管理部へ出力する、請求項4に記載のブローカ装置。
For each topic, manages an index value of reliability required for transmission and reception of the publication data, and further includes an index value management unit that determines whether the publication data needs to be copied,
The other subscription information management unit, when the index value management unit determines that the publication data needs to be duplicated by the index value management unit for the topic for which a subscription request for unsubscription was issued from the other broker device, The broker device according to claim 4, wherein a subscription request for registration is output to the self-subscription information management unit.
前記他出版情報データ送信部から、複数の前記他ブローカ装置へ送信される前記出版データを、前記他ブローカ装置別に、一定時間毎に1つの集約済出版データに集約する集約部と、
前記集約部によって集約された前記集約済出版データを、予め定められた第1のアルゴリズムに従って圧縮する圧縮部とをさらに備えた、請求項1乃至8のうち何れか1項に記載のブローカ装置。
An aggregation unit that aggregates the publication data transmitted to the plurality of other broker devices from the other publication information data transmission unit into one aggregated publication data at predetermined time intervals for each of the other broker devices;
The broker device according to any one of claims 1 to 8, further comprising a compression unit configured to compress the aggregated publication data aggregated by the aggregation unit in accordance with a predetermined first algorithm.
前記自出版データ受信部は、前記第1のクライアント装置から受信した前記出版データの受信時刻を記録し、
さらに、現在時刻から前記一定時間経過した時刻と、前記受信時刻との差が、前記トピック毎に予め定められた最大待機時間を超える前記出版データを、前記集約部による集約の対象であると判定するリアルタイム性判定部を備えた、請求項9に記載のブローカ装置。
The self-published data receiving unit records a reception time of the published data received from the first client device,
Further, it is determined that the publication data in which the difference between the time when the certain time has elapsed from the current time and the reception time exceeds the maximum standby time predetermined for each topic is the object of aggregation by the aggregation unit. The broker device according to claim 9, further comprising a real-time determination unit that performs the determination.
前記他ブローカ装置から送信され、前記他出版データ受信部によって受信された、複数の出版データが集約および圧縮されてなる集約済出版データを、予め定められた第2のアルゴリズムに従って展開することによって、前記圧縮されてなる集約済出版データから、圧縮前の前記集約済出版データを復元する展開部と、
前記展開部によって復元された前記圧縮前の集約済出版データを分割して、前記圧縮前の集約済出版データから、集約前の複数の出版データを復元する分割部とをさらに備えた、請求項2乃至10のうち何れか1項に記載のブローカ装置。
By expanding the aggregated publication data, which is transmitted from the other broker device and received by the other publication data receiving unit, in which a plurality of publication data are aggregated and compressed, according to a second predetermined algorithm, From the compressed aggregated publication data that has been compressed, a decompression unit that restores the aggregated publication data before compression,
A dividing unit configured to divide the uncompressed aggregated publishing data restored by the decompression unit and restore a plurality of unpublished publishing data from the uncompressed aggregated publishing data. The broker device according to any one of 2 to 10.
複数のブローカ装置と接続可能なクライアント装置であって、
前記複数のブローカ装置のうち、接続先のブローカ装置から送信された、複数の出版データが集約および圧縮されてなる集約済出版データを展開して、圧縮前の前記集約済出版データを復元し、前記復元された前記集約済出版データを分割して、集約前の出版データを復元する分割展開部と、
前記接続先のブローカ装置へ送信される複数の出版データを、それぞれ関連するトピック毎に集約して集約済出版データを生成し、前記生成された集約済出版データを圧縮する集約圧縮部と、
前記集約圧縮部によって圧縮された前記集約済出版データを、前記接続先のブローカ装置へ送信するとともに、前記接続先のブローカ装置から送信された前記集約済出版データを受信して、前記分割展開部へ提供する通信部とを備えた、クライアント装置。
A client device connectable to a plurality of broker devices,
Of the plurality of broker devices, transmitted from the broker device of the connection destination, a plurality of publication data is aggregated and expand the aggregated publication data that is compressed, to restore the aggregated publication data before compression, Dividing the restored aggregated publishing data, and a split developing unit for restoring the publishing data before aggregation,
A plurality of publication data transmitted to the broker device of the connection destination, aggregating compression unit for generating aggregated publication data by aggregating each related topic, and compressing the generated aggregated publication data,
The aggregated publishing data compressed by the aggregation compression unit is transmitted to the broker device of the connection destination, and the aggregated publication data transmitted from the broker device of the connection destination is received. And a communication unit for providing to the client device.
前記接続先のブローカ装置の異常を検出すると、接続先を別のブローカ装置へ変更する異常検出部と、
前記接続先のブローカ装置の負荷増大を検出すると、接続先を別のブローカ装置へ接続先を変更する負荷検出部とをさらに備えた、請求項12に記載のクライアント装置。
When detecting an abnormality in the broker device of the connection destination, an abnormality detection unit that changes the connection destination to another broker device,
13. The client device according to claim 12, further comprising: a load detection unit configured to change the connection destination to another broker device when the increase in the load of the connection destination broker device is detected.
第1のクライアント装置から受信した出版データを、第2のクライアント装置および他ブローカ装置へ送信するために、ブローカ装置によって実施される通信方法であって、
前記ブローカ装置が、
前記第2のクライアント装置によって購読されるトピックに対する購読要求を、前記第2のクライアント装置から受信する工程と、
前記第1のクライアント装置から、前記トピックに関連する出版データを受信する工程と、
前記受信された出版データを、前記第2のクライアント装置へ送信する工程と、
前記受信された出版データを、前記他ブローカ装置へ送信する工程とを含む、通信方法。
A communication method performed by a broker device to transmit publishing data received from a first client device to a second client device and another broker device, comprising:
The broker device,
Receiving, from the second client device, a subscription request for a topic subscribed to by the second client device;
Receiving publication data associated with the topic from the first client device;
Transmitting the received publication data to the second client device;
Transmitting the received publication data to the other broker device.
第1のクライアント装置から受信した出版データを、第2のクライアント装置および他ブローカ装置へ送信するためのプログラムであって、
前記第2のクライアント装置によって購読されるトピックに対する購読要求を、前記第2のクライアント装置から受信する機能、
前記第1のクライアント装置から、前記トピックに関連する出版データを受信する機能、
前記受信された出版データを、前記第2のクライアント装置へ送信する機能、
前記受信された出版データを、前記他ブローカ装置へ送信する機能、をコンピュータに実現させるためのプログラム。
A program for transmitting publishing data received from a first client device to a second client device and another broker device,
A function of receiving a subscription request for a topic subscribed by the second client device from the second client device;
A function of receiving publication data related to the topic from the first client device;
Transmitting the received publication data to the second client device;
A program for causing a computer to implement a function of transmitting the received publication data to the other broker device.
複数のクライアント装置と、複数のブローカ装置とから構成される通信システムであって、
前記複数のブローカ装置のうち少なくとも1つのブローカ装置は、
前記複数のクライアント装置のうち第2のクライアント装置によって購読されるトピックに対する購読要求を、前記第2のクライアント装置から受信する自購読情報受信部と、
前記複数のクライアント装置のうち第1のクライアント装置から、前記トピックに関連する出版データを受信する自出版データ受信部と、
前記自出版データ受信部によって受信された出版データを、前記第2のクライアント装置へ送信する自出版データ送信部と、
前記自出版データ受信部によって受信された出版データを、前記複数のブローカ装置のうち他ブローカ装置へ送信する他出版データ送信部とを備え、
前記複数のクライアント装置のうち少なくとも1つのクライアント装置は、
前記複数のブローカ装置のうち、接続先のブローカ装置から送信された、複数の出版データが集約および圧縮されてなる集約済出版データを展開して、圧縮前の前記集約済出版データを復元し、前記復元された前記集約済出版データを分割して、集約前の出版データを復元する分割展開部と、
前記接続先のブローカ装置へ送信される複数の出版データを、それぞれ関連するトピック毎に集約して集約済出版データを生成し、前記生成された集約済出版データを圧縮する集約圧縮部と、
前記集約圧縮部によって圧縮された前記集約済出版データを、前記接続先のブローカ装置へ送信するとともに、前記接続先のブローカ装置から送信された前記集約済出版データを受信して、前記分割展開部へ提供する通信部とを備えた、通信システム。
A communication system comprising a plurality of client devices and a plurality of broker devices,
At least one broker device among the plurality of broker devices,
A self-subscription information receiving unit that receives, from the second client device, a subscription request for a topic subscribed by a second client device among the plurality of client devices;
A self-published data receiving unit that receives, from a first client device of the plurality of client devices, publication data related to the topic;
A self-publishing data transmitting unit that transmits the publication data received by the self-publishing data receiving unit to the second client device;
The publication data received by the self-published data receiving unit, the other publication data transmission unit that transmits to another broker device among the plurality of broker devices,
At least one client device among the plurality of client devices,
Of the plurality of broker devices, transmitted from the broker device to which the connection is made, a plurality of publication data is aggregated and expands the aggregated publication data formed by compression, to restore the aggregated publication data before compression, Dividing the restored aggregated publishing data, a split developing unit for restoring the publishing data before aggregation,
A plurality of publication data transmitted to the broker device of the connection destination, to generate aggregated publication data by aggregating each related topic, an aggregation compression unit that compresses the generated aggregated publication data,
Transmitting the aggregated publication data compressed by the aggregation compression unit to the broker device of the connection destination; receiving the aggregated publication data transmitted from the broker device of the connection destination; A communication system comprising:
JP2018140330A 2018-07-26 2018-07-26 Broker device, communication system, communication method, and program Active JP7163093B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018140330A JP7163093B2 (en) 2018-07-26 2018-07-26 Broker device, communication system, communication method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018140330A JP7163093B2 (en) 2018-07-26 2018-07-26 Broker device, communication system, communication method, and program

Publications (2)

Publication Number Publication Date
JP2020017118A true JP2020017118A (en) 2020-01-30
JP7163093B2 JP7163093B2 (en) 2022-10-31

Family

ID=69580396

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018140330A Active JP7163093B2 (en) 2018-07-26 2018-07-26 Broker device, communication system, communication method, and program

Country Status (1)

Country Link
JP (1) JP7163093B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003003673A1 (en) * 2001-06-28 2003-01-09 Ntt Docomo, Inc. Routing method, node, packet communication system, program, and recording medium
WO2009050794A1 (en) * 2007-10-16 2009-04-23 Fujitsu Limited Relay station device, terminal station device, wireless communication system, and method for distributing load
JP2015192356A (en) * 2014-03-28 2015-11-02 クラリオン株式会社 On-vehicle communication unit and service provision system
JP2017224032A (en) * 2016-06-13 2017-12-21 日本電信電話株式会社 Distributed cooperation proxy and asynchronous messaging system using the same
JP2018046404A (en) * 2016-09-14 2018-03-22 株式会社東芝 Relay device, relay system, relay program, and relay method
US20180167476A1 (en) * 2016-12-12 2018-06-14 Sap Se Meta broker for publish-subscribe-based messaging

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003003673A1 (en) * 2001-06-28 2003-01-09 Ntt Docomo, Inc. Routing method, node, packet communication system, program, and recording medium
WO2009050794A1 (en) * 2007-10-16 2009-04-23 Fujitsu Limited Relay station device, terminal station device, wireless communication system, and method for distributing load
JP2015192356A (en) * 2014-03-28 2015-11-02 クラリオン株式会社 On-vehicle communication unit and service provision system
JP2017224032A (en) * 2016-06-13 2017-12-21 日本電信電話株式会社 Distributed cooperation proxy and asynchronous messaging system using the same
JP2018046404A (en) * 2016-09-14 2018-03-22 株式会社東芝 Relay device, relay system, relay program, and relay method
US20180167476A1 (en) * 2016-12-12 2018-06-14 Sap Se Meta broker for publish-subscribe-based messaging

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
伊藤 克恭 KATSUTAKA ITO: "IoT向けプロトコル用ハニーポットの初期検討 Primary Discussion about a Honeypot System for IoT Aim", 電子情報通信学会技術研究報告 VOL.116 NO.522 IEICE TECHNICAL REPORT, vol. 第116巻, JPN6021050906, 6 March 2017 (2017-03-06), JP, pages 103 - 108, ISSN: 0004752939 *

Also Published As

Publication number Publication date
JP7163093B2 (en) 2022-10-31

Similar Documents

Publication Publication Date Title
US6760765B1 (en) Cluster server apparatus
US7518983B2 (en) Proxy response apparatus
US20070204275A1 (en) Method and system for reliable message delivery
JP5640649B2 (en) Data communication method and information processing apparatus
US7676812B2 (en) Large scale event notification system
CN1954578B (en) Improvements in message-based communications
CN110661871B (en) Data transmission method and MQTT server
US7623472B2 (en) Dynamic peer application discovery
US6067567A (en) Message distribution capability which uses distribution nodes to collect acknowledgements for a primary node
CN112217847A (en) Micro service platform, implementation method thereof, electronic device and storage medium
US8495167B2 (en) Data communications networks, systems, methods and apparatus
EP3345345A1 (en) Systems and methods for remote network topology discovery
CN110460482B (en) Traffic acquisition method, device, server and medium
JP7163093B2 (en) Broker device, communication system, communication method, and program
JP2008129628A (en) Communication system in system for processing predetermined operation by transferring message by multiple computer systems and message communication program
JP2000200245A (en) System and method for information utilization
CN114090342A (en) Storage disaster tolerance link management method, message execution node and storage control cluster
CN114827171A (en) Information synchronization method and device, computer equipment and storage medium
JP4859956B2 (en) Data distribution system
CN109155792B (en) Updating a transport stack in a content-centric network
CN114666324B (en) Downloading method of monitoring video, server, client and readable storage medium
KR101659579B1 (en) Server multiplex service providing apparatus using publish-subscribe method and method therefor
JP6251203B2 (en) Streaming data distribution system and streaming data distribution method
JP2000295294A (en) Network system, network control method and signal transmitter-receiver
CN114500660B (en) Request processing method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210616

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211221

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220419

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220602

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220920

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221019

R150 Certificate of patent or registration of utility model

Ref document number: 7163093

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150