JP2014154031A - Difference update device, difference update system, difference update method, difference update program and difference update server - Google Patents

Difference update device, difference update system, difference update method, difference update program and difference update server Download PDF

Info

Publication number
JP2014154031A
JP2014154031A JP2013024815A JP2013024815A JP2014154031A JP 2014154031 A JP2014154031 A JP 2014154031A JP 2013024815 A JP2013024815 A JP 2013024815A JP 2013024815 A JP2013024815 A JP 2013024815A JP 2014154031 A JP2014154031 A JP 2014154031A
Authority
JP
Japan
Prior art keywords
update
client
master
event
master server
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
JP2013024815A
Other languages
Japanese (ja)
Other versions
JP5642817B2 (en
Inventor
Yuji Yamada
佑二 山田
Koichi Washisaka
光一 鷲坂
Koyo Yamamoto
公洋 山本
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2013024815A priority Critical patent/JP5642817B2/en
Publication of JP2014154031A publication Critical patent/JP2014154031A/en
Application granted granted Critical
Publication of JP5642817B2 publication Critical patent/JP5642817B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce the communication load required for updating cache.SOLUTION: The difference update device includes a cache storage unit, a reception unit, and an update unit. The cache storage unit stores cache of data stored in a master server, which is one of a plurality of servers. The reception unit, when the data stored in the master server has been updated, receives a difference update notification to the effect that difference between updated data and the data before the update is updated, from the master server or a new master server selected from replica servers other than the master server, out of a plurality of servers for which synchronization of the difference update notification with transmission completion information which indicates whether transmission of the difference update notification is completed or not has been executed by the master server. The update unit updates the cache by use of the received difference update notification.

Description

本発明の実施形態は、差分更新装置、差分更新システム、差分更新方法、差分更新プログラム及び差分更新サーバに関する。   Embodiments described herein relate generally to a differential update device, a differential update system, a differential update method, a differential update program, and a differential update server.

システムの性能を向上させるために、サーバ側で管理されるデータのキャッシュをクライアント側で保持する技術が用いられている。例えば、クライアントは、自装置で動作するアプリケーションで利用するファイルをサーバから取得した場合に、取得したファイルをキャッシュデータ(以下、キャッシュと略記)として自装置内のキャッシュメモリに格納する。これにより、クライアントは、サーバから取得済みのファイルを再び利用する場合に、キャッシュメモリから読み込むことで、サーバ−クライアント間の通信量を抑制する。   In order to improve the performance of the system, a technique for holding a cache of data managed on the server side on the client side is used. For example, when a client acquires a file used by an application running on its own device from the server, the client stores the acquired file as cache data (hereinafter abbreviated as “cache”) in a cache memory in its own device. As a result, when the client uses a file acquired from the server again, the client reads the cache memory, thereby reducing the amount of communication between the server and the client.

また、上記の技術では、ファイル自体のキャッシュのみならず、例えば、ファイルやファイルが属するディレクトリの名前、属性、更新日時、サイズ、物理的な格納場所を示す情報等のディレクトリ情報をキャッシュ(ディレクトリキャッシュ)として保持することも行われている。この技術は、例えば、サーバに対して複数のクライアントが接続される分散システム環境下でサーバ−クライアント間の通信量を抑制し、処理速度を向上させるために用いられている。   In the above technique, not only the file itself but also the directory information such as the name of the file and the directory to which the file belongs, the attribute, the update date and time, the size, and the information indicating the physical storage location are cached (directory cache). ) Is also held. This technique is used, for example, to suppress the amount of communication between the server and the client in a distributed system environment in which a plurality of clients are connected to the server and to improve the processing speed.

なお、分散システムでは、サーバ故障やネットワーク分断に耐えられる程度の高い可用性を備えることが求められている。このため、例えば、サーバ故障を自ら検知して他のリソースに故障等のイベント情報を通知するとともに、リソースの自動切替を行う技術が利用されている。また、イベント発生から送信完了までの間にハードウェアリソースに故障が発生すると、イベント情報が欠送し、システムの故障検知、及び切替えに失敗することになる。このため、切り替えが生じた際に欠送発生の可能性を通知し、各クライアント側で、欠送した情報を補完する技術も提案されている。   Note that a distributed system is required to have high availability enough to withstand server failures and network partitioning. For this reason, for example, a technique is used in which a server failure is detected by itself and event information such as failure is notified to other resources and resources are automatically switched. Also, if a hardware resource failure occurs between the event occurrence and the transmission completion, event information is missed, and system failure detection and switching will fail. For this reason, there has been proposed a technique for notifying the possibility of a missed delivery when switching occurs and complementing the missed information on each client side.

Mike Burrows,“The Chubby lock service for loosely‐coupled distributed systems”,OSDI'06:Seventh Symposium on Operating System Design and Implementation, Seattle, WA,November,2006.[online]、[平成25年1月22日検索]、インターネット<http://research.google.com/archive/chubby‐osdi06.pdf>Mike Burrows, “The Chubby lock service for loosely-coupled distributed systems”, OSDI'06: Seventh Symposium on Operating System Design and Implementation, Seattle, WA, November, 2006. [online], [January 22, 2013 search ] Internet <http://research.google.com/archive/chubby‐osdi06.pdf> Tushar Chandra et al. “Paxos Made Live‐An Engineering Perspective“, PODC’07: Proceedings of the twenty-sixth annual ACM symposium on Principles of distributed computing, Portland, Oregon, USA, August, 2007.Tushar Chandra et al. “Paxos Made Live-An Engineering Perspective“, PODC’07: Proceedings of the twenty-sixth annual ACM symposium on Principles of distributed computing, Portland, Oregon, USA, August, 2007.

しかしながら、上記の従来技術では、キャッシュの更新に要する通信負荷が大きいという課題があった。例えば、上記のディレクトリキャッシュにおいて、ディレクトリ情報の更新が行われると、各クライアントは、保持していた更新前のディレクトリ情報のキャッシュを一旦削除し、更新後のディレクトリ情報を再受信するので、通信負荷が大きかった。   However, the above-described conventional technique has a problem that a communication load required for updating the cache is large. For example, when directory information is updated in the above directory cache, each client once deletes the cache of the directory information before update that has been held, and receives the updated directory information again. Was big.

ここで、サーバにおいて、あるディレクトリ配下に10000個のファイルが管理され、クライアント側で10000個のファイル名をキャッシュとして保持している場合を説明する。ここで、サーバ側に1個のファイルが追加されると、サーバは、ディレクトリ配下に10001個のファイルを管理することとなる。そして、各クライアントは、10000個のファイル名を一旦削除し、ファイル追加後の10001個のファイル名を再受信する。すなわち、各クライアントは、ファイル追加前から保持していた10000個のファイル名には変化が無いにもかかわらず、変化が無い10000個のファイル名を含む10001個のファイル名を再受信されることとなるので、通信負荷が大きかった。   Here, a case where 10,000 files are managed under a certain directory in the server and 10,000 file names are held as a cache on the client side will be described. Here, when one file is added to the server side, the server manages 10001 files under the directory. Each client once deletes 10000 file names and re-receives 10001 file names after adding the files. That is, each client is re-received 10001 file names including 10,000 file names that have not changed even though there are no changes in the 10,000 file names held before the addition of the file. As a result, the communication load was large.

また、上記のディレクトリキャッシュが分散システムに適用されていた場合には、再受信する処理を、該当のディレクトリキャッシュを有する全てのクライアントが行うこととなるので、通信負荷が大きかった。なお、上記の課題は、ディレクトリキャッシュが更新される場合に限定されるものではなく、例えば、サーバから取得されたファイルのキャッシュが更新される場合にも同様に挙げられる課題である。   Further, when the above directory cache is applied to a distributed system, the re-reception process is performed by all the clients having the corresponding directory cache, so that the communication load is large. Note that the above-described problem is not limited to the case where the directory cache is updated. For example, the problem is similarly described when the cache of a file acquired from the server is updated.

そこで、この発明は、上述した従来技術の課題を解決するためになされたものであり、キャッシュの更新に要する通信負荷を軽減することを目的とする。   Accordingly, the present invention has been made to solve the above-described problems of the prior art, and an object thereof is to reduce the communication load required for cache update.

実施形態に係る差分更新装置は、キャッシュ記憶部と、受信部と、更新部とを備える。キャッシュ記憶部は、複数のサーバのうちの一つのサーバであるマスタサーバに記憶されたデータのキャッシュを記憶する。受信部は、前記マスタサーバに記憶されたデータが更新された場合に、更新後のデータと更新前のデータとの間の差分を更新する旨の差分更新通知と、当該差分更新通知の送信を完了したか否かを示す送信完了情報との同期処理が前記マスタサーバによって行われた前記複数のサーバのうち、当該マスタサーバ、又は、当該マスタサーバ以外のレプリカサーバのなかから選択された新たなマスタサーバから、前記差分更新通知を受信する。更新部は、受信された差分更新通知を用いて、前記キャッシュを更新する。   The difference update apparatus according to the embodiment includes a cache storage unit, a reception unit, and an update unit. The cache storage unit stores a cache of data stored in a master server that is one of a plurality of servers. When the data stored in the master server is updated, the reception unit transmits a difference update notification for updating the difference between the updated data and the data before the update, and transmission of the difference update notification. A new process selected from the master server or a replica server other than the master server among the plurality of servers in which the synchronization processing with the transmission completion information indicating whether or not the master server has been completed is performed. The difference update notification is received from the master server. The update unit updates the cache using the received difference update notification.

本願の開示する技術の一つの態様によれば、キャッシュの更新に要する通信負荷を軽減することができるという効果を奏する。   According to one aspect of the technology disclosed in the present application, it is possible to reduce the communication load required for updating the cache.

図1は、第1の実施形態に係る死活監視システムの概要を説明するための図である。FIG. 1 is a diagram for explaining the outline of the life and death monitoring system according to the first embodiment. 図2は、第1の実施形態に係る死活監視システムの構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of the life and death monitoring system according to the first embodiment. 図3は、セッション情報一覧を示す図である。FIG. 3 is a diagram showing a list of session information. 図4は、ノード情報一覧を示す図である。FIG. 4 is a diagram showing a node information list. 図5は、イベント一覧を示す図である。FIG. 5 shows an event list. 図6は、セッション一覧を示す図である。FIG. 6 is a diagram showing a session list. 図7は、死活監視システムによる新マスタへの切替処理を説明する図である。FIG. 7 is a diagram for explaining the switching process to the new master by the alive monitoring system. 図8は、第1の実施形態に係る死活監視システムによる欠送防止処理の流れを説明する図である。FIG. 8 is a diagram for explaining the flow of the missed sending prevention process by the life and death monitoring system according to the first embodiment. 図9は、第1の実施形態に係る死活監視システムによる欠送防止処理の流れを説明する図である。FIG. 9 is a diagram for explaining the flow of the missed sending prevention process by the life and death monitoring system according to the first embodiment. 図10は、第1の実施形態に係る死活監視システムによる欠送防止処理の流れを説明する図である。FIG. 10 is a diagram for explaining the flow of the missed sending prevention process by the life and death monitoring system according to the first embodiment. 図11は、第1の実施形態に係る死活監視システムによる欠送防止処理の流れを説明する図である。FIG. 11 is a diagram for explaining the flow of the missed sending prevention process by the life and death monitoring system according to the first embodiment. 図12は、第1の実施形態に係る死活監視システムによる欠送防止処理の流れを説明する図である。FIG. 12 is a diagram for explaining the flow of the missed sending prevention process by the life and death monitoring system according to the first embodiment. 図13は、第1の実施形態に係る死活監視システムによる差分更新処理の流れを示すシーケンス図である。FIG. 13 is a sequence diagram illustrating a flow of difference update processing by the alive monitoring system according to the first embodiment. 図14は、第1の実施形態に係るクライアントの定期通信開始処理の処理手順を説明するためのフローチャートである。FIG. 14 is a flowchart for explaining the processing procedure of the periodic communication start processing of the client according to the first embodiment. 図15は、第1の実施形態に係るクライアントの定期通信受信処理の処理手順を説明するためのフローチャートである。FIG. 15 is a flowchart for explaining the processing procedure of the regular communication reception processing of the client according to the first embodiment. 図16は、第1の実施形態に係るクライアントのイベント処理の処理手順を説明するためのフローチャートである。FIG. 16 is a flowchart for explaining a processing procedure of client event processing according to the first embodiment. 図17は、第1の実施形態に係るクライアントのディレクトリ情報取得要求発生時の処理手順を説明するためのフローチャートである。FIG. 17 is a flowchart for explaining a processing procedure when a client directory information acquisition request is generated according to the first embodiment. 図18は、第1の実施形態に係るクライアントのノードの追加・削除要求発生時の処理手順を説明するためのフローチャートである。FIG. 18 is a flowchart for explaining a processing procedure when a client node addition / deletion request is generated according to the first embodiment. 図19は、第1の実施形態に係る死活監視装置におけるイベント配信処理の処理手順を説明するためのフローチャートである。FIG. 19 is a flowchart for explaining a processing procedure of event distribution processing in the life and death monitoring apparatus according to the first embodiment. 図20は、第1の実施形態に係る死活監視装置における差分更新処理の処理手順を説明するためのフローチャートである。FIG. 20 is a flowchart for explaining the processing procedure of the difference update processing in the life and death monitoring apparatus according to the first embodiment. 図21は、第1の実施形態に係る死活監視システムの効果を説明するための図である。FIG. 21 is a diagram for explaining the effect of the life and death monitoring system according to the first embodiment. 図22は、第2の実施形態に係る死活監視システムによる差分更新処理の流れを示すシーケンス図である。FIG. 22 is a sequence diagram illustrating a flow of difference update processing by the alive monitoring system according to the second embodiment. 図23は、第3の実施形態に係るクライアントのノードの追加・削除要求発生時の処理手順を説明するためのフローチャートである。FIG. 23 is a flowchart for explaining a processing procedure when a client node addition / deletion request is generated according to the third embodiment. 図24は、差分更新プログラムを実行するコンピュータを示す図である。FIG. 24 is a diagram illustrating a computer that executes a differential update program.

以下に添付図面を参照して、この発明に係る差分更新装置、差分更新システム、差分更新方法、差分更新プログラム及び差分更新サーバの実施形態を図面に基づいて説明する。なお、以下では、キャッシュデータ(以下、キャッシュと略記)の書き換え前後の差分を更新する差分更新処理を死活監視サービスの一部分として提供する死活監視システムについて説明するが、この実施形態により本発明が限定されるものではない。   Exemplary embodiments of a differential update device, a differential update system, a differential update method, a differential update program, and a differential update server according to the present invention will be described below with reference to the accompanying drawings. In the following, a life / death monitoring system that provides a difference update process for updating a difference before and after rewriting of cache data (hereinafter abbreviated as “cache”) as a part of the life / death monitoring service will be described, but the present invention is limited by this embodiment. Is not to be done.

[第1の実施形態]
以下、第1の実施形態では、第1の実施形態に係る死活監視システムの概要、死活監視システムの構成、処理の流れを順に説明し、最後に第1の実施形態による効果を説明する。
[First Embodiment]
Hereinafter, in the first embodiment, the outline of the life and death monitoring system according to the first embodiment, the configuration of the life and death monitoring system, and the flow of processing will be described in order, and finally, the effects of the first embodiment will be described.

[死活監視システムの概要]
図1を用いて、第1の実施形態に係る死活監視システムの概要を説明する。図1は、第1の実施形態に係る死活監視システムの概要を説明するための図である。
[Outline of Alive Monitoring System]
The outline of the life and death monitoring system according to the first embodiment will be described with reference to FIG. FIG. 1 is a diagram for explaining the outline of the life and death monitoring system according to the first embodiment.

第1の実施形態に係る死活監視システム1は、死活監視装置10と、該死活監視装置10に接続される複数のクライアント20A,20Bとを有する。死活監視装置10は、複数のサーバを有し、複数のサーバのうち、一つのサーバの役割をマスタ10Aとし、その他のサーバの役割をレプリカ10B〜10Eとする。なお、死活監視システム1の構成は図1の例に限定されるものではなく、例えば、死活監視システム1は、任意数のサーバと、任意数のクライアントを有して良い。また、クライアント20A,20Bの各装置を区別無く総称する場合に、クライアント20と記載する。   The life and death monitoring system 1 according to the first embodiment includes a life and death monitoring device 10 and a plurality of clients 20A and 20B connected to the life and death monitoring device 10. The life and death monitoring apparatus 10 includes a plurality of servers, and among the plurality of servers, the role of one server is the master 10A, and the roles of the other servers are the replicas 10B to 10E. Note that the configuration of the life and death monitoring system 1 is not limited to the example in FIG. 1. For example, the life and death monitoring system 1 may include an arbitrary number of servers and an arbitrary number of clients. Further, the clients 20A and 20B are collectively referred to as the client 20 when collectively referred to without distinction.

第1の実施形態において、死活監視システム1は、欠送防止処理を実現するとともに、マスタ10Aに記憶されたデータについてのディレクトリ情報が更新されると、該ディレクトリ情報のキャッシュデータであるディレクトリキャッシュを記憶するクライアント20において、ディレクトリキャッシュの差分更新処理を行う。   In the first embodiment, the alive monitoring system 1 realizes the missed sending prevention process, and when the directory information about the data stored in the master 10A is updated, the directory cache that is the cache data of the directory information is updated. In the storing client 20, the directory cache difference update process is performed.

ここで、イベント情報の欠送が発生することを防止する構成は、死活監視装置10によって実現される。すなわち、死活監視装置10は、サーバ故障ならびにネットワーク分断に耐えることができるシステム上でイベント情報を冗長化する。具体的には、死活監視装置10は、マスタ10Aが管理するイベント情報をレプリケーションにより冗長化することで、レプリカ10B〜10Eでもマスタ10Aが管理するイベント情報を記憶させる。例えば、死活監視装置10は、既存のPaxosアルゴリズムやQuorumプロトコルによるレプリケーション技術によって、サーバ故障やネットワーク分断に耐えられる冗長化を行っている。   Here, the configuration for preventing the event information from being missed is realized by the alive monitoring apparatus 10. That is, the life and death monitoring apparatus 10 makes event information redundant on a system that can withstand a server failure and network disconnection. Specifically, the life and death monitoring apparatus 10 stores event information managed by the master 10A in the replicas 10B to 10E by making the event information managed by the master 10A redundant by replication. For example, the life and death monitoring apparatus 10 performs redundancy to withstand a server failure or network partition by using a replication technique based on an existing Paxos algorithm or a Quorum protocol.

死活監視装置10では、イベントが発生すると、マスタ10Aが複数のクライアント20A,20Bに対してイベント情報を配送する。ここで、マスタ10Aに故障が発生した場合には、マスタをマスタ10Aからレプリカ10Bに切替えて、新しいマスタであるレプリカ10Bが複数のクライアント20A,20Bと再接続し、送信を完了していないイベント情報を複数のクライアント20A,20Bに対して送信する。   In the alive monitoring apparatus 10, when an event occurs, the master 10A delivers event information to the plurality of clients 20A and 20B. Here, when a failure occurs in the master 10A, the master is switched from the master 10A to the replica 10B, and the replica 10B, which is a new master, is reconnected to the plurality of clients 20A and 20B, and the transmission has not been completed. Information is transmitted to a plurality of clients 20A and 20B.

これにより、クライアント20側での欠送イベント情報の補完が不要となるため、システム構成を複雑にすることがなくなり、また、マスタ故障時に新マスタからイベント情報を配送可能なため、イベント情報の欠送防止処理が実現される。   This eliminates the need for supplementing the missed event information on the client 20 side, so that the system configuration is not complicated, and the event information can be delivered from the new master when the master fails. A sending prevention process is realized.

このような構成のもと、各クライアント20は、マスタ10Aに記憶されたデータについてのディレクトリ情報が更新されると、該ディレクトリ情報の差分更新処理を行う旨の差分更新通知をマスタ10Aから受信し、受信した差分更新通知を用いてディレクトリキャッシュを更新する。   Under such a configuration, when the directory information about the data stored in the master 10A is updated, each client 20 receives from the master 10A a difference update notification indicating that the directory information difference update processing is performed. The directory cache is updated using the received difference update notification.

図1には、クライアント20Bによって記憶されるディレクトリキャッシュが更新される場合を例示する。図1の例では、マスタ10A及びレプリカ10B〜10Eは、ディレクトリ名「ディレクトリA」のディレクトリ(以下、ディレクトリAと略記)の配下にファイル名「File1〜3」のファイルを記憶している。また、クライアント20Bは、ディレクトリA配下のファイル名のリストをディレクトリキャッシュとして既に取得し(ディレクトリ監視)、記憶している。すなわち、クライアント20Bは、死活監視装置10のディレクトリAを監視する。   FIG. 1 illustrates a case where the directory cache stored by the client 20B is updated. In the example of FIG. 1, the master 10 </ b> A and the replicas 10 </ b> B to 10 </ b> E store files with the file names “File 1 to 3” under the directory with the directory name “directory A” (hereinafter abbreviated as directory A). Further, the client 20B has already acquired a list of file names under the directory A as a directory cache (directory monitoring) and stores it. That is, the client 20B monitors the directory A of the alive monitoring apparatus 10.

ここで、例えば、マスタ10Aは、クライアント20AによってディレクトリA配下にファイル名「File4」のファイルが新規に追加されると、追加されたファイル名「File4」をリストに追加する旨の追加通知(差分更新通知)をクライアント20Bへ送信する。そして、クライアント20Bは、受信した追加通知を用いて、リストにファイル名「File4」を追加、すなわち、更新前後の差分に相当する情報を更新する(差分更新)。   Here, for example, when the client 20A adds a new file with the file name “File4” under the directory A by the client 20A, the master 10A adds an additional notification (difference) to add the added file name “File4” to the list. Update notification) is sent to the client 20B. Then, using the received addition notification, the client 20B adds the file name “File4” to the list, that is, updates information corresponding to the difference before and after the update (difference update).

また、例えば、マスタ10Aに故障が発生し、追加通知がクライアント20へ送信されなかった場合には、未送信の追加通知は欠送防止処理によってクライアント20Bへ送信される。具体的には、マスタがマスタ10Aからレプリカ10Bに切替わり、新しいマスタであるレプリカ10Bが、未送信の追加通知をイベント情報としてクライアント20Bに対して送信することにより、差分更新が行われる。   Further, for example, when a failure occurs in the master 10A and an additional notification is not transmitted to the client 20, an untransmitted additional notification is transmitted to the client 20B by the missed sending prevention process. Specifically, the master is switched from the master 10A to the replica 10B, and the replica 10B, which is a new master, transmits an unsent addition notification as event information to the client 20B, thereby performing differential update.

これにより、マスタ10Aに故障が発生した場合にも、ディレクトリキャッシュの差分更新処理が実現されるので、ディレクトリキャッシュの更新に要する通信負荷を軽減することが可能となる。   As a result, even when a failure occurs in the master 10A, the directory cache difference update process is realized, so that the communication load required for updating the directory cache can be reduced.

なお、図1の例では、ファイルの追加に伴ってディレクトリキャッシュが更新される場合を説明したが、実施形態はこれに限定されるものではなく、例えば、ディレクトリ情報の更新に伴ってディレクトリキャッシュは更新される。具体的には、ファイルの追加や削除、或いはディレクトリの追加や削除によってディレクトリ情報が更新されることにより、該ディレクトリ情報のキャッシュは更新される。   In the example of FIG. 1, the case where the directory cache is updated as a file is added has been described. However, the embodiment is not limited to this. For example, the directory cache is updated as the directory information is updated. Updated. Specifically, the directory information cache is updated by updating the directory information by adding or deleting files or by adding or deleting directories.

また、図1の例では、ファイル名がディレクトリキャッシュとしてクライアント20に記憶され、更新される場合を説明したが、実施形態はこれに限定されるものではない。例えば、クライアント20は、マスタ10Aのディレクトリ配下に属するファイル及びディレクトリの名称、属性、更新日時、サイズ、物理的な格納場所を示す情報等のディレクトリ情報(ディレクトリエントリ)をディレクトリキャッシュとして記憶する。また、以下において、ファイル及びディレクトリを総称する場合に、「ノード」と記載する。   In the example of FIG. 1, the case where the file name is stored in the client 20 as the directory cache and updated is described, but the embodiment is not limited to this. For example, the client 20 stores directory information (directory entry) such as information indicating the name, attribute, update date / time, size, and physical storage location of files and directories belonging to the directory of the master 10A as a directory cache. In the following, a file and a directory are collectively referred to as “node”.

[死活監視システムの構成]
図2を用いて、図1に示した死活監視システム1の構成を説明する。図2は、第1の実施形態に係る死活監視システムの構成を示すブロック図である。図2に示すように、この死活監視システム1は、死活監視装置10及びクライアント20を備え、死活監視装置10のマスタ10Aとクライアント20とが接続されている。以下にこれらの各装置の構成を説明する。
[Configuration of Alive Monitoring System]
The configuration of the life and death monitoring system 1 shown in FIG. 1 will be described with reference to FIG. FIG. 2 is a block diagram illustrating a configuration of the life and death monitoring system according to the first embodiment. As shown in FIG. 2, the alive monitoring system 1 includes a alive monitoring device 10 and a client 20, and a master 10 </ b> A of the alive monitoring device 10 and the client 20 are connected. The configuration of each of these devices will be described below.

死活監視装置10は、複数のサーバのうちの一つのサーバであるマスタ10Aと、その他のサーバであるレプリカ10B〜10Eを有する。また、マスタ10A及びレプリカ10B〜10Eは、それぞれが独立したデータベース30A〜30Eを保持している。   The life and death monitoring apparatus 10 includes a master 10A that is one of a plurality of servers, and replicas 10B to 10E that are other servers. Further, the master 10A and the replicas 10B to 10E hold independent databases 30A to 30E, respectively.

データベース30A〜30Eは、例えば、クライアント20上で動作するアプリケーションによって利用される各種情報を記憶する。具体的には、データベース30A〜30Eは、所定のディレクトリ配下にアプリケーションによって利用される各種ファイルを記憶する。   The databases 30 </ b> A to 30 </ b> E store, for example, various types of information used by applications that operate on the client 20. Specifically, the databases 30A to 30E store various files used by applications under a predetermined directory.

また、例えば、データベース30A〜30Eは、死活監視装置10上で発生したイベントに関する情報であるイベント情報を記憶する。また、各データベース30A〜30Eが記憶するイベント情報については、それぞれ同期しているため、同じ内容のイベント情報が記憶されているものとする。   Further, for example, the databases 30 </ b> A to 30 </ b> E store event information that is information regarding events that have occurred on the alive monitoring apparatus 10. Further, since the event information stored in each of the databases 30A to 30E is synchronized, it is assumed that event information having the same content is stored.

マスタ10A及びレプリカ10B〜10Eは、更新部11、生成部12、イベント送信部13、同期部14、接続部15、送信未完了イベント送信部16及び記憶部17を有する。なお、各サーバ(マスタ10A及びレプリカ10B〜10E)は、マスタとレプリカで役割が異なるが、構成については同様である。以下にこれらの各部の処理を説明する。また、以下の説明では、マスタ10Aがマスタの役割であり、マスタ10Aに故障が発生した後にレプリカ10Bが新たなマスタとなる場合を例にして説明する。   The master 10A and the replicas 10B to 10E include an update unit 11, a generation unit 12, an event transmission unit 13, a synchronization unit 14, a connection unit 15, a transmission incomplete event transmission unit 16, and a storage unit 17. Each server (master 10A and replicas 10B to 10E) has a different role in the master and the replica, but the configuration is the same. The processing of each of these units will be described below. Further, in the following description, the case where the master 10A is a master and the replica 10B becomes a new master after a failure occurs in the master 10A will be described as an example.

記憶部17は、各種処理に必要なデータ及びプログラムを格納する。例えば、マスタ10Aの記憶部17は、セッションを管理するための情報であるセッション情報一覧と、ノードを管理するための情報であるノード情報一覧と、イベント情報を管理するための情報であるイベント一覧とを記憶する。なお、ノード情報一覧及びイベント一覧は、マスタ10A及びレプリカ10B〜10Eがそれぞれ保持するデータベース30A〜30Eにおいても記憶される情報である。また、上記したデータベース30A〜30Eは、セッションの一覧であるセッション一覧を記憶する。以下では、セッション情報一覧、ノード情報一覧、イベント一覧及びセッション一覧について、図3〜図6を用いてそれぞれ具体的に説明する。   The storage unit 17 stores data and programs necessary for various processes. For example, the storage unit 17 of the master 10A has a session information list that is information for managing sessions, a node information list that is information for managing nodes, and an event list that is information for managing event information. And remember. Note that the node information list and the event list are also stored in the databases 30A to 30E held by the master 10A and the replicas 10B to 10E, respectively. The databases 30A to 30E described above store a session list that is a list of sessions. Hereinafter, the session information list, the node information list, the event list, and the session list will be specifically described with reference to FIGS.

例えば、マスタ10Aの記憶部17は、図3に例示するように、セッション情報一覧として、セッションを一意に識別する「セッションID」と、各クライアント20に関する情報である「クライアント情報」と、各クライアント20が現在アクセスしているノードのノードIDを示す「アクセス中のノードID」と、クライアント20に送信するイベント情報のイベントIDである「送信するイベントのエントリ」とを対応付けて記憶する。図3の例を挙げて説明すると、記憶部17は、例えば、セッションID「1」と、クライアント情報としてIPアドレス「10.0.0.1」と、アクセス中のノードID「Nid=1」と、送信するイベントのエントリ「Eid=1,2,5」とを対応付けて記憶する。つまり、記憶部17は、セッションID「1」のセッションで接続されるIPアドレス「10.0.0.1」のクライアント20が、ノードID「Nid=1」のディレクトリキャッシュを保持しており、イベントID「Eid=1,2,5」のイベント情報をクライアント20に送信することを記憶する。   For example, as illustrated in FIG. 3, the storage unit 17 of the master 10 </ b> A includes a “session ID” that uniquely identifies a session as a list of session information, “client information” that is information about each client 20, and each client The “node ID being accessed” indicating the node ID of the node 20 is currently accessing, and the “event entry to be transmitted” that is the event ID of the event information to be transmitted to the client 20 are stored in association with each other. 3, for example, the storage unit 17 has a session ID “1”, an IP address “10.0.0.1” as client information, and a node ID “Nid = 1” being accessed. And the entry “Eid = 1, 2, 5” of the event to be transmitted are stored in association with each other. That is, in the storage unit 17, the client 20 with the IP address “10.0.0.1” connected in the session with the session ID “1” holds the directory cache with the node ID “Nid = 1”. Stores transmission of event information of event ID “Eid = 1, 2, 5” to the client 20.

また、例えば、マスタ10Aの記憶部17は、図4に例示するように、ノード情報一覧として、ノードを一意に識別する「ノードID」と、ノードが属する親のノード(ディレクトリ)のノードIDを示す「親ノードID」と、ノードの種別を示す「ノード種別」と、ノードに現在アクセスしているセッションのセッションIDを示す「アクセス中のセッションID」とを対応付けて記憶する。図4の例を挙げて説明すると、記憶部17は、例えば、ノードID「1」と、親ノードID「Pid=0」と、ノード種別「ディレクトリ」と、アクセス中のセッションID「Sid=1,3」とを対応付けて記憶する。なお、親ノードIDには、図4に示した例に限らず、ルートを示す情報が記憶されても良い。   Further, for example, as illustrated in FIG. 4, the storage unit 17 of the master 10 </ b> A includes a “node ID” that uniquely identifies a node and a node ID of a parent node (directory) to which the node belongs as a node information list. The “parent node ID” that is indicated, the “node type” that indicates the type of the node, and the “session ID being accessed” that indicates the session ID of the session that is currently accessing the node are stored in association with each other. 4, for example, the storage unit 17 stores, for example, a node ID “1”, a parent node ID “Pid = 0”, a node type “directory”, and a session ID “Sid = 1” being accessed. , 3 "in association with each other. The parent node ID is not limited to the example shown in FIG. 4, and information indicating a route may be stored.

また、例えば、マスタ10Aの記憶部17は、図5に例示するように、イベント一覧として、イベントを一意に識別する「イベントID」と、イベントの発生元となるノードを示す「イベント発生元のノードID」と、イベントの種別を示す「イベント種別」と、イベントの発生元となるセッションのセッションIDを示す「イベント発生元のセッションID」とを対応付けて記憶する。図5の例を挙げて説明すると、記憶部17は、例えば、イベントID「1」と、イベント発生元のノードID「Nid=2」と、イベント種別「ファイル追加」と、イベント発生元のセッションID「Sid=2」とを対応付けて記憶する。つまり、記憶部17は、セッションID「Sid=2」のセッションで接続されるクライアント20からの要求によってノードID「Nid=2」のファイルが追加されたことを、イベントID「1」のイベントとして記憶する。なお、図5の例では、ノードの追加又は削除がイベントとして登録される場合を例示したが、これに限定されるものではなく、例えば、ファイルの内容の更新や、ノードに対するアクセスの無効など、ノードに対して発生した各種イベントが登録されても良い。   Further, for example, as illustrated in FIG. 5, the storage unit 17 of the master 10 </ b> A has an “event ID” that uniquely identifies an event as an event list, and a “event generation source The node ID, the “event type” indicating the event type, and the “event generation source session ID” indicating the session ID of the session that is the event generation source are stored in association with each other. Referring to the example of FIG. 5, for example, the storage unit 17 stores an event ID “1”, an event occurrence source node ID “Nid = 2”, an event type “add file”, and an event occurrence source session. The ID “Sid = 2” is stored in association with each other. In other words, the storage unit 17 uses, as an event with the event ID “1”, that the file with the node ID “Nid = 2” is added by a request from the client 20 connected in the session with the session ID “Sid = 2”. Remember. In the example of FIG. 5, the case where addition or deletion of a node is registered as an event is illustrated, but the present invention is not limited to this, for example, update of file contents, invalidation of access to a node, etc. Various events that occur for the node may be registered.

また、データベース30A〜30Eは、図6に例示するように、セッション一覧として、セッションを一意に識別する「セッションID」と、各クライアント20に関する情報である「クライアント情報」と、各クライアント20が現在アクセスしているノードのノードIDを示す「アクセス中のノードID」とを対応付けて記憶する。図6の例を挙げて説明すると、データベース30A〜30Eは、例えば、セッションID「1」と、クライアント情報としてIPアドレス「10.0.0.1」と、アクセス中のノードID「Nid=1」とを対応付けて記憶する。   Further, as illustrated in FIG. 6, the databases 30 </ b> A to 30 </ b> E include a “session ID” that uniquely identifies a session, “client information” that is information about each client 20, The “node ID being accessed” indicating the node ID of the accessing node is stored in association with each other. Referring to the example of FIG. 6, the databases 30A to 30E have, for example, a session ID “1”, an IP address “10.0.0.1” as client information, and a node ID “Nid = 1” being accessed. Is stored in association with each other.

ここで、レプリカ10B〜10Eのデータベース30B〜30Eが記憶するノード情報一覧、イベント一覧及びセッション一覧は、マスタ10Aのデータベース30Aが記憶するノード情報一覧、イベント一覧及びセッション一覧の複製である。また、上記したように、レプリカ10B〜10Eのデータベース30B〜30Eは、セッション情報一覧を記憶していない。このため、レプリカ10B〜10Eのいずれかがマスタに切り替わった場合には、データベース30B〜30Eに記憶されたイベント一覧及びセッション一覧からセッション情報一覧を構築して、該セッション情報一覧を記憶部17にセットする。   Here, the node information list, event list, and session list stored in the databases 30B-30E of the replicas 10B-10E are copies of the node information list, event list, and session list stored in the database 30A of the master 10A. Further, as described above, the databases 30B to 30E of the replicas 10B to 10E do not store a session information list. For this reason, when any of the replicas 10B to 10E is switched to the master, a session information list is constructed from the event list and session list stored in the databases 30B to 30E, and the session information list is stored in the storage unit 17. set.

更新部11は、死活監視装置10によって管理される各種情報を更新する。具体的には、更新部11は、データベース30に記憶された各種情報を更新する旨の要求をクライアント20から受信する。そして、更新部11は、受信した要求に応じてデータベース30に記憶された各種情報を更新する。より具体的には、更新部11は、ノードの追加又は削除を行う旨の要求であるノードの追加・削除要求を、要求元のアプリケーションが動作するクライアント20から受信する。   The update unit 11 updates various information managed by the alive monitoring apparatus 10. Specifically, the update unit 11 receives a request to update various information stored in the database 30 from the client 20. And the update part 11 updates the various information memorize | stored in the database 30 according to the received request | requirement. More specifically, the update unit 11 receives a node addition / deletion request, which is a request for adding or deleting a node, from the client 20 on which the requesting application operates.

一例としては、マスタ10Aの更新部11は、セッションID「2」のセッションで接続されるクライアントからノードID「2」のファイルを追加する旨の追加要求を受信した場合には、ノードID「2」のファイルをデータベース30Aに新規に追加する。また、他の例としては、マスタ10Aの更新部11は、セッションID「3」のセッションで接続されるクライアントからノードID「6」のファイルを削除する旨の削除要求を受信した場合には、ノードID「6」のファイルをデータベース30Aから削除する。   As an example, when the update unit 11 of the master 10A receives an addition request for adding a file with the node ID “2” from a client connected in the session with the session ID “2”, the update unit 11 receives the node ID “2”. 'Is newly added to the database 30A. As another example, when the update unit 11 of the master 10A receives a deletion request to delete the file with the node ID “6” from the client connected with the session with the session ID “3”, The file with the node ID “6” is deleted from the database 30A.

生成部12は、更新部11によって更新された情報について、更新後の情報と、更新前の情報との差分を更新するための差分更新通知を生成する。具体的には、マスタ10Aの生成部12は、データベース30に記憶された各種情報が更新されると、差分更新通知を生成する。そして、生成部12は、生成した差分更新通知をイベント情報としてイベント一覧に登録する。なお、ここで生成部12によって登録されるイベントIDは、例えば、イベント一覧に登録される順にイベントIDを1増加させて採番したイベントIDが生成部12によって選択され、登録される。   The generation unit 12 generates a difference update notification for updating the difference between the updated information and the information before the update for the information updated by the update unit 11. Specifically, the generation unit 12 of the master 10A generates a difference update notification when various information stored in the database 30 is updated. Then, the generation unit 12 registers the generated difference update notification as event information in the event list. Here, as the event ID registered by the generation unit 12, for example, an event ID obtained by increasing the event ID by 1 in the order of registration in the event list is selected and registered by the generation unit 12.

イベント送信部13は、自サーバがマスタ10Aである場合に、自サーバが保持している記憶部17がイベント一覧として記憶するイベント情報をクライアント20に対して送信する。具体的には、イベント送信部13は、定期的にクライアント20に対して送信する死活監視情報にイベント情報を付加することで、イベント情報をクライアント20に対して送信する。ここで、死活監視装置10とクライアント20との間で行う死活監視とは、死活監視装置10及びクライアント20の両計算機間の接続が保てていることの確認をするためのものである。また、イベント送信部13は、イベント情報として、イベントを一意に識別する「イベントID」とイベントの種類を示す「イベントの種類」とを死活監視情報に付加してクライアント20に送信する。   The event transmission unit 13 transmits, to the client 20, event information stored as an event list in the storage unit 17 held by the own server when the own server is the master 10 </ b> A. Specifically, the event transmission unit 13 transmits the event information to the client 20 by adding the event information to the alive monitoring information that is periodically transmitted to the client 20. Here, the life and death monitoring performed between the life and death monitoring apparatus 10 and the client 20 is for confirming that the connection between both computers of the life and death monitoring apparatus 10 and the client 20 is maintained. Further, the event transmission unit 13 adds, as event information, an “event ID” that uniquely identifies the event and an “event type” that indicates the type of the event to the alive monitoring information, and transmits the information to the client 20.

また、例えば、イベント送信部13は、差分更新通知をイベント情報として送信する場合には、差分更新通知の通知先となる通知先クライアントの一覧を取得し、取得した通知先クライアントに対して差分更新通知を送信する。   In addition, for example, when transmitting a difference update notification as event information, the event transmission unit 13 acquires a list of notification destination clients that are notification destinations of the difference update notification, and performs a difference update on the acquired notification destination client. Send notifications.

なお、イベント送信部13は、クライアント20へ送信するイベント情報の順序を保つために、通信順序を保証する通信路を用いて、クライアント20にイベント情報を送信する。例えば、イベント送信部13は、TCP(Transmission Control Protocol)やUDP(User Datagram Protocol)を用いた通信路でイベント情報をクライアント20に送信する。ただし、UDPを用いた通信路を適用する場合には、UDP通信に通信順序を保証する機能を追加する必要がある。   The event transmitting unit 13 transmits the event information to the client 20 using a communication path that guarantees the communication order in order to maintain the order of the event information to be transmitted to the client 20. For example, the event transmission unit 13 transmits event information to the client 20 through a communication path using TCP (Transmission Control Protocol) or UDP (User Datagram Protocol). However, when applying a communication path using UDP, it is necessary to add a function for guaranteeing the communication order to UDP communication.

同期部14は、自サーバがマスタ10Aである場合に、マスタ10Aが保持するデータベース30Aが記憶するイベント情報をレプリカ10B〜10Eに通知してデータベース30B〜30Eに記憶させる。具体的には、同期部14は、イベントが発生して自サーバが保持するデータベースにイベント情報を登録するたびに、該イベント情報をレプリカ10B〜10Eに通知してデータベース30B〜30Eに記憶させる。   When the own server is the master 10A, the synchronization unit 14 notifies the replicas 10B to 10E of the event information stored in the database 30A held by the master 10A and stores them in the databases 30B to 30E. Specifically, every time an event occurs and event information is registered in a database held by the server, the synchronization unit 14 notifies the replicas 10B to 10E of the event information and stores them in the databases 30B to 30E.

また、同期部14は、クライアント20に対してイベント情報の送信を完了したか否かを示す情報を、レプリカ10B〜10Eに通知してレプリカ10B〜10Eのデータベース30B〜30Eにそれぞれ記憶させる。ここで、同期部14は、イベント情報の送信を完了したか否かを示す情報として、クライアント20に送信した最新のイベント情報のイベントIDである「最新送信完了イベントID」をレプリカ10B〜10Eに通知してレプリカ10B〜10Eのデータベース30B〜30Eにそれぞれ記憶させる。   In addition, the synchronization unit 14 notifies the replicas 10B to 10E of information indicating whether or not the transmission of the event information to the client 20 is completed, and stores the information in the databases 30B to 30E of the replicas 10B to 10E, respectively. Here, the synchronization unit 14 sets the “latest transmission completion event ID” that is the event ID of the latest event information transmitted to the client 20 to the replicas 10B to 10E as information indicating whether or not the transmission of the event information has been completed. Notification is made and stored in the databases 30B to 30E of the replicas 10B to 10E, respectively.

接続部15は、マスタ10Aに故障が発生した場合には、レプリカ10B〜10Eのなかから選択された新しいマスタであるレプリカ10Bとクライアント20とを通信可能に接続する。具体的には、接続部15は、クライアント20のクライアントライブラリ21が送信したマスタの問い合わせを受け付け、かつ、自サーバが新しいマスタであるレプリカ10Bである場合には、クライアント20と通信可能に接続する。なお、新しいマスタの選択については、例えば、既存のPaxosによるマスタの選定機能を利用して行う。   When a failure occurs in the master 10A, the connection unit 15 connects the replica 10B, which is a new master selected from the replicas 10B to 10E, and the client 20 so that they can communicate with each other. Specifically, the connection unit 15 accepts a master inquiry transmitted from the client library 21 of the client 20 and, when the server 10 is a replica 10B that is a new master, connects to the client 20 so as to be communicable. . Note that the selection of a new master is performed using, for example, a master selection function based on an existing Paxos.

送信未完了イベント送信部16は、新しいマスタであるレプリカ10Bが保持するデータベース20Bが記憶するイベント情報のうちクライアント20に対して送信未完了であるイベント情報を、最新送信完了イベントIDを用いて特定し、該送信未完了であるイベント情報をクライアント20に送信する。具体的には、送信未完了イベント送信部16は、最新送信完了イベントIDのイベント情報より新しいイベントIDのイベント情報を送信未完了であるイベント情報として特定し、該イベント情報をクライアント20に送信する。   The transmission incomplete event transmission unit 16 uses the latest transmission completion event ID to identify event information that has not been transmitted to the client 20 among the event information stored in the database 20B held by the replica 10B that is the new master. Then, the event information that has not been transmitted is transmitted to the client 20. Specifically, the transmission incomplete event transmission unit 16 specifies event information having an event ID that is newer than the event information of the latest transmission completion event ID as event information that has not been transmitted, and transmits the event information to the client 20. .

また、クライアント20は、クライアントライブラリ21とアプリケーション22とを有する。また、クライアントライブラリ21は、セッション管理部21aと、キャッシュ更新部21bと、キャッシュ記憶部21cとを有しており、死活監視のため、定期的にマスタ10Aと通信を行う。   The client 20 includes a client library 21 and an application 22. The client library 21 includes a session management unit 21a, a cache update unit 21b, and a cache storage unit 21c, and periodically communicates with the master 10A for alive monitoring.

セッション管理部21aは、マスタ10Aから受信した死活監視情報にイベント情報が付加されている場合には、マスタ10Aが送信した最新のイベント情報のイベントIDである最新送信完了イベントIDを用いて、該イベント情報を二重に受信していないか確認する冗送確認処理を行う。なお、上記した最新送信完了イベントIDと死活監視装置10が記憶する最新受信完了イベントIDとは、同種の情報であり、クライアント視点では、「最新受信完了イベントID」とし、死活監視装置視点では、「最新送信完了イベントID」としている。具体的には、セッション管理部21aは、最新受信完了イベントIDを保持し、受信したイベント情報のイベントIDが最新受信完了イベントIDよりも新しいイベント情報であれば、イベント情報をアプリケーション22に通知する。   When event information is added to the alive monitoring information received from the master 10A, the session management unit 21a uses the latest transmission completion event ID that is the event ID of the latest event information transmitted by the master 10A. Redundant sending confirmation processing is performed to check whether event information has been received twice. The latest transmission completion event ID and the latest reception completion event ID stored in the alive monitoring device 10 are the same type of information, and are “latest reception completion event ID” from the client perspective, and from the alive monitoring device perspective, “Latest transmission completion event ID”. Specifically, the session management unit 21a holds the latest reception completion event ID, and notifies the application 22 of event information if the event ID of the received event information is newer than the latest reception completion event ID. .

また、セッション管理部21aは、マスタ10Aが故障してフェイルオーバが起こると、接続先を新たなマスタであるレプリカ10Bに変更する。ここで、フェイルオーバ中にクライアント20が故障等により再接続を行わなかった場合について、図7を用いて説明する。図7は、死活監視システムによる新マスタへの切替処理を説明する図である。図7に例示するように、マスタ10Aに故障が発生してフェイルオーバでマスタが交代し、レプリカ10Bが新マスタとなる(図7の(1)参照)。ここで、フェイルオーバ中にクライアント20Bは、故障したため新マスタであるレプリカ10Bと再接続を行わなかったものとし(図7の(2)参照)、クライアント20Aは、新マスタであるレプリカ10Bと再接続を行ったものとする(図7の(3)参照)。   In addition, when the master 10A fails and failover occurs, the session management unit 21a changes the connection destination to the replica 10B that is a new master. Here, a case where the client 20 has not reconnected during a failover due to a failure or the like will be described with reference to FIG. FIG. 7 is a diagram for explaining the switching process to the new master by the alive monitoring system. As illustrated in FIG. 7, a failure occurs in the master 10A, and the master is replaced by failover, and the replica 10B becomes the new master (see (1) in FIG. 7). Here, it is assumed that the client 20B does not reconnect with the replica 10B as the new master during the failover (see (2) in FIG. 7), and the client 20A reconnects with the replica 10B as the new master. (See (3) of FIG. 7).

この場合には、新マスタであるレプリカ10Bは、一定期間再接続のなかったセッション(この例では、故障したクライアント20Bとのセッション)に関する情報を新マスタであるレプリカ10Bの記憶部17及びデータベース30Bから削除する。つまり、セッションが切断した場合には、そのクライアントへのイベント情報の送信が不要になるため、セッションに関する情報を記憶部17及びデータベース30Bから削除する(図7の(4)参照)。   In this case, the replica 10B that is the new master uses the storage unit 17 and the database 30B of the replica 10B that is the new master to obtain information on a session that has not been reconnected for a certain period of time (in this example, a session with the failed client 20B). Delete from. In other words, when the session is disconnected, it is not necessary to transmit event information to the client, so information related to the session is deleted from the storage unit 17 and the database 30B (see (4) in FIG. 7).

また、セッション管理部21aは、受信した死活監視情報に差分更新通知がイベント情報として付加されている場合には、該差分更新通知をキャッシュ更新部21bへ通知する。例えば、セッション管理部21aは、受信した死活監視情報にイベントID「1」の差分更新通知が付加されていれば、差分更新通知をキャッシュ更新部21bへ通知する。   In addition, when a difference update notification is added as event information to the received alive monitoring information, the session management unit 21a notifies the cache update unit 21b of the difference update notification. For example, if a difference update notification with event ID “1” is added to the received alive monitoring information, the session management unit 21a notifies the cache update unit 21b of the difference update notification.

キャッシュ更新部21bは、マスタ10Aから通知された差分更新通知を用いて、ディレクトリキャッシュを差分更新する。一例としては、キャッシュ更新部21bは、イベントID「1」の差分更新通知をセッション管理部21aから受け付ける。ここで、イベントID「1」の差分更新通知は、ノードID「2」のファイルが追加された旨の差分更新通知である。この結果、キャッシュ更新部21bは、キャッシュ記憶部21cに記憶されたディレクトリキャッシュにノードID「2」のファイル名を追加する。他の例としては、キャッシュ更新部21bは、イベントID「4」の差分更新通知をセッション管理部21aから受け付ける。ここで、イベントID「4」の差分更新通知は、ノードID「6」のファイルが削除された旨の差分更新通知である。この結果、キャッシュ更新部21bは、キャッシュ記憶部21cに記憶されたディレクトリキャッシュからノードID「6」のファイル名を削除する。   The cache update unit 21b performs differential update of the directory cache using the differential update notification notified from the master 10A. As an example, the cache update unit 21b receives a difference update notification of the event ID “1” from the session management unit 21a. Here, the difference update notification of the event ID “1” is a difference update notification indicating that the file of the node ID “2” has been added. As a result, the cache update unit 21b adds the file name of the node ID “2” to the directory cache stored in the cache storage unit 21c. As another example, the cache update unit 21b receives a difference update notification of the event ID “4” from the session management unit 21a. Here, the difference update notification of the event ID “4” is a difference update notification indicating that the file of the node ID “6” has been deleted. As a result, the cache update unit 21b deletes the file name of the node ID “6” from the directory cache stored in the cache storage unit 21c.

キャッシュ記憶部21cは、マスタ10Aによって管理される各種情報のキャッシュを記憶する。具体的には、キャッシュ記憶部21cは、アプリケーション22によって利用されるためにマスタ10Aから取得された各種情報のディレクトリキャッシュを記憶する。   The cache storage unit 21c stores a cache of various information managed by the master 10A. Specifically, the cache storage unit 21c stores a directory cache of various types of information acquired from the master 10A for use by the application 22.

[死活監視システムによる欠送防止処理]
図8〜図12を用いて、第1の実施形態に係る死活監視システム1によるイベント情報の欠送防止処理の流れを説明する。なお、本実施形態では、ノードの更新によって発生した差分更新通知がイベント情報として各クライアント20に通知される場合に、差分更新通知の欠送を防止するために行われる欠送防止処理について説明するが、実施形態はこれに限定されるものではない。例えば、イベント情報の欠送防止処理は、各クライアント20上で動作するアプリケーション22からの要求によって発生した各種イベントが、各クライアント20に通知される場合にも実行され得る。
[Non-delivery prevention processing by life and death monitoring system]
A flow of event information missing sending prevention processing by the life and death monitoring system 1 according to the first embodiment will be described with reference to FIGS. 8 to 12. In the present embodiment, a description will be given of a missed transmission prevention process that is performed in order to prevent missing of a difference update notification when a difference update notification generated by node update is notified to each client 20 as event information. However, the embodiment is not limited to this. For example, the event information miss-prevention process can be executed even when each client 20 is notified of various events generated by a request from the application 22 operating on each client 20.

図8〜図12は、第1の実施形態に係る死活監視システム1による欠送防止処理の流れを示すシーケンス図である。図8には、死活監視システムがイベント情報の欠送を防止するために行う正常時のイベント配送処理の流れを示す。図9〜図12には、死活監視システムによるフェイルオーバ時のイベント配送処理の流れを示す。また、図9〜図12は、それぞれフェイルオーバの発生時が異なる。具体的には、図9の例では、イベント発生前にフェイルオーバが発生した場合を示しており、図10の例では、イベント情報送信前にフェイルオーバが発生した場合を示しており、図11の例では、応答受信前にフェイルオーバが発生した場合を示しており、図12の例では、応答受信後にフェイルオーバが発生した場合を示している。   FIG. 8 to FIG. 12 are sequence diagrams showing the flow of the missed sending prevention process by the life and death monitoring system 1 according to the first embodiment. FIG. 8 shows a flow of normal event delivery processing performed by the alive monitoring system to prevent event information from being missed. 9 to 12 show a flow of event delivery processing at the time of failover by the alive monitoring system. 9 to 12 are different when a failover occurs. Specifically, the example of FIG. 9 shows a case where a failover occurs before an event occurs, and the example of FIG. 10 shows a case where a failover occurs before event information transmission, and the example of FIG. Shows a case where a failover occurs before receiving a response, and the example in FIG. 12 shows a case where a failover occurs after receiving a response.

まず、図8を用いて、死活監視システムがイベント情報の欠送を防止するために行う正常時のイベント配送処理の流れを説明する。図8に示すように、マスタ10Aは、イベントが発生すると(ステップS101)、イベント情報を記憶部17及びデータベース30Aに登録し(ステップS102)、イベント情報の複製をレプリカ10B、10Cに通知する(ステップS103)。レプリカ10B、10Cは、イベント情報の複製を受信すると、データベース30B、30Cにイベント情報の複製を登録し、登録を行った旨の応答をマスタ10Aに送信する(ステップS104)。   First, the flow of normal event delivery processing performed by the life and death monitoring system to prevent event information from being missed will be described with reference to FIG. As shown in FIG. 8, when an event occurs (step S101), the master 10A registers the event information in the storage unit 17 and the database 30A (step S102), and notifies the replicas 10B and 10C of a copy of the event information ( Step S103). Upon receiving the copy of the event information, the replicas 10B and 10C register the copy of the event information in the databases 30B and 30C, and transmit a response indicating that the registration has been performed to the master 10A (step S104).

そして、マスタ10Aは、定期的に通信している死活監視情報にイベント情報を付加して、クライアント20のクライアントライブラリ21にイベント情報を送信する(ステップS105)。クライアントライブラリ21は、イベント情報の受信を完了すると、最新送信完了イベントIDを用いて、イベント情報を二重に受信していないか確認する冗送確認処理を行う(ステップS106)。そして、クライアントライブラリ21は、二重に受信していないイベント情報である場合には、イベント情報をアプリケーション22に通知する(ステップS107)。   Then, the master 10A adds the event information to the alive monitoring information that is periodically communicated, and transmits the event information to the client library 21 of the client 20 (step S105). When the reception of the event information is completed, the client library 21 performs a redundant transmission confirmation process for confirming whether the event information has been received twice using the latest transmission completion event ID (step S106). If the event information is not received twice, the client library 21 notifies the application 22 of the event information (step S107).

そして、クライアントライブラリ21は、最新受信完了イベントIDを含むイベント受信完了応答をマスタ10Aに送信する(ステップS108)。続いて、マスタ10Aは、イベント受信完了応答を受信すると、イベント情報の送信が完了した旨の登録と最新受信完了イベントIDの更新とを行う(ステップS109)。その後、マスタ10Aは、最新受信完了イベントIDの複製をレプリカ10B、10Cに通知する(ステップS110)。レプリカ10B、10Cは、最新受信完了イベントIDの複製を受信すると、データベース30B、30Cに最新受信完了イベントIDを登録し、登録を行った旨の応答をマスタ10Aに送信する(ステップS111)。そして、マスタ10Aは、レプリカ10B、10Cからの応答を受信し、イベント情報を受信すべき全クライアント20から応答が揃った場合に、送信を完了したイベント情報を削除する(ステップS112)。その後、マスタ10Aは、自身のデータベース30Aからイベント情報を削除した場合には、レプリカ10B、10Cに対してイベント情報の削除を複製させる(ステップS113)。そして、レプリカ10B、10Cは、イベント情報の削除を複製してデータベース30B、30Cからイベント情報を削除すると、削除を行った旨の応答をマスタ10Aに送信する(ステップS114)。   Then, the client library 21 transmits an event reception completion response including the latest reception completion event ID to the master 10A (step S108). Subsequently, when receiving the event reception completion response, the master 10A registers that the transmission of the event information is completed and updates the latest reception completion event ID (step S109). Thereafter, the master 10A notifies the replicas 10B and 10C of a copy of the latest reception completion event ID (step S110). When the replicas 10B and 10C receive a copy of the latest reception completion event ID, the replicas 10B and 10C register the latest reception completion event ID in the databases 30B and 30C, and transmit a response indicating that the registration has been performed to the master 10A (step S111). Then, the master 10A receives the responses from the replicas 10B and 10C, and deletes the event information that has been transmitted when the responses are obtained from all the clients 20 that should receive the event information (step S112). Thereafter, when the event information is deleted from its own database 30A, the master 10A causes the replicas 10B and 10C to replicate the deletion of the event information (step S113). Then, when replicating the deletion of the event information and deleting the event information from the databases 30B and 30C, the replicas 10B and 10C transmit a response indicating that the deletion has been performed to the master 10A (step S114).

続いて、図9を用いて、第1の実施形態に係る死活監視システムによるフェイルオーバ時のイベント配送処理の流れを説明する。図9に示すように、マスタ10Aは、イベントが発生すると(ステップS201)、イベント情報を記憶部17及びデータベース30Aに登録し(ステップS202)、該イベント情報の複製をレプリカ10B、10Cに通知する(ステップS203)。   Next, a flow of event delivery processing at the time of failover by the alive monitoring system according to the first embodiment will be described with reference to FIG. As shown in FIG. 9, when an event occurs (step S201), the master 10A registers the event information in the storage unit 17 and the database 30A (step S202), and notifies the replicas 10B and 10C of a copy of the event information. (Step S203).

そして、マスタ10Aに故障が発生し(ステップS204)、フェイルオーバによりレプリカ10Bを新マスタに切り替える。ここで、マスタ10Aが故障しているため、通信ができず、レプリカ10Cからの応答が失敗する(ステップS205)。また、クライアントライブラリ21は、マスタ10Aとの定期通信が途絶えたことからマスタ10Aとの接続切断を検出すると、レプリカのどれかにマスタの問い合わせを行い(ステップS206)、新マスタであるレプリカ10Bから新しいマスタである旨の返信を受信する(ステップS208)。そして、クライアントライブラリ21は、新マスタであるレプリカ10Bとの再接続を要求し(ステップS209)、新マスタであるレプリカ10Bとのセッションを確立してマスタと再接続する(ステップS210)。また、新マスタであるレプリカ10Bは、クライアントライブラリ21との再接続処理と並行して、データベース30Bからイベント情報を読み出し、イベント情報を復元する処理を行う(ステップS207)。   Then, a failure occurs in the master 10A (step S204), and the replica 10B is switched to the new master by failover. Here, since the master 10A is out of order, communication cannot be performed and the response from the replica 10C fails (step S205). Further, when the client library 21 detects disconnection with the master 10A because the periodic communication with the master 10A has been interrupted, the client library 21 inquires of one of the replicas (step S206), and from the replica 10B, which is the new master. A reply indicating that it is a new master is received (step S208). Then, the client library 21 requests reconnection with the replica 10B that is the new master (step S209), establishes a session with the replica 10B that is the new master, and reconnects with the master (step S210). Further, in parallel with the reconnection process with the client library 21, the replica 10B that is the new master reads the event information from the database 30B and performs a process of restoring the event information (step S207).

そして、新マスタであるレプリカ10Bは、イベント情報のうちクライアント20に対して送信未完了であるイベント情報を、最新受信完了イベントIDを用いて特定し、該送信未完了であるイベント情報をクライアント20に送信する(ステップS211)。クライアントライブラリ21は、イベント情報の受信を完了すると、最新送信完了イベントIDを用いて、イベント情報を二重に受信していないか確認する冗送確認処理を行う(ステップS212)。そして、クライアントライブラリ21は、二重に受信していないイベント情報である場合には、イベント情報をアプリケーション22に通知する(ステップS213)。   Then, the replica 10B, which is the new master, identifies event information that has not been transmitted to the client 20 among the event information using the latest reception completion event ID, and the event information that has not been transmitted yet is identified by the client 20. (Step S211). When the reception of the event information is completed, the client library 21 performs a redundant transmission confirmation process for confirming whether the event information has been received twice using the latest transmission completion event ID (step S212). If the event information is not received twice, the client library 21 notifies the application 22 of the event information (step S213).

そして、クライアントライブラリ21は、最新受信完了イベントIDを含むイベント受信完了応答を新マスタであるレプリカ10Bに送信する(ステップS214)。続いて、新マスタであるレプリカ10Bは、イベント受信完了応答を受信すると、イベント情報の送信が完了した旨の登録と最新受信完了イベントIDの更新とを行う(ステップS215)。その後、新マスタであるレプリカ10Bは、最新受信完了イベントIDの複製をレプリカ10Cに通知する(ステップS216)。レプリカ10Cは、最新受信完了イベントIDの複製を受信すると、データベース30Cに最新受信完了イベントIDを登録し、登録を行った旨の応答を新マスタであるレプリカ10Bに送信する(ステップS217)。そして、新マスタであるレプリカ10Bは、レプリカ10Cからの応答を受信し、イベント情報を受信すべき全クライアント20から応答が揃った場合に、送信を完了したイベント情報を削除する(ステップS218)。その後、新マスタであるレプリカ10Bは、自身のデータベース30Bからイベント情報を削除した場合には、レプリカ10Cに対してイベント情報の削除を複製させる(ステップS219)。そして、レプリカ10Cは、イベント情報の削除を複製してデータベース30Cからイベント情報を削除すると、削除を行った旨の応答を新マスタであるレプリカ10Bに送信する(ステップS220)。   Then, the client library 21 transmits an event reception completion response including the latest reception completion event ID to the replica 10B that is the new master (step S214). Subsequently, when receiving the event reception completion response, the replica 10B, which is the new master, registers that the transmission of the event information has been completed and updates the latest reception completion event ID (step S215). Thereafter, the replica 10B, which is the new master, notifies the replica 10C of a copy of the latest reception completion event ID (step S216). When the replica 10C receives a copy of the latest reception completion event ID, the replica 10C registers the latest reception completion event ID in the database 30C, and transmits a response to the effect that registration has been performed to the replica 10B that is the new master (step S217). Then, the replica 10B, which is the new master, receives the response from the replica 10C, and deletes the event information that has been transmitted when the responses are obtained from all the clients 20 that should receive the event information (step S218). After that, when the event information is deleted from its own database 30B, the replica 10B, which is the new master, replicates the deletion of the event information to the replica 10C (step S219). Then, when replicating the deletion of the event information and deleting the event information from the database 30C, the replica 10C transmits a response indicating that the deletion has been performed to the replica 10B that is the new master (step S220).

次に、図10を用いて、第1の実施形態に係る死活監視システムによるフェイルオーバ時のイベント配送処理の流れを説明する。図10に示すように、マスタ10Aは、イベントが発生すると(ステップS301)、イベント情報を記憶部17及びデータベース30Aに登録し(ステップS302)、該イベント情報の複製をレプリカ10B、10Cに通知する(ステップS303)。レプリカ10B、10Cは、イベント情報の複製を受信すると、データベース30B、30Cにイベント情報の複製を登録し、登録を行った旨の応答をマスタ10Aに送信する(ステップS304)。   Next, the flow of event delivery processing during failover by the alive monitoring system according to the first embodiment will be described with reference to FIG. As shown in FIG. 10, when an event occurs (step S301), the master 10A registers the event information in the storage unit 17 and the database 30A (step S302), and notifies the replicas 10B and 10C of a copy of the event information. (Step S303). Upon receiving the copy of the event information, the replicas 10B and 10C register the copy of the event information in the databases 30B and 30C, and transmit a response indicating that the registration has been performed to the master 10A (step S304).

そして、マスタ10Aに故障が発生し(ステップS305)、イベント情報の送信が失敗すると(ステップS306)、フェイルオーバによりレプリカ10Bを新マスタであるレプリカ10Bに切り替える。続いて、新マスタであるレプリカ10Bは、データベース30Bからイベント情報を読み出し、イベント情報を復元する処理を行う(ステップS307)。ここで、クライアントライブラリ21は、マスタ10Aとの定期通信が途絶えたことからマスタ10Aとの接続切断を検出すると、レプリカのどれかにマスタの問い合わせを行い(ステップS308)、新マスタであるレプリカ10Bから新しいマスタである旨の返信を受信する(ステップS309)。そして、クライアントライブラリ21は、新マスタであるレプリカ10Bとの再接続を要求し(ステップS310)、新マスタであるレプリカ10Bとのセッションを確立してマスタと再接続する(ステップS311)。   When a failure occurs in the master 10A (step S305) and transmission of event information fails (step S306), the replica 10B is switched to the replica 10B that is the new master by failover. Subsequently, the replica 10B, which is the new master, reads the event information from the database 30B and performs a process of restoring the event information (step S307). Here, when the client library 21 detects disconnection with the master 10A because the periodic communication with the master 10A is interrupted, the client library 21 inquires of one of the replicas of the master (step S308), and the replica 10B which is the new master. A reply indicating that it is a new master is received (step S309). Then, the client library 21 requests reconnection with the replica 10B that is the new master (step S310), establishes a session with the replica 10B that is the new master, and reconnects with the master (step S311).

そして、新マスタであるレプリカ10Bは、イベント情報のうちクライアント20に対して送信未完了であるイベント情報を、最新受信完了イベントIDを用いて特定し、該送信未完了であるイベント情報をクライアント20に送信する(ステップS312)。クライアントライブラリ21は、イベント情報の受信を完了すると、最新送信完了イベントIDを用いて、イベント情報を二重に受信していないか確認する冗送確認処理を行う(ステップS313)。そして、クライアントライブラリ21は、二重に受信していないイベント情報である場合には、イベント情報をアプリケーション22に通知する(ステップS314)。   Then, the replica 10B, which is the new master, identifies event information that has not been transmitted to the client 20 among the event information using the latest reception completion event ID, and the event information that has not been transmitted yet is identified by the client 20. (Step S312). When the reception of the event information is completed, the client library 21 performs a redundant transmission confirmation process for confirming whether the event information has been received twice using the latest transmission completion event ID (step S313). If the event information is not received twice, the client library 21 notifies the application 22 of the event information (step S314).

そして、クライアントライブラリ21は、最新受信完了イベントIDを含むイベント受信完了応答を新マスタであるレプリカ10Bに送信する(ステップS315)。続いて、新マスタであるレプリカ10Bは、イベント受信完了応答を受信すると、イベント情報の送信が完了した旨の登録と最新受信完了イベントIDの更新とを行う(ステップS316)。その後、新マスタであるレプリカ10Bは、最新受信完了イベントIDの複製をレプリカ10Cに通知する(ステップS317)。レプリカ10Cは、最新受信完了イベントIDの複製を受信すると、データベース30Cに最新受信完了イベントIDを登録し、登録を行った旨の応答を新マスタであるレプリカ10Bに送信する(ステップS318)。そして、新マスタであるレプリカ10Bは、レプリカ10Cからの応答を受信し、イベント情報を受信すべき全クライアント20から応答が揃った場合に、送信を完了したイベント情報を削除する(ステップS319)。その後、新マスタであるレプリカ10Bは、自身のデータベース30Bからイベント情報を削除した場合には、レプリカ10Cに対してイベント情報の削除を複製させる(ステップS320)。そして、レプリカ10Cは、イベント情報の削除を複製してデータベース30Cからイベント情報を削除すると、削除を行った旨の応答を新マスタであるレプリカ10Bに送信する(ステップS321)。   Then, the client library 21 transmits an event reception completion response including the latest reception completion event ID to the replica 10B that is the new master (step S315). Subsequently, when receiving the event reception completion response, the replica 10B, which is the new master, registers that the transmission of the event information has been completed and updates the latest reception completion event ID (step S316). Thereafter, the replica 10B, which is the new master, notifies the replica 10C of a copy of the latest reception completion event ID (step S317). When the replica 10C receives a copy of the latest reception completion event ID, the replica 10C registers the latest reception completion event ID in the database 30C, and transmits a response to the effect that registration has been performed to the replica 10B, which is the new master (step S318). Then, the replica 10B, which is the new master, receives the response from the replica 10C, and deletes the event information that has been transmitted when the responses are obtained from all the clients 20 that should receive the event information (step S319). Thereafter, when the event information is deleted from its own database 30B, the replica 10B as the new master causes the replica 10C to replicate the deletion of the event information (step S320). Then, when replicating the deletion of the event information and deleting the event information from the database 30C, the replica 10C transmits a response indicating that the deletion has been performed to the replica 10B, which is the new master (step S321).

次に、図11を用いて、第1の実施形態に係る死活監視システムによるフェイルオーバ時のイベント配送処理の流れを説明する。図11に示すように、マスタ10Aは、イベントが発生すると(ステップS401)、イベント情報を記憶部17及びデータベース30Aに登録し(ステップS402)、該イベント情報の複製をレプリカ10B、10Cに通知する(ステップS403)。レプリカ10B、10Cは、イベント情報の複製を受信すると、データベース30B、30Cにイベント情報の複製を登録し、登録を行った旨の応答をマスタ10Aに送信する(ステップS404)。   Next, the flow of event delivery processing during failover by the alive monitoring system according to the first embodiment will be described with reference to FIG. As shown in FIG. 11, when an event occurs (step S401), the master 10A registers the event information in the storage unit 17 and the database 30A (step S402), and notifies the replicas 10B and 10C of a copy of the event information. (Step S403). Upon receiving the copy of the event information, the replicas 10B and 10C register the copy of the event information in the databases 30B and 30C, and transmit a response indicating that the registration has been performed to the master 10A (step S404).

そして、マスタ10Aは、定期的に通信している死活監視情報にイベント情報を付加して、クライアント20のクライアントライブラリ21にイベント情報を送信する(ステップS405)。クライアントライブラリ21は、イベント情報の受信を完了すると、最新送信完了イベントIDを用いて、イベント情報を二重に受信していないか確認する冗送確認処理を行う(ステップS406)。そして、クライアントライブラリ21は、二重に受信していないイベント情報である場合には、イベント情報をアプリケーション22に通知する(ステップS407)。   Then, the master 10A adds the event information to the alive monitoring information that is periodically communicated, and transmits the event information to the client library 21 of the client 20 (step S405). When the reception of the event information is completed, the client library 21 performs a redundant transmission confirmation process for confirming whether the event information has been received twice using the latest transmission completion event ID (step S406). If the event information is not received twice, the client library 21 notifies the application 22 of the event information (step S407).

そして、マスタ10Aに故障が発生し、フェイルオーバによりレプリカ10Bを新マスタであるレプリカ10Bに切り替える(ステップS408)。続いて、新マスタであるレプリカ10Bは、データベース30Bからイベント情報を読み出し、イベント情報を復元する処理を行う(ステップS409)。また、クライアントライブラリ21は、マスタ10Aに故障が発生したため、イベント受信完了応答を旧マスタ10Aに送信することに失敗する(ステップS410)。ここで、クライアントライブラリ21は、マスタ10Aとの定期通信が途絶えたことからマスタ10Aとの接続切断を検出すると、レプリカのどれかにマスタの問い合わせを行い(ステップS411)、新マスタであるレプリカ10Bから新しいマスタである旨の返信を受信する(ステップS412)。そして、クライアントライブラリ21は、新マスタであるレプリカ10Bとの再接続を要求し(ステップS413)、新マスタであるレプリカ10Bとのセッションを確立してマスタと再接続する(ステップS414)。   Then, a failure occurs in the master 10A, and the replica 10B is switched to the replica 10B that is the new master by failover (step S408). Subsequently, the replica 10B, which is the new master, reads the event information from the database 30B and performs a process of restoring the event information (step S409). Further, since a failure has occurred in the master 10A, the client library 21 fails to transmit an event reception completion response to the old master 10A (step S410). Here, when the client library 21 detects disconnection with the master 10A because the periodic communication with the master 10A has been interrupted, the client library 21 inquires of one of the replicas of the master (step S411), and the replica 10B which is the new master. A reply indicating that it is a new master is received (step S412). Then, the client library 21 requests reconnection with the replica 10B that is the new master (step S413), establishes a session with the replica 10B that is the new master, and reconnects with the master (step S414).

続いて、新マスタであるレプリカ10Bは、イベント情報のうちクライアント20に対して送信未完了であるイベント情報を、最新受信完了イベントIDを用いて特定し、該送信未完了であるイベント情報をクライアント20に送信する(ステップS415)。そして、クライアントライブラリ21は、イベント情報の受信を完了すると、最新送信完了イベントIDを用いて、イベント情報を二重に受信していないか確認する冗送確認処理を行う(ステップS416)。ここでは、クライアントライブラリ21は、受信したイベント情報が、ステップS405において受信しているイベント情報であるため、イベント情報をアプリケーション22に通知せずに、最新受信完了イベントIDを含むイベント受信完了応答を新マスタであるレプリカ10Bに送信する(ステップS417)。   Subsequently, the replica 10B that is the new master specifies event information that has not been transmitted to the client 20 among the event information using the latest reception completion event ID, and the event information that has not been transmitted yet is identified by the client 10 20 (step S415). Then, when the reception of the event information is completed, the client library 21 performs a redundant sending confirmation process for checking whether the event information has been received twice using the latest transmission completion event ID (step S416). Here, since the received event information is the event information received in step S405, the client library 21 sends an event reception completion response including the latest reception completion event ID without notifying the application 22 of the event information. The data is transmitted to the replica 10B that is the new master (step S417).

続いて、新マスタであるレプリカ10Bは、イベント受信完了応答を受信すると、イベント情報の送信が完了した旨の登録と最新受信完了イベントIDの更新とを行う(ステップS418)。その後、新マスタであるレプリカ10Bは、最新受信完了イベントIDの複製をレプリカ10Cに通知する(ステップS419)。レプリカ10Cは、最新受信完了イベントIDの複製を受信すると、データベース30Cに最新受信完了イベントIDを登録し、登録を行った旨の応答を新マスタであるレプリカ10Bに送信する(ステップS420)。そして、新マスタであるレプリカ10Bは、レプリカ10Cからの応答を受信し、イベント情報を受信すべき全クライアント20から応答が揃った場合に、送信を完了したイベント情報を削除する(ステップS421)。その後、新マスタであるレプリカ10Bは、自身のデータベース30Bからイベント情報を削除した場合には、レプリカ10Cに対してイベント情報の削除を複製させる(ステップS422)。そして、レプリカ10Cは、イベント情報の削除を複製してデータベース30Cからイベント情報を削除すると、削除を行った旨の応答を新マスタであるレプリカ10Bに送信する(ステップS423)。   Subsequently, when receiving the event reception completion response, the replica 10B, which is the new master, registers that the transmission of the event information has been completed and updates the latest reception completion event ID (step S418). Thereafter, the replica 10B, which is the new master, notifies the replica 10C of a copy of the latest reception completion event ID (step S419). When the replica 10C receives a copy of the latest reception completion event ID, the replica 10C registers the latest reception completion event ID in the database 30C and transmits a response indicating that the registration has been performed to the replica 10B, which is the new master (step S420). Then, the replica 10B, which is the new master, receives the response from the replica 10C, and deletes the event information that has been transmitted when the responses are obtained from all the clients 20 that should receive the event information (step S421). After that, when the event information is deleted from its own database 30B, the replica 10B, which is the new master, replicates the deletion of the event information to the replica 10C (step S422). Then, when replicating the deletion of the event information and deleting the event information from the database 30C, the replica 10C transmits a response indicating that the deletion has been performed to the replica 10B that is the new master (step S423).

次に、図12を用いて、第1の実施形態に係る死活監視システムによるフェイルオーバ時のイベント配送処理の流れを説明する。図12に示すように、マスタ10Aは、イベントが発生すると(ステップS501)、イベント情報を記憶部17及びデータベース30Aに登録し(ステップS502)、該イベント情報の複製をレプリカ10B、10Cに通知する(ステップS503)。レプリカ10B、10Cは、イベント情報の複製を受信すると、データベース30B、30Cにイベント情報の複製を登録し、登録を行った旨の応答をマスタ10Aに送信する(ステップS504)。   Next, the flow of event delivery processing at the time of failover by the alive monitoring system according to the first embodiment will be described with reference to FIG. As shown in FIG. 12, when an event occurs (step S501), the master 10A registers the event information in the storage unit 17 and the database 30A (step S502), and notifies the replicas 10B and 10C of a copy of the event information. (Step S503). Upon receiving the copy of the event information, the replicas 10B and 10C register the copy of the event information in the databases 30B and 30C, and transmit a response indicating that the registration has been performed to the master 10A (step S504).

そして、マスタ10Aは、定期的に通信している死活監視情報にイベント情報を付加して、クライアント20のクライアントライブラリ21にイベント情報を送信する(ステップS505)。クライアントライブラリ21は、イベント情報の受信を完了すると、最新送信完了イベントIDを用いて、イベント情報を二重に受信していないか確認する冗送確認処理を行う(ステップS506)。そして、クライアントライブラリ21は、二重に受信していないイベント情報である場合には、イベント情報をアプリケーション22に通知する(ステップS507)。   Then, the master 10A adds event information to the alive monitoring information that is periodically communicated, and transmits the event information to the client library 21 of the client 20 (step S505). When the reception of the event information is completed, the client library 21 performs a redundant sending confirmation process for checking whether the event information has been received twice using the latest transmission completion event ID (step S506). If the event information is not received twice, the client library 21 notifies the application 22 of the event information (step S507).

そして、クライアントライブラリ21は、最新受信完了イベントIDを含むイベント受信完了応答をマスタ10Aに送信する(ステップS508)。ここで、マスタ10Aに故障が発生し、フェイルオーバによりレプリカ10Bを新マスタであるレプリカ10Bに切り替える(ステップS509)。続いて、新マスタであるレプリカ10Bは、データベース30Bからイベント情報を読み出し、イベント情報を復元する処理を行う(ステップS510)。ここで、クライアントライブラリ21は、マスタ10Aとの定期通信が途絶えたことからマスタ10Aとの接続切断を検出すると、レプリカのどれかにマスタの問い合わせを行い(ステップS511)、新マスタであるレプリカ10Bから新しいマスタである旨の返信を受信する(ステップS512)。そして、クライアントライブラリ21は、新マスタであるレプリカ10Bとの再接続を要求し(ステップS513)、新マスタであるレプリカ10Bとのセッションを確立してマスタと再接続する(ステップS514)。   Then, the client library 21 transmits an event reception completion response including the latest reception completion event ID to the master 10A (step S508). Here, a failure occurs in the master 10A, and the replica 10B is switched to the replica 10B that is the new master by failover (step S509). Subsequently, the replica 10B, which is the new master, reads the event information from the database 30B and performs a process of restoring the event information (step S510). Here, when the client library 21 detects disconnection with the master 10A because the periodic communication with the master 10A is interrupted, the client library 21 inquires of one of the replicas of the master (step S511), and the replica 10B which is the new master. A reply indicating that it is a new master is received (step S512). Then, the client library 21 requests reconnection with the replica 10B that is the new master (step S513), establishes a session with the replica 10B that is the new master, and reconnects with the master (step S514).

続いて、新マスタであるレプリカ10Bは、イベント情報のうちクライアント20に対して送信未完了であるイベント情報を、最新受信完了イベントIDを用いて特定し、該送信未完了であるイベント情報をクライアント20に送信する(ステップS515)。そして、クライアントライブラリ21は、イベント情報の受信を完了すると、最新送信完了イベントIDを用いて、イベント情報を二重に受信していないか確認する冗送確認処理を行う(ステップS516)。ここでは、クライアントライブラリ21は、受信したイベント情報が、ステップS505において受信しているイベント情報であるため、イベント情報をアプリケーション22に通知せずに、最新受信完了イベントIDを含むイベント受信完了応答を新マスタであるレプリカ10Bに送信する(ステップS517)。   Subsequently, the replica 10B that is the new master specifies event information that has not been transmitted to the client 20 among the event information using the latest reception completion event ID, and the event information that has not been transmitted yet is identified by the client 10 20 (step S515). Then, when the reception of the event information is completed, the client library 21 performs a redundant sending confirmation process for checking whether the event information has been received twice using the latest transmission completion event ID (step S516). Here, since the received event information is the event information received in step S505, the client library 21 sends an event reception completion response including the latest reception completion event ID without notifying the application 22 of the event information. The data is transmitted to the replica 10B that is the new master (step S517).

続いて、新マスタであるレプリカ10Bは、イベント受信完了応答を受信すると、イベント情報の送信が完了した旨の登録と最新受信完了イベントIDの更新とを行う(ステップS518)。その後、新マスタであるレプリカ10Bは、最新受信完了イベントIDの複製をレプリカ10Cに通知する(ステップS519)。レプリカ10Cは、最新受信完了イベントIDの複製を受信すると、データベース30Cに最新受信完了イベントIDを登録し、登録を行った旨の応答を新マスタであるレプリカ10Bに送信する(ステップS520)。そして、新マスタであるレプリカ10Bは、レプリカ10Cからの応答を受信し、イベント情報を受信すべき全クライアント20から応答が揃った場合に、送信を完了したイベント情報を削除する(ステップS521)。その後、新マスタであるレプリカ10Bは、自身のデータベース30Bからイベント情報を削除した場合には、レプリカ10Cに対してイベント情報の削除を複製させる(ステップS522)。そして、レプリカ10Cは、イベント情報の削除を複製してデータベース30Cからイベント情報を削除すると、削除を行った旨の応答を新マスタであるレプリカ10Bに送信する(ステップS523)。   Subsequently, when receiving the event reception completion response, the replica 10B, which is the new master, registers that the transmission of the event information has been completed and updates the latest reception completion event ID (step S518). Thereafter, the replica 10B, which is the new master, notifies the replica 10C of a copy of the latest reception completion event ID (step S519). When the replica 10C receives a copy of the latest reception completion event ID, the replica 10C registers the latest reception completion event ID in the database 30C, and transmits a response indicating that the registration has been performed to the replica 10B, which is the new master (step S520). Then, the replica 10B, which is the new master, receives the response from the replica 10C, and deletes the event information that has been transmitted when the responses are prepared from all the clients 20 that should receive the event information (step S521). After that, when the event information is deleted from its own database 30B, the replica 10B, which is the new master, replicates the deletion of the event information to the replica 10C (step S522). Then, when replicating the deletion of the event information and deleting the event information from the database 30C, the replica 10C transmits a response indicating that the deletion has been performed to the replica 10B that is the new master (step S523).

[死活監視システムによる差分更新処理]
図13を用いて、第1の実施形態に係る死活監視システム1による差分更新処理の流れを説明する。図13は、第1の実施形態に係る死活監視システム1による差分更新処理の流れを示すシーケンス図である。図13には、クライアント20Bがマスタ10Aに記憶されたディレクトリ情報「File1,Dir2」のディレクトリキャッシュを取得し、クライアント20Aによるファイル名「File3」のファイルの追加に応じてディレクトリキャッシュを更新する場合を例示する。
[Difference update processing by alive monitoring system]
The flow of the difference update process by the alive monitoring system 1 according to the first embodiment will be described with reference to FIG. FIG. 13 is a sequence diagram showing a flow of difference update processing by the alive monitoring system 1 according to the first embodiment. FIG. 13 shows a case where the client 20B acquires the directory cache of the directory information “File1, Dir2” stored in the master 10A, and updates the directory cache according to the addition of the file with the file name “File3” by the client 20A. Illustrate.

図13に示すように、クライアント20Bは、アプリケーション22からディレクトリ情報を取得するためのディレクトリ情報取得要求が発生すると(ステップS601)、マスタ10Aへ該ディレクトリ情報取得要求を送信する(ステップS602)。クライアント20Bは、送信したディレクトリ情報取得要求に対応するディレクトリ情報のリストをマスタ10Aから受信すると(ステップS603)、該リストをキャッシュ記憶部21cに格納する(ステップS604)。この結果、クライアント20Bは、ディレクトリ情報「File1,Dir2」のディレクトリキャッシュを取得する。   As shown in FIG. 13, when a directory information acquisition request for acquiring directory information from the application 22 is generated (step S601), the client 20B transmits the directory information acquisition request to the master 10A (step S602). Upon receiving the directory information list corresponding to the transmitted directory information acquisition request from the master 10A (step S603), the client 20B stores the list in the cache storage unit 21c (step S604). As a result, the client 20B acquires the directory cache of the directory information “File1, Dir2”.

これ以降、クライアント20Bは、アプリケーション22からディレクトリ情報取得要求が発生するごとに(ステップS605)、取得済みのディレクトリキャッシュを読み込んで(ステップS606)、これを利用する。   Thereafter, every time a directory information acquisition request is generated from the application 22 (step S605), the client 20B reads the acquired directory cache (step S606) and uses it.

ここで、クライアント20Aが新規にファイル名「File3」のファイルを追加する要求をマスタ10Aに対して送信すると(ステップS607)、マスタ10Aは、ファイルを作成する(ステップS608)。そして、マスタ10Aは、ファイル名「File3」のファイルを作成すると、ファイルの作成完了をクライアント20Aへ通知する(ステップS609)。   Here, when the client 20A transmits a request to add a new file with the file name “File3” to the master 10A (step S607), the master 10A creates a file (step S608). When the master 10A creates a file with the file name “File3”, the master 10A notifies the client 20A of the completion of the file creation (step S609).

マスタ10Aは、ファイル名「File3」のファイルを新規に追加すると、ファイル名「File3」を追加する旨の差分更新通知をイベントとして発生させる。そして、マスタ10Aは、ファイル名「File3」を追加する旨の差分更新通知を、ディレクトリキャッシュを保持するクライアント20Bに送信する(ステップS610)。この結果、クライアント20Bは、ディレクトリキャッシュのリストを更新し(ステップS611)、ファイル名「File3」のディレクトリ情報をリストに追加する。そして、クライアント20Bは、更新完了通知をマスタ10Aへ送信する(ステップS612)。   When a new file with the file name “File3” is newly added, the master 10A generates a difference update notification indicating that the file name “File3” is added as an event. Then, the master 10A transmits a difference update notification for adding the file name “File3” to the client 20B holding the directory cache (step S610). As a result, the client 20B updates the directory cache list (step S611), and adds the directory information of the file name “File3” to the list. Then, the client 20B transmits an update completion notification to the master 10A (step S612).

これ以降、クライアント20Bは、アプリケーション22からディレクトリ情報取得要求が発生するごとに(ステップS613)、更新済みのディレクトリキャッシュを読み込んで(ステップS614)、これを利用する。   Thereafter, every time a directory information acquisition request is generated from the application 22 (step S613), the client 20B reads the updated directory cache (step S614) and uses it.

なお、マスタ10Aは、ファイルが更新されたことを契機として、差分更新通知をイベントとして発生させた後に、図8のステップS101以降の処理も実行する。これにより、差分更新通知が欠送されることを防止する。すなわち、差分更新通知が発生した後に、マスタ10Aにおいて故障が発生した場合には、図9〜図12のいずれかの処理によって差分更新通知が通知先クライアント20へ送信されることとなる。このため、マスタ10Aは、差分更新通知を欠送させることなく通知先クライアント20に送信することができる。   Note that the master 10A also executes the processing after step S101 in FIG. 8 after generating a difference update notification as an event when the file is updated. This prevents the difference update notification from being missed. That is, when a failure occurs in the master 10A after the difference update notification is generated, the difference update notification is transmitted to the notification destination client 20 by any one of the processes in FIGS. Therefore, the master 10A can transmit the difference update notification to the notification destination client 20 without missing it.

また、図13では、ノードの追加や削除を行うクライアント20と、ディレクトリキャッシュを保持するクライアント20とが異なる場合を例示したが、これらのクライアントが同一の場合にも同様の処理によって差分更新処理が行われる。例えば、図13において、クライアント20Aがディレクトリキャッシュを保持していれば、マスタ10Aは、ファイル名「File3」を追加する旨の差分更新通知を、クライアント20Aにも送信する(ステップS610)。この結果、クライアント20Aは、ディレクトリキャッシュのリストを更新し(ステップS611)、ファイル名「File3」のディレクトリ情報をリストに追加する。そして、クライアント20Aは、更新完了通知をマスタ10Aへ送信する(ステップS612)。   FIG. 13 illustrates the case where the client 20 that adds or deletes a node is different from the client 20 that holds the directory cache. However, even if these clients are the same, the difference update process is performed by the same process. Done. For example, in FIG. 13, if the client 20A holds the directory cache, the master 10A also transmits a difference update notification to the effect that the file name “File3” is added to the client 20A (step S610). As a result, the client 20A updates the directory cache list (step S611), and adds the directory information of the file name “File3” to the list. Then, the client 20A transmits an update completion notification to the master 10A (step S612).

ここで、図13及び図3〜図5を用いて、ファイルが追加される場合の差分更新処理と、ファイルが削除される場合の差分更新処理とをそれぞれ詳細に説明する。なお、ここでは、図13に例示のクライアント20Aは、マスタ10AとセッションID「Sid=2」で接続されており、クライアント20Bは、マスタ10AとセッションID「Sid=1」で接続されている。また、マスタ10Aは、ノードID「Nid=1」のディレクトリ配下に、ノードID「Nid=5」のファイル(図13のファイル名「File1」)と、ノードID「Nid=3」のディレクトリ(図13のディレクトリ名「Dir2」)とをそれぞれ記憶する。また、クライアント20Bは、ステップS602の処理において、図4に例示のノードID「Nid=1」のディレクトリのディレクトリ情報を取得済みであるものとする。   Here, the difference update process when a file is added and the difference update process when a file is deleted will be described in detail with reference to FIGS. 13 and 3 to 5. Here, the client 20A illustrated in FIG. 13 is connected to the master 10A with the session ID “Sid = 2”, and the client 20B is connected to the master 10A with the session ID “Sid = 1”. Further, the master 10A subordinates the directory with the node ID “Nid = 1”, the file with the node ID “Nid = 5” (file name “File1” in FIG. 13), and the directory with the node ID “Nid = 3” (see FIG. 13). 13 directory names “Dir2”). Further, it is assumed that the client 20B has already acquired the directory information of the directory having the node ID “Nid = 1” illustrated in FIG. 4 in the process of step S602.

まず、ファイルが追加される場合の差分更新処理について説明する。ステップS607において、例えば、クライアント20Aは、ノードID「Nid=1」のディレクトリ配下にファイル名「File3」のファイルを追加する要求をマスタ10Aに対して送信する。マスタ10Aは、ファイル名「File3」のファイルを追加する要求を受信すると、ファイル名「File3」のファイルを作成する(ステップS608)。また、マスタ10Aは、ファイル名「File3」のファイルを作成するとき、作成されるファイルのメタデータとして、図3〜図5に例示の各種一覧の更新を行う。   First, the difference update process when a file is added will be described. In step S607, for example, the client 20A transmits a request to add a file with the file name “File3” to the master 10A under the directory with the node ID “Nid = 1”. When the master 10A receives a request to add a file with the file name “File3”, the master 10A creates a file with the file name “File3” (step S608). When the master 10A creates a file with the file name “File3”, the master 10A updates various lists illustrated in FIGS. 3 to 5 as metadata of the created file.

具体的には、マスタ10Aの更新部11は、ファイル名「File3」のファイルが作成されると、作成されたファイルを識別するためのノードIDを割り当て、ノード情報一覧に登録する。図4に示す例では、更新部11は、ノードID「2」、親ノードID「Pid=1」、ノード種別「ファイル」及びアクセス中のセッションID「Sid=2」が対応付けられたレコードをノード情報一覧に追加する。   Specifically, when the file with the file name “File3” is created, the update unit 11 of the master 10A assigns a node ID for identifying the created file and registers it in the node information list. In the example illustrated in FIG. 4, the update unit 11 stores a record in which a node ID “2”, a parent node ID “Pid = 1”, a node type “file”, and a session ID “Sid = 2” being accessed are associated. Add to the node information list.

また、マスタ10Aの生成部12は、ファイル名「File3」のファイルが作成されると、ファイルが作成されたことを通知するためのイベント情報(差分更新通知)を生成し、イベント一覧に登録する。図5に示す例では、生成部12は、イベント発生元のノードID「Nid=2」と、イベント種別「ファイル追加」と、イベント発生元のセッションID「Sid=2」とを対応付けてイベントID「1」のイベント情報としてイベント一覧に登録する。   Also, when the file with the file name “File3” is created, the generation unit 12 of the master 10A generates event information (difference update notification) for notifying that the file has been created and registers it in the event list. . In the example illustrated in FIG. 5, the generation unit 12 associates an event generation source node ID “Nid = 2”, an event type “file addition”, and an event generation source session ID “Sid = 2” with an event. The event information of ID “1” is registered in the event list.

また、マスタ10Aのイベント送信部13は、ファイル名「File3」のファイルが作成されると、イベントID「1」の差分更新通知の通知先を特定し、セッション情報一覧に登録する。図3に示す例では、イベント送信部13は、ノード情報一覧を参照し、ファイル名「File3」のファイルが作成されるディレクトリのノードID「Nid=1」に対応するアクセス中のセッションID「Sid=1,3」を特定する。そして、イベント送信部13は、セッション情報一覧を参照し、特定した各セッションID「Sid=1,3」に対応する「送信するイベントのエントリ」に「Eid=1」をそれぞれ追加する。   Further, when the file with the file name “File3” is created, the event transmission unit 13 of the master 10A specifies the notification destination of the difference update notification with the event ID “1” and registers it in the session information list. In the example illustrated in FIG. 3, the event transmission unit 13 refers to the node information list, and accesses the session ID “Sid” that corresponds to the node ID “Nid = 1” of the directory in which the file with the file name “File3” is created. = 1, 3 ”. Then, the event transmission unit 13 refers to the session information list and adds “Eid = 1” to “entry of event to be transmitted” corresponding to each identified session ID “Sid = 1, 3”.

このように、マスタ10Aは、ファイル名「File3」のファイルの作成に伴って、作成されたファイルのメタデータを図3〜図5に例示の各種一覧に登録する。その後、イベント送信部13は、ファイルの作成完了をクライアント20Aへ通知する(ステップS609)。   As described above, the master 10A registers the metadata of the created file in the various lists illustrated in FIGS. 3 to 5 along with the creation of the file with the file name “File3”. Thereafter, the event transmission unit 13 notifies the client 20A of completion of file creation (step S609).

そして、イベント送信部13は、各クライアント20に対して死活監視情報を定期的に送信する際に、セッション情報一覧を参照する。そして、イベント送信部13は、「送信するイベントのエントリ」にあるイベント情報(差分更新通知)を、該当するセッションIDで接続されたクライアント20に対して送信する。ここで、図3を用いて、セッションID「1」で接続されたクライアント20(図13のクライアント20B)に定期的な死活監視情報を送信する場合を説明する。この場合、イベント送信部13は、図3に例示のセッション情報一覧を参照し、セッションID「1」に送信するイベントのエントリとして「Eid=1,2,5」を特定する。そして、イベント送信部13は、イベントID「1,2,5」の各イベント情報をイベント一覧から取得する。そして、イベント送信部13は、取得した各イベント情報を死活監視情報に付加して送信する。この結果、ファイル名「File3」のファイルが作成されたことを通知するためのイベントID「1」のイベント情報(差分更新通知)がセッションID「1」で接続されたクライアント通知される(ステップS610)。このように、マスタ10Aは、ファイルの追加に応じて差分更新処理を実行する。   The event transmitting unit 13 refers to the session information list when periodically transmitting alive monitoring information to each client 20. Then, the event transmission unit 13 transmits the event information (difference update notification) in “entry of event to be transmitted” to the client 20 connected with the corresponding session ID. Here, a case where periodic alive monitoring information is transmitted to the client 20 (client 20B in FIG. 13) connected with the session ID “1” will be described with reference to FIG. In this case, the event transmitting unit 13 refers to the session information list illustrated in FIG. 3 and identifies “Eid = 1, 2, 5” as the entry of the event transmitted to the session ID “1”. Then, the event transmission unit 13 acquires each event information of the event ID “1, 2, 5” from the event list. Then, the event transmission unit 13 adds the acquired event information to the alive monitoring information and transmits it. As a result, the event information (difference update notification) of the event ID “1” for notifying that the file with the file name “File3” has been created is notified to the client connected with the session ID “1” (step S610). ). As described above, the master 10A executes the difference update process according to the addition of the file.

次に、ファイルが削除される場合の差分更新処理について説明する。ステップS607に相当する処理として、例えば、クライアント20Aは、ノードID「Nid=3」のディレクトリ配下にあるノードID「Nid=6」のファイルを削除する要求をマスタ10Aに対して送信する。マスタ10Aは、ノードID「Nid=6」のファイルを削除する要求を受信すると、ノードID「Nid=6」のファイルを削除する(ステップS608に相当)。また、マスタ10Aは、ノードID「Nid=6」のファイルを削除するとき、削除されるファイルのメタデータとして、図3〜図5に例示の各種一覧の更新を行う。   Next, a difference update process when a file is deleted will be described. As processing corresponding to step S607, for example, the client 20A transmits to the master 10A a request to delete the file with the node ID “Nid = 6” under the directory with the node ID “Nid = 3”. When receiving the request to delete the file with the node ID “Nid = 6”, the master 10A deletes the file with the node ID “Nid = 6” (corresponding to step S608). Further, when deleting the file with the node ID “Nid = 6”, the master 10 </ b> A updates various lists illustrated in FIGS. 3 to 5 as metadata of the deleted file.

具体的には、マスタ10Aの更新部11は、ノードID「Nid=6」のファイルが削除されると、削除されたファイルのノードIDに対応するレコードを、ノード情報一覧から削除する。図4に示す例では、更新部11は、ノードID「6」、親ノードID「Pid=3」、ノード種別「ファイル」及びアクセス中のセッションID「なし」が対応付けられたレコードをノード情報一覧から削除する。なお、ここでは、説明の便宜上、削除されたファイルにアクセス中のセッションIDが無い場合を例示したが、削除されたノードにアクセス中のセッションIDがある場合も考えられる。このような場合には、マスタ10Aは、セッションIDで接続されたクライアント20に対してアクセスが無効になる旨を通知する処理を別途行っても良い。   Specifically, when the file with the node ID “Nid = 6” is deleted, the update unit 11 of the master 10A deletes the record corresponding to the node ID of the deleted file from the node information list. In the example illustrated in FIG. 4, the update unit 11 sets a node ID “6”, a parent node ID “Pid = 3”, a node type “file”, and a session ID “None” being accessed as node information. Remove from the list. Here, for convenience of explanation, the case where there is no session ID being accessed in the deleted file is illustrated, but there may be a case where there is a session ID being accessed in the deleted node. In such a case, the master 10A may separately perform processing for notifying the client 20 connected with the session ID that access is invalid.

また、マスタ10Aの生成部12は、ノードID「Nid=6」のファイルが削除されると、ファイルが削除されたことを通知するためのイベント情報(差分更新通知)を生成し、イベント一覧に登録する。図5に示す例では、生成部12は、イベント発生元のノードID「Nid=6」と、イベント種別「ファイル削除」と、イベント発生元のセッションID「Sid=3」とを対応付けてイベントID「4」のイベント情報としてイベント一覧に登録する。   Further, when the file with the node ID “Nid = 6” is deleted, the generation unit 12 of the master 10A generates event information (difference update notification) for notifying that the file has been deleted, and displays the event list. sign up. In the example illustrated in FIG. 5, the generation unit 12 associates an event generation source node ID “Nid = 6”, an event type “file deletion”, and an event generation source session ID “Sid = 3” with an event. The event information of ID “4” is registered in the event list.

また、マスタ10Aのイベント送信部13は、ノードID「Nid=6」のファイルが削除されると、イベントID「4」の差分更新通知の通知先を特定し、セッション情報一覧に登録する。図3に示す例では、イベント送信部13は、ノード情報一覧を参照し、ノードID「Nid=6」のファイルが属するディレクトリのノードID「Nid=3」に対応するアクセス中のセッションID「Sid=4」を特定する。そして、イベント送信部13は、セッション情報一覧を参照し、特定したセッションID「Sid=4」に対応する「送信するイベントのエントリ」に「Eid=4」を追加する。   Further, when the file with the node ID “Nid = 6” is deleted, the event transmission unit 13 of the master 10A specifies the notification destination of the difference update notification with the event ID “4” and registers it in the session information list. In the example illustrated in FIG. 3, the event transmission unit 13 refers to the node information list, and accesses the session ID “Sid” being accessed corresponding to the node ID “Nid = 3” of the directory to which the file with the node ID “Nid = 6” belongs. = 4 "is specified. Then, the event transmission unit 13 refers to the session information list and adds “Eid = 4” to “entry of event to be transmitted” corresponding to the identified session ID “Sid = 4”.

このように、マスタ10Aは、ノードID「Nid=6」のファイルの削除に伴って、削除されたファイルのメタデータを図3〜図5に例示の各種一覧に登録する。その後、イベント送信部13は、ファイルの削除完了をクライアント20Aへ通知する(ステップS609に相当)。   As described above, the master 10A registers the metadata of the deleted file in the various lists illustrated in FIGS. 3 to 5 along with the deletion of the file having the node ID “Nid = 6”. Thereafter, the event transmission unit 13 notifies the client 20A of the completion of file deletion (corresponding to step S609).

そして、イベント送信部13は、各クライアント20に対して死活監視情報を定期的に送信する際に、セッション情報一覧を参照する。そして、イベント送信部13は、「送信するイベントのエントリ」にあるイベント情報(差分更新通知)を、該当するセッションIDで接続されたクライアント20に対して送信する。ここで、図3を用いて、セッションID「4」で接続されたクライアント20に定期的な死活監視情報を送信する場合を説明する。この場合、イベント送信部13は、図3に例示のセッション情報一覧を参照し、セッションID「4」に送信するイベントのエントリとして「Eid=3,4,7」を特定する。そして、イベント送信部13は、イベントID「3,4,7」の各イベント情報をイベント一覧から取得する。そして、イベント送信部13は、取得した各イベント情報を死活監視情報に付加して送信する。この結果、ノードID「Nid=6」のファイルが削除されたことを通知するためのイベントID「4」のイベント情報(差分更新通知)がセッションID「4」で接続されたクライアント通知される(ステップS610に相当)。このように、マスタ10Aは、ファイルの削除に応じて差分更新処理を実行する。   The event transmitting unit 13 refers to the session information list when periodically transmitting alive monitoring information to each client 20. Then, the event transmission unit 13 transmits the event information (difference update notification) in “entry of event to be transmitted” to the client 20 connected with the corresponding session ID. Here, a case where periodic alive monitoring information is transmitted to the client 20 connected with the session ID “4” will be described with reference to FIG. 3. In this case, the event transmitting unit 13 refers to the session information list illustrated in FIG. 3 and identifies “Eid = 3, 4, 7” as an entry of the event transmitted to the session ID “4”. Then, the event transmission unit 13 acquires each event information of the event ID “3, 4, 7” from the event list. Then, the event transmission unit 13 adds the acquired event information to the alive monitoring information and transmits it. As a result, event information (difference update notification) of the event ID “4” for notifying that the file with the node ID “Nid = 6” has been deleted is notified to the client connected with the session ID “4” ( Equivalent to step S610). As described above, the master 10A executes the difference update process according to the file deletion.

[クライアントによる処理]
次に、図14〜図18を用いて、第1の実施形態に係るクライアント20による処理を説明する。図14は、第1の実施形態に係るクライアントの定期通信開始処理の処理手順を説明するためのフローチャートである。図15は、第1の実施形態に係るクライアントの定期通信受信処理の処理手順を説明するためのフローチャートである。図16は、第1の実施形態に係るクライアントのイベント処理の処理手順を説明するためのフローチャートである。図17は、第1の実施形態に係るクライアントのディレクトリ情報取得要求発生時の処理手順を説明するためのフローチャートである。図18は、第1の実施形態に係るクライアントのノードの追加・削除要求発生時の処理手順を説明するためのフローチャートである。
[Processing by client]
Next, processing performed by the client 20 according to the first embodiment will be described with reference to FIGS. FIG. 14 is a flowchart for explaining the processing procedure of the periodic communication start processing of the client according to the first embodiment. FIG. 15 is a flowchart for explaining the processing procedure of the regular communication reception processing of the client according to the first embodiment. FIG. 16 is a flowchart for explaining a processing procedure of client event processing according to the first embodiment. FIG. 17 is a flowchart for explaining a processing procedure when a client directory information acquisition request is generated according to the first embodiment. FIG. 18 is a flowchart for explaining a processing procedure when a client node addition / deletion request is generated according to the first embodiment.

まず、図14を用いてクライアントの定期通信開始処理の処理手順を説明する。図14に示すように、クライアント20は、全てのサーバ10A〜10Eへ接続要求を行う(ステップS701)。そして、クライアント20は、マスタ10Aの接続先を受信すると(ステップS702)、マスタ10Aへ受信完了応答を送信する(ステップS703)。   First, the processing procedure of the regular communication start process of the client will be described using FIG. As shown in FIG. 14, the client 20 makes a connection request to all the servers 10A to 10E (step S701). When the client 20 receives the connection destination of the master 10A (step S702), the client 20 transmits a reception completion response to the master 10A (step S703).

続いて、クライアント20は、死活監視タイマをセットし(ステップS704)、定期通信受信処理(後に図13を用いて詳述)を行って(ステップS705)、処理を終了する。   Subsequently, the client 20 sets an alive monitoring timer (step S704), performs a periodic communication reception process (detailed later using FIG. 13) (step S705), and ends the process.

次に、図15を用いてクライアントの定期通信受信処理の処理手順を説明する。図15に示すように、クライアント20は、死活監視タイムアウト前に受信したか判定する(ステップS801)。この結果、クライアント20は、死活監視タイムアウト前に死活監視情報を受信した場合には(ステップS801肯定)、イベント処理(後に図16を用いて詳述)を行って(ステップS802)、マスタ10Aへ受信完了応答を送信し(ステップS803)、死活監視タイマをリセットした後、再度セットして(ステップS804)、ステップS801に戻る。   Next, the processing procedure of the periodic communication reception process of the client will be described using FIG. As shown in FIG. 15, the client 20 determines whether it has been received before the alive monitoring timeout (step S801). As a result, when the alive monitoring information is received before the alive monitoring timeout (Yes at Step S801), the client 20 performs event processing (described later in detail with reference to FIG. 16) (Step S802) to the master 10A. A reception completion response is transmitted (step S803), the alive monitoring timer is reset, then set again (step S804), and the process returns to step S801.

また、ステップS801において、クライアント20は、死活監視タイムアウト前に死活監視情報を受信しなかった場合には(ステップS801否定)、処理を終了する。   In step S801, when the client 20 does not receive the alive monitoring information before the alive monitoring timeout (No in step S801), the client 20 ends the process.

次に、図16を用いてクライアントのイベント処理の処理手順を説明する。図16に示すように、クライアント20は、イベント情報を受信したか否か、すなわち、死活監視情報にイベント情報が付加されているか否かを判定する(ステップS901)。この結果、クライアント20は、イベント情報を受信していない場合には(ステップS901否定)、処理を終了する。一方、クライアント20は、イベント情報を受信した場合には(ステップS901肯定)、受信したイベント情報が以前に受信していないイベント情報であるか否かを判定する(ステップS902)。   Next, a processing procedure of client event processing will be described with reference to FIG. As shown in FIG. 16, the client 20 determines whether or not event information has been received, that is, whether or not event information has been added to life / death monitoring information (step S901). As a result, when the event information has not been received (No at Step S901), the client 20 ends the process. On the other hand, when the event information is received (Yes at Step S901), the client 20 determines whether the received event information is event information that has not been received before (Step S902).

この結果、クライアント20は、以前に受信していないイベント情報ではない、すなわち、以前に受信済みのイベント情報である場合には(ステップS902否定)、処理を終了する。一方、クライアント20は、以前に受信していないイベント情報である場合には(ステップS902肯定)、受信したイベントが差分更新通知であるか否かを判定する(ステップS903)。   As a result, if the event information is not event information that has not been received before, that is, event information that has been received previously (No at step S902), the client 20 ends the processing. On the other hand, if the event information has not been received before (Yes at step S902), the client 20 determines whether the received event is a difference update notification (step S903).

この結果、クライアント20は、差分更新通知である場合には(ステップS903肯定)、ディレクトリキャッシュを差分更新し(ステップS904)、ステップS905の処理へ移行する。一方、クライアント20は、差分更新通知でない場合には(ステップS903否定)、ステップS904の処理を実行することなくステップS905の処理へ移行する。   As a result, when it is a difference update notification (Yes at step S903), the client 20 updates the directory cache by difference (step S904), and proceeds to the process of step S905. On the other hand, if it is not the difference update notification (No at Step S903), the client 20 proceeds to the process at Step S905 without executing the process at Step S904.

続いて、クライアント20は、受信したイベント情報がアプリケーションに通知するイベント情報であるか否かを判定する(ステップS905)。この結果、クライアント20は、アプリケーションに通知するイベント情報である場合には(ステップS905肯定)、アプリケーション22にイベント情報を通知して(ステップS906)、処理を終了する。一方、クライアント20は、アプリケーションに通知するイベント情報ではない場合には(ステップS905否定)、ステップS906の処理を実行することなく処理を終了する。   Subsequently, the client 20 determines whether or not the received event information is event information notified to the application (step S905). As a result, when the event information is to be notified to the application (Yes at Step S905), the client 20 notifies the application 22 of the event information (Step S906) and ends the processing. On the other hand, if the event information is not to be notified to the application (No at Step S905), the client 20 ends the process without executing the process at Step S906.

次に、図17を用いてクライアントのディレクトリ情報取得要求発生時の処理手順を説明する。図17に示すように、クライアント20は、ディレクトリ情報取得要求がアプリケーションから発生すると(ステップS1001肯定)、ディレクトリキャッシュを保持しているか否かを判定する(ステップS1002)。この結果、クライアント20は、ディレクトリキャッシュを保持している場合には(ステップS1002肯定)、保持しているディレクトリキャッシュを読み込んでアプリケーションへ返却する(ステップS1003)。なお、クライアント20は、ディレクトリ情報取得要求がアプリケーションから発生するまで(ステップS1001否定)、処理を開始しない。   Next, a processing procedure when a client directory information acquisition request is generated will be described with reference to FIG. As shown in FIG. 17, when a directory information acquisition request is generated from an application (Yes at Step S1001), the client 20 determines whether or not the directory cache is held (Step S1002). As a result, when the directory cache is held (Yes at Step S1002), the client 20 reads the held directory cache and returns it to the application (Step S1003). The client 20 does not start the process until a directory information acquisition request is issued from the application (No at step S1001).

一方、クライアント20は、ディレクトリキャッシュを保持していない場合には(ステップS1002否定)、発生したディレクトリ情報取得要求をマスタ10Aへ送信する(ステップS1004)。そして、クライアント20は、送信したディレクトリ情報取得要求に対応するディレクトリ情報をマスタ10Aから受信すると(ステップS1005)、該ディレクトリ情報をディレクトリキャッシュとしてキャッシュ記憶部21cに格納する(ステップS1006)。   On the other hand, if the client 20 does not hold the directory cache (No at Step S1002), the client 20 transmits the generated directory information acquisition request to the master 10A (Step S1004). When the client 20 receives the directory information corresponding to the transmitted directory information acquisition request from the master 10A (step S1005), the client 20 stores the directory information as a directory cache in the cache storage unit 21c (step S1006).

次に、図18を用いてクライアントのノードの追加・削除要求発生時の処理手順を説明する。図18に示すように、クライアント20は、ノードの追加又は削除を行う旨の追加・削除要求がアプリケーションから発生すると(ステップS1101肯定)、ノードの追加・削除要求をマスタ10Aへ送信する(ステップS1102)。そして、クライアント20は、マスタ10Aがノードの追加又は削除を行うと、ノードの追加又は削除を行った旨の応答をマスタ10Aから受信し(ステップS1103)、処理を終了する。なお、クライアント20は、ノードの追加又は削除を行う旨の追加・削除要求がアプリケーションから発生するまで(ステップS1101否定)、処理を開始しない。   Next, a processing procedure when a client node addition / deletion request is generated will be described with reference to FIG. As illustrated in FIG. 18, when an addition / deletion request for adding or deleting a node is generated from the application (Yes in step S1101), the client 20 transmits a node addition / deletion request to the master 10A (step S1102). ). Then, when the master 10A adds or deletes a node, the client 20 receives a response indicating that the node has been added or deleted from the master 10A (step S1103), and ends the process. The client 20 does not start the processing until an addition / deletion request for adding or deleting a node is issued from the application (No at Step S1101).

なお、クライアントのノードの追加・削除要求発生時の処理手順は、上記の例に限定されるものではない。例えば、クライアント20は、ノードの追加を行った際に、追加したノードの親ノードIDに対応するノードのディレクトリキャッシュを保持していれば、マスタ10Aからの差分更新通知を待つことなく、追加したノードのディレクトリ情報を該ディレクトリキャッシュに追加しても良い。また、クライアント20は、ノードの削除を行った際に、削除したノードのディレクトリキャッシュを保持していれば、マスタ10Aからの差分更新通知を待つことなく、削除したノードのディレクトリ情報を該ディレクトリキャッシュから削除しても良い。   The processing procedure when a client node addition / deletion request is generated is not limited to the above example. For example, when adding a node, if the client 20 holds the directory cache of the node corresponding to the parent node ID of the added node, the client 20 adds the node without waiting for a difference update notification from the master 10A. Node directory information may be added to the directory cache. If the client 20 holds the directory cache of the deleted node when the node is deleted, the directory information of the deleted node is stored in the directory cache without waiting for a differential update notification from the master 10A. You may delete from.

[死活監視装置による処理]
次に、図19及び図20を用いて、第1の実施形態に係る死活監視装置による処理を説明する。図19は、第1の実施形態に係る死活監視装置10におけるイベント配信処理の処理手順を説明するためのフローチャートである。図20は、第1の実施形態に係る死活監視装置10における差分更新処理の処理手順を説明するためのフローチャートである。
[Processing by life and death monitoring device]
Next, processing by the life and death monitoring apparatus according to the first embodiment will be described with reference to FIGS. 19 and 20. FIG. 19 is a flowchart for explaining a processing procedure of event distribution processing in the alive monitoring apparatus 10 according to the first embodiment. FIG. 20 is a flowchart for explaining the processing procedure of the difference update processing in the life and death monitoring apparatus 10 according to the first embodiment.

まず、図19を用いて第1の実施形態に係る死活監視装置10におけるイベント配信処理の処理手順を説明する。図19に示すように、マスタ10Aは、イベントが発生すると、イベント情報を登録し(ステップS1201)、レプリカ10B〜10Eへイベント情報の複製を通知する(ステップS1202)。そして、マスタ10Aは、クライアント20へイベント情報を送信し(ステップS1203)、クライアントから最新受信完了イベントIDを含むイベント受信完了応答を受信する(ステップS1204)。そして、マスタ10Aは、イベント受信完了応答に含まれる最新受信完了イベントIDを登録する(ステップS1205)。   First, the procedure of the event distribution process in the alive monitoring apparatus 10 according to the first embodiment will be described with reference to FIG. As shown in FIG. 19, when an event occurs, the master 10A registers event information (step S1201), and notifies the replicas 10B to 10E of replication of the event information (step S1202). Then, the master 10A transmits event information to the client 20 (step S1203), and receives an event reception completion response including the latest reception completion event ID from the client (step S1204). Then, the master 10A registers the latest reception completion event ID included in the event reception completion response (step S1205).

続いて、マスタ10Aは、イベント受信完了応答に含まれる最新受信完了イベントIDを複製して、レプリカ10B〜10Eへ通知する(ステップS1206)。その後、マスタ10Aは、イベント情報を送信したクライアント全てから応答があったか判定する(ステップS1207)。この結果、マスタ10Aは、イベント情報を送信したクライアント全てから応答がなかった場合(ステップS1207否定)、処理を終了する。   Subsequently, the master 10A duplicates the latest reception completion event ID included in the event reception completion response and notifies the replicas 10B to 10E (step S1206). Thereafter, the master 10A determines whether there is a response from all the clients that transmitted the event information (step S1207). As a result, when there is no response from all the clients that transmitted the event information (No at Step S1207), the master 10A ends the process.

また、マスタ10Aは、イベント情報を送信したクライアント全てから応答があった場合(ステップS1207肯定)、イベント情報を削除し(ステップS1208)、レプリカ10B〜10Eへイベント情報削除を複製させて(ステップS1209)、処理を終了する。   Further, when there is a response from all the clients that transmitted the event information (Yes at Step S1207), the master 10A deletes the event information (Step S1208), and replicates the event information deletion to the replicas 10B to 10E (Step S1209). ), The process is terminated.

次に、図20を用いて第1の実施形態に係る死活監視装置10における差分更新処理の処理手順を説明する。図20に示すように、マスタ10Aは、ノードの追加・削除要求をクライアント20から受信すると(ステップS1301肯定)、ノードの追加・削除要求に基づいて、データベース30Aを更新する(ステップS1302)。そして、マスタ10Aは、ノードの追加・削除要求の送信元のクライアント20へ追加・削除完了の旨の応答を送信する(ステップS1303)。   Next, a processing procedure of difference update processing in the life and death monitoring apparatus 10 according to the first embodiment will be described with reference to FIG. As illustrated in FIG. 20, when the master 10A receives a node addition / deletion request from the client 20 (Yes in step S1301), the master 10A updates the database 30A based on the node addition / deletion request (step S1302). Then, the master 10A transmits a response indicating completion of addition / deletion to the client 20 that is the transmission source of the node addition / deletion request (step S1303).

また、マスタ10Aは、ノードの追加・削除要求に基づいて、データベース30Aを更新すると、更新したノードの差分更新通知を生成し(ステップS1304)、これをイベント情報としてイベント一覧に登録する。すなわち、マスタ10Aは、図19のステップS1201及びステップS1202に示したように、差分更新通知をイベント情報として登録し、登録したイベント情報の複製をレプリカ10B〜10Eへ通知する。例えば、マスタ10Aは、セッションID「2」のセッションで接続されるクライアントからノードID「2」のファイルを追加する旨の追加要求を受信した場合には、イベント発生元のノードID「Nid=2」と、イベント種別「ファイル追加」と、イベント発生元のセッションID「Sid=2」とを対応付けてイベントID「1」のイベントとしてイベント一覧に登録する。   Further, when the master 10A updates the database 30A based on the node addition / deletion request, the master 10A generates a difference update notification of the updated node (step S1304), and registers this as event information in the event list. That is, as shown in steps S1201 and S1202 of FIG. 19, the master 10A registers the difference update notification as event information, and notifies the replicas 10B to 10E of a copy of the registered event information. For example, when the master 10A receives an addition request for adding the file with the node ID “2” from the client connected in the session with the session ID “2”, the node ID “Nid = 2” of the event occurrence source. ”, The event type“ add file ”, and the session ID“ Sid = 2 ”of the event occurrence source are associated with each other and registered in the event list as an event with the event ID“ 1 ”.

そして、マスタ10Aは、差分更新通知の通知先となる通知先クライアントの一覧を取得する(ステップS1305)。例えば、マスタ10Aは、ノード情報一覧を参照し、イベント発生元のノードID「Nid=2」の親ノードID「Pid=1」のノードにアクセス中のセッションID「Sid=1,3」を取得する。そして、マスタ10Aは、セッション情報一覧を参照し、取得した各セッションID「Sid=1,3」に対応する「送信するイベントのエントリ」に「Eid=1」をそれぞれ追加する。   Then, the master 10A acquires a list of notification destination clients that are notification destinations of the difference update notification (step S1305). For example, the master 10A refers to the node information list and acquires the session ID “Sid = 1, 3” that is accessing the node with the parent node ID “Pid = 1” of the node ID “Nid = 2” of the event generation source. To do. Then, the master 10A refers to the session information list and adds “Eid = 1” to “entry of event to be transmitted” corresponding to each acquired session ID “Sid = 1, 3”.

そして、マスタ10Aは、通知先クライアントへ差分更新通知をイベント情報として送信する(ステップS1306)。すなわち、マスタ10Aは、図19のステップS1203〜ステップS1209に示したように、差分更新通知をイベント情報として各クライアントへ送信し、応答を受信する。例えば、マスタ10Aは、IPアドレス「10.0.0.1」及び「10.0.1.4」の各クライアントに差分更新通知を送信し、送信先の全てのクライアントから応答を受信すると、イベントID「1」のイベント情報(差分更新通知)を削除する。   Then, the master 10A transmits a difference update notification to the notification destination client as event information (step S1306). That is, as shown in steps S1203 to S1209 in FIG. 19, the master 10A transmits a difference update notification as event information to each client and receives a response. For example, when the master 10A transmits a difference update notification to each of the clients with the IP addresses “10.0.0.1” and “10.0.1.4” and receives responses from all the destination clients, The event information with event ID “1” (difference update notification) is deleted.

[第1の実施形態の効果]
第1の実施形態に係るクライアント20は、複数のサーバのうちの一つのサーバであるマスタサーバに記憶されたデータのキャッシュを記憶する。クライアント20は、前記マスタサーバに記憶されたデータが更新された場合に、更新後のデータと更新前のデータとの間の差分を更新する旨の差分更新通知と、当該差分更新通知の送信を完了したか否かを示す送信完了情報との同期処理が前記マスタサーバによって行われた前記複数のサーバのうち、当該マスタサーバ、又は、当該マスタサーバ以外のレプリカサーバのなかから選択された新たなマスタサーバから、前記差分更新通知を受信する。クライアント20は、受信された差分更新通知を用いて、前記キャッシュを更新する。このため、クライアント20は、キャッシュの更新に要する通信負荷を軽減することができる。例えば、死活監視装置10は、ディレクトリキャッシュに対して追加・削除を行うノードのみを差分更新するため、キャッシュの更新に要する通信負荷を軽減することができ、ディレクトリ情報の更新を高速に行うことができる。
[Effect of the first embodiment]
The client 20 according to the first embodiment stores a cache of data stored in a master server that is one of a plurality of servers. When the data stored in the master server is updated, the client 20 transmits a difference update notification for updating the difference between the updated data and the data before the update, and transmission of the difference update notification. A new process selected from the master server or a replica server other than the master server among the plurality of servers in which the synchronization processing with the transmission completion information indicating whether or not the master server has been completed is performed. The difference update notification is received from the master server. The client 20 updates the cache using the received difference update notification. For this reason, the client 20 can reduce the communication load required for updating the cache. For example, since the alive monitoring apparatus 10 performs differential update only on the nodes that are added to or deleted from the directory cache, the communication load required for cache update can be reduced, and directory information can be updated at high speed. it can.

ここで、図21を用いて第1の実施形態に係る死活監視システムの効果を説明する。図21は、第1の実施形態に係る死活監視システムの効果を説明するための図である。図21には、死活監視の対象となる3台のクライアント20A〜20C(計算機1〜3)が死活監視装置10に接続されており、4台目のクライアント20D(計算機4)が追加された場合の差分更新処理を例示する。なお、図21において、クライアント20A〜20D(計算機1〜4)の名称は、それぞれ「m1〜m4」であるものとする。   Here, the effect of the life and death monitoring system according to the first embodiment will be described with reference to FIG. FIG. 21 is a diagram for explaining the effect of the life and death monitoring system according to the first embodiment. In FIG. 21, three clients 20A to 20C (computers 1 to 3) that are targets of alive monitoring are connected to the alive monitoring apparatus 10, and a fourth client 20D (computer 4) is added. The difference update process is illustrated. In FIG. 21, it is assumed that the names of the clients 20A to 20D (computers 1 to 4) are “m1 to m4”, respectively.

図21の左側には、4台目のクライアント20Dが追加される前の死活監視システムの状態を示す。この場合、死活監視装置10は、5台のサーバで構成され、各クライアント20A〜20Cと接続されている。このとき、死活監視装置10は、接続されている各クライアント20A〜20C(計算機1〜3)の名前のファイル名「m1,m2,m3」のファイルをそれぞれ作成し、ディレクトリ名「mDir」のディレクトリ配下に保持している。また、各クライアント20A〜20Cは、ディレクトリ名「mDir」のディレクトリを監視しており、ディレクトリ名「mDir」のキャッシュとしてファイル名「m1,m2,m3」をそれぞれ保持している。また、死活監視装置10は、各クライアント20A〜20Cがディレクトリ名「mDir」のキャッシュを保持している旨の情報を記憶している。   The left side of FIG. 21 shows the state of the alive monitoring system before the fourth client 20D is added. In this case, the life and death monitoring apparatus 10 is composed of five servers and is connected to the clients 20A to 20C. At this time, the alive monitoring apparatus 10 creates files with the file names “m1, m2, m3” having the names of the connected clients 20A to 20C (computers 1 to 3), and the directory with the directory name “mDir”. I hold it under me. Each of the clients 20A to 20C monitors the directory with the directory name “mDir”, and holds the file names “m1, m2, and m3” as caches of the directory name “mDir”. In addition, the alive monitoring apparatus 10 stores information indicating that each of the clients 20A to 20C holds a cache of the directory name “mDir”.

ここで、4台目のクライアント20D(計算機)が死活監視の対象として死活監視装置10に接続されると、クライアント20Dは、死活監視装置10のディレクトリ名「mDir」のディレクトリ配下に自装置を示すファイル名「m4」のファイルを作成する要求を送信し(1.ファイル追加)、これを追加する(2.ファイル追加)。ここで、従来の技術では、各クライアント20A〜20Cが追加前に保持していたキャッシュを削除してから、追加後のディレクトリ情報であるファイル名「m1,m2,m3,m4」を再受信するので、通信負荷が大きかった。すなわち、各クライアント20A〜20Cは、ファイル追加の前後で変化のないファイル名「m1,m2,m3」についても再受信していたので、通信負荷が大きかった。   Here, when the fourth client 20D (computer) is connected to the alive monitoring device 10 as the alive monitoring target, the client 20D indicates the own device under the directory with the directory name “mDir” of the alive monitoring device 10. A request to create a file with the file name “m4” is transmitted (1. file addition), and this is added (2. file addition). Here, in the prior art, after deleting the cache held by each of the clients 20A to 20C before the addition, the file names “m1, m2, m3, m4” which are the directory information after the addition are received again. So the communication load was large. That is, each of the clients 20A to 20C re-receives the file names “m1, m2, and m3” that have not changed before and after the addition of the file, so that the communication load is large.

これに対して、第1の実施形態に係る死活監視装置10は、このファイル名「m4」のファイルの追加を契機として、各クライアント20が保持するキャッシュにファイル名「m4」を追加する旨の差分更新通知を行う。具体的には、死活監視装置10は、追加されたファイル名「m4」の親のディレクトリ名「mDir」のディレクトリ情報を保持するクライアント20A〜20Cを通知先クライアントとして特定する(3.差分通知準備)。そして、死活監視装置10は、特定した各クライアント20A〜20Cに対してファイル名「m4」を追加する旨の差分更新通知を送信する(4.更新情報通知)。このように、第1の実施形態に係る死活監視システムは、各クライアント20A〜20Cに対してファイル名「m1,m2,m3,m4」を通知するのではなく、新たに追加されたファイル名「m4」のみを通知することができるので、キャッシュの更新に要する通信負荷を軽減することができる。   In contrast, the alive monitoring apparatus 10 according to the first embodiment adds the file name “m4” to the cache held by each client 20 when the file with the file name “m4” is added. Perform differential update notification. Specifically, the alive monitoring apparatus 10 identifies the clients 20A to 20C that hold the directory information of the parent directory name “mDir” of the added file name “m4” as notification destination clients (3. Preparation for difference notification) ). Then, the alive monitoring apparatus 10 transmits a difference update notification indicating that the file name “m4” is added to each of the identified clients 20A to 20C (4. update information notification). As described above, the life and death monitoring system according to the first embodiment does not notify each of the clients 20A to 20C of the file name “m1, m2, m3, m4”, but newly added the file name “ Since only “m4” can be notified, the communication load required to update the cache can be reduced.

更に具体例を挙げて説明する。例えば、サーバにおいて、ディレクトリ名「mDir」のディレクトリ配下に10000個のファイルが管理されている状況で、サーバ側に1個のファイルが追加された場合を説明する。この場合、従来技術では、10001個のファイル名が各クライアント20に再通知されていた。これに対して、第1の実施形態に係る死活監視装置10は、追加された1個のファイル名のみを各クライアント20に通知する。このため、第1の実施形態に係る死活監視装置10は、キャッシュの更新に要する通信負荷を軽減することができる。   Furthermore, a specific example is given and demonstrated. For example, a case will be described in which one file is added to the server side in a situation where 10,000 files are managed under the directory with the directory name “mDir” in the server. In this case, according to the prior art, 10001 file names are notified to each client 20 again. In contrast, the alive monitoring apparatus 10 according to the first embodiment notifies each client 20 of only one added file name. For this reason, the alive monitoring apparatus 10 according to the first embodiment can reduce the communication load required for updating the cache.

また、従来技術では、例えば、差分更新通知が発生した後に、マスタ10Aに故障が発生した場合には、一部のクライアント20に対して差分更新通知が欠送してしまう恐れがあった。すなわち、従来技術では、キャッシュの維持が担保されなかったため、分散システムに対してキャッシュの差分更新技術を実装することができなかった。これに対して、第1の実施形態に係る死活監視装置10は、欠送防止処理を行うことによって差分更新通知の欠送を防止しているので、故障が発生しても差分更新通知が欠送することを防止することができる。すなわち、死活監視装置10は、フェイルオーバの前後でもキャッシュの維持が担保されるため、分散システムに対してキャッシュの差分更新技術を実装することが可能となった。   Further, in the related art, for example, if a failure occurs in the master 10A after the difference update notification is generated, the difference update notification may be missed to some clients 20. That is, in the conventional technique, since the maintenance of the cache is not secured, the cache differential update technique cannot be implemented in the distributed system. In contrast, the life and death monitoring apparatus 10 according to the first embodiment prevents the difference update notification from being missed by performing the missed sending prevention process. Therefore, even if a failure occurs, the difference update notification is missing. Sending can be prevented. In other words, the alive monitoring device 10 can maintain the cache even before and after the failover, so that it is possible to implement the cache differential update technology for the distributed system.

[第2の実施形態]
上記の第1の実施形態では、ディレクトリキャッシュが差分更新される場合を説明したが、実施形態はこれに限定されるものではない。例えば、実施形態は、マスタ10Aから取得されたファイルのキャッシュが差分更新される場合に適用されても良い。そこで、第2の実施形態では、マスタ10Aから取得されたファイルのキャッシュが差分更新される場合を説明する。
[Second Embodiment]
In the first embodiment described above, the case where the directory cache is differentially updated has been described, but the embodiment is not limited to this. For example, the embodiment may be applied to the case where the cache of the file acquired from the master 10A is differentially updated. Therefore, in the second embodiment, a case will be described in which the cache of the file acquired from the master 10A is differentially updated.

第2の実施形態に係る死活監視システム1は、図2に示した死活監視システム1と比較して、基本的に同様の機能構成を有し、クライアント20がディレクトリ情報ではなくファイル等のデータをキャッシュデータとして保持する点が相違する。以下、この相違点について中心的に説明することとする。   The life and death monitoring system 1 according to the second embodiment has basically the same functional configuration as the life and death monitoring system 1 shown in FIG. 2, and the client 20 receives data such as files instead of directory information. It is different in that it is held as cache data. Hereinafter, this difference will be mainly described.

図22を用いて、第2の実施形態に係る死活監視システム1による差分更新処理の流れを説明する。図22は、第2の実施形態に係る死活監視システム1による差分更新処理の流れを示すシーケンス図である。図22には、クライアント20Bがマスタ10Aに記憶されたファイル名「FileA」のキャッシュを取得した場合を説明する。そして、クライアント20Aによるファイル名「FileA」の内容の更新に応じて、キャッシュが差分更新される場合を例示する。   The flow of the difference update process by the alive monitoring system 1 according to the second embodiment will be described with reference to FIG. FIG. 22 is a sequence diagram illustrating a flow of difference update processing by the alive monitoring system 1 according to the second embodiment. FIG. 22 illustrates a case where the client 20B obtains a cache of the file name “FileA” stored in the master 10A. Then, the case where the cache is differentially updated in accordance with the update of the content of the file name “FileA” by the client 20A is illustrated.

図22に示すように、クライアント20Bは、アプリケーション22からファイル名「FileA」のファイルを取得するための取得要求が発生すると(ステップS1401)、マスタ10Aへ「FileA」の取得要求を送信する(ステップS1402)。クライアント20Bは、送信した取得要求に対応するファイルの内容をマスタ10Aから受信すると(ステップS1403)、ファイルのキャッシュを格納する(ステップS1404)。この結果、クライアント20Bは、ファイル名「FileA」のファイルのキャッシュを取得する。なお、クライアント20Bが取得したファイル名「FileA」の内容は、例えば、「Line1 aaa,Line2 bbb」である。   As shown in FIG. 22, when an acquisition request for acquiring a file with the file name “FileA” is generated from the application 22 (step S1401), the client 20B transmits an acquisition request for “FileA” to the master 10A (step S1401). S1402). Upon receiving the contents of the file corresponding to the acquired acquisition request from the master 10A (step S1403), the client 20B stores the file cache (step S1404). As a result, the client 20B acquires the cache of the file with the file name “FileA”. The contents of the file name “FileA” acquired by the client 20B are, for example, “Line1 aaa, Line2 bbb”.

これ以降、クライアント20Bは、アプリケーション22からファイル名「FileA」のファイルを取得するための取得要求が発生するごとに(ステップS1405)、取得済みのキャッシュを読み込んで(ステップS1406)、これを利用する。   Thereafter, every time an acquisition request for acquiring the file with the file name “FileA” is generated from the application 22 (step S1405), the client 20B reads the acquired cache (step S1406) and uses it. .

ここで、クライアント20Aがファイル名「FileA」のファイルを更新する旨の更新要求をマスタ10Aに対して送信すると(ステップS1407)、マスタ10Aは、ファイル名「FileA」のファイルを更新する。例えば、マスタ10Aは、ファイル名「FileA」のファイル更新要求を受信すると、ファイル名「FileA」のファイルを更新する(ステップS1408)。例えば、マスタ10Aは、ファイル名「FileA」のファイルの内容を「Line1 aaa,Line2 bbb,Line3 ccc」に変更する旨の更新要求であれば、データベース30Aに記憶された更新前のファイル名「FileA」のファイルの内容を生成部12へ通知する。そして、マスタ10Aは、更新要求で指定されたファイルの内容を生成部12へ通知するとともに、データベース30Aに記憶されたファイル名「FileA」のファイルを更新要求にしたがって上書きする(更新)。そして、マスタ10Aは、ファイル名「FileA」のファイルを更新すると、ファイルの更新完了をクライアント20Aへ通知する(ステップS1409)。   When the client 20A transmits an update request for updating the file with the file name “FileA” to the master 10A (step S1407), the master 10A updates the file with the file name “FileA”. For example, when receiving the file update request with the file name “FileA”, the master 10A updates the file with the file name “FileA” (step S1408). For example, if the master 10A is an update request to change the contents of the file with the file name “FileA” to “Line1 aaa, Line2 bbb, Line3 ccc”, the file name “FileA” before update stored in the database 30A. ”Is notified to the generation unit 12. Then, the master 10A notifies the generation unit 12 of the contents of the file specified by the update request, and overwrites the file with the file name “FileA” stored in the database 30A according to the update request (update). When the master 10A updates the file with the file name “FileA”, the master 10A notifies the client 20A of the completion of the file update (step S1409).

マスタ10Aは、ファイル名「FileA」のファイルを更新すると、ファイル名「FileA」のファイルを更新するための差分更新通知を生成する。具体的には、マスタ10Aの生成部12は、更新前のファイル名「FileA」の内容と、更新後のファイル名「FileA」の内容とを比較する。そして、マスタ10Aの生成部12は、更新前のファイル名「FileA」の内容の「Line2 bbb」の次に「Line3 ccc」を挿入する旨の差分更新通知を生成する。そして、マスタ10Aは、生成した差分更新通知を、キャッシュを保持するクライアント20Bに送信する(ステップS1410)。この結果、クライアント20Bは、キャッシュのファイル名「FileA」の内容を更新し(ステップS1411)、キャッシュデータ内の「Line2 bbb」の次に「Line3 ccc」を挿入する。そして、クライアント20Bは、更新完了通知をマスタ10Aへ送信する(ステップS1412)。   When the master 10A updates the file with the file name “FileA”, the master 10A generates a difference update notification for updating the file with the file name “FileA”. Specifically, the generation unit 12 of the master 10A compares the contents of the file name “FileA” before the update with the contents of the file name “FileA” after the update. Then, the generation unit 12 of the master 10A generates a difference update notification indicating that “Line3 ccc” is inserted after “Line2 bbb” of the content of the file name “FileA” before the update. Then, the master 10A transmits the generated difference update notification to the client 20B that holds the cache (step S1410). As a result, the client 20B updates the contents of the file name “FileA” in the cache (step S1411), and inserts “Line3 ccc” after “Line2 bbb” in the cache data. Then, the client 20B transmits an update completion notification to the master 10A (step S1412).

これ以降、クライアント20Bは、アプリケーション22からファイル名「FileA」のファイルを取得するための取得要求が発生するごとに(ステップS1413)、更新済みのキャッシュを読み込んで(ステップS1414)、これを利用する。   Thereafter, every time an acquisition request for acquiring a file with the file name “FileA” is generated from the application 22 (step S1413), the client 20B reads the updated cache (step S1414) and uses it. .

このように、第2の実施形態によれば、死活監視システム1は、マスタ10Aから取得されたファイルのキャッシュを差分更新することもできる。このため、死活監視システムは、キャッシュの更新に要する通信負荷を軽減することが期待される。   Thus, according to the second embodiment, the alive monitoring system 1 can also update the cache of the file acquired from the master 10A by difference. For this reason, the alive monitoring system is expected to reduce the communication load required for updating the cache.

[第3の実施形態]
さて、これまで本発明の実施形態について説明したが、本発明は上述した実施形態以外にも、種々の異なる形態にて実施されてよいものである。そこで、以下では第3の実施形態として本発明に含まれる他の実施形態を説明する。
[Third Embodiment]
Although the embodiments of the present invention have been described so far, the present invention may be implemented in various different forms other than the above-described embodiments. Therefore, another embodiment included in the present invention will be described below as a third embodiment.

例えば、上記の実施形態では、クライアント20がマスタ10Aから受信した差分更新通知に基づいてキャッシュの差分更新を行う場合を説明したが、実施形態はこれに限定されるものではない。例えば、ノードの追加・削除要求を送信したクライアント20がキャッシュを保持していれば、マスタ10Aからの差分更新通知を待つことなくキャッシュの差分更新を行っても良い。   For example, in the above-described embodiment, the case where the client 20 performs the cache difference update based on the difference update notification received from the master 10A has been described, but the embodiment is not limited thereto. For example, if the client 20 that transmitted a node addition / deletion request holds a cache, the cache difference may be updated without waiting for a difference update notification from the master 10A.

図23を用いて第3の実施形態に係るクライアント20のノードの追加・削除要求発生時の処理手順を説明する。図23は、第3の実施形態に係るクライアントのノードの追加・削除要求発生時の処理手順を説明するためのフローチャートである。   A processing procedure when a node addition / deletion request is generated in the client 20 according to the third embodiment will be described with reference to FIG. FIG. 23 is a flowchart for explaining a processing procedure when a client node addition / deletion request is generated according to the third embodiment.

図23に示すように、クライアント20は、ノードの追加又は削除を行う旨の追加・削除要求がアプリケーション22から発生すると(ステップS1501肯定)、ノードの追加・削除要求をマスタ10Aへ送信する(ステップS1502)。そして、クライアント20は、マスタ10Aがノードの追加又は削除を行うと、ノードの追加又は削除を行った旨の応答をマスタ10Aから受信する(ステップS1503)。なお、クライアント20は、ノードの追加又は削除を行う旨の追加・削除要求がアプリケーション22から発生するまで(ステップS1101否定)、処理を開始しない。   As shown in FIG. 23, when an addition / deletion request for adding or deleting a node is generated from the application 22 (Yes in step S1501), the client 20 transmits a node addition / deletion request to the master 10A (step S1501). S1502). Then, when the master 10A adds or deletes a node, the client 20 receives a response indicating that the node has been added or deleted from the master 10A (step S1503). Note that the client 20 does not start processing until an addition / deletion request for adding or deleting a node is issued from the application 22 (No in step S1101).

そして、クライアント20は、追加・削除したノードを含むキャッシュを保持しているか判定する(ステップS1504)。クライアント20は、キャッシュを保持している場合には(ステップS1504肯定)、追加・削除要求に基づいて、保持しているキャッシュに対してノードの追加・削除を行う差分更新を実行し(ステップS1505)、処理を終了する。なお、クライアント20は、キャッシュを保持していない場合には(ステップS1504否定)、処理を終了する。   Then, the client 20 determines whether or not it holds a cache including the added / deleted node (step S1504). If the cache is held (Yes at step S1504), the client 20 executes a differential update for adding / deleting a node to / from the held cache based on the addition / deletion request (step S1505). ), The process is terminated. If the client 20 does not hold the cache (No at step S1504), the process is terminated.

このように、ノードの追加・削除要求を送信したクライアント20がキャッシュを保持していれば、クライアント20は、マスタ10Aからの差分更新通知を待つことなくキャッシュの差分更新を行うことができる。   As described above, if the client 20 that has transmitted the node addition / deletion request holds the cache, the client 20 can update the cache difference without waiting for the difference update notification from the master 10A.

また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。例えば、イベント送信部13と送信未完了イベント送信部16を統合してもよい。さらに、各装置にて行なわれる各処理機能は、その全部または任意の一部が、CPUおよび当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。   Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, the event transmission unit 13 and the transmission incomplete event transmission unit 16 may be integrated. Further, all or any part of each processing function performed in each device may be realized by a CPU and a program analyzed and executed by the CPU, or may be realized as hardware by wired logic.

また、本実施例において説明した各処理のうち、自動的におこなわれるものとして説明した処理の全部または一部を手動的におこなうこともでき、あるいは、手動的におこなわれるものとして説明した処理の全部または一部を公知の方法で自動的におこなうこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。   In addition, among the processes described in this embodiment, all or part of the processes described as being performed automatically can be performed manually, or the processes described as being performed manually can be performed. All or a part can be automatically performed by a known method. In addition, the processing procedure, control procedure, specific name, and information including various data and parameters shown in the above-described document and drawings can be arbitrarily changed unless otherwise specified.

また、上記実施形態において説明した死活監視装置10が実行する処理をコンピュータが実行可能な言語で記述したプログラムを作成することもできる。例えば、実施例1に係る死活監視装置10が実行する処理をコンピュータが実行可能な言語で記述した差分更新プログラムを作成することもできる。この場合、コンピュータが差分更新プログラムを実行することにより、上記実施形態と同様の効果を得ることができる。さらに、かかる差分更新プログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録された差分更新プログラムをコンピュータに読み込ませて実行することにより上記第一の実施形態と同様の処理を実現してもよい。以下に、図2に示した死活監視装置10と同様の機能を実現する差分更新プログラムを実行するコンピュータの一例を説明する。   Moreover, the program which described the process which the life-and-death monitoring apparatus 10 demonstrated in the said embodiment performed in the language which a computer can execute can also be created. For example, a difference update program in which processing executed by the life and death monitoring apparatus 10 according to the first embodiment is described in a language that can be executed by a computer can be created. In this case, when the computer executes the difference update program, the same effect as in the above embodiment can be obtained. Further, by recording such a differential update program on a computer-readable recording medium, and reading the differential update program recorded on this recording medium into a computer and executing it, the same processing as in the first embodiment is realized. May be. Below, an example of the computer which performs the difference update program which implement | achieves the function similar to the alive monitoring apparatus 10 shown in FIG. 2 is demonstrated.

図24は、差分更新プログラムを実行するコンピュータ1000を示す図である。図24に例示するように、コンピュータ1000は、例えば、メモリ1010と、CPU1020と、ハードディスクドライブインタフェース1030と、ディスクドライブインタフェース1040と、ネットワークインタフェース1070とを有し、これらの各部はバス1080によって接続される。   FIG. 24 is a diagram illustrating a computer 1000 that executes a differential update program. As illustrated in FIG. 24, the computer 1000 includes, for example, a memory 1010, a CPU 1020, a hard disk drive interface 1030, a disk drive interface 1040, and a network interface 1070. These units are connected by a bus 1080. The

メモリ1010は、図24に例示するように、ROM(Read Only Memory)1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、図24に例示するように、ハードディスクドライブ1031に接続される。ディスクドライブインタフェース1040は、図24に例示するように、ディスクドライブ1041に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブに挿入される。   The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012 as illustrated in FIG. The ROM 1011 stores a boot program such as BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1031 as illustrated in FIG. The disk drive interface 1040 is connected to the disk drive 1041 as illustrated in FIG. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive.

ここで、図24に例示するように、ハードディスクドライブ1031は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、上記の差分更新プログラムは、コンピュータ1000によって実行される指令が記述されたプログラムモジュールとして、例えばハードディスクドライブ1031に記憶される。   Here, as illustrated in FIG. 24, the hard disk drive 1031 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, the above-described differential update program is stored in, for example, the hard disk drive 1031 as a program module in which a command executed by the computer 1000 is described.

また、上記実施形態で説明した各種データは、プログラムデータとして、例えばメモリ1010やハードディスクドライブ1031に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1031に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出し、各手順を実行する。   The various data described in the above embodiment is stored as program data, for example, in the memory 1010 or the hard disk drive 1031. Then, the CPU 1020 reads the program module 1093 and the program data 1094 stored in the memory 1010 and the hard disk drive 1031 to the RAM 1012 as necessary, and executes each procedure.

なお、差分更新プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1031に記憶される場合に限られず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ等を介してCPU1020によって読み出されてもよい。あるいは、差分更新プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶され、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。   Note that the program module 1093 and the program data 1094 related to the differential update program are not limited to being stored in the hard disk drive 1031, but are stored in, for example, a removable storage medium and read out by the CPU 1020 via the disk drive or the like. Also good. Alternatively, the program module 1093 and the program data 1094 related to the differential update program are stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.), and the network interface 1070 is stored. Via the CPU 1020.

1 死活監視システム
10 死活監視装置
10A マスタ
10B〜10E レプリカ
11 更新部
12 生成部
13 イベント送信部
14 同期部
15 接続部
16 送信未完了イベント送信部
17 記憶部
20 クライアント
21 クライアントライブラリ
21a セッション管理部
21b キャッシュ更新部
21c キャッシュ記憶部
22 アプリケーション
DESCRIPTION OF SYMBOLS 1 Life / death monitoring system 10 Life / death monitoring apparatus 10A Master 10B-10E Replica 11 Update part 12 Generation part 13 Event transmission part 14 Synchronization part 15 Connection part 16 Transmission incomplete event transmission part 17 Storage part 20 Client 21 Client library 21a Session management part 21b Cache update unit 21c Cache storage unit 22 Application

実施形態に係る差分更新装置は、キャッシュ記憶部と、接続部と、受信部と、更新部とを備える。キャッシュ記憶部は、複数のサーバのうちの一つのサーバであるマスタサーバに記憶されたデータのキャッシュを記憶する。接続部は、前記マスタサーバに故障が発生し、前記故障したマスタサーバとの通信が途絶えた場合に、更新後のデータと更新前のデータとの間の差分を更新する旨の差分更新通知と、当該差分更新通知の送信を完了したか否かを示す送信完了情報との同期処理が前記マスタサーバによって行われた前記複数のサーバのうち、当該マスタサーバ以外のレプリカサーバのなかから選択された新たなマスタサーバを問い合わせ、該新たなマスタサーバと通信可能に接続する。受信部は、前記マスタサーバに故障が発生した場合に、前記新たなマスタサーバから前記差分更新通知を受信し、前記マスタサーバに故障が発生していない場合に、当該マスタサーバから前記差分更新通知を受信する。更新部は、受信された差分更新通知を用いて、前記キャッシュを更新する。 The difference update apparatus according to the embodiment includes a cache storage unit, a connection unit, a reception unit, and an update unit. The cache storage unit stores a cache of data stored in a master server that is one of a plurality of servers. The connection unit, when a failure occurs in the master server and communication with the failed master server is interrupted, a difference update notification for updating a difference between the updated data and the pre-update data; Selected from replica servers other than the master server among the plurality of servers in which the synchronization processing with the transmission completion information indicating whether or not the transmission of the difference update notification has been completed is performed by the master server A new master server is inquired and connected to be communicable with the new master server. The receiving unit receives the difference update notification from the new master server when a failure occurs in the master server, and receives the difference update notification from the master server when no failure occurs in the master server. Receive. The update unit updates the cache using the received difference update notification.

Claims (7)

複数のサーバのうちの一つのサーバであるマスタサーバに記憶されたデータのキャッシュを記憶するキャッシュ記憶部と、
前記マスタサーバに記憶されたデータが更新された場合に、更新後のデータと更新前のデータとの間の差分を更新する旨の差分更新通知と、当該差分更新通知の送信を完了したか否かを示す送信完了情報との同期処理が前記マスタサーバによって行われた前記複数のサーバのうち、当該マスタサーバ、又は、当該マスタサーバ以外のレプリカサーバのなかから選択された新たなマスタサーバから、前記差分更新通知を受信する受信部と、
受信された差分更新通知を用いて、前記キャッシュを更新する更新部と
を備えたことを特徴とする差分更新装置。
A cache storage unit that stores a cache of data stored in a master server that is one of a plurality of servers;
When the data stored in the master server has been updated, the difference update notification for updating the difference between the updated data and the data before the update, and whether or not the transmission of the difference update notification has been completed Among the plurality of servers that have been synchronized by the master server with the transmission completion information indicating the master server, or a new master server selected from the replica servers other than the master server, A receiver for receiving the difference update notification;
An update unit comprising: an update unit that updates the cache using the received difference update notification.
前記キャッシュ記憶部は、前記マスタサーバに記憶されたデータについてのディレクトリ情報をキャッシュとして記憶し、
前記受信部は、前記マスタサーバに記憶されたディレクトリ情報が更新された場合に、更新後のディレクトリ情報と更新前のディレクトリ情報との間の差分を更新する旨のディレクトリ用差分更新通知と、当該ディレクトリ用差分更新通知の送信を完了したか否かを示すディレクトリ用送信完了情報との同期処理が前記マスタサーバによって行われた前記複数のサーバのうち、当該マスタサーバ、又は、前記レプリカサーバのなかから選択された新たなマスタサーバから、前記ディレクトリ用差分更新通知を受信し、
前記更新部は、受信されたディレクトリ用差分更新通知を用いて、前記ディレクトリキャッシュを更新することを特徴とする請求項1に記載の差分更新装置。
The cache storage unit stores directory information about data stored in the master server as a cache,
The receiving unit, when the directory information stored in the master server is updated, a directory difference update notification for updating the difference between the updated directory information and the updated directory information, Among the plurality of servers in which the synchronization processing with the directory transmission completion information indicating whether or not the transmission of the directory difference update notification has been completed is performed by the master server, the master server or the replica server Receiving the directory difference update notification from the new master server selected from
The difference update apparatus according to claim 1, wherein the update unit updates the directory cache using the received directory difference update notification.
前記マスタサーバに記憶されたデータを更新する旨の更新要求を当該マスタサーバに対して送信する更新要求送信部を更に備え、
前記更新部は、前記更新要求送信部によって送信された更新要求に対応するデータのキャッシュが前記記憶部に記憶されていれば、前記更新要求に基づいて、当該キャッシュを更新することを特徴とする請求項1に記載の差分更新装置。
An update request transmitting unit that transmits an update request for updating the data stored in the master server to the master server;
The update unit updates the cache based on the update request if a cache of data corresponding to the update request transmitted by the update request transmission unit is stored in the storage unit. The difference update apparatus according to claim 1.
複数のサーバと、クライアントとを備えた差分更新システムであって、
前記複数のサーバ各々が、
前記データを記憶するデータ記憶部と、
前記データ記憶部に記憶されたデータを更新する旨の要求を受信して、受信した要求に応じて前記データ記憶部に記憶されたデータを更新するデータ更新部と、
前記データ更新部によって更新された更新後の情報と、更新前の情報との差分を更新するための差分更新通知を生成する生成部と、
前記データ記憶部に記憶されたデータのキャッシュを保持する前記クライアントへ前記差分更新通知を送信する送信部と、
前記マスタサーバが記憶する差分更新通知と、前記クライアントに対して前記差分更新通知の送信を完了したか否かを示す送信完了情報とを、前記複数のサーバのうち前記マスタサーバ以外のサーバであるレプリカサーバに記憶させる同期部と、
前記マスタサーバに故障が発生した場合に、前記レプリカサーバのなかから選択された新しいマスタサーバと前記クライアントとを通信可能に接続する接続部と、
前記新しいマスタサーバが記憶する差分更新通知のうち前記クライアントに対して送信未完了である差分更新通知を、前記送信完了情報を用いて特定し、該送信未完了である差分更新通知を前記クライアントに送信する送信未完了通知送信部と、を備え、
前記クライアントが、
前記マスタサーバに記憶されたデータのキャッシュを記憶するキャッシュ記憶部と、
前記データが更新された場合に、前記マスタサーバ、又は、前記レプリカサーバのなかから選択された新しいマスタサーバから、前記差分更新通知を受信し、
受信された差分更新通知を用いて、前記キャッシュを更新するキャッシュ更新部と、を備えたことを特徴とする差分更新システム。
A differential update system comprising a plurality of servers and clients,
Each of the plurality of servers is
A data storage unit for storing the data;
A data update unit that receives a request to update the data stored in the data storage unit and updates the data stored in the data storage unit in response to the received request;
A generation unit that generates a difference update notification for updating the difference between the updated information updated by the data update unit and the information before the update;
A transmission unit that transmits the difference update notification to the client that holds a cache of data stored in the data storage unit;
The difference update notification stored in the master server and transmission completion information indicating whether or not the transmission of the difference update notification has been completed to the client is a server other than the master server among the plurality of servers. A synchronization unit to be stored in the replica server;
When a failure occurs in the master server, a connection unit that connects the new master server selected from the replica server and the client in a communicable manner;
Of the differential update notifications stored in the new master server, a differential update notification that has not been transmitted to the client is identified using the transmission completion information, and the differential update notification that has not been transmitted is transmitted to the client. A transmission incomplete notification transmission unit for transmitting,
The client
A cache storage unit for storing a cache of data stored in the master server;
When the data is updated, the difference update notification is received from the master server or a new master server selected from the replica servers,
A differential update system comprising: a cache update unit that updates the cache using the received differential update notification.
差分更新装置で実行される差分更新方法であって、
複数のサーバのうちの一つのサーバであるマスタサーバに記憶されたデータが更新された場合に、更新後のデータと更新前のデータとの間の差分を更新する旨の差分更新通知と、当該差分更新通知の送信を完了したか否かを示す送信完了情報とが前記マスタサーバによって同期された前記複数のサーバのうち、当該マスタサーバ、又は、当該マスタサーバ以外のサーバであるレプリカサーバのなかから選択された新しいマスタサーバから、前記差分更新通知を受信する受信工程と、
受信された差分更新通知を用いて、前記マスタサーバに記憶されたデータのキャッシュを記憶する記憶部に記憶されたキャッシュを更新する更新工程と
を含んだことを特徴とする差分更新方法。
A differential update method executed by a differential update device,
A difference update notification for updating the difference between the updated data and the pre-update data when the data stored in the master server that is one of the plurality of servers is updated; and Among the plurality of servers synchronized by the master server with transmission completion information indicating whether or not the transmission of the difference update notification has been completed, the master server or a replica server that is a server other than the master server Receiving a difference update notification from a new master server selected from:
An update process for updating a cache stored in a storage unit for storing a cache of data stored in the master server using the received difference update notification.
複数のサーバのうちの一つのサーバであるマスタサーバに記憶されたデータが更新された場合に、更新後のデータと更新前のデータとの間の差分を更新する旨の差分更新通知と、当該差分更新通知の送信を完了したか否かを示す送信完了情報とが前記マスタサーバによって同期された前記複数のサーバのうち、当該マスタサーバ、又は、当該マスタサーバ以外のサーバであるレプリカサーバのなかから選択された新しいマスタサーバから、前記差分更新通知を受信する受信ステップと、
受信された差分更新通知を用いて、前記マスタサーバに記憶されたデータのキャッシュを記憶する記憶部に記憶されたキャッシュを更新する更新ステップと
をコンピュータに実行させることを特徴とする差分更新プログラム。
A difference update notification for updating the difference between the updated data and the pre-update data when the data stored in the master server that is one of the plurality of servers is updated; and Among the plurality of servers synchronized by the master server with transmission completion information indicating whether or not the transmission of the difference update notification has been completed, the master server or a replica server that is a server other than the master server Receiving a difference update notification from a new master server selected from:
A difference update program that causes a computer to execute an update step of updating a cache stored in a storage unit that stores a cache of data stored in the master server, using the received difference update notification.
前記データを記憶するデータ記憶部と、
前記データ記憶部に記憶されたデータを更新する旨の要求を受信して、受信した要求に応じて前記データ記憶部に記憶されたデータを更新するデータ更新部と、
前記データ更新部によって更新された更新後の情報と、更新前の情報との差分を更新するための差分更新通知を生成する生成部と、
前記データ記憶部に記憶されたデータのキャッシュを保持するクライアントへ前記差分更新通知を送信する送信部と、
前記マスタサーバが記憶する差分更新通知と、前記クライアントに対して前記差分更新通知の送信を完了したか否かを示す送信完了情報とを、複数のサーバのうち前記マスタサーバ以外のサーバであるレプリカサーバに記憶させる同期部と、
前記マスタサーバに故障が発生した場合に、前記レプリカサーバのなかから選択された新しいマスタサーバと前記クライアントとを通信可能に接続する接続部と、
前記新しいマスタサーバが記憶する差分更新通知のうち前記クライアントに対して送信未完了である差分更新通知を、前記送信完了情報を用いて特定し、該送信未完了である差分更新通知を前記クライアントに送信する送信未完了通知送信部と
を備えたことを特徴とする差分更新サーバ。
A data storage unit for storing the data;
A data update unit that receives a request to update the data stored in the data storage unit and updates the data stored in the data storage unit in response to the received request;
A generation unit that generates a difference update notification for updating the difference between the updated information updated by the data update unit and the information before the update;
A transmission unit that transmits the difference update notification to a client that holds a cache of data stored in the data storage unit;
A replica that is a server other than the master server among a plurality of servers, including a difference update notification stored in the master server and transmission completion information indicating whether or not the transmission of the difference update notification has been completed to the client. A synchronization unit stored in the server;
When a failure occurs in the master server, a connection unit that connects the new master server selected from the replica server and the client in a communicable manner;
Of the differential update notifications stored in the new master server, a differential update notification that has not been transmitted to the client is identified using the transmission completion information, and the differential update notification that has not been transmitted is transmitted to the client. A differential update server comprising: a transmission incomplete notification transmission unit for transmission.
JP2013024815A 2013-02-12 2013-02-12 Differential update device, differential update system, differential update method, differential update program, and differential update server Active JP5642817B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013024815A JP5642817B2 (en) 2013-02-12 2013-02-12 Differential update device, differential update system, differential update method, differential update program, and differential update server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013024815A JP5642817B2 (en) 2013-02-12 2013-02-12 Differential update device, differential update system, differential update method, differential update program, and differential update server

Publications (2)

Publication Number Publication Date
JP2014154031A true JP2014154031A (en) 2014-08-25
JP5642817B2 JP5642817B2 (en) 2014-12-17

Family

ID=51575819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013024815A Active JP5642817B2 (en) 2013-02-12 2013-02-12 Differential update device, differential update system, differential update method, differential update program, and differential update server

Country Status (1)

Country Link
JP (1) JP5642817B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000082003A (en) * 1999-09-10 2000-03-21 Hitachi Ltd Information processing system enabling access to different kind of file and control method thereof
JP2001043105A (en) * 1999-07-30 2001-02-16 Toshiba Corp High-availability computer system and data backup method of the system
JP2002073401A (en) * 2000-08-28 2002-03-12 Mitsubishi Electric Corp Distribution system for www contents, proxy server, www server, and distribution method for www contents and computer readable medium recording program making computer execute
JP2003186785A (en) * 2001-12-14 2003-07-04 Sanyo Electric Co Ltd Local server, information delivery system and user terminal devices
JP2003529866A (en) * 2000-03-30 2003-10-07 インテル・コーポレーション Distributed edge network architecture
JP2010181929A (en) * 2009-02-03 2010-08-19 Ntt Docomo Inc Communication system, proxy device, and update notification method for content

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001043105A (en) * 1999-07-30 2001-02-16 Toshiba Corp High-availability computer system and data backup method of the system
JP2000082003A (en) * 1999-09-10 2000-03-21 Hitachi Ltd Information processing system enabling access to different kind of file and control method thereof
JP2003529866A (en) * 2000-03-30 2003-10-07 インテル・コーポレーション Distributed edge network architecture
JP2002073401A (en) * 2000-08-28 2002-03-12 Mitsubishi Electric Corp Distribution system for www contents, proxy server, www server, and distribution method for www contents and computer readable medium recording program making computer execute
JP2003186785A (en) * 2001-12-14 2003-07-04 Sanyo Electric Co Ltd Local server, information delivery system and user terminal devices
JP2010181929A (en) * 2009-02-03 2010-08-19 Ntt Docomo Inc Communication system, proxy device, and update notification method for content

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CSNB201000671001; 高橋 和秀: エンジニアのためのMySQL運用管理大全 第1版, 20090625, pp.167-179, 株式会社技術評論社 *
JPN6014038002; 高橋 和秀: エンジニアのためのMySQL運用管理大全 第1版, 20090625, pp.167-179, 株式会社技術評論社 *

Also Published As

Publication number Publication date
JP5642817B2 (en) 2014-12-17

Similar Documents

Publication Publication Date Title
US10831720B2 (en) Cloud storage distributed file system
US20190370362A1 (en) Multi-protocol cloud storage for big data and analytics
US10817498B2 (en) Distributed transactions in cloud storage with hierarchical namespace
US9436694B2 (en) Cooperative resource management
EP3811596B1 (en) Hierarchical namespace with strong consistency and horizontal scalability
ES2881606T3 (en) Geographically distributed file system using coordinated namespace replication
CN103384876B (en) Information processing system is unified data processing method
US8862644B2 (en) Data distribution system
JP5727020B2 (en) Cloud computing system and data synchronization method thereof
US20170075921A1 (en) Hosted file sync with direct access to hosted files
CN105814544B (en) System and method for supporting persistent partition recovery in a distributed data grid
EP3452919A1 (en) Splitting and moving ranges in a distributed system
US20080010299A1 (en) File management system
EP3811229A1 (en) Hierarchical namespace service with distributed name resolution caching and synchronization
US8417679B1 (en) Fast storage writes
CN111506592A (en) Method and device for upgrading database
JPH11272534A (en) Document distribution processing method, server management method for the same and recording medium for server program
CN113010549A (en) Data processing method based on remote multi-active system, related equipment and storage medium
US20140317055A1 (en) Version Vector Scheme for Data Synchronization on Resource-Constrained Networks
JP5416490B2 (en) Distributed data management system, data management apparatus, data management method, and program
JP5642817B2 (en) Differential update device, differential update system, differential update method, differential update program, and differential update server
JP6643114B2 (en) Image processing apparatus, control method thereof, and program
CN113138879A (en) Method and system for hybrid edge replication
JP4160544B2 (en) Server management method and server program recording medium for distributed document processing system
JP5431551B1 (en) Event delivery device, event delivery system, event delivery method, and event delivery program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140909

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141009

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: 20141028

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141029

R150 Certificate of patent or registration of utility model

Ref document number: 5642817

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150