JP4434838B2 - Distributed data equivalence method and system, and program - Google Patents

Distributed data equivalence method and system, and program Download PDF

Info

Publication number
JP4434838B2
JP4434838B2 JP2004160356A JP2004160356A JP4434838B2 JP 4434838 B2 JP4434838 B2 JP 4434838B2 JP 2004160356 A JP2004160356 A JP 2004160356A JP 2004160356 A JP2004160356 A JP 2004160356A JP 4434838 B2 JP4434838 B2 JP 4434838B2
Authority
JP
Japan
Prior art keywords
data
computer
mode
master
information
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.)
Expired - Fee Related
Application number
JP2004160356A
Other languages
Japanese (ja)
Other versions
JP2005339411A (en
Inventor
龍生 佐藤
秀一 上村
智 小松
豊 小波津
照喜 川内
あゆみ 藤本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Toshiba System Technology Corp
Original Assignee
Toshiba Corp
Toshiba System Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp, Toshiba System Technology Corp filed Critical Toshiba Corp
Priority to JP2004160356A priority Critical patent/JP4434838B2/en
Publication of JP2005339411A publication Critical patent/JP2005339411A/en
Application granted granted Critical
Publication of JP4434838B2 publication Critical patent/JP4434838B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

本発明は、ネットワークを介して接続された複数の計算機をマスター計算機およびレプリカ計算機としてそれぞれ動作させ、マスター計算機で目的データがオリジナルに更新された場合に、各レプリカ計算機の目的データをマスター計算機と同一内容に等価する分散データ等価技術に関するものである。   The present invention operates a plurality of computers connected via a network as a master computer and a replica computer, respectively, and when the target data is updated to the original by the master computer, the target data of each replica computer is the same as that of the master computer. The present invention relates to a distributed data equivalent technique equivalent to content.

昨今の都市の基幹をなすライフラインと言われる産業システム(電力、ガス、水道、公共交通機関等)においては、システムを監視制御するために用いられるデータベースは巨大になり、かつ高速にアクセスできることが求められている。そして、産業システムの状態が変われば、データベースを変化させ、複数箇所の計算機のデータ内容が等しく保たれることが求められている。等しく保つことで、複数箇所ではネットワークを介してデータを取得することがないので、高速なアクセスが可能となる。   In an industrial system (power, gas, water, public transportation, etc.) that is said to be the lifeline that forms the backbone of modern cities, the database used to monitor and control the system becomes huge and can be accessed at high speed. It has been demanded. And if the state of an industrial system changes, a database will be changed and the data content of the computer of several places is calculated | required to be kept equal. By keeping them equal, data is not acquired via a network at a plurality of locations, so that high-speed access is possible.

また、最も重要な計算機をサーバーとして運用する場合、このサーバーが停止しても産業システムの機能が失われないようにサーバー機能を他計算機がバックアップする、二重系(または多重系)のシステムを構成するのが通常である。多重系構成にすることによって、サーバーが停止しても、他の計算機に直ちにサーバー機能を移して、産業システムの機能を損なわないようにする。サーバー機能を移しても、以前と変わらずデータを引き継いでアクセス可能であり、かつ、他の残りの計算機も同様に等しくデータが保たれた状態であることが必要である。このように、産業システムにおいては、複数の計算機間でデータ内容を等しく保つ分散データ等価システムが必要となっていた。   In addition, when operating the most important computer as a server, a dual system (or multiple system) that backs up the server function so that the function of the industrial system is not lost even if this server stops is used. It is usual to configure. By adopting a multi-system configuration, even if the server is stopped, the server function is immediately transferred to another computer so that the function of the industrial system is not impaired. Even if the server function is transferred, it is necessary that the data can be accessed and accessed as before, and the other remaining computers are similarly kept in the same state. Thus, in an industrial system, a distributed data equivalent system that keeps data contents equal among a plurality of computers is required.

特許文献1においては、このような分散データ等価システムとして、システム内における複数の計算機のデータを等しく保つために変更内容を転送する電力系統の監視制御手法が提案されている。この手法は、電力系統の監視制御データベースの内容に変更のあった場合には、各計算機間でその変更内容を授受するものである。この手法によれば、各計算機でデータベースの内容を更新すると、各計算機が変更内容を他計算機へ送り出す。同時刻に同箇所のデータ変更があった場合は、後でデータ内容を修正して調整するものである。この手法においては、複数箇所の計算機からデータベースを更新可能である。   In Patent Document 1, as such a distributed data equivalent system, a monitoring control method for a power system is proposed in which changes are transferred in order to keep the data of a plurality of computers in the system equal. In this method, when there is a change in the contents of the monitoring control database of the power system, the change contents are exchanged between the computers. According to this method, when the contents of the database are updated in each computer, each computer sends out the changed contents to other computers. If there is a data change at the same location at the same time, the data contents are corrected and adjusted later. In this method, the database can be updated from a plurality of computers.

また、特許文献2においては、複数の計算機がある場合に、特定の1つの計算機をベースホストと呼び、ベースホストにてデータ更新可能とした場合に、ベースホストを切り替えるベースホスト切替型データベース管理システムについて記載されている。この手法においては、ベースホストを切り替えるとき、ベースホストを変更したという情報を、ある計算機から変更内容をレプリケーション通信で送り出して、各計算機のベースホスト内容を書き換える。また、ベースホストを切り替えた場合に、新旧ベースホストのデータ内容のずれを合わせるのに、切替のタイミングをきっかけにして、データベースのデータをレプリケーション手段によって最新データに等しく保つようにしている。   In Patent Document 2, when there are a plurality of computers, one specific computer is called a base host, and when the base host can update data, a base host switching type database management system that switches the base host Is described. In this method, when the base host is switched, information indicating that the base host has been changed is sent out from a certain computer by replication communication, and the base host content of each computer is rewritten. In addition, when the base host is switched, the data of the old and new base hosts are matched with the timing of switching to keep the database data equal to the latest data by the replication means.

また、特許文献3においては、レプリケーションにより複数の計算機のデータ内容を、一貫して保つ分散データ管理手法について記載されている。この手法においては、データベースへの更新はトランザクションという一連の操作の塊で行われる。トランザクションの中身はデータベースの中で実行され、データベースで実行された更新内容は、通信手段によって他計算機にレプリケーションされる。   Further, Patent Document 3 describes a distributed data management technique that maintains the data contents of a plurality of computers consistently by replication. In this method, updating to the database is performed in a series of operations called transactions. The contents of the transaction are executed in the database, and the update contents executed in the database are replicated to other computers by the communication means.

特許番号第2787108号公報Japanese Patent No. 2787108 特開2002−297593公報JP 2002-297593 A 特開2002−297428公報JP 2002-297428 A

複数の計算機にあるデータを等しく保つ分散データ等価システムにおいては、データ内容を等しく保つための変更内容の送信が、高速に行われることが求められている。多重系システムを構成し、サーバーが停止してもシステムとして継続するため、サーバー機能(マスター)を他に移して動作し続けることが必要である。マスターを切り替える機能があり、切り替えてもデータが等しく保たれて継続して利用できるデータ管理システムが必要である。   In a distributed data equivalent system that keeps data in a plurality of computers equal, it is required that transmission of change contents for keeping data contents be performed at high speed. Since a multi-system is configured and continues as a system even if the server stops, it is necessary to move the server function (master) to another and continue to operate. There is a need for a data management system that has a function of switching masters and that can be used continuously with the data kept the same even after switching.

前記特許文献1の手法は、データの変更内容を各計算機から送信するものであるが、同時期に同箇所を複数の計算機で更新する可能性もあり、このような場合には、一つの計算機以外の更新内容を一旦無効にした後に残りの計算機の更新内容を順次反映し直すという調整が必要であった。このような調整を行うためには、更新順番の調停、変更の履歴を保存する必要があった。この手法においては、結局のところ、システム全体として更新のスループットが高速にならず、かつ、各計算機には、変更内容のデータ量に比べて大幅に大容量の主記憶メモリが必要になっていた。   The technique disclosed in Patent Document 1 transmits data changes from each computer, but the same location may be updated by a plurality of computers at the same time. In such a case, one computer is used. It was necessary to make an adjustment that the update contents of the remaining computers were sequentially reflected after invalidating the update contents other than. In order to perform such adjustment, it is necessary to store the update order arbitration and change history. In the end, with this method, the update throughput of the entire system was not increased, and each computer required a large amount of main memory compared to the amount of data to be changed. .

また、前記特許文献2の手法においては、ベースホスト(マスター)を切り替える場合に、例えば、「ベースホストがホストBに変更された」、「ベースからレプリカに変更された」というような変更内容がレプリケーションされて、各計算機の管理情報を変更するので、ベースホストが存在しなくなったことを確認した別の計算機がベースホストになるような、他の計算機のモード変更と同期する振る舞いはできなかった。そのため、通信時間の時間遅れ次第では、ある時間帯に2つ以上のベースホストが同時に存在する可能性があった。また、切替後のデータをレプリケーションで合わせるため、通信の遅れ等でタイムアウトした場合に、データが一致しない計算機が発生する可能性もあった。複数の計算機が同時にデータ更新可能なベースホストになるための動作を行った場合には、システム管理情報の書き換え権限を調停するために、いずれの管理情報も書き換えられず、2つ以上のベースホストが動作してしまう可能性があった。   In the method of Patent Document 2, when the base host (master) is switched, for example, there are changes such as “the base host has been changed to the host B” and “the base has been changed to the replica”. Since the management information of each computer is changed after being replicated, it was not possible to synchronize with the mode change of other computers so that another computer that confirmed that the base host no longer exists becomes the base host . Therefore, depending on the time delay of the communication time, there may be two or more base hosts simultaneously in a certain time zone. In addition, in order to match the data after switching by replication, there is a possibility that a computer whose data does not match may occur when a timeout occurs due to communication delay or the like. When multiple computers perform operations to become a base host that can update data at the same time, in order to mediate the authority to rewrite system management information, none of the management information is rewritten, and two or more base hosts Could have worked.

また、前記特許文献3の手法においては、並行して複数のデータ更新が実行されても、データ更新がトランザクションという形でデータベースへ行われるため、データベースのスループットの影響を受け易かった。そして、その変更内容をそのままレプリケーション送信するため、細かなトランザクションが続いた場合には、実際の変更内容に比べて、通信のオーバーヘッドが大きくなり、更新のスループットが通信のスループットより低いレベルで制限される可能性があった。   Further, in the method of Patent Document 3, even if a plurality of data updates are executed in parallel, the data update is performed on the database in the form of a transaction, so that it is easily affected by the throughput of the database. Since the changes are replicated as they are, if detailed transactions continue, the communication overhead becomes larger than the actual changes, and the update throughput is limited to a level lower than the communication throughput. There was a possibility.

なお、このような問題点は、産業システムを監視制御するための分野に限らず、マスター計算機のデータ更新結果を各レプリカ計算機に反映させる各種の分野における分散データ等価技術においても同様に存在している。   Such problems are not limited to the field for monitoring and controlling the industrial system, but also exist in the distributed data equivalent technology in various fields in which the data update result of the master computer is reflected in each replica computer. Yes.

本発明は、上記のような従来技術の問題点を解決するために提案されたものであり、その目的は、マスター計算機と各レプリカ計算機とのデータ等価を、無駄なデータ処理や保存を行うことなしに計算機資源や通信資源を効率よく活用して高速に実現可能な分散データ等価方法とシステム、およびプログラムを提供することである。   The present invention has been proposed to solve the above-described problems of the prior art, and its purpose is to perform unnecessary data processing and storage of data equivalence between a master computer and each replica computer. It is to provide a distributed data equivalent method, system, and program that can be realized at high speed by efficiently using computer resources and communication resources.

本発明は、上記のような目的を達成するために、各計算機でマスター計算機と自計算機のモード情報を管理し、モード情報に基づいてデータ更新結果の送受信を行うと共に、レプリカ計算機からのリトリーブ要求に応じてマスター計算機からリトリーブデータを送信することにより、マスター計算機と各レプリカ計算機とのデータ等価を、無駄なデータ処理や保存を行うことなしに計算機資源や通信資源を効率よく活用して高速に実現できるようにしたものである。   In order to achieve the above object, the present invention manages the mode information of the master computer and its own computer in each computer, transmits and receives the data update result based on the mode information, and retrieve requests from the replica computer By sending retrieve data from the master computer in response to the data, the data equivalence between the master computer and each replica computer can be efficiently utilized at high speed by efficiently using computer resources and communication resources without wasteful data processing and storage. It can be realized.

本発明の分散データ等価方法は、ネットワークを介して接続された複数の計算機に目的データをそれぞれ格納し、特定の1つの計算機をマスターモード、その他の各計算機をレプリカモードで運用することによりマスター計算機およびレプリカ計算機としてそれぞれ動作させ、マスター計算機でデータ更新操作により目的データがオリジナルに更新された場合に、各レプリカ計算機の目的データをマスター計算機と同一内容に等価するための方法である。この分散データ等価方法において、各計算機は、複数のアプリケーションからアクセス可能な共有領域に目的データを格納するデータファイルを配置してなるデータベースを備え、モード処理ステップを行うと共に、マスター計算機とレプリカ計算機の間で、データ更新、更新データマージ、レプリケーション送信、レプリケーション受信、マージデータ展開、受信データ反映、リトリーブ要求送信、リトリーブデータ送信、リトリーブデータ受信、の各ステップを行うことを特徴としている。   The distributed data equivalent method of the present invention stores the target data in a plurality of computers connected via a network, and operates a specific one computer in the master mode and the other computers in the replica mode. This is a method for causing each replica computer to have the same content as that of the master computer when the target computer is operated as a replica computer and the target data is updated to the original by a data update operation on the master computer. In this distributed data equivalent method, each computer includes a database in which data files for storing target data are arranged in a shared area accessible from a plurality of applications, and performs a mode processing step, and also includes a master computer and a replica computer. The data update, update data merge, replication transmission, replication reception, merge data expansion, reception data reflection, retrieval request transmission, retrieval data transmission, and retrieval data reception are performed.

ここで、モード処理ステップは、複数の計算機のうち、どの計算機がマスター計算機であるかを特定するモード情報と自計算機のモードを特定するモード情報を含むモード情報を管理して、他計算機との間でモード情報の送受信を行うと共に、モード切替が必要な場合にはモード遷移および予め決められたモード遷移後の動作を実行するステップである。   Here, the mode processing step manages mode information including mode information for identifying which computer is the master computer among a plurality of computers and mode information for identifying the mode of the own computer. In this step, mode information is transmitted and received, and when mode switching is required, mode transition and a predetermined operation after mode transition are executed.

また、データ更新、更新データマージ、レプリケーション送信、の各ステップは、マスターモード時にマスター計算機として動作する計算機により行われる。データ更新ステップは、データ更新操作の結果を更新キャッシュに一旦格納すると共に、コミット要求に応じて更新キャッシュの内容を1個の更新内容コミットデータとし、固有のデータ特定情報を付加して前記データファイルに格納するステップである。更新データマージステップは、予め設定されたマージ併合条件に従って決められる1個または複数個の前記更新内容コミットデータをマージしてマージデータを生成するステップである。レプリケーション送信ステップは、モード情報に基づき、等価対象となる各レプリカ計算機を示す送信先情報を管理して、この送信先情報に基づき各レプリカ計算機に対してマージデータをレプリケーションデータとして送信するステップである。   Each step of data update, update data merge, and replication transmission is performed by a computer that operates as a master computer in the master mode. In the data update step, the result of the data update operation is temporarily stored in the update cache, and the content of the update cache is set as one update content commit data in response to the commit request, and the data file is added with unique data specifying information It is the step which stores in. The update data merging step is a step of generating merge data by merging one or a plurality of update content commit data determined in accordance with a preset merge merging condition. The replication transmission step is a step of managing transmission destination information indicating each replica computer to be equivalent based on the mode information and transmitting merge data as replication data to each replica computer based on the transmission destination information. .

これに対して、レプリケーション受信、マージデータ展開、受信データ反映、の各ステップは、レプリカモード時にレプリカ計算機として動作する計算機により行われる。レプリケーション受信ステップは、モード情報に基づき、レプリケーションデータの送信元となるマスター計算機を示す送信元情報を管理して、この送信元情報に基づきマスター計算機からのレプリケーションデータを受信するステップである。マージデータ展開ステップは、レプリケーションデータである前記マージデータを、元の1個または複数個の更新内容コミットデータに展開するステップである。受信データ反映ステップは、展開された更新内容コミットデータを、各更新内容コミットデータ毎に、そのデータのリトリーブ状態を示すリトリーブ状態情報に基づき、データファイルに反映するか否か判定して、反映すると判定した更新内容コミットデータをそのデータ特定情報と共にデータファイルに反映するステップである。   On the other hand, the steps of replication reception, merge data expansion, and reception data reflection are performed by a computer that operates as a replica computer in the replica mode. The replication reception step is a step of managing transmission source information indicating a master computer that is a transmission source of replication data based on the mode information, and receiving replication data from the master computer based on the transmission source information. The merge data expansion step is a step of expanding the merge data, which is replication data, into one or more original update content commit data. The received data reflection step determines whether or not to reflect the expanded update content commit data on each data update content commit data based on the retrieve status information indicating the retrieve status of the data. In this step, the determined update content commit data is reflected in the data file together with the data specifying information.

さらに、リトリーブ要求送信は、レプリカ計算機により、自計算機とマスター計算機のデータファイル間の差異をなくすためにデータファイルの一部または全部を一括してコピーするリトリーブに必要なリトリーブデータを要求するリトリーブ要求をマスター計算機に送信するステップである。リトリーブデータ送信ステップは、マスター計算機により、レプリカ計算機からのリトリーブ要求の受信に応答してリトリーブデータをそのレプリカ計算機に送信するステップである。リトリーブデータ受信ステップは、レプリカ計算機により、マスター計算機からリトリーブデータを受信した場合に、リトリーブを実行してリトリーブ状態情報を更新するステップである。   Furthermore, the retrieval request transmission is a retrieval request that requests the retrieval data required for retrieval to copy all or part of the data file in a batch in order to eliminate the difference between the data file of the own computer and the master computer by the replica computer. Is transmitted to the master computer. The retrieve data transmission step is a step in which the master computer transmits the retrieve data to the replica computer in response to reception of the retrieve request from the replica computer. The retrieve data receiving step is a step of executing retrieve and updating retrieve state information when the replica computer receives retrieve data from the master computer.

なお、本発明の分散データ等価システム、プログラムは、いずれも、上記のような分散データ等価方法の特徴を、別の観点から把握したものである。   Note that the distributed data equivalent system and program of the present invention grasp the characteristics of the distributed data equivalent method as described above from another viewpoint.

このような特徴を有する本発明によれば、マスター切替というモード管理において各計算機でモード変更を行い、モード変更は、他の計算機のモード変更を受信したことをきっかけでモード遷移ルールに従って遷移し、遷移した状況に応じてデータ等価を行うことができる。すなわち、複数の計算機のモード変更を互いの状況に応じて行うことができ、かつ、モード管理の状況に応じてデータ等価を積極的に行うことができる。そのため、複数のマスター計算機が存在してしまうような問題を生じることなく、マスター計算機を1つに定めて、他の計算機との調整を行うことなくデータ更新を連続して高速に行うことができる。   According to the present invention having such a feature, each computer performs a mode change in mode management called master switching, and the mode change is made in accordance with the mode transition rule triggered by the reception of the mode change of another computer, Data equivalence can be performed according to the state of transition. That is, it is possible to change the mode of a plurality of computers according to each other's situation, and to actively perform data equivalence according to the situation of mode management. Therefore, without causing a problem that a plurality of master computers exist, a single master computer can be determined and data can be continuously updated at high speed without adjustment with other computers. .

また、各アプリケーションでデータ更新操作を行った場合に、そのデータ更新結果をアプリケーションごとに更新キャッシュに格納し、コミット操作によって送り出し、1つまたは複数のアプリケーションからなされたコミットをマージしてある程度のデータ単位に固めてレプリケーション送信を行うことができる。そのため、複数のアプリケーションでデータ更新を並行かつ高速に行うことができる。また、コミットした結果は複数個がマージされるため、個別に送信する場合に比べて送信オーバーヘッドを大幅に減らすことができる。したがって、データ更新やコミットよりスループットの低い通信機能であっても、その通信機能の能力を最大限に活用して効率よくデータ更新結果を送信することができ、その結果、計算機間のデータ等価を、無駄なデータ処理や保存を行うことなしに計算機資源や通信資源を効率よく活用して高速に実現できる。   In addition, when a data update operation is performed in each application, the data update result is stored in an update cache for each application, sent out by a commit operation, merged with commits made by one or more applications, and a certain amount of data Replication transmission can be performed in units. Therefore, data can be updated in parallel and at high speed by a plurality of applications. In addition, since a plurality of committed results are merged, the transmission overhead can be greatly reduced as compared with the case of individually transmitting. Therefore, even if the communication function has a lower throughput than the data update or commit, the data update result can be transmitted efficiently by making the best use of the capability of the communication function. It can be realized at high speed by efficiently using computer resources and communication resources without wasteful data processing and storage.

以上のように、本発明によれば、マスター計算機と各レプリカ計算機とのデータ等価を、無駄なデータ処理や保存を行うことなしに計算機資源や通信資源を効率よく活用して高速に実行可能な分散データ等価方法とシステム、およびプログラムを提供することができる。   As described above, according to the present invention, data equivalence between a master computer and each replica computer can be executed at high speed by efficiently using computer resources and communication resources without performing unnecessary data processing and storage. Distributed data equivalence methods and systems, and programs can be provided.

以下には、本発明を適用した分散データ等価システムの実施形態について図面を参照して説明する。ただし、ここで記載する実施形態は、本発明をなんら限定するものではなく、本発明の一態様を例示するものにすぎない。   Hereinafter, embodiments of a distributed data equivalent system to which the present invention is applied will be described with reference to the drawings. However, the embodiment described here does not limit the present invention at all, and merely illustrates one aspect of the present invention.

本発明は、典型的には、コンピュータをソフトウェアで制御することにより実現される。この場合のソフトウェアは、コンピュータのハードウェアを物理的に活用することで本発明の各計算機の機能および作用効果を実現するものであり、また、従来技術を適用可能な部分には好適な従来技術が適用される。さらに、本発明を実現するハードウェアやソフトウェアの具体的な種類や構成、ソフトウェアで処理する範囲などは自由に変更可能であり、例えば、本発明を実現するプログラムは本発明の一態様である。   The present invention is typically realized by controlling a computer with software. The software in this case realizes the functions and operational effects of each computer of the present invention by physically utilizing the hardware of the computer, and is suitable for conventional technology to which the conventional technology can be applied. Applies. Furthermore, specific types and configurations of hardware and software that realize the present invention, a range processed by software, and the like can be freely changed. For example, a program that implements the present invention is one aspect of the present invention.

[1.用語説明]
以下にはまず、本明細書中で用いられる重要な用語の定義について説明する。
[1. Glossary]
First, definitions of important terms used in the present specification will be described.

(1)マスター計算機:
等価対象となる目的データに対して、単なる複製ではなく、オリジナルなデータ更新が可能で、また、そのオリジナルにデータ更新されたデータを参照可能な計算機である。通常は、ネットワークで接続されたシステムの中で特定の1台である。
(1) Master computer:
It is a computer that can update original data, and can refer to data that has been updated to the original, instead of simply copying the target data to be equivalent. Usually, it is a specific unit in a system connected by a network.

(2)レプリカ計算機:
等価対象となる目的データに対して、オリジナルなデータ更新はできず、マスター計算機でオリジナルにデータ更新されたデータの複製とその参照のみが可能な計算機である。すなわち、レプリカ計算機により取り扱われる目的データは、マスター計算機のオリジナルデータの複製のみによりデータ更新される。
(2) Replica computer:
The original data cannot be updated with respect to the target data to be equivalent, and the computer can only copy and refer to the original data updated by the master computer. That is, the target data handled by the replica computer is updated only by copying the original data of the master computer.

(3)マスター切替:
1つのレプリカ計算機をマスター計算機に設定することである。一般的には、既にマスター計算機が存在する場合に、1つのレプリカ計算機をマスターに設定することを意味している。これまでマスターであった計算機を旧マスター、新たにマスターに設定した計算機を新マスターと呼ぶことがある。また、マスター計算機が故障等で失われて存在せず、レプリカ計算機のみが存在する場合に、1つのレプリカ計算機をマスターに設定することもマスター切替と呼ぶ。さらに、設定や起動のタイミング等で、マスター計算機が複数存在してしまったとき、複数のマスター計算機または他のレプリカ計算機の1つをマスターに設定することもマスター切替と呼ぶ。
(3) Master switching:
One replica computer is set as a master computer. In general, when a master computer already exists, this means that one replica computer is set as a master. A computer that has been a master until now is sometimes called an old master, and a computer that has been newly set as a master is sometimes called a new master. In addition, when a master computer is lost due to a failure or the like and does not exist but only a replica computer exists, setting one replica computer as a master is also called master switching. Further, when there are a plurality of master computers due to setting or activation timing, setting one of a plurality of master computers or one of the other replica computers as a master is also referred to as master switching.

(4)データファイル:
等価対象となる目的データのデータ本体が格納されたファイルである。具体的には、計算機のハードディスクや主記憶メモリ等の記憶装置上に配置される。データファイルは、複数のアプリケーションからアクセス可能な共有領域に配置されて、各アプリケーションから更新・参照される。一般的には、データファイルは、データ本体と、更新シリアル番号を格納するデータ状態表から構成される。この場合、データ本体は、それぞれが、テーブル、リスト、キュー等のデータ構造を持つ1個または複数個のデータから構成される。以下の実施形態では、一例として、データ本体が、複数個の表形式データ(テーブル)から構成されている場合について説明している。また、本発明のデータファイルは、ハードディスク上のデータと後述するマッピングデータの両方を含む概念である。
(4) Data file:
It is a file that stores the data body of the target data to be equivalent. Specifically, it is arranged on a storage device such as a computer hard disk or main memory. The data file is arranged in a shared area accessible from a plurality of applications, and is updated / referenced by each application. In general, a data file is composed of a data body and a data state table storing update serial numbers. In this case, the data body is composed of one or a plurality of data each having a data structure such as a table, a list, and a queue. In the following embodiments, as an example, the case where the data body is composed of a plurality of tabular data (tables) is described. The data file of the present invention is a concept including both data on the hard disk and mapping data described later.

(5)データ状態表:
データ本体をいくつかの単位に分けて、各単位毎にそれぞれの更新シリアル番号を格納した表である。具体的に、データ本体が、複数のテーブルから構成される場合、データ状態表は、各テーブルのシリアル番号を格納したものになる。また、テーブルをカラム別に分けて考えた場合、データ状態表は、テーブルとカラムのシリアル番号を格納したものになる。
(5) Data status table:
The data body is divided into several units, and each update serial number is stored for each unit. Specifically, when the data body is composed of a plurality of tables, the data state table stores the serial number of each table. If the table is divided into columns, the data state table stores the serial numbers of the table and the column.

(6)シリアル番号:
データ更新される毎に増分される番号である。一般的には、データを構成する各単位毎にシリアル番号を振る。例えば、テーブルとカラムの単位でシリアル番号を振る場合に、更新があったならば、更新されたテーブルのシリアル番号と、そのテーブルの該当カラムのシリアル番号をそれぞれ更新する。
(6) Serial number:
This number is incremented every time data is updated. Generally, a serial number is assigned to each unit constituting data. For example, when serial numbers are assigned in units of tables and columns, if there is an update, the serial number of the updated table and the serial number of the corresponding column of the table are updated.

(7)更新キャッシュ:
アプリケーション毎に設けられた一時的な記憶領域である。すなわち、各アプリケーションでなされたデータ更新内容をそれぞれ溜めておく領域である。
(7) Update cache:
This is a temporary storage area provided for each application. That is, it is an area for storing data update contents made by each application.

(8)データ更新:
アプリケーションによる「データ更新」とは、データの書き換え、追加、削除の全てを含む概念である。このような操作を行うと、通常は、一旦キャッシュに溜められて、即座にデータファイルに変更が加えられることはない。1つのアプリケーションがデータ更新した場合、そのデータ更新結果のコミットが行われない段階では、他のアプリケーションにそのデータ更新結果は示されない。
(8) Data update:
“Data update” by an application is a concept including all of data rewriting, addition, and deletion. When such an operation is performed, the data file is normally stored once in a cache and is not immediately changed. When one application updates data, the data update result is not shown to other applications when the data update result is not committed.

(9)コミット:
キャッシュに溜められたデータ更新結果を、複数のアプリケーションが共有するデータファイルに反映することである。反映とは、データファイル中の特定のデータを更新対象とするデータ更新が行われた場合に、その特定データのデータ更新前のデータ値を、データ更新結果として得られたデータ値に変更することである。1つのアプリケーションがデータ更新した場合、そのデータ更新結果のコミットが行われた段階で初めて、他のアプリケーションにもデータ更新結果が示されることになる。また、コミットされた1回毎のデータはコミットデータと呼ぶが、コミットと略称することもある。
(9) Commit:
The data update result stored in the cache is reflected in a data file shared by a plurality of applications. Reflection is to change the data value before updating the specific data to the data value obtained as a data update result when data update for specific data in the data file is performed. It is. When one application updates data, the data update result is shown to other applications only when the data update result is committed. The committed data for each time is called commit data, but may be abbreviated as commit.

(10)モード:
計算機の状態である。少なくとも、マスターモードとレプリカモードがある。以下の実施形態では、マスターモードである「マスター運用中」、レプリカモードである「レプリカ運用中」に加えて、「マスター遷移中」、「レプリカ遷移中」のモードを用いている。また、説明の簡略化の観点から、概して、自計算機または他計算機のモードを示すモード情報を「モード」と略している。
(10) Mode:
The state of the calculator. There are at least a master mode and a replica mode. In the following embodiments, in addition to “in master operation” as the master mode and “in replica operation” in the replica mode, modes of “in master transition” and “in replica transition” are used. In addition, from the viewpoint of simplifying the description, mode information indicating the mode of the own computer or another computer is generally abbreviated as “mode”.

(11)モード管理:
少なくとも自計算機のモードを維持することであり、必要であれば、特定の計算機をマスター計算機に維持することも含む。さらに、全計算機のモードを維持する場合もあり得る。基本的なモード管理は、他計算機からのモード情報を受信して、自計算機のモードを変更したり、モード変更後にその変更後のモード情報を送信したりするものである。また、モード情報を受信したり、自計算機のモードを変更したりした場合は、必要に応じて、レプリケーションやリトリーブを連携して働かせることも行う。
(11) Mode management:
It is at least maintaining the mode of the own computer, and if necessary, also includes maintaining a specific computer in the master computer. Furthermore, the mode of all computers may be maintained. In basic mode management, mode information from another computer is received and the mode of the own computer is changed, or mode information after the change is transmitted after the mode is changed. In addition, when mode information is received or the mode of the local computer is changed, replication and retrieval are also performed in cooperation with each other as necessary.

(12)モード管理表:
モード管理表には少なくとも自計算機のモード情報が格納されている。実際には、モード管理、リトリーブ、レプリケーションの機能に利用するために、モード管理表には、自計算機が認識するマスター計算機名(名称またはIPアドレス等のユニークな識別子)や、モード送受信をやり取りした他計算機のモードを格納することもある。
(12) Mode management table:
The mode management table stores at least mode information of the own computer. Actually, in order to use it for the functions of mode management, retrieval, and replication, the mode management table includes the name of the master computer (a unique identifier such as name or IP address) recognized by the local computer, and mode transmission / reception. The mode of other computers may be stored.

(13)モード変更:
計算機のモードを変更することである。モードを変更した際に、必要があれば、モード管理の一部として変更後のモード情報を送信する。
(13) Mode change:
It is to change the mode of the calculator. When the mode is changed, if necessary, the changed mode information is transmitted as part of the mode management.

(14)リトリーブ:
1つの計算機から、データファイルの全体または一部を一括してコピーすることである。例えば、テーブルデータファイルならば、1つのテーブル全体をコピーする操作や、テーブルの一部のカラムをコピーする操作がリトリーブである。通常のリトリーブにおいては、コピーを受けようとする側がリトリーブ要求を発して、要求を受けた側が必要な部分(例えば、テーブルやカラム)を送信する。送信は1対1となる。
(14) Retrieve:
Copying all or part of a data file from one computer at a time. For example, in the case of a table data file, an operation of copying an entire table or an operation of copying a part of a table column is a retrieve. In normal retrieval, the side that wants to receive a copy issues a retrieval request, and the side that receives the request transmits a necessary part (for example, a table or a column). Transmission is one to one.

(15)リトリーブ状態表:
データファイル中のデータ本体のリトリーブ送受信する単位ごとに、当該データがリトリーブのどのような状態にあるかを示す情報を格納した表である。例えば、状態としては、「リトリーブ中」、「リトリーブ完了」などの状態がある。テーブルデータの場合、リトリーブ送受信する単位としては、カラム単位、テーブル単位等が考えられる。この場合、リトリーブ状態表は、カラム毎の状態、テーブル毎の状態等が記述された表となる。
(15) Retrieve status table:
It is the table | surface which stored the information which shows the state which the said data is in the retrieval for every unit which carries out the transmission / reception of the data main body in a data file. For example, there are states such as “Retrieving”, “Retrieve completed”, and the like. In the case of table data, the units for retrieving and transmitting may be column units, table units, or the like. In this case, the retrieval state table is a table in which the state for each column, the state for each table, and the like are described.

(16)レプリケーション:
マスター計算機においてデータファイルが更新された際に、更新内容を1つまたは複数のレプリカ計算機に送信することである。通常は、同一の送信内容を複数のレプリカ計算機に同時に送る。送信される更新内容をレプリケーションデータと呼ぶ。また、レプリカ計算機において自計算機がレプリケーションデータの受信対象であることをマスター計算機に通知することをレプリケーション接続と呼ぶ。レプリカ計算機においては、このレプリケーション接続を行うことにより、マスター計算機からのレプリケーションデータの受信が可能となる。
(16) Replication:
When the data file is updated in the master computer, the update content is transmitted to one or a plurality of replica computers. Usually, the same transmission content is sent simultaneously to a plurality of replica computers. The update content to be transmitted is called replication data. Informing the master computer that the replica computer is the target of receiving replication data in the replica computer is called replication connection. In the replica computer, the replication data can be received from the master computer by performing this replication connection.

(17)レプリケーション管理表:
レプリケーションの送受信側において、それぞれ送受信相手側の計算機を示す情報を格納した表である。すなわち、レプリケーションの送信側では、レプリケーション送信先計算機名を格納し、レプリケーションの受信側では、レプリケーション送信元計算機名を格納し、送信側でありかつ受信側でもある場合は、両方を格納した表である。
(17) Replication management table:
7 is a table storing information indicating computers on the transmission / reception partner side on the transmission / reception side of replication. In other words, the replication destination computer name is stored on the replication transmission side, the replication transmission source computer name is stored on the replication reception side, and if both are the transmission side and the reception side, both are stored in a table containing both. is there.

(18)マージ:
複数のコミットデータを一体的にまとめて扱うことである。まとめられたものをマージデータと呼ぶ。逆に、マージデータを元の複数のコミットに分けることをマージ展開と呼ぶ。
(18) Merge:
It is to handle multiple commit data together. The collected data is called merge data. Conversely, dividing the merge data into a plurality of original commits is called merge expansion.

(19)マージ番号:
マージデータごとに振られた番号である。以下の実施形態では、マージ展開処理においてマージ番号の抜けをチェックすることで、リトリーブ要求を発するきっかけとなる。
(19) Merge number:
This is a number assigned to each merge data. In the following embodiment, the retrieval of the merge number is checked in the merge development process, which triggers the retrieval request.

(20)マッピングデータ:
複数のアプリケーションが共有するデータファイルの実現方法の1つである。データベースの中身を固定的なハードディスク上に配置し、データベースを起動した際に、ハードディスクにあるデータを主記憶メモリ上のプロセス空間に映したデータである。主記憶メモリ上のプロセス空間に映されたマッピングデータを更新すれば、(OSの実装によるが)ハードディスク上のデータについても直ちに更新される。また、マッピングデータを参照すれば、ハードディスク上のデータを読み出したことになる。
(20) Mapping data:
This is one method for realizing a data file shared by a plurality of applications. When the contents of the database are placed on a fixed hard disk and the database is started, the data on the hard disk is reflected in the process space on the main memory. If the mapping data reflected in the process space on the main memory is updated, the data on the hard disk is also updated immediately (depending on the OS implementation). If the mapping data is referred to, the data on the hard disk is read out.

(21)一斉同報通信:
複数の計算機に対して同時一斉に送信を行うことである。受信側の受信状況に関わらず送信する一方的な通信である。複数の計算機が特定のグループである場合と不特定多数である場合がある。IP網におけるマルチキャスト通信マルチブロードキャスト通信は、一斉同報通信の一例である。
(21) Simultaneous broadcast:
The simultaneous transmission to a plurality of computers. It is a one-sided communication that is transmitted regardless of the reception status on the receiving side. There may be a case where a plurality of computers are a specific group or an unspecified number. Multicast communication multi-broadcast communication in an IP network is an example of simultaneous broadcast communication.

(22)アプリケーション:
各計算機上で動作するアプリケーションであるが、特に、分散データ等価システムのデータ処理やモード処理を発生させるシステム外部の外部アプリケーションを示している。
(22) Application:
Although the application runs on each computer, an external application outside the system that generates data processing and mode processing of the distributed data equivalent system is particularly shown.

[2.システム構成]
図1は、本発明を適用した一つの実施形態に係る分散データ等価システム(以下には、本システムと略称する)を構成する各計算機を示すブロック構成図である。この図1に示すように、各計算機は、分散データ等価処理を実現するための構成要素として、データベース11、データ処理部12、マージデータ処理部13、レプリケーション処理部14、モード処理部15、リトリーブ処理部16、等を備えている。また、データ操作アプリケーション17とモード設定アプリケーション18は、各計算機上で動作して本システムのデータ処理やモード処理を発生させるシステム外部の外部アプリケーションである。なお、本システムの各構成要素11〜16の機能および構成は、次の通りである。
[2. System configuration]
FIG. 1 is a block configuration diagram showing each computer constituting a distributed data equivalent system (hereinafter abbreviated as this system) according to an embodiment to which the present invention is applied. As shown in FIG. 1, each computer has a database 11, a data processing unit 12, a merge data processing unit 13, a replication processing unit 14, a mode processing unit 15, a retrieve as constituent elements for realizing distributed data equivalent processing. A processing unit 16 and the like are provided. The data operation application 17 and the mode setting application 18 are external applications outside the system that operate on each computer and generate data processing and mode processing of the system. In addition, the function and structure of each component 11-16 of this system are as follows.

データベース11は、分散データ等価システム監視制御データ等の目的データを格納する部分であり、ハードディスク上に配置されたデータファイル111とそのマッピングデータ112を備えている。このうち、データファイル111は、ハードディスク上において、複数のアプリケーションからアクセス可能な共有領域に配置されている。また、マッピングデータ112は、データファイル111を主記憶メモリ上のプロセス空間に映したデータである。このようにデータファイル111とマッピングデータ112からデータベース11を構成するのは、本発明を計算機にて実現する方法の一つである。   The database 11 is a part for storing target data such as distributed data equivalent system monitoring control data, and includes a data file 111 and its mapping data 112 arranged on a hard disk. Among these, the data file 111 is arranged in a shared area accessible from a plurality of applications on the hard disk. The mapping data 112 is data that reflects the data file 111 in the process space on the main memory. The construction of the database 11 from the data file 111 and the mapping data 112 in this way is one of the methods for realizing the present invention on a computer.

データ処理部12は、データベース11中のデータを処理する部分であり、データ参照処理部121、データ更新処理部122、受信データ反映部123、更新データキャッシュ124を備えている。このうち、データ参照処理部121は、マスターモード時とレプリカモード時の両方で動作する部分であり、データ操作アプリケーション17からのデータ参照要求に応じて、データベース11中のデータの参照を行う。   The data processing unit 12 is a part that processes data in the database 11, and includes a data reference processing unit 121, a data update processing unit 122, a received data reflection unit 123, and an update data cache 124. Among these, the data reference processing unit 121 is a part that operates in both the master mode and the replica mode, and refers to the data in the database 11 in response to a data reference request from the data operation application 17.

また、データ更新処理部122は、マスターモード時に動作してデータベース11中のデータの更新を行う部分であり、データ操作アプリケーション17からのデータ更新要求に応じて、データ更新操作の結果を更新データキャッシュ124に一旦格納すると共に、コミット要求に応じて更新データキャッシュ124の内容を1個の更新内容コミットデータとし、固有のシリアル番号を付加してデータベース11に格納する。   The data update processing unit 122 is a part that operates in the master mode and updates the data in the database 11. The data update processing unit 122 updates the result of the data update operation in response to the data update request from the data operation application 17. The data is temporarily stored in 124, and the content of the update data cache 124 is set as one update content commit data in response to the commit request, and a unique serial number is added and stored in the database 11.

また、受信データ反映部123は、レプリカモード時に動作してマスター計算機側におけるデータベース11のデータ更新内容を自計算機のデータベース11に反映する部分である。この受信データ反映部123は、マスター計算機側で得られた更新内容コミットデータを、自計算機のマージデータ処理部13を通じて取得し、各更新内容コミットデータ毎に、後述するリトリーブ状態表に基づき、自計算機のデータベース11に反映するか否か判定して、反映すると判定した更新内容コミットデータをそのシリアル番号と共にデータベース11に反映する。   The received data reflecting unit 123 is a part that operates in the replica mode and reflects the data update contents of the database 11 on the master computer side to the database 11 of the own computer. The received data reflecting unit 123 acquires the update content commit data obtained on the master computer side through the merge data processing unit 13 of the own computer, and for each update content commit data, based on the retrieve state table described later. It is determined whether or not to be reflected in the database 11 of the computer, and the update content commit data determined to be reflected is reflected in the database 11 together with the serial number.

マージデータ処理部13は、更新内容コミットデータのマージおよびマージされたデータのマージ展開を行う部分であり、更新データマージ部131とマージデータ展開部132を備えている。このうち、更新データマージ部131は、マスターモード時に動作する部分であり、予め設定されたマージ併合条件に従って決められる1個または複数個の更新内容コミットデータをマージしてマージデータを生成する。また、マージデータ展開部132は、レプリカモード時に動作する部分であり、マスター計算機側で得られたマージデータを、自計算機のレプリケーション処理部14を通じて取得し、元の1個または複数個の更新内容コミットデータに展開する。   The merge data processing unit 13 is a part that merges update content commit data and merges and expands merged data, and includes an update data merge unit 131 and a merge data expansion unit 132. Among them, the update data merge unit 131 is a part that operates in the master mode, and generates merge data by merging one or a plurality of update content commit data determined in accordance with a preset merge merge condition. The merge data expansion unit 132 is a part that operates in the replica mode. The merge data obtained on the master computer side is acquired through the replication processing unit 14 of the own computer, and the original one or more update contents are acquired. Expand to commit data.

レプリケーション処理部14は、更新内容コミットデータのマージデータをレプリケーションデータとして送受信する部分であり、レプリケーション管理部141、レプリケーション通信部142、レプリケーション管理表143を備えている。このうち、レプリケーション管理部141は、マスターモード時とレプリカモード時の両方で動作する部分であり、レプリケーション管理表143を管理する。   The replication processing unit 14 is a part that transmits and receives merge data of update content commit data as replication data, and includes a replication management unit 141, a replication communication unit 142, and a replication management table 143. Among these, the replication management unit 141 is a part that operates in both the master mode and the replica mode, and manages the replication management table 143.

また、レプリケーション管理表143には、マスターモード時には、等価対象となる各レプリカ計算機を示すレプリカ計算機情報(送信先情報)が格納され、レプリカモード時には、レプリケーションデータの送信元となるマスター計算機を示すマスター計算機情報(送信元情報)が格納される。また、レプリケーション通信部142は、マスターモード時とレプリカモード時の両方で動作する部分であり、マスターモード時には、レプリカ計算機情報に基づき各レプリカ計算機に対してマージデータをレプリケーションデータとして送信し、レプリカモード時には、マスター計算機情報に基づきマスター計算機にレプリケーション接続してレプリケーションデータを受信する。   The replication management table 143 stores replica computer information (transmission destination information) indicating each replica computer to be equivalent in the master mode, and a master indicating the master computer that is the replication data transmission source in the replica mode. Computer information (source information) is stored. The replication communication unit 142 is a part that operates in both the master mode and the replica mode. In the master mode, the merge communication data is transmitted as replication data to each replica computer based on the replica computer information. Sometimes, replication connection is made to the master computer based on the master computer information and the replication data is received.

モード処理部15は、モード情報の送受信を含む管理と、自計算機のモード管理およびモード変更を行う部分であり、モード管理部151、モード送信部152、モード受信部153、モード管理表154を備えている。ここで、モード情報は、どの計算機が前記マスター計算機であるかを特定するマスター計算機情報と自計算機のモードを特定する自計算機モード情報を含む情報であり、モード管理表154に格納される。   The mode processing unit 15 is a part that performs management including transmission / reception of mode information, mode management of the own computer, and mode change, and includes a mode management unit 151, a mode transmission unit 152, a mode reception unit 153, and a mode management table 154. ing. Here, the mode information is information including master computer information specifying which computer is the master computer and own computer mode information specifying the mode of the own computer, and is stored in the mode management table 154.

モード管理部151は、マスターモード時とレプリカモード時の両方で動作する部分であり、モード管理表154を管理すると共に、モード設定アプリケーション18からのモード変更要求に応じて、モード変更が必要な場合にはモード遷移および予め決められたモード遷移後の動作を実行する。また、モード送信部152とモード受信部153は、マスターモード時とレプリカモード時の両方で動作する部分であり、他計算機との間でモード情報の送受信を行う。   The mode management unit 151 is a part that operates in both the master mode and the replica mode, manages the mode management table 154, and requires a mode change in response to a mode change request from the mode setting application 18 The mode transition and the operation after the predetermined mode transition are executed. The mode transmission unit 152 and the mode reception unit 153 operate in both the master mode and the replica mode, and transmit / receive mode information to / from other computers.

リトリーブ処理部16は、リトリーブに必要なデータをリトリーブデータとして他計算機との間で送受信する部分であり、リトリーブ要求受理部161、リトリーブデータ送信部162、リトリーブ要求送信部163、リトリーブデータ受信部164、リトリーブ状態表165を備えている。   The retrieval processing unit 16 is a part that transmits / receives data necessary for retrieval to / from other computers as retrieval data. The retrieval processing unit 161, retrieval data transmission unit 162, retrieval request transmission unit 163, and retrieval data reception unit 164 The retrieval state table 165 is provided.

このうち、リトリーブ要求受理部161とリトリーブデータ送信部162は、マスターモード時に動作する部分であり、リトリーブ要求受理部161はレプリカ計算機からのリトリーブ要求を受理し、リトリーブデータ送信部162は要求元のレプリカ計算機にリトリーブデータを送信する。   Among these, the retrieve request accepting unit 161 and the retrieve data transmitting unit 162 are parts that operate in the master mode. The retrieve request accepting unit 161 accepts the retrieve request from the replica computer, and the retrieve data transmitting unit 162 is the request source. Send retrieve data to the replica computer.

また、リトリーブ要求送信部163とリトリーブデータ受信部164は、レプリカモード時に動作する部分であり、リトリーブ要求送信部163はマスター計算機にリトリーブ要求を送信し、リトリーブデータ受信部164はマスター計算機からのリトリーブデータを受信する。また、リトリーブ状態表165は、レプリカモード時に使用され、リトリーブデータとして送受信するデータ単位毎に、そのデータがリトリーブのどのような状態にあるかを示すリトリーブ状態情報が格納されている。このリトリーブ状態表165は、リトリーブ状態に応じてリトリーブ要求送信部163により更新される。   The retrieve request transmission unit 163 and the retrieve data reception unit 164 operate in the replica mode. The retrieve request transmission unit 163 transmits a retrieve request to the master computer, and the retrieve data reception unit 164 retrieves from the master computer. Receive data. The retrieve state table 165 is used in the replica mode, and stores retrieve state information indicating the state of the retrieve for each data unit transmitted and received as retrieve data. The retrieve state table 165 is updated by the retrieve request transmission unit 163 according to the retrieve state.

図2は、図1に示す複数の計算機を通信ネットワークで接続することによって構成される分散データ等価システムを示すブロック構成図である。複数の計算機のうち、特定の1つの計算機を、データベース11のオリジナルなデータ更新が可能なマスターモード、その他の計算機を、オリジナルなデータ更新はできずマスター側のデータ更新内容を複製するレプリカモードで運用することにより、マスター計算機およびレプリカ計算機としてそれぞれ動作させる。   FIG. 2 is a block diagram showing a distributed data equivalent system configured by connecting a plurality of computers shown in FIG. 1 through a communication network. Among a plurality of computers, one specific computer is in a master mode in which the original data of the database 11 can be updated, and the other computers are in a replica mode in which the original data cannot be updated and the master data update contents are duplicated. By operating, it operates as a master computer and a replica computer.

図3は、図2に示す複数の計算機を、マスター計算機およびレプリカ計算機として動作させた場合のシステム構成を示すブロック構成図である。この図3においては、図1に示す各構成要素のうち、マスター計算機、レプリカ計算機として動作する際に使用される構成要素のみを示しており、マスター計算機とレプリカ計算機におけるそれらの構成要素の関係を示している。   FIG. 3 is a block configuration diagram showing a system configuration when the plurality of computers shown in FIG. 2 are operated as a master computer and a replica computer. In FIG. 3, only the components used when operating as the master computer and the replica computer among the components shown in FIG. 1 are shown, and the relationship between those components in the master computer and the replica computer is shown. Show.

以下には、これらの図1〜図3に示す計算機の各構成要素11〜16の詳細について順次説明する。   Below, the detail of each component 11-16 of the computer shown in these FIGS. 1-3 is demonstrated sequentially.

[2−1.データベース]
データベース11のデータファイル111には、表形式データファイルとデータ状態表という2種類のデータが格納されている。
[2-1. Database]
The data file 111 of the database 11 stores two types of data, a tabular data file and a data status table.

表形式データファイルは、図4(a)に示すような、行、列からなる表形式データファイルであり、データファイル111内に1つまたは複数格納されている。以下の説明では、簡略化の観点から、表形式データファイルを「テーブル」と略称する。テーブルには、計算機間でデータファイル内のテーブルを一意に識別するための固有の名称が与えられており、この名称により個々のテーブルの識別を行う。この名称は、テーブルを一意に識別できるものであればよく、番号や記号からなる単なる文字列、記号列などでもよい。   The tabular data file is a tabular data file composed of rows and columns as shown in FIG. 4A, and one or a plurality of tabular data files are stored in the data file 111. In the following description, the tabular data file is abbreviated as “table” from the viewpoint of simplification. The table is given a unique name for uniquely identifying the table in the data file between computers, and each table is identified by this name. The name may be anything that can uniquely identify the table, and may be a simple character string or symbol string composed of numbers and symbols.

データ状態表は、図4(b)に示すように、テーブル、列、行、のいずれかの単位のデータのそれぞれに、シリアル番号値が割り当てられた表であり、図4(b)においては、一例として列番号毎にシリアル番号値が割り当てられている。このシリアル番号は各単位のデータが計算機間で同一であるか否かを判断するために次のように使用される。すなわち、データファイル111において、あるテーブルの列番号、行番号により特定できる1つのデータ値が変更された際に、テーブル、列番号に対応するデータ状態表のシリアル番号値を加算して変更前と異なるシリアル番号値とすることで、計算機間ではシリアル番号値が一致していればテーブルの列番号により示されるデータ内容は同一であると判断し、一致していなければ同一でないと判断する。   As shown in FIG. 4B, the data state table is a table in which a serial number value is assigned to each unit of data in a table, a column, or a row. In FIG. As an example, a serial number value is assigned to each column number. This serial number is used as follows to determine whether the data of each unit is the same between computers. That is, when one data value that can be specified by the column number and row number of a table is changed in the data file 111, the serial number value of the data state table corresponding to the table and column number is added to By using different serial number values, it is determined that the data contents indicated by the column numbers in the table are the same if the serial number values are the same between computers, and if they are not the same, it is determined that they are not the same.

なお、図4(b)では、列番号毎にシリアル番号値を与えているが、テーブル毎、行番号毎またはテーブル、行番号、列番号毎にシリアル番号値を与えて管理してもよい。また、本実施形態では、一例として、データファイル111のデータ本体を表形式のテーブルとしているが、変形例として、データファイル111のデータ本体の形式は、表形式データに限らず、データ内容の追加、削除、更新、参照を行うことが可能な形式であれば、どのような形式でもよい。   In FIG. 4B, the serial number value is given for each column number. However, the serial number value may be given for each table, each row number, or each table, row number, and column number for management. In this embodiment, as an example, the data body of the data file 111 is a table in a table format. However, as a modification, the format of the data body of the data file 111 is not limited to tabular data, and the addition of data contents Any format can be used as long as it can be deleted, updated, and referenced.

また、データベース11のマッピングデータ112は、ハードディスク上に配置されたデータファイル111中のテーブルおよびデータ状態表を、本システムおよび複数のデータ操作アプリケーション17から主記憶メモリ上の仮想メモリ・ページに直接マッピングしたものである。複数のデータ操作アプリケーション17が動作する場合には、データ操作アプリケーション17毎にマッピングデータ112が作成される。   Further, the mapping data 112 of the database 11 directly maps the tables and data status tables in the data file 111 arranged on the hard disk to virtual memory pages on the main memory from the system and the plurality of data manipulation applications 17. It is a thing. When a plurality of data manipulation applications 17 operate, mapping data 112 is created for each data manipulation application 17.

データベース11へのデータ更新内容の反映処理においては、データファイル111へ直接反映処理を行うことなく、マッピングデータ112へ一旦反映することで、データファイル111への反映が間接的に行われ、同時に、本システムおよび複数のデータ操作アプリケーション17の仮想メモリ・ページにマッピングされているマッピングデータ112への反映が行われる。なお、変形例として、マッピングデータ112を作成せず、データベース11への更新、参照処理を行う毎にデータファイル111上のテーブル、データ状態表を構成するファイルへの書込み、読込み処理を行ってもよい。   In the process of reflecting the data update contents to the database 11, the reflection to the data file 111 is indirectly performed by reflecting the mapping data 112 temporarily without performing the direct reflection process to the data file 111. Reflection to the mapping data 112 mapped to the virtual memory page of the system and the plurality of data manipulation applications 17 is performed. As a modification, the mapping data 112 is not created, and writing to and reading from the table on the data file 111 and the file constituting the data state table are performed each time the update or reference process is performed on the database 11. Good.

[2−2.データ処理部]
更新データキャッシュ124は、図5に示すように、変更されたデータのテーブル名称、行番号、列番号、シリアル番号値、変更後データ値などにより管理されており、マスター計算機上で動作するデータ操作アプリケーション17に対して個別に作成・管理される。マスター計算機において、データ操作アプリケーション17が複数動作する場合には、各データ操作アプリケーション17に対して更新データキャッシュ124がそれぞれ作成され、データ更新処理部122によりデータの追加、変更、消去、データ参照処理部121によりデータの参照が行われる。
[2-2. Data processing section]
As shown in FIG. 5, the update data cache 124 is managed by a table name, a row number, a column number, a serial number value, a changed data value, etc. of the changed data, and is a data operation which operates on the master computer. Created and managed individually for the application 17. When a plurality of data manipulation applications 17 operate in the master computer, an update data cache 124 is created for each data manipulation application 17, and data update processing unit 122 adds, changes, deletes, and references data. Data is referenced by the unit 121.

データ参照処理部121は、データ操作アプリケーション17からのデータ参照要求を受けた場合に、次のようなデータ参照処理を行う。すなわち、自計算機がマスター計算機として動作している場合には、対応するテーブル名称、行番号、列番号のデータが更新データキャッシュ124に存在するか否かを確認し、存在する場合には更新データキャッシュ124内のデータ値を返却する。マスター計算機として動作している場合にそのような更新データキャッシュデータが存在しない場合およびレプリカ計算機として動作している場合には、テーブルの行番号、列番号のデータ値を返却する。   When receiving a data reference request from the data operation application 17, the data reference processing unit 121 performs the following data reference processing. That is, when the own computer is operating as a master computer, it is checked whether or not the data of the corresponding table name, row number, and column number exists in the update data cache 124. The data value in the cache 124 is returned. When such update data cache data does not exist when operating as a master computer and when operating as a replica computer, the data values of the row number and column number of the table are returned.

データ更新処理部122は、マスター計算機として動作している自計算機上のデータ操作アプリケーション17からのデータ変更要求を受けた場合に、データ変更処理として、更新データキャッシュ124へ変更内容(データ更新操作の結果)の追加を行い、データ操作アプリケーション17からのコミット要求を受けた場合に、次のようなコミット処理を行う。   When the data update processing unit 122 receives a data change request from the data operation application 17 on the own computer operating as the master computer, the data update processing unit 122 stores the change contents (data update operation When a commit request from the data manipulation application 17 is received, the following commit process is performed.

すなわち、コミット処理において、データ更新処理部122はまず、更新データキャッシュ124に格納された変更後データ値をテーブルへ反映すると共に、データ状態表の対応するテーブル名称、列番号のシリアル番号値に「1」加算し、加算したシリアル番号値を更新データキャッシュ124のシリアル番号値へ格納する。この後、更新データマージ部131へ更新データキャッシュ124の内容と共に通知を行い、更新データキャッシュ124の内容を空とする。   That is, in the commit process, the data update processing unit 122 first reflects the post-change data value stored in the update data cache 124 to the table, and sets the corresponding table name and column number serial number value of the data status table to “ 1 ”is added, and the added serial number value is stored in the serial number value of the update data cache 124. Thereafter, the update data merge unit 131 is notified together with the contents of the update data cache 124, and the contents of the update data cache 124 are emptied.

受信データ反映部123は、レプリカ計算機として動作している自計算機のマージデータ展開部132から、マスター計算機によるデータベースへの変更内容の通知を受けた場合に、次のようなデータ反映処理を行う。すなわち、データ反映処理において、受信データ反映部123は、リトリーブ状態表165を参照し、その変更内容が反映可能な場合にはテーブルへ反映し、データ状態表のシリアル番号値を更新する。また、変更内容が反映可能でない場合には一時保存し、反映可能となったタイミングでテーブルへ反映し、データ状態表のシリアル番号値の更新を行う。   The received data reflection unit 123 performs the following data reflection process when receiving a notification of changes to the database by the master computer from the merge data expansion unit 132 of the own computer operating as a replica computer. That is, in the data reflection process, the reception data reflection unit 123 refers to the retrieve state table 165, and if the change contents can be reflected, reflects the change in the table and updates the serial number value in the data state table. If the change contents cannot be reflected, it is temporarily saved, reflected in the table at the timing when the change can be reflected, and the serial number value in the data status table is updated.

[2−3.マージデータ処理部]
更新データマージ部131は、マスター計算機として動作している自計算機のデータ更新処理部122から更新データキャッシュ124の内容の通知を受けた場合に、今回通知された更新データキャッシュ124の内容と、以前に通知された一時保存中の更新データキャッシュ内容とのマージ処理を行う。ここで、以前に通知された一時保存中の更新データキャッシュ内容が存在する場合には、その更新データキャッシュ内容とのマージを行い、そのような一時保存中の更新データキャッシュ内容が存在しない場合には、今回通知された更新データキャッシュ内容を一時保存する。
[2-3. Merge data processing unit]
When the update data merging unit 131 receives a notification of the contents of the update data cache 124 from the data update processing unit 122 of the own computer operating as the master computer, Merge processing with the contents of the update data cache being temporarily saved notified to. Here, if there is update data cache content that has been notified before and temporarily stored, merge with the update data cache content, and if there is no such update data cache content that is temporarily stored Temporarily stores the update data cache contents notified this time.

このようなマージ処理は、予め設定されたマージ併合条件に従って行われる。すなわち、マージ併合条件を満たした場合には、一時保存中の複数の更新データキャッシュ内容をマージしてマージデータを作成し、このマージデータをそのままあるいは必要に応じて分割を行ってレプリケーションデータとし、レプリケーション通信部142に対してレプリケーションデータの送信依頼通知を行い、一時保存中の更新データキャッシュ内容を空にする。   Such a merge process is performed according to a preset merge merge condition. That is, when the merge merge condition is satisfied, merge data is created by merging the contents of a plurality of update data caches that are temporarily stored, and this merge data is divided into replication data as it is or as needed, A replication data transmission request is notified to the replication communication unit 142, and the contents of the update data cache being temporarily saved are emptied.

ここで、マージ併合条件とは、次のような各種の条件項目の中から選択された単数または複数の条件項目を組み合わせたものである。各種の条件項目としては、一時保存中の更新データキャッシュ内容のデータサイズ、前回のマージ処理(レプリケーション通信部142への送信依頼通知を行い一時保存中の更新データキャッシュ内容を空にするまでの処理)完了後にデータ更新処理部122から通知を受けた回数、前回のマージ処理完了からの経過時間、などが考えられる。   Here, the merge merge condition is a combination of one or more condition items selected from the following various condition items. As various condition items, the data size of the update data cache contents being temporarily saved, the previous merge process (processing until the transmission request notification to the replication communication unit 142 is notified and the update data cache contents being temporarily saved are emptied) ) The number of notifications received from the data update processing unit 122 after the completion, the elapsed time from the completion of the previous merge process, and the like can be considered.

マージデータ展開部132は、レプリカ計算機として動作している自計算機のレプリケーション通信部142から通知を受けたレプリケーションデータを、テーブルへ反映可能な更新内容コミットデータへ展開し、受信データ反映部123へ通知を行う。   The merge data expansion unit 132 expands the replication data received from the replication communication unit 142 of the own computer operating as a replica computer into update content commit data that can be reflected in the table, and notifies the received data reflection unit 123 I do.

[2−4.レプリケーション処理部]
レプリケーション管理表143には、図6に示すように、自計算機がマスター計算機として動作している場合には、データ等価対象である1または複数のレプリカ計算機の情報が格納されており、また、自計算機がレプリカ計算機として動作している場合には、マスター計算機の情報が格納されている。
[2-4. Replication processing section]
As shown in FIG. 6, in the replication management table 143, when the local computer is operating as a master computer, information on one or more replica computers that are data equivalence targets is stored. When the computer is operating as a replica computer, information on the master computer is stored.

レプリケーション管理部141は、モード管理部151からの要求を受け、レプリケーション管理表143の初期化や、マスター計算機情報の追加を行う。   In response to the request from the mode management unit 151, the replication management unit 141 initializes the replication management table 143 and adds master computer information.

レプリケーション通信部142は、マスター計算機として動作している場合に、レプリカ計算機からのレプリケーション接続を受けた場合には、そのレプリカ計算機を示すレプリカ計算機情報をレプリケーション管理表143に追加する。また、マスター計算機として動作している自計算機の更新データマージ部131より送信依頼通知を受けた場合には、レプリケーション管理表143に従い、レプリケーションデータ内容を1または複数のレプリカ計算機のレプリケーション通信部142へ送信する。   When the replication communication unit 142 operates as a master computer and receives a replication connection from a replica computer, the replication communication unit 142 adds replica computer information indicating the replica computer to the replication management table 143. When a transmission request notification is received from the update data merge unit 131 of the own computer operating as the master computer, the replication data contents are transferred to the replication communication unit 142 of one or more replica computers according to the replication management table 143. Send.

レプリケーション通信部142はまた、レプリカ計算機として動作している場合に、レプリケーション管理表143に格納されたマスター計算機情報に従い、マスター計算機へレプリケーション接続してマスター計算機からレプリケーションデータを受信し、マージデータ展開部132への通知を行う。   When the replication communication unit 142 operates as a replica computer, the replication communication unit 142 performs replication connection to the master computer according to the master computer information stored in the replication management table 143, receives replication data from the master computer, and merge data expansion unit. Notification to 132 is performed.

[2−5.モード処理部]
本実施形態において、モード管理表154は、図7に示すように、「自計算機モード情報」と「マスター計算機情報」から構成されている。「自計算機モード情報」には自計算機のモード情報が格納される。「マスター計算機情報」には、ネットワーク内にマスター計算機が存在する場合に、そのマスター計算機の情報が格納される。
[2-5. Mode processing section]
In the present embodiment, the mode management table 154 includes “own computer mode information” and “master computer information” as shown in FIG. “Own computer mode information” stores mode information of the own computer. The “master computer information” stores information on the master computer when the master computer exists in the network.

なお、変形例として、自計算機モード情報のみ、あるいは、全ての計算機のモード情報を格納してもよい。また、モード情報の通信に一斉同報通信を利用して、モード変更した計算機がそのモード情報を複数の計算機に同時一斉に送信することにより、各計算機が他計算機のモード情報を自動的に取得してモード管理表154をリアルタイム更新することも可能である。   As a modification, only the own computer mode information or the mode information of all computers may be stored. In addition, using simultaneous broadcast communication for mode information transmission, each computer automatically acquires mode information of other computers by sending the mode information to multiple computers simultaneously at the same time. It is also possible to update the mode management table 154 in real time.

モード管理部151は、モード設定アプリケーション18からのマスターモードへのモード設定変更要求を受けた場合や、モード受信部153を通じて他計算機からのモード情報を受信した場合に、自計算機のモード変更およびモード管理表154の変更、モード送信部152への自計算機のモード情報の送信要求、レプリケーション管理部141へのレプリカ計算機追加通知やマスター計算機変更通知、リトリーブ要求送信部163へのリトリーブ開始要求通知、等を行う。   When the mode management unit 151 receives a mode setting change request to the master mode from the mode setting application 18 or receives mode information from another computer through the mode receiving unit 153, the mode management unit 151 changes the mode and mode of the own computer. Change of management table 154, request for transmission of mode information of own computer to mode transmission unit 152, notification of addition of replica computer or notification of change of master computer to replication management unit 141, notification of request for start of retrieval to retrieve request transmission unit 163, etc. I do.

モード送信部152は、モード管理部151からの送信要求に従い、ブロードキャストやマルチキャスト等の一斉同報通信を使用して、ネットワーク上の1または複数の計算機のモード受信部153へモード情報データの送信を行う。   The mode transmission unit 152 transmits mode information data to the mode reception unit 153 of one or a plurality of computers on the network by using broadcast communication such as broadcast or multicast according to a transmission request from the mode management unit 151. Do.

モード受信部153は、他の計算機のモード送信部152から送信されたモード情報データを受信し、モード管理部151へ通知する。   The mode reception unit 153 receives the mode information data transmitted from the mode transmission unit 152 of another computer and notifies the mode management unit 151 of the mode information data.

本発明において、モード管理で扱うモード種別は、最低限「マスター」と「レプリカ」が識別できることであるが、本実施形態では、本発明におけるマスターモードとレプリカモードに加えて、これらのモードになる途中の状態についても独立したモードとして取り扱うものとする。   In the present invention, the mode type handled in the mode management is that at least “master” and “replica” can be identified, but in this embodiment, in addition to the master mode and replica mode in the present invention, these modes are used. The intermediate state is also handled as an independent mode.

以下には、マスターモードとレプリカモードをそれぞれ「マスター運用中」、「レプリカ運用中」と呼ぶと共に、レプリカモードおよびマスターモードへの各遷移状態をそれぞれ「マスター遷移中」、「レプリカ遷移中」と呼ぶ。すなわち、本実施形態では、モード種別として、「マスター運用中」、「レプリカ運用中」、「マスター遷移中」、「レプリカ遷移中」という4つのモードを取り扱う。   In the following, the master mode and the replica mode are referred to as “master operation” and “replica operation”, respectively, and the transition states to the replica mode and the master mode are respectively “master transition” and “replica transition”. Call. That is, in the present embodiment, four modes of “master operation”, “replica operation”, “master transition”, and “replica transition” are handled as mode types.

これらのモードのうち、マスターモードである「マスター運用中」だけが、データベース11中のデータに対して、単なる複製ではなく、オリジナルなデータ更新が可能なモードである。レプリカモードである「レプリカ運用中」は、データベース11のオリジナルなデータ更新ができず、マスター計算機でオリジナルにデータ更新されたデータの複製とその参照のみが可能なモードである。   Among these modes, only the “master operation” which is the master mode is a mode in which original data can be updated with respect to the data in the database 11, not simply copying. The replica mode “during replica operation” is a mode in which the original data of the database 11 cannot be updated, and the data that has been originally updated by the master computer can be copied and referenced.

「マスター遷移中」は、「マスター運用中」に遷移する途中のモードであるため、「マスター運用中」に遷移する場合には、常に「マスター遷移中」を経た上で「マスター運用中」に遷移する。例えば、「レプリカ運用中」の計算機において、外部アプリケーションからマスター計算機として動作するようにマスター切替を設定された場合には、「マスター遷移中」に遷移して他にマスター計算機が存在するか否かを確認した後、「マスター運用中」に遷移する。同様に、「レプリカ遷移中」は、「レプリカ運用中」に遷移する途中のモードであるため、「レプリカ運用中」に遷移する場合には、常に「レプリカ遷移中」を経た上で「レプリカ運用中」に遷移する。   Since “Master Transition” is a mode in the middle of transition to “Master Operation”, when transitioning to “Master Operation”, it always goes through “Master Transition” and then “Master Operation”. Transition. For example, if a master switch is set to operate as a master computer from an external application in a “replica operating” computer, transition to “master transition” and whether there is another master computer or not After confirming, transition to “Master Operation”. Similarly, “Replica Transition” is a mode in the middle of transition to “Replica Operation”. Therefore, when transitioning to “Replica Operation”, always go through “Replica Transition” and then “Replica Operation”. Transition to “medium”.

なお、計算機が「マスター遷移中」、「レプリカ遷移中」のいずれかのモードである場合、その計算機は、アプリケーションとの関係ではいずれもレプリカ計算機と同様の存在となる。   Note that when the computer is in either the “master transition” or “replica transition” mode, the computer is present in the same manner as the replica computer in relation to the application.

図8は、4種類のモードから他のモードに遷移する場合の遷移条件として、各モードにおける遷移のトリガー(きっかけ、契機となる事象)と遷移先を示す図である。矢印上に記載された内容が「トリガー」である。この図8においては、4種類のモードの他に、データベースがない状態(データベースの初期化前または停止後の状態)として「データベースなし」モードを便宜的に導入しているが、この「データベースなし」モードは、モード管理表151には現れないモードである。以下には、図8を参照しながら、この「データベースなし」モードを含む計5種類のモードでの遷移フローを説明する。   FIG. 8 is a diagram showing transition triggers (triggers and triggering events) and transition destinations in each mode as transition conditions when transitioning from four types of modes to another mode. The content described on the arrow is “trigger”. In FIG. 8, in addition to the four types of modes, the “no database” mode is introduced as a state where there is no database (the state before or after the initialization of the database) for convenience. "Mode" is a mode that does not appear in the mode management table 151. Hereinafter, transition flows in a total of five modes including the “no database” mode will be described with reference to FIG.

まず、5種類のモード間の遷移トリガーは、大別して、「データベース起動/停止」、「外部アプリケーションのモード設定」、「他計算機からのモード情報受信」、という3種類に分類できる。   First, transition triggers between five types of modes can be broadly classified into three types: “database start / stop”, “mode setting of external application”, and “reception of mode information from other computers”.

第1のトリガー「データベース起動/停止」は、「データベースなし」モードを遷移先または遷移元とするトリガーである。データベースの起動時直前のモードは、「データベースなし」である。この場合に、データベース11を起動すると、まず、「レプリカ遷移中」に遷移する。「データベースなし」モードへは、他の4つのいずれかのモードからも遷移可能であり、そのためのトリガーはデータベース11の停止である。   The first trigger “database start / stop” is a trigger having the “no database” mode as a transition destination or a transition source. The mode immediately before starting the database is “no database”. In this case, when the database 11 is activated, first, the state transits to “in replica transition”. Transition to the “no database” mode is possible from any of the other four modes, and the trigger for that is the shutdown of the database 11.

第2のトリガー「外部アプリケーションのモード設定」は、システム外部のモード設定アプリケーション18によってモード設定されることである。自計算機をマスター計算機に設定するというモード設定操作が行われた場合に、自計算機のモードが「レプリカ運用中」または「レプリカ遷移中」ならば、「マスター遷移中」に遷移する。   The second trigger “mode setting of the external application” is a mode setting by the mode setting application 18 outside the system. When a mode setting operation for setting the own computer as a master computer is performed, if the mode of the own computer is “during replica operation” or “during replica transition”, transition is made to “during master transition”.

第3のトリガー「他計算機からのモード情報受信」は、他計算機からその計算機のモードを示すモード情報を受信することである。他計算機からモード情報を受信した場合には、自計算機のモードをそのモード情報に応じた遷移先モードに変更する。図9は、このようなモード受信時の遷移条件を示す表であり、左の欄に示す現在のモードにおいて右上欄に示すモードであることを示すモード情報を受信した場合における、自計算機の遷移先モードを、現在モードと受信モードの交差する中央の各欄にそれぞれ示したものである。   The third trigger “reception of mode information from another computer” is to receive mode information indicating the mode of the computer from another computer. When mode information is received from another computer, the mode of the own computer is changed to a transition destination mode corresponding to the mode information. FIG. 9 is a table showing the transition conditions at the time of such mode reception, and the transition of the own computer when the mode information indicating the mode shown in the upper right column in the current mode shown in the left column is received. The previous mode is shown in each column in the center where the current mode and the reception mode intersect.

この図9に示すように、自計算機が「マスター運用中」モードである時に、他の計算機から「マスター遷移中」モードを受信した場合、自計算機を最終的には「レプリカ運用中」モードに変更することになるので、モード管理部151は、そのための前段階としてまず、自計算機を途中のモードである「レプリカ遷移中」モードに変更し、モード管理表154の「自計算機モード」欄を「レプリカ遷移中」に変更する。   As shown in FIG. 9, when the own computer is in the “master operation” mode and receives the “master transition” mode from another computer, the own computer is finally set to the “replica operation” mode. Therefore, the mode management unit 151 first changes its own computer to the “in transit replica” mode, which is an intermediate mode, and sets the “own computer mode” column of the mode management table 154 as a previous step. Change to "Replica transitioning".

また、自計算機が「レプリカ運用中」モードである時に、他の計算機から「マスター遷移中」モードを受信した場合、この場合にも最終的には「レプリカ運用中」モードになるので、モード管理部151は、そのための前段階として自計算機を「レプリカ遷移中」モードに変更し、モード管理表154の「自計算機モード」欄を「レプリカ遷移中」に変更する。   In addition, when the local computer is in "Replica in operation" mode, if it receives "Master transition in progress" mode from another computer, it will eventually become "Replica in operation" mode, so mode management The unit 151 changes the own computer to the “in replica transition” mode as a previous step for that purpose, and changes the “own computer mode” column in the mode management table 154 to “in replica transition”.

なお、このように、最終的に「レプリカ運用中」モードにすべき状況で現在モードが「レプリカ運用中」モードである場合は、変形例として、「レプリカ遷移中」モードに変更せずに、そのまま「レプリカ運用中」モードを維持することも考えられるが、本実施形態では、他の計算機から「マスター遷移中」モードを受信した場合の処理を現在モードに関わらず等しくする観点から、現在モードが「レプリカ運用中」であっても、「レプリカ遷移中」に一旦変更するものとする。   In this way, when the current mode is the “in replica operation” mode in the situation that should finally be in the “in replica operation” mode, as a modification, without changing to the “in replica transition” mode, Although it is conceivable to maintain the “in replica operation” mode as it is, in this embodiment, from the viewpoint of equalizing the processing when receiving the “master transition” mode from another computer regardless of the current mode, the current mode Even if “Replica is in operation”, it is temporarily changed to “Replica transition”.

また、自計算機が「マスター遷移中」モードである時に、以前のマスター計算機から「レプリカ遷移中」モードを受信した場合には、以前のマスター計算機がマスター計算機でなくなったことを確認したことになるので、モード管理部151は、自計算機を「マスター運用中」モードに変更し、モード管理表154の「自計算機モード」欄を「マスター運用中」に変更する。   In addition, when the local computer is in "Master Transition" mode, if the "Replica Transition" mode is received from the previous master computer, it is confirmed that the previous master computer is no longer the master computer. Therefore, the mode management unit 151 changes the own computer to the “master operation” mode, and changes the “own computer mode” column of the mode management table 154 to “master operation”.

これに対して、自計算機が「レプリカ遷移中」モードである時に、新マスター計算機から「マスター運用中」モードを受信した場合には、新たにマスター計算機が確立したことを確認したことになるので、モード管理部151は、自計算機を「レプリカ運用中」モードに変更し、モード管理表154の「自計算機モード」欄を「レプリカ運用中」に変更する。   On the other hand, when the local computer is in “Replica Transition” mode, if it receives “Master Operation” mode from the new master computer, it is confirmed that a new master computer has been established. Then, the mode management unit 151 changes the own computer to the “in replica operation” mode, and changes the “own computer mode” column of the mode management table 154 to “in replica operation”.

モード管理部151は、以上のような各モード遷移を行った後、遷移後の新モードに応じて決定される各動作を実行する。図10は、そのようなモード遷移後に行う動作を示したものである。   After performing each mode transition as described above, the mode management unit 151 executes each operation determined according to the new mode after the transition. FIG. 10 shows an operation performed after such mode transition.

この図10に示すように、「マスター運用中」にモード遷移した場合には、モード管理部151は、単純に、モード送信部152により新モード「マスター運用中」の送信のみを行う。   As shown in FIG. 10, when the mode transition is made to “in master operation”, the mode management unit 151 simply transmits only the new mode “in master operation” by the mode transmission unit 152.

また、「レプリカ運用中」にモード遷移した場合には、モード管理部151は、モード送信部152により新モード「レプリカ運用中」を送信すると共に、レプリケーション管理部141とレプリケーション通信部142によりマスター計算機に対してレプリケーション接続し、リトリーブ要求送信部163によりリトリーブ要求を送信する。   When the mode transition is made to “in replica operation”, the mode management unit 151 transmits a new mode “in replica operation” by the mode transmission unit 152 and the master computer by the replication management unit 141 and the replication communication unit 142. And a retrieval request transmission unit 163 transmits a retrieval request.

また、「マスター遷移中」にモード遷移した場合には、モード管理部151は、モード送信部152により新モード「マスター遷移中」を送信すると共に、最終的に「マスター運用中」にモード遷移した際の動作の準備として、レプリケーション管理部141とレプリケーション通信部142によりレプリケーション送信を開始し、リトリーブ要求受理部161を起動する。ここで、レプリケーション送信の開始においては、以前のレプリケーション管理表143を抹消してレプリケーション接続を待つ。   In addition, when the mode transition is made to “in master transition”, the mode management unit 151 transmits a new mode “in master transition” by the mode transmission unit 152 and finally transits to the mode in “master operation”. As a preparation for the operation at that time, replication transmission is started by the replication management unit 141 and the replication communication unit 142, and the retrieve request receiving unit 161 is activated. Here, at the start of replication transmission, the previous replication management table 143 is deleted and a replication connection is awaited.

また、「レプリカ遷移中」にモード遷移した場合には、モード管理部151は、単純に、モード送信部152により新モード「レプリカ遷移中」の送信のみを行う。   When the mode transition is made to “in replica transition”, the mode management unit 151 simply transmits only the new mode “in replica transition” by the mode transmission unit 152.

以上のように、モード処理部15は、図8および図9に示すような予め決められた遷移条件に基づき、モード遷移を行うと共に、モード遷移後には、レプリケーション処理部14およびリトリーブ処理部16と連携して、図10に示すような予め決められた内容のモード遷移後の動作を実行する。   As described above, the mode processing unit 15 performs mode transition based on predetermined transition conditions as shown in FIGS. 8 and 9, and after the mode transition, the replication processing unit 14 and the retrieval processing unit 16 In cooperation with each other, an operation after mode transition having a predetermined content as shown in FIG. 10 is executed.

[2−6.リトリーブ処理部]
リトリーブ状態表165には、図11に示すように、各テーブルのリトリーブ状態が格納されている。
[2-6. Retrieve processing unit]
The retrieve state table 165 stores the retrieve state of each table as shown in FIG.

リトリーブ要求受理部161は、自計算機がマスター計算機である場合にのみ動作し、レプリカ計算機である他の計算機のリトリーブ要求送信部163から「データ状態表」の送信要求、または「テーブルの列に関するデータ」および「データ状態表」の送信要求を受けた場合に、リトリーブデータ送信部162へその送信要求を行う。   The retrieve request accepting unit 161 operates only when the own computer is a master computer. The retrieve request transmitting unit 163 of another computer that is a replica computer sends a “data state table” transmission request or “data about a table column”. ”And“ data state table ”are transmitted to the retrieve data transmission unit 162.

リトリーブデータ送信部162は、自計算機がマスター計算機である場合にのみ動作し、リトリーブ要求受理部161で受け付けた送信要求の要求内容に応じて、自計算機のデータベース11中のテーブルおよびデータ状態表からデータを取得し、取得したデータを「送信要求内容に応じたデータ」として、要求元レプリカ計算機のリトリーブデータ受信部164へ送信する。   The retrieve data transmission unit 162 operates only when the own computer is a master computer. From the table and the data state table in the database 11 of the own computer, the retrieve data transmission unit 162 operates according to the request content of the transmission request received by the retrieve request reception unit 161. The data is acquired, and the acquired data is transmitted as “data corresponding to the content of the transmission request” to the retrieve data receiving unit 164 of the request source replica computer.

リトリーブ要求送信部163は、自計算機がレプリカ計算機である場合にのみ動作し、自計算機のモード管理部151、マージデータ展開部132、受信データ反映部123からの通知を受けた場合に、「データ状態表」の送信要求、または「テーブルの列に関するデータ」および「データ状態表」の送信要求をマスター計算機のリトリーブデータ送信部162に行い、リトリーブ状態表165の更新を行う。   The retrieve request transmission unit 163 operates only when the local computer is a replica computer, and when receiving a notification from the mode management unit 151, the merge data expansion unit 132, and the reception data reflection unit 123 of the local computer, A transmission request for “status table” or a transmission request for “data relating to table columns” and “data status table” is sent to the retrieval data transmission unit 162 of the master computer, and the retrieval status table 165 is updated.

リトリーブ要求送信部163は、行った送信要求が「データ状態表の送信要求」である場合には、要求先マスター計算機から「送信要求内容に応じたデータ」として送信される「データ状態表」を、リトリーブデータ受信部164を通じて受信し、自計算機のデータベース11のデータ状態表全体と比較する。このデータ状態表比較の結果として、シリアル番号値の異なる「テーブル、列」が得られた場合に、その「テーブル、列」についての「テーブルの列に関するデータ」および「データ状態表」の送信要求をマスター計算機のリトリーブデータ送信部162へ行い、リトリーブ状態表165の更新を行う。   When the transmitted transmission request is a “data state table transmission request”, the retrieve request transmission unit 163 transmits a “data state table” transmitted as “data corresponding to the content of the transmission request” from the requesting master computer. The data is received through the retrieve data receiving unit 164 and compared with the entire data state table of the database 11 of the own computer. When “table, column” with different serial number values is obtained as a result of this data state table comparison, a transmission request for “data on table column” and “data state table” for that “table, column” To the retrieve data transmission unit 162 of the master computer, and the retrieve state table 165 is updated.

リトリーブ要求送信部163はまた、行った送信要求が、上記のような「テーブル、列」についての「テーブルの列に関するデータ」および「データ状態表」の送信要求である場合には、要求先マスター計算機のリトリーブデータ送信部162から、それらのデータを含む完了通知を、リトリーブデータ受信部164を通じて受信し、リトリーブ状態表165の更新を行う。   The retrieve request transmission unit 163 also sends a request request master if the transmission request made is a transmission request for “data relating to table columns” and “data state table” for “table, column” as described above. A completion notification including such data is received from the retrieve data transmission unit 162 of the computer through the retrieve data reception unit 164, and the retrieval status table 165 is updated.

リトリーブデータ受信部164は、要求先マスター計算機のリトリーブデータ送信部162から受信した内容が、「データ状態表」である場合には、リトリーブ要求送信部163へその内容を通知する。これに対して、受信した内容が「テーブル、列」についての「テーブルの列に関するデータ」および「データ状態表」である場合には、自計算機のデータベース11中のテーブルおよびデータ状態表へ反映し、完了結果をリトリーブ要求送信部163へ通知する。   When the content received from the retrieve data transmission unit 162 of the requested master computer is the “data state table”, the retrieve data reception unit 164 notifies the retrieval request transmission unit 163 of the content. On the other hand, if the received contents are “data related to table columns” and “data status table” for “table, column”, they are reflected in the table and data status table in the database 11 of the own computer. The completion request is notified to the retrieval request transmission unit 163.

[3.初期起動・モード変更処理]
図12は、図1〜図3に示す分散データ等価システムの各計算機による初期起動からシステム停止に至るまでの動作概要を示すフローチャートである。
[3. Initial startup / mode change processing]
FIG. 12 is a flowchart showing an outline of the operation from the initial activation by each computer of the distributed data equivalent system shown in FIGS. 1 to 3 to the system stop.

この図12に示すように、各計算機は、モード処理部15とレプリケーション処理部14およびリトリーブ処理部16の連携により、「初期起動処理」を行う(S1201)ことで、「レプリカ遷移中」モードまたは「レプリカ運用中」モードとなり、レプリカ計算機として動作する(S1202)。その後、モード設定アプリケーション18で自計算機のマスター設定が行われた場合(S1203のYES)には、モード処理部15とレプリケーション処理部14およびリトリーブ処理部16の連携により、「自計算機マスター設定時のモード変更処理」を行う(S1204)ことで、マスター運用中モードとなり、マスター計算機として動作する(S1205)。   As shown in FIG. 12, each computer performs “initial startup processing” in cooperation with the mode processing unit 15, the replication processing unit 14, and the retrieval processing unit 16 (S 1201). The “replica operation” mode is set, and the system operates as a replica computer (S1202). After that, when the master setting of the own computer is performed by the mode setting application 18 (YES in S1203), the mode processing unit 15, the replication processing unit 14, and the retrieval processing unit 16 cooperate with each other, By performing “mode change processing” (S1204), the master operation mode is set, and the system operates as a master computer (S1205).

また、他の計算機のマスター設定が行われた場合(S1206のYES)には、モード処理部15とレプリケーション処理部14およびリトリーブ処理部16の連携により、「他計算機マスター設定時のモード変更処理」を行う(S1207)ことで、レプリカ運用中モードとなり、レプリカ計算機として動作する(S1208)。各計算機は、自計算機のデータベース11が停止するまで(S1209のNO)、自計算機または他計算機のマスター設定に応じたモード変更処理(S1203〜S1208)を繰り返し、自計算機のデータベース11が停止した時点(S1209のYES)で動作を終了する。   Further, when the master setting of another computer is performed (YES in S1206), the mode processing unit 15, the replication processing unit 14, and the retrieval processing unit 16 cooperate to “mode change processing at the time of other computer master setting”. (S1207), the replica operation mode is set, and the system operates as a replica computer (S1208). Each computer repeats the mode change process (S1203 to S1208) according to the master setting of the own computer or another computer until the database 11 of the own computer stops (NO in S1209), and the time when the database 11 of the own computer stops The operation ends in (YES in S1209).

以下には、図12に示す動作のうち、初期起動処理(S1201)、自計算機マスター設定時のモード変更処理(S1204)、他計算機マスター設定時のモード変更処理(S1207)の詳細について順次説明する。   In the following, details of the initial startup process (S1201), the mode change process at the time of setting the own computer master (S1204), and the mode change process at the time of setting the other computer master (S1207) among the operations shown in FIG. .

[3−1.初期起動処理]
図13は、図12に示す初期起動処理(S1201)の処理手順の概要を示すフローチャートである。この処理は、モード管理部151を処理主体とし、レプリケーション管理部141およびリトリーブ要求送信部163と連携して行われる。
[3-1. Initial startup process]
FIG. 13 is a flowchart showing an outline of the processing procedure of the initial activation process (S1201) shown in FIG. This processing is performed in cooperation with the replication management unit 141 and the retrieve request transmission unit 163 with the mode management unit 151 as a processing subject.

なお、初期起動時には、計算機はレプリカ計算機として起動させるため、モード管理表154の最初の自計算機モードをレプリカ遷移中と設定する。なお、初期起動時の最初のモードは4つのモードのどれでもよいが、処理フローを簡略化する観点から、本実施形態においては最初のモードを「レプリカ遷移中」とした場合について説明する。   At the time of initial startup, since the computer is started as a replica computer, the first own computer mode in the mode management table 154 is set to replica transition. The first mode at the time of initial activation may be any of the four modes. However, from the viewpoint of simplifying the processing flow, the case where the first mode is “during replica transition” will be described in the present embodiment.

まず、モード管理部151により、通信ネットワーク内にマスター計算機が存在するか否かの確認を行う(S1301)。モード管理部151は、この確認を行うための処理として、具体的には、モード送信部152を通じて、マスター計算機が存在するかの「問い合わせ」をマルチキャストまたはブロードキャストにてネットワーク上へ送信し、一定時間応答を待つ。   First, the mode management unit 151 checks whether or not a master computer exists in the communication network (S1301). Specifically, as a process for performing this confirmation, the mode management unit 151 transmits an “inquiry” as to whether or not the master computer exists through the mode transmission unit 152 to the network by multicast or broadcast, for a certain period of time. Wait for a response.

この「問い合わせ」に対して、通信ネットワーク内にマスター計算機として動作している計算機が存在する場合には、そのマスター計算機上のモード受信部153により「問い合わせ」が受信され、マスター計算機上のモード管理部151へ通知が行われる。この場合に、そのマスター計算機上のモード管理部151は、モード送信部152を通じて自計算機がマスター計算機であることを示す情報を送信する。そして、問い合わせ元の計算機において、モード受信部153によりマスター計算機の情報を受信し、その通知をモード管理部151により受けた場合には、マスター計算機の存在を確認したことになる。   In response to this “inquiry”, if there is a computer operating as a master computer in the communication network, the “inquiry” is received by the mode receiving unit 153 on the master computer, and mode management on the master computer is performed. Notification is made to the unit 151. In this case, the mode management unit 151 on the master computer transmits information indicating that the own computer is a master computer through the mode transmission unit 152. When the inquiry source computer receives the master computer information by the mode receiving unit 153 and receives the notification by the mode management unit 151, the presence of the master computer is confirmed.

このようなマスター計算機の確認処理(S1301)の結果、マスター計算機が存在しない場合(S1302のNO)には、自計算機または通信ネットワーク上の他計算機がマスター計算機となるまで、モード管理部151により自計算機モードおよびモード管理表154の自計算機モード情報を「レプリカ遷移中」に維持し、レプリカ計算機として動作する(S1303)。   If there is no master computer (NO in S1302) as a result of such a master computer confirmation process (S1301), the mode management unit 151 automatically executes until the own computer or another computer on the communication network becomes the master computer. The own computer mode information in the computer mode and mode management table 154 is maintained as “in replica transition”, and operates as a replica computer (S1303).

これに対して、マスター計算機が存在する場合(S1302のYES)には、モード管理部151によりモード管理表154のマスター計算機情報の設定を行い(S1304)、モード管理部151からリトリーブ要求送信部163に通知を行うことで、リトリーブ要求送信部163により、リトリーブ状態表165の初期化を行う(S1305)。このリトリーブ状態表165の初期化において、リトリーブ要求送信部163は、データファイル111内の全てのテーブルについて、リトリーブ状態表165の状態を「リトリーブ未」に設定する。   On the other hand, if there is a master computer (YES in S1302), the mode management unit 151 sets the master computer information in the mode management table 154 (S1304), and the mode management unit 151 sends the retrieval request transmission unit 163. The retrieval request transmission unit 163 initializes the retrieval status table 165 (S1305). In the initialization of the retrieval status table 165, the retrieval request transmission unit 163 sets the status of the retrieval status table 165 to “not retrieved” for all the tables in the data file 111.

リトリーブ状態表165の初期化(S1305)を完了した後、モード管理部151からレプリケーション管理部141にマスター計算機情報の通知を行うことで、レプリケーション管理部141により、レプリケーション受信開始のための処理を行う(S1306)。   After completing the initialization (S1305) of the retrieve state table 165, the replication manager 141 notifies the replication manager 141 of the master computer information, and the replication manager 141 performs processing for starting replication reception. (S1306).

この場合、レプリケーション管理部141は、レプリケーション受信するための処理として、具体的には、モード管理部151から通知されたマスター計算機情報をレプリケーション管理表143へ格納し、レプリケーション通信部142によりマスター計算機へのレプリケーション接続処理を行う。レプリケーション接続処理とは、自計算機がレプリケーション受信する対象であることをマスター計算機に通知することである。これにより、レプリケーション通信部142は、マスター計算機からのレプリケーション受信が可能となる。   In this case, the replication management unit 141 stores the master computer information notified from the mode management unit 151 in the replication management table 143 as a process for receiving replication, and the replication communication unit 142 sends the master computer information to the master computer. Perform replication connection processing. The replication connection process is to notify the master computer that the local computer is a target for receiving replication. As a result, the replication communication unit 142 can receive replication from the master computer.

このようなレプリケーション受信開始処理(S1306)の結果、レプリケーション受信可能となった後、モード管理部151からリトリーブ要求送信部163に通知を行うことで、リトリーブ要求送信部163により、データベース全体のリトリーブ処理を行う(S1307)。   As a result of the replication reception start processing (S1306), after the replication reception becomes possible, the retrieval request transmission unit 163 notifies the retrieval request transmission unit 163, and the retrieval request transmission unit 163 retrieves the entire database. Is performed (S1307).

図14(a)は、このデータベース全体のリトリーブ処理(S1307)の処理手順を示すフローチャートである。この処理は、リトリーブ要求送信部163を処理主体として行われる。   FIG. 14A is a flowchart showing the processing procedure of the retrieval processing (S1307) of the entire database. This processing is performed with the retrieval request transmission unit 163 as a processing subject.

まず、マスター計算機からデータ状態表の取得を行い(S1401)、各テーブルについて(S1402)、自計算機のデータ状態表との比較を行い(S1403)、テーブルの列全てのバージョン番号値が等しいテーブルについて(S1404のYES)は、リトリーブ状態表165の該当テーブルの状態を「リトリーブ済」とし(S1405)、その他の、バージョン番号値の異なる列を持つテーブルについて(S1404のNO)は、「テーブル、列のリトリーブ要求処理」を行う(S1406)。   First, a data state table is acquired from the master computer (S1401), each table is compared (S1402), and is compared with the data state table of its own computer (S1403). (YES in S1404) sets the state of the corresponding table in the retrieve state table 165 to “Retrieved” (S1405), and for other tables having columns with different version number values (NO in S1404) ”Retrieve request processing” is performed (S1406).

図14(b)は、この「テーブル、列のリトリーブ要求処理」(S1406)の処理手順を示すフローチャートである。初めに、要求を受けたテーブルについて「リトリーブ中」とし(S14061)、テーブル毎にバージョン番号の異なるカラムについての情報とともにマスター計算機へ送信要求を行う(S14062)。   FIG. 14B is a flowchart showing the processing procedure of this “table / column retrieval request processing” (S 1406). First, the table for which the request has been received is set to “retrieving” (S14061), and a transmission request is made to the master computer together with information about columns having different version numbers for each table (S14062).

この送信要求を受けたマスター計算機のリトリーブ要求受理部161からリトリーブデータ送信部162へ通知を行い、送信要求内容に応じたデータがリトリーブデータとして送信されることにより、このリトリーブデータは、「送信要求内容に応じたリトリーブデータ」として、リトリーブ要求元の計算機のリトリーブデータ受信部164により受信される(S14063)。その結果、「リトリーブ実行処理」として、リトリーブデータ受信部164によりテーブルおよびデータ状態表へリトリーブデータが一括的に反映されると共に、リトリーブ要求送信部163へのリトリーブ完了通知が行われる(S14064)。   The retrieval request receiving unit 161 of the master computer that has received this transmission request notifies the retrieval data transmission unit 162, and the data corresponding to the content of the transmission request is transmitted as retrieval data. "Retrieve data according to the content" is received by the retrieve data receiving unit 164 of the computer requesting the retrieval (S14063). As a result, as the “retrieve execution process”, the retrieve data receiving unit 164 collectively reflects the retrieve data on the table and the data state table, and the retrieve request transmission unit 163 is notified of the retrieval completion (S14064).

図14(a)に示すデータベース全体のリトリーブ処理においては、全てのテーブルについて一連の処理手順(S1402〜S1407)が完了した後、リトリーブ要求送信部163によってリトリーブデータ受信部164からのリトリーブ完了通知を受ける(S1410)。その結果、リトリーブ要求送信部163は、リトリーブ状態表165の該当するテーブルの状態を「リトリーブ済」とし(S1411)、全てのテーブルについて「リトリーブ済」となった時点(S1408の”YES”)で、データベース全体のリトリーブ処理は完了となる(S1409)。   In the retrieval processing of the entire database shown in FIG. 14A, after a series of processing steps (S1402 to S1407) are completed for all tables, a retrieval completion notification is sent from the retrieval data receiving unit 164 by the retrieval request transmission unit 163. Receive (S1410). As a result, the retrieval request transmission unit 163 sets the state of the corresponding table in the retrieval state table 165 to “retrieved” (S1411), and when all the tables are “retrieved” (“YES” in S1408). The retrieval process for the entire database is completed (S1409).

図13に示す「初期起動処理」においては、図14(a)に示す「データベース全体のリトリーブ処理」(S1307)が完了した後、モード管理部151により、自計算機モードおよびモード管理表154の自計算機モード情報を「レプリカ運用中」へ変更し(S1308)、これ以降、自計算機は、マスター変更が発生するまで「レプリカ運用中」モードを維持し、レプリカ計算機として動作する(S1309)。   In the “initial start-up process” shown in FIG. 13, after the “retrieve process for the entire database” (S1307) shown in FIG. 14A is completed, the mode management unit 151 uses the own computer mode and the mode management table 154. The computer mode information is changed to “in replica operation” (S1308), and thereafter, the own computer maintains the “in replica operation” mode until a master change occurs and operates as a replica computer (S1309).

なお、図13中の「レプリケーション受信開始処理」(S1306)における「レプリケーション接続」とは、通信層(IP層)での接続ではなく、本システムでのレプリケーションの管理層(レプリケーション処理部14)での接続である。また、レプリケーション通信には、IP層のTCPやUDP(マルチキャスト、ブロードキャスト)が用いられる。接続型IP通信であるTCPを用いる時は、レプリケーション接続処理と同期してTCPレベルでの接続処理を行う。   Note that “replication connection” in “replication reception start processing” (S1306) in FIG. 13 is not a connection in the communication layer (IP layer) but a replication management layer (replication processing unit 14) in this system. Connection. In addition, IP layer TCP or UDP (multicast, broadcast) is used for replication communication. When TCP, which is connection-type IP communication, is used, connection processing at the TCP level is performed in synchronization with replication connection processing.

[3−2.自計算機マスター設定時のモード変更処理]
図15は、図12に示す自計算機マスター設定時のモード変更処理(S1204)の処理手順の概要を示すフローチャートである。この処理は、モード管理部151を処理主体とし、レプリケーション管理部141およびリトリーブ要求受理部161と連携して行われる。
[3-2. Mode change process when setting own computer master]
FIG. 15 is a flowchart showing an outline of the processing procedure of the mode change process (S1204) at the time of setting the own computer master shown in FIG. This processing is performed in cooperation with the replication management unit 141 and the retrieve request reception unit 161 with the mode management unit 151 as a processing subject.

なお、この「自計算機マスター設定時のモード変更処理」の具体的な処理手順は、自計算機がマスター計算機とレプリカ計算機のいずれであるかにより異なり、レプリカ計算機である場合には、現在のモードがレプリカ運用中とレプリカ遷移中のいずれであるかにより異なる。以下では、これらの状況別における処理手順について説明する。   Note that the specific processing procedure of the “mode change process when setting the own computer master” differs depending on whether the own computer is a master computer or a replica computer. If the computer is a replica computer, the current mode is Depends on whether replica operation or replica transition is in progress. Below, the processing procedure according to these situations will be described.

前述した初期起動時に通信ネットワーク内にマスター計算機が存在しない場合には、各計算機において、モード管理表154の自計算機モード情報は「レプリカ遷移中」に設定され、マスター計算機情報は空となっている。一方、初期起動時にスター計算機が存在する場合には、それ以外の計算機において、モード管理表154の自計算機モード情報は「レプリカ運用中」に設定され、マスター計算機情報には、マスター計算機として現在動作している計算機の情報が格納されている。   When there is no master computer in the communication network at the time of initial startup, the own computer mode information in the mode management table 154 is set to “in replica transition” in each computer, and the master computer information is empty. . On the other hand, if a star computer exists at the time of initial startup, the own computer mode information in the mode management table 154 is set to “in replica operation” in other computers, and the master computer information is currently operating as a master computer. Stores information about the computers that are running.

さらに、初期起動後に1回またはそれ以上のマスター設定によるモード変更処理が行われた後には、各計算機において、モード管理表154の自計算機モード情報は「マスター運用中」、「レプリカ運用中」、「マスター遷移中」、「レプリカ遷移中」、のいずれかに設定され、マスター計算機情報には、マスター計算機として現在動作している計算機の情報が格納されている。ここで、自計算機がマスター計算機として動作している場合には、モード管理表154の自計算機モード情報は「マスター運用中」に設定され、マスター計算機情報には自計算機の情報が格納されている。   Further, after the mode change process is performed by one or more master settings after the initial startup, in each computer, the own computer mode information in the mode management table 154 includes “master operation”, “replica operation”, It is set to either “master transition in progress” or “replica transition in progress”, and the master computer information stores information on a computer currently operating as a master computer. Here, when the own computer is operating as a master computer, the own computer mode information in the mode management table 154 is set to “master operation in progress”, and information on the own computer is stored in the master computer information. .

このような各種の状況において、モード設定アプリケーション18により自計算機のマスター設定が行われると(S1501)、モード管理部151により処理が行われる。モード管理部151は、モード管理表154の自計算機モード情報を参照し、マスター計算機であるか否かの確認を行う(S1502)。自計算機がマスター計算機である場合には(S1502のYES)、そのままマスター設定処理を完了する。   In such various situations, when the master setting of the own computer is performed by the mode setting application 18 (S1501), processing is performed by the mode management unit 151. The mode management unit 151 refers to its own computer mode information in the mode management table 154 and confirms whether it is a master computer (S1502). When the own computer is a master computer (YES in S1502), the master setting process is completed as it is.

また、自計算機がマスター計算機でない場合には(S1502のNO)、モード管理表154の自計算機モード情報を「マスター遷移中」へ変更する(S1503)。   If the own computer is not the master computer (NO in S1502), the own computer mode information in the mode management table 154 is changed to “during master transition” (S1503).

自計算機モード情報を「マスター遷移中」へ変更後、モード管理部151は、モード送信部152によりマスター遷移中情報の送信を行う(S1504)。マスター遷移中情報の送信では、自計算機モード情報としてマスター遷移中情報をマルチキャストまたはブロードキャストにてネットワーク上へ送信する。   After changing the own computer mode information to “in master transition”, the mode management unit 151 transmits the information in master transition by the mode transmission unit 152 (S1504). In transmitting the master transition information, the master transition information is transmitted to the network by multicast or broadcast as its own computer mode information.

次に、モード管理部151は、自計算機のモード管理表154にて「マスター運用中」モードで現在動作中のマスター計算機(現マスター計算機)が存在するか否かを確認し(S1505)、現マスター計算機が存在する場合には(S1505のYES)、現マスター計算機からレプリカ遷移中情報が送信されてくるまで一定時間受信待ちを行い、モード受信部153により現マスター計算機からのレプリカ遷移中情報を受信する(S1506)。モード管理部151は、現マスター計算機からのレプリカ遷移中情報を受信した場合、または、現マスター計算機が存在しない場合には(S1505のNO)、モード管理表154のマスター計算機情報へ自計算機の情報を格納する(S1507)。   Next, the mode management unit 151 checks whether or not there is a master computer (current master computer) currently operating in the “master operation” mode in the mode management table 154 of the own computer (S1505). If there is a master computer (YES in S1505), it waits for a certain period of time until the replica transition information is transmitted from the current master computer, and the mode reception unit 153 receives the replica transition information from the current master computer. Receive (S1506). When the mode management unit 151 receives the replica transition information from the current master computer, or when the current master computer does not exist (NO in S1505), the mode management unit 151 adds the information of the own computer to the master computer information in the mode management table 154. Is stored (S1507).

その後、モード管理部151からレプリケーション管理部141に自計算機マスター情報の通知を行い、レプリケーション管理部141により、レプリケーション送信開始処理を行う(S1508)。レプリケーション管理部141は、このレプリケーション送信開始処理として、具体的には、レプリケーション管理表143の初期化を行い、レプリケーション通信部142がマスター計算機とレプリケーション接続している場合には切断処理を行い、レプリカ計算機からのレプリケーション接続要求の受付を可能とする。このようなレプリケーション送信開始処理を行うことにより、マスター計算機では、レプリカ計算機からのレプリケーション接続要求を受け、接続を行い、以降に発生するレプリケーションデータの送信が可能となる。   After that, the mode manager 151 notifies the replication manager 141 of its own computer master information, and the replication manager 141 performs replication transmission start processing (S1508). Specifically, as the replication transmission start processing, the replication management unit 141 initializes the replication management table 143. When the replication communication unit 142 is in replication connection with the master computer, the replication management unit 141 performs disconnection processing. Enables reception of replication connection requests from computers. By performing such a replication transmission start process, the master computer can receive a replication connection request from the replica computer, establish a connection, and transmit replication data generated thereafter.

次に、モード管理部151からの通知により、リトリーブ要求送信部163の停止(S1509)を行う。リトリーブ要求送信部163は、現在要求中の処理がある場合には、その処理を停止する。   Next, in response to a notification from the mode management unit 151, the retrieval request transmission unit 163 is stopped (S1509). If there is a process that is currently requested, the retrieve request transmission unit 163 stops the process.

続いて、モード管理部151からの通知により、リトリーブ要求受理部161の開始(S1510)を行う。リトリーブ要求受理部161は、開始処理を行うことでレプリカ計算機からのリトリーブ要求に応答可能となる。   Subsequently, in response to a notification from the mode management unit 151, the retrieval request reception unit 161 is started (S1510). The retrieve request accepting unit 161 can respond to the retrieve request from the replica computer by performing the start process.

この後、モード管理部151は、モード管理表154の自計算機モード情報を「マスター運用中」へ変更し(S1511)、モード送信部152にてマスター運用中情報の送信を行い(S1512)、マスター計算機としての動作を開始する。   Thereafter, the mode management unit 151 changes its own computer mode information in the mode management table 154 to “master operation” (S1511), and the mode transmission unit 152 transmits the master operation information (S1512). Start operation as a computer.

[3−3.他計算機マスター設定時のモード変更処理]
図16、図17は、図12に示す他計算機マスター設定時のモード変更処理(S1207)の処理手順の概要を示すフローチャートであり、図16は、「レプリカ遷移中」モードに遷移するまでの前半部分、図17は、その後「レプリカ運用中」モードに遷移するまでの後半部分を示している。この処理は、モード管理部151を処理主体とし、レプリケーション管理部141およびリトリーブ要求送信部163と連携して行われる。
[3-3. Mode change processing when setting other computer master]
16 and 17 are flowcharts showing an overview of the processing procedure of the mode change processing (S1207) at the time of other computer master setting shown in FIG. 12, and FIG. 16 shows the first half until the transition to the “in replica transition” mode. FIG. 17 shows the latter half until the transition to the “in replica operation” mode. This processing is performed in cooperation with the replication management unit 141 and the retrieve request transmission unit 163 with the mode management unit 151 as a processing subject.

なお、この「自計算機マスター設定時のモード変更処理」の具体的な処理手順は、自計算機がマスター計算機とレプリカ計算機のいずれであるかにより異なり、レプリカ計算機である場合には、現在のモードがレプリカ運用中とレプリカ遷移中のいずれであるかにより異なる。以下では、これらの状況別における処理手順について説明する。   Note that the specific processing procedure of the “mode change process when setting the own computer master” differs depending on whether the own computer is a master computer or a replica computer. If the computer is a replica computer, the current mode is Depends on whether replica operation or replica transition is in progress. Below, the processing procedure according to these situations will be described.

前述した初期起動時に通信ネットワーク内にマスター計算機が存在しない場合には、各計算機において、モード管理表154の自計算機モード情報は「レプリカ遷移中」に設定され、マスター計算機情報は空となっている。一方、初期起動時にスター計算機が存在する場合には、それ以外の計算機において、モード管理表154の自計算機モード情報は「レプリカ運用中」に設定され、マスター計算機情報には、マスター計算機として現在動作している計算機の情報が格納されている。   When there is no master computer in the communication network at the time of initial startup, the own computer mode information in the mode management table 154 is set to “in replica transition” in each computer, and the master computer information is empty. . On the other hand, if a star computer exists at the time of initial startup, the own computer mode information in the mode management table 154 is set to “in replica operation” in other computers, and the master computer information is currently operating as a master computer. Stores information about the computers that are running.

さらに、初期起動後に1回またはそれ以上のマスター設定によるモード変更処理が行われた後には、各計算機において、モード管理表154の自計算機モード情報は「マスター運用中」、「レプリカ運用中」、「マスター遷移中」、「レプリカ遷移中」、のいずれかに設定され、マスター計算機情報には、マスター計算機として現在動作している計算機の情報が格納されている。ここで、自計算機がマスター計算機として動作している場合には、モード管理表154の自計算機モード情報は「マスター運用中」に設定され、マスター計算機情報には自計算機の情報が格納されている。   Further, after the mode change process is performed by one or more master settings after the initial startup, in each computer, the own computer mode information in the mode management table 154 includes “master operation”, “replica operation”, It is set to either “master transition in progress” or “replica transition in progress”, and the master computer information stores information on a computer currently operating as a master computer. Here, when the own computer is operating as a master computer, the own computer mode information in the mode management table 154 is set to “master operation in progress”, and information on the own computer is stored in the master computer information. .

他計算機の1つでマスター設定が行われると、その計算機において前述した「自計算機マスター設定時のモード変更処理」が行われ、マスター遷移中情報が送信される(S1504)。   When the master setting is performed in one of the other computers, the above-described “mode change process at the time of own computer master setting” is performed in the computer, and the information during master transition is transmitted (S1504).

自計算機において、そのような他計算機からのマスター遷移中情報をモード受信部153により受信すると(S1601)、モード管理部151は、モード管理表154の自計算機モード情報を参照して、自計算機のモードが「マスター運用中」または「レプリカ運用中」であるか否かの確認を行う(S1602)。   In the own computer, when the mode receiving unit 153 receives such master transition information from another computer (S1601), the mode management unit 151 refers to the own computer mode information in the mode management table 154, and It is checked whether the mode is “master operation” or “replica operation” (S1602).

確認の結果、自計算機のモードが「マスター運用中」と「レプリカ運用中」のいずれでもない場合、すなわち、「マスター遷移中」または「レプリカ遷移中」である場合には(S1602のNO)、そのまま処理を完了する。例えば、初期起動時にマスター計算機が存在しなかった場合の処理では、自計算機は「レプリカ遷移中」であるが、この際に、他計算機からのマスター遷移中情報を受信してもモード変更処理を行うことはない。   As a result of the confirmation, when the mode of the computer is neither “master operation” nor “replica operation”, that is, “master transition in progress” or “replica transition in progress” (NO in S1602), The process is completed as it is. For example, in the process when the master computer does not exist at the time of initial startup, the own computer is “in replica transition”, but at this time, the mode change process is performed even if master transition information from another computer is received. Never do.

また、確認の結果、自計算機のモードが「マスター運用中」または「レプリカ運用中」である(S1602のYES)場合には、モード管理部151からレプリケーション管理部141に通知を行い、レプリケーション管理部141によりレプリケーション停止処理を行う(S1603)。レプリケーション管理部141は、このレプリケーション停止処理として、具体的には、レプリケーション管理表143の初期化を行い、レプリケーション通信部142がマスター計算機とレプリケーション接続している場合には切断処理を行い、レプリカ計算機からのレプリケーション接続を受けている場合には切断処理を行う。このようなレプリケーション停止処理処理を行うことにより、以降、レプリケーション処理の開始を行うまでは、レプリケーションの送信・受信処理は発生しなくなる。   If the mode of the computer is “master operation” or “replica operation” (YES in S1602) as a result of the confirmation, the mode management unit 151 notifies the replication management unit 141 and the replication management unit 141, a replication stop process is performed (S1603). Specifically, as the replication stop process, the replication management unit 141 initializes the replication management table 143, and performs a disconnection process when the replication communication unit 142 is in replication connection with the master computer. If a replication connection is received from, disconnect processing is performed. By performing such a replication stop process, the replication transmission / reception process does not occur until the replication process is started.

次に、モード管理部151は、自計算機のモードが「マスター運用中」であるか否かを判定する(S1604)。自計算機のモードが「マスター運用中」である(S1604のYES)場合には、モード管理部151からの通知により、リトリーブ要求受理部161の停止(S1605)を行う。リトリーブ要求受理部161は、この時点で、現在受付済みの要求処理がリトリーブデータ送信部162において実行されている場合にその処理を停止する。   Next, the mode management unit 151 determines whether or not the mode of the local computer is “in master operation” (S1604). When the mode of the local computer is “master operation in progress” (YES in S1604), the retrieval request accepting unit 161 is stopped (S1605) in response to a notification from the mode management unit 151. At this time, the retrieve request accepting unit 161 stops the currently accepted request process when the retrieve data transmitting unit 162 is executing the process.

また、自計算機のモードが「マスター運用中」でない(S1604のNO)場合には、モード管理部151からの通知により、リトリーブ要求送信部163の停止(S1606)を行う。リトリーブ要求送信部163は、現在要求中の処理がある場合には、その処理を停止する。   If the mode of the local computer is not “master operation” (NO in S1604), the retrieval request transmission unit 163 is stopped (S1606) by a notification from the mode management unit 151. If there is a process that is currently requested, the retrieve request transmission unit 163 stops the process.

次に、モード管理部151は、モード管理表154の自計算機モード情報を「レプリカ遷移中」へ変更する(S1607)。変更前のモード情報もまた、以降の処理で必要なため、変更前の時点で記憶しておく。   Next, the mode management unit 151 changes the own computer mode information in the mode management table 154 to “in replica transition” (S1607). Since the mode information before the change is also necessary for the subsequent processing, it is stored at the time before the change.

モード管理部151は、自計算機のモードを「レプリカ遷移中」へ変更した後、モード送信部152によりレプリカ遷移中情報の送信を行う(S1608)。このレプリカ遷移中情報の送信処理においては、レプリカ遷移中情報をマルチキャストまたはブロードキャストにてネットワーク上へ送信する。ここで、自計算機の変更前のモードが「マスター運用中」であった場合には、このレプリカ遷移中情報に対して、新規マスター計算機による受信待ちが行われている。   The mode management unit 151 changes the mode of its own computer to “in replica transition”, and then transmits information during replica transition by the mode transmission unit 152 (S1608). In the replica transition information transmission process, replica transition information is transmitted to the network by multicast or broadcast. Here, when the mode before the change of the own computer is “master operation”, the new master computer is waiting to receive the replica transition information.

レプリカ遷移中情報の送信処理(S1608)を行った後は、モード管理部151は、新規マスター計算機からのマスター運用中情報の受信待ちを行う。   After performing the replica transition information transmission processing (S1608), the mode management unit 151 waits for reception of master operating information from the new master computer.

その後、前記マスター遷移中情報の送信元である新規マスター計算機から、その計算機の前記「自計算機マスター設定時のモード変更処理」によりマスター運用中情報が送信されると(S1512)、図17に示すように、自計算機においては、その新規マスター計算機からのマスター運用中情報をモード受信部153により受信する(S1701)。この場合に、モード管理部151は、自計算機のモード管理表154のマスター計算機情報を、その新規マスター計算機の情報に変更し(S1702)、リトリーブ状態表165の初期化を行い(S1703)、レプリケーション受信開始処理(S1704)、データベース全体のリトリーブ処理(S1705)を行い、データベース全体のリトリーブ処理が完了した後、自計算機モード情報を「レプリカ運用中」へ変更し(S1706)、レプリカ計算機として動作する(S1707)。   Thereafter, when the master operating information is transmitted from the new master computer which is the transmission source of the master transition information by the “mode change processing at the time of setting the own computer master” of the computer (S1512), it is shown in FIG. As described above, the own computer receives master operating information from the new master computer by the mode receiving unit 153 (S1701). In this case, the mode management unit 151 changes the master computer information of the mode management table 154 of the own computer to the information of the new master computer (S1702), initializes the retrieve state table 165 (S1703), and replicates. A reception start process (S1704) and a retrieve process for the entire database (S1705) are performed. After the retrieve process for the entire database is completed, the local computer mode information is changed to “in replica operation” (S1706), and the system operates as a replica computer. (S1707).

ここで、マスター計算機情報の設定からレプリカ計算機として動作するまでの一連の処理(S1702〜S1707)は、図13の初期起動処理における一連の処理(S1304〜S1309)と同様である。   Here, a series of processes (S1702 to S1707) from the setting of the master computer information to the operation as a replica computer are the same as the series of processes (S1304 to S1309) in the initial startup process of FIG.

[4.データ変更・反映処理]
図18は、図1〜図3に示す分散データ等価システムにおいて、マスター計算機のデータ変更処理からレプリカ計算機のデータ反映処理に至るまでの分散データ等価処理手順の概要を示すフローチャートである。
[4. Data change / reflection process]
FIG. 18 is a flowchart showing an outline of the distributed data equivalent processing procedure from the data change process of the master computer to the data reflection process of the replica computer in the distributed data equivalent system shown in FIGS.

この図18に示すように、「マスター運用中」モード(S1205)で動作しているマスター計算機において、データ処理部12により、データベース11中のデータの変更内容を更新データキャッシュ124に格納するデータ変更処理(S1801)を行い、その変更内容を更新内容コミットデータとしてデータベース11に反映するコミット処理(S1802)を行う。次に、更新データマージ部131により、マージ併合条件に従って、更新内容コミットデータである更新データキャッシュ内容をマージするマージ処理(S1803)を行い、続いて、レプリケーション処理部14により、マージされたデータをレプリケーションデータとしてレプリカ計算機に送信するレプリケーション送信処理(S1804)を行う。   As shown in FIG. 18, in the master computer operating in the “in master operation” mode (S1205), the data change unit 12 stores the data change contents stored in the update data cache 124 by the data processing unit 12. Processing (S1801) is performed, and commit processing (S1802) is performed in which the changed content is reflected in the database 11 as update content commit data. Next, the update data merging unit 131 performs merge processing (S1803) for merging the update data cache content that is update content commit data in accordance with the merge merge condition, and then, the replication processing unit 14 converts the merged data into the merged data. A replication transmission process (S1804) is performed to transmit the replication data to the replica computer.

この後、「レプリカ運用中」モード(S1208)で動作しているレプリカ計算機において、レプリケーション処理部14により、マスター側から送信されたレプリケーションデータを受信するレプリケーション受信処理(S1811)を行う。次に、マージデータ処理部13により、レプリケーションデータをデータベース11に反映可能な更新内容コミットデータへ展開するマージデータ展開処理(S1812)を行い、続いて、データ処理部12により、展開された更新内容コミットデータを、自計算機のデータベース11に反映するデータ反映処理(S1813)を行うことで、マスター計算機のデータベース11と同一内容に等価する。   Thereafter, in the replica computer operating in the “in replica operation” mode (S1208), the replication processing unit 14 performs a replication reception process (S1811) for receiving the replication data transmitted from the master side. Next, the merge data processing unit 13 performs merge data expansion processing (S1812) for expanding the replication data into update content commit data that can be reflected in the database 11, and subsequently, the update content expanded by the data processing unit 12 By performing the data reflection process (S1813) for reflecting the commit data in the database 11 of the own computer, it is equivalent to the same content as the database 11 of the master computer.

以下には、図18に示す各処理の詳細について順次説明する。   Details of each process shown in FIG. 18 will be sequentially described below.

[4−1.データ変更処理]
図19は、図3に示すマスター計算機のデータ処理部12によるデータ変更処理手順の概要を示すフローチャートである。
[4-1. Data change processing]
FIG. 19 is a flowchart showing an outline of a data change processing procedure by the data processing unit 12 of the master computer shown in FIG.

この図19に示すように、データ操作アプリケーション17によりデータ変更要求が行われた場合(S1901)には、データ更新処理部122により、そのデータ変更要求に応じた変更内容を更新データキャッシュ123に格納するデータ変更処理が行われる。ここでは、一例として、データ変更要求は、変更するテーブルの「テーブルのテーブル名称」、変更するデータの「テーブル内での行番号」、「テーブル内での列番号」、「変更後データ値」により与えられるものとする。   As shown in FIG. 19, when a data change request is made by the data manipulation application 17 (S1901), the data update processing unit 122 stores the change contents corresponding to the data change request in the update data cache 123. Data change processing is performed. Here, as an example, the data change request is “table name of table” of the table to be changed, “row number in the table”, “column number in the table”, “data value after change” of the data to be changed. Shall be given by

データ更新処理部122は、まず、モード管理表154の自計算機モード情報を参照し、自計算機が「マスター運用中」モードで動作しているマスター計算機であるか否かの確認を行う(S1902)。自計算機がマスター計算機でない場合(S1902のNO)には、そのままデータ変更処理を終了する。   First, the data update processing unit 122 refers to the own computer mode information in the mode management table 154 to check whether the own computer is a master computer operating in the “master operation” mode (S1902). . If the own computer is not the master computer (NO in S1902), the data change process is terminated as it is.

また、自計算機がマスター計算機である場合(S1902のYES)には、データ更新処理部122は、「テーブルのテーブル名称」、「テーブル内での行番号」、「テーブル内での列番号」により、更新データキャッシュ123内にそのデータ変更要求に該当するキャッシュデータが既に存在するか否かを確認する(S1903)。該当するキャッシュデータが存在する場合(S1903のYES)には、該当するキャッシュデータの「変更後データ値」の更新を行う(S1905)。   When the own computer is a master computer (YES in S1902), the data update processing unit 122 uses the “table name of the table”, “row number in the table”, and “column number in the table”. Then, it is confirmed whether or not the cache data corresponding to the data change request already exists in the update data cache 123 (S1903). If the corresponding cache data exists (YES in S1903), the “changed data value” of the corresponding cache data is updated (S1905).

また、更新データキャッシュ123内にデータ変更要求に該当するキャッシュデータが存在しない場合(S1903のNO)には、更新データキャッシュ123内に、新たにキャッシュデータを追加し、追加したキャッシュデータの情報として、「テーブルのテーブル名称」、「テーブル内での行番号」、「テーブル内での列番号」、「変更後データ値」を格納する(S1904)。   If there is no cache data corresponding to the data change request in the update data cache 123 (NO in S1903), the cache data is newly added to the update data cache 123, and the added cache data is used as information. , “Table name of table”, “row number in table”, “column number in table”, “data value after change” are stored (S1904).

[4−2.変更内容のコミット処理]
図20は、図3に示すマスター計算機のデータ処理部12による変更内容のコミット処理手順の概要を示すフローチャートである。
[4-2. Change commit process]
FIG. 20 is a flowchart showing an outline of a change commit procedure performed by the data processor 12 of the master computer shown in FIG.

この図20に示すように、データ操作アプリケーション17により変更内容のコミット要求が行われた場合(S2001)には、データ更新処理部122により、更新データキャッシュ123内にキャッシュデータが格納されているか否かを確認する(S2002)。更新データキャッシュ123内にキャッシュデータが格納されている場合(S2002のYES)には、個々のキャッシュデータについて(S2003)、次のような一連の処理(S2004〜S2006)を行う。   As shown in FIG. 20, when a change commit request is made by the data manipulation application 17 (S2001), whether or not cache data is stored in the update data cache 123 by the data update processing unit 122. (S2002). When cache data is stored in the update data cache 123 (YES in S2002), the following series of processes (S2004 to S2006) are performed for each cache data (S2003).

すなわち、個々のキャッシュデータについて(S2003)、「変更後データ値」をデータファイル111の該当するテーブル名称のテーブルの行番号、列番号のデータ値へ反映し(S2004)、データ状態表112の該当するテーブル名称、列番号のシリアル番号値を加算し(S2005)、加算後のシリアル番号値をキャッシュデータの「シリアル番号値」へ格納する(S2006)。   That is, for each cache data (S2003), the “changed data value” is reflected in the data value of the row number and column number of the corresponding table name in the data file 111 (S2004), and the corresponding data state table 112 The serial number value of the table name and column number to be added is added (S2005), and the serial number value after the addition is stored in the “serial number value” of the cache data (S2006).

全てのキャッシュデータについて一連の処理(S2004〜S2006)が完了(S2007)した後、その時点での更新データキャッシュ123の内容を更新データマージ部131に通知してマージ要求する「更新データキャッシュのマージ要求処理」(S2008)を行い、続いて、更新データキャッシュ123内のキャッシュデータを空の状態にする(S2009)。   After a series of processing (S2004 to S2006) has been completed for all cache data (S2007), the update data merge unit 131 is notified of the contents of the update data cache 123 at that time, and a merge request is made. Request processing "(S2008) is performed, and subsequently, the cache data in the update data cache 123 is made empty (S2009).

[4−3.コミットデータのマージ処理]
図21は、図3に示すマスター計算機のマージデータ処理部13によるコミットデータのマージ処理手順の概要を示すフローチャートである。
[4-3. Commit data merge process]
FIG. 21 is a flowchart showing an outline of the commit data merge processing procedure by the merge data processing unit 13 of the master computer shown in FIG.

ここでは、マージ要求を受けた複数のキャッシュデータの内容を、どのタイミングでマージしてレプリケーション通信部142へ送信要求を行うかについてのマージ併合条件が、次のような複数の条件項目の組み合わせであるものとする。すなわち、マージ併合条件は、「『現在マージされている複数のキャッシュデータの総データサイズ』、『前回レプリケーション通信部142へ送信要求を行ってからの時間』、『前回レプリケーション通信部142へ送信要求を行ってからマージ要求を受付けた回数』、という複数の項目のいずれかが設定済みの閾値を超えること」、として設定されているものとする。   Here, the merge merge condition for the timing of merging the contents of a plurality of cache data that has received a merge request and making a transmission request to the replication communication unit 142 is a combination of the following condition items: It shall be. In other words, the merge merge condition is “the total data size of a plurality of cache data currently merged”, “the time since the transmission request to the previous replication communication unit 142”, “the transmission request to the previous replication communication unit 142” It is assumed that any one of a plurality of items “the number of times the merge request has been received since the execution of“ is exceeded the set threshold ”is set.

図21に示すように、マージ処理において、更新データマージ部131は、データ更新処理部122からの更新データキャッシュ内容のマージ要求をタイムアウト付きで「受付待ち」しており(S2101)、いずれかの事象の発生により「受付待ち」が解除された場合(S2102)には、その発生した事象がタイムアウトとマージ要求の受付のいずれであるかの判定(S2103)を行う。   As shown in FIG. 21, in the merge process, the update data merge unit 131 “waits for reception” with a timeout for the merge request of the update data cache contents from the data update processing unit 122 (S2101). When “waiting for reception” is canceled due to the occurrence of an event (S2102), it is determined whether the event that occurred is a timeout or a merge request (S2103).

タイムアウトが発生した場合には(S2103のNO)、一時保存領域に現在保存中のマージ中データがあるか否かの判定を行う(S2104)。なお、「マージ中データ」とは、更新データキャッシュ内容をマージして得られたマージデータのうち、特に、レプリケーション送信要求用のデータとして確定する前の処理途中のデータを示しており、マージ併合条件に基づいてさらに別の更新データキャッシュ内容とマージされる可能性のあるデータを意味している。   If a timeout has occurred (NO in S2103), it is determined whether there is merged data currently being saved in the temporary save area (S2104). Note that “data being merged” refers to merged data obtained by merging the update data cache contents, especially data that is being processed before being determined as data for a replication transmission request. This means data that may be merged with other update data cache contents based on conditions.

一時保存領域に現在保存中のマージ中データが存在しない場合(S2104のNO)には、要求受付回数、タイムアウト時間のリセットを行い(S2106)、再び、マージ要求受付待ち(S2102)を行う。また、一時保存領域に現在保存中のマージデータが存在する場合(S2104のYES)には、一時保存中のマージ中データをレプリケーション送信要求用のデータとして確定してレプリケーション通信部142に対してレプリケーション送信要求を行う(S2105)。続いて、送信要求済のマージデータ、要求受付回数、タイムアウト時間のリセットを行い(S2106)、再び、マージ要求受付待ち(S2101)を行う。   If there is no merged data currently stored in the temporary storage area (NO in S2104), the number of request receptions and timeout time are reset (S2106), and the merge request reception waiting is again performed (S2102). If merge data currently being saved exists in the temporary save area (YES in S2104), the merged data being temporarily saved is determined as replication transmission request data and replicated to the replication communication unit 142. A transmission request is made (S2105). Subsequently, the merge data for which transmission has been requested, the number of request receptions, and the timeout time are reset (S2106), and a merge request reception wait is again performed (S2101).

一方、マージ要求を受け付けた場合(S2103のYES)には、一時保存領域に現在保存中のマージ中データがあるか否かの判定を行う(S2107)。一時保存領域に現在保存中のマージ中データが存在する場合(S2107のYES)には、その現在保存中のマージ中データと、今回要求を受け付けた更新データキャッシュ内容とのマージを行う(S2108)。また、現在保存中のマージ中データが存在しない場合(S2107のNO)には、要求を受けた更新データキャッシュ内容をマージ中データとして一時保存領域に保存する(S2109)。   On the other hand, if a merge request is received (YES in S2103), it is determined whether there is currently merging data being stored in the temporary storage area (S2107). If there is merged data that is currently saved in the temporary save area (YES in S2107), the merged data that is currently saved is merged with the contents of the update data cache that has received this request (S2108). . If there is no merged data currently stored (NO in S2107), the requested update data cache content is stored in the temporary storage area as merged data (S2109).

その後、マージ併合条件に基づいて、「現在保存中のマージ中データのサイズが閾値を超えているか」(S2110)、「現在保存中のマージ中データを構成するために受け付けた要求受付回数が閾値を超えているか」(S2111)の判定を行い、いずれかの閾値を超えている場合(S2110のYESまたはS2111のYES)には、レプリケーション通信部142へレプリケーション送信要求(S2105)を行い、その要求に使用された現在保存中のマージ中データ、要求受付回数、タイムアウト時間のリセットを行い(S2106)、再びマージ要求受付待ち(S2101)を行う。   After that, based on the merge merge condition, “whether the size of the merged data currently being stored exceeds the threshold” (S2110), “the number of requests received to configure the merged data currently being stored is the threshold Is exceeded ”(S2111). If any threshold is exceeded (YES in S2110 or YES in S2111), a replication transmission request (S2105) is made to the replication communication unit 142, and the request is made. The merged data currently being stored, the number of requests received, and the timeout period are reset (S2106), and the merge request reception wait is again performed (S2101).

マージ併合条件に基づく上記の判定において、いずれの閾値も超えていない場合(S2110のNOおよびS2111のNO)には、タイムアウト時間の設定を行い(S2112)、再びマージ要求受付待ち(S2102)を行う。   In the above determination based on the merge merge condition, if neither threshold is exceeded (NO in S2110 and NO in S2111), a timeout time is set (S2112), and a merge request reception wait is again performed (S2102). .

なお、以上のようなマージ処理において、レプリケーション送信要求(S2105)を行う際には、確定された元のマージデータをそのまま使用してもよいが、別の手法として、元のマージデータを分割または圧縮して得られたデータを使用してもよい。すなわち、元のマージデータの内容を複数に分割して得られたデータ、あるいは、元のマージデータをハフマン符号化等のデータ圧縮手段を用いて圧縮して得られたデータ、またはそれらの分割、圧縮の両方を共に実行して得られたデータ、のいずれかのデータを用いてレプリケーション送信要求を行ってもよい。   In the merge processing as described above, when the replication transmission request (S2105) is performed, the confirmed original merge data may be used as it is. However, as another method, the original merge data is divided or Data obtained by compression may be used. That is, the data obtained by dividing the content of the original merge data into a plurality of data, or the data obtained by compressing the original merge data using a data compression means such as Huffman coding, or the division thereof, The replication transmission request may be made using any one of the data obtained by executing both of the compressions.

[4−4.レプリケーション送受信処理]
図22は、図3に示すマスター計算機とレプリカ計算機のレプリケーション処理部14によるレプリケーション送信処理手順とレプリケーション受信処理手順の概要を示すフローチャートである。
[4-4. Replication send / receive processing]
FIG. 22 is a flowchart showing an overview of a replication transmission processing procedure and a replication reception processing procedure by the replication processing unit 14 of the master computer and the replica computer shown in FIG.

この図22に示すように、マスター計算機のレプリーション管理部141は、レプリケーション送信要求待ちを行っており(S2201)、自計算機の更新データマージ部131からレプリケーション送信要求を受けると、レプリケーション管理表143を参照して、レプリケーションデータの送信先となるレプリカ計算機が存在するか否かを判定する(S2202)。   As shown in FIG. 22, the replication management unit 141 of the master computer is waiting for a replication transmission request (S2201). When receiving a replication transmission request from the update data merging unit 131 of its own computer, the replication management table 143 is updated. Referring to this, it is determined whether or not there is a replica computer that is a transmission destination of replication data (S2202).

送信先レプリカ計算機が存在しない場合(S2202のNO)には、要求を受けたデータ内容を破棄して、再び送信要求待ち(S2201)を行う。また、送信先レプリカ計算機が存在する場合(S2202の”YES”)には、レプリケーション管理表143中のその送信先レプリカ計算機の情報を参照して、レプリケーション通信部142により送信先レプリカ計算機のレプリケーション通信部142へデータ送信を行う(S2203)。   If there is no destination replica computer (NO in S2202), the contents of the requested data are discarded and the transmission request is waited again (S2201). If there is a destination replica computer (“YES” in S2202), the replication communication unit 142 refers to the information of the destination replica computer in the replication management table 143 and the replication communication of the destination replica computer. Data is transmitted to the unit 142 (S2203).

一方、レプリカ計算機のレプリケーション管理部141は、マスター計算機からのレプリケーションデータの受信待ちを行っており(S2211)、マスター計算機からのレプリケーションデータを受信すると(S2212)、その受信したデータ内容について、自計算機のマージデータ展開部132にマージデータ展開要求を行う(S2213)。   On the other hand, the replication management unit 141 of the replica computer waits for reception of replication data from the master computer (S2211), and receives replication data from the master computer (S2212). The merge data expansion request is sent to the merge data expansion unit 132 (S2213).

[4−5.マージデータ展開・データ反映処理]
図23、図24は、図3に示すレプリカ計算機のマージデータ処理部13とデータ処理部12によるマージデータ展開処理手順とデータ反映処理手順の概要をそれぞれ示すフローチャートである。
[4-5. Merge data expansion / data reflection processing]
FIGS. 23 and 24 are flowcharts respectively showing an outline of the merge data expansion processing procedure and the data reflection processing procedure by the merge data processing unit 13 and the data processing unit 12 of the replica computer shown in FIG.

図23に示すように、マージデータ展開部132は、レプリケーション通信部142からマージ展開要求を受けると(S2301)、レプリケーション通信部142の受信したレプリケーションデータであるマージデータ内容を、個々の更新内容を表す更新内容コミットデータへと展開する(S2302)。次に、その展開した更新内容コミットデータについて、受信データ反映部123にデータ反映要求を行う(S2303)。   As shown in FIG. 23, when the merge data expansion unit 132 receives a merge expansion request from the replication communication unit 142 (S2301), the merge data content that is the replication data received by the replication communication unit 142 is displayed as individual update content. The update contents to be expressed are expanded into commit data (S2302). Next, a data reflection request is made to the received data reflection unit 123 for the expanded update content commit data (S2303).

図24に示すように、受信データ反映部123は、マージデータ展開部132からのデータ反映要求を受けると、個々の更新内容コミットデータについて(S2401)処理を行い、その処理中更新内容コミットデータに該当するテーブルのリトリーブ状態をリトリーブ状態表165で確認し(S2402)、「リトリーブ済」であるか否かを判定する(S2403)。   As shown in FIG. 24, when receiving the data reflection request from the merge data expansion unit 132, the reception data reflection unit 123 performs a process on each update content commit data (S2401), and sets the update content commit data during the processing. The retrieval state of the corresponding table is confirmed in the retrieval state table 165 (S2402), and it is determined whether or not it is “retrieved” (S2403).

処理中更新内容コミットデータに該当するテーブルのリトリーブ状態が「リトリーブ済」でない場合(S2403のNO)には、その更新内容コミットデータを一時保存領域へ保存した(S2404)後、次の更新内容コミットデータの処理を行う。   If the retrieved state of the table corresponding to the update content commit data being processed is not “retrieved” (NO in S2403), the update content commit data is stored in the temporary storage area (S2404), and then the next update content commit is performed. Process the data.

また、受信データ反映部123は、該当するテーブルのリトリーブ状態が「リトリーブ済」である場合(S2403のYES)には、一時保存領域において「該当するテーブルについての更新内容コミットデータ」の確認を行い(S2406)、該当するテーブルについての保存中更新内容コミットデータの存在の有無を判定する(S2407)。   Further, when the retrieved state of the corresponding table is “retrieved” (YES in S2403), the received data reflecting unit 123 confirms “update content commit data for the corresponding table” in the temporary storage area. (S2406), it is determined whether or not there is commit data for update contents being saved for the corresponding table (S2407).

該当するテーブルについて保存中更新内容コミットデータが存在する場合(S2407のYES)には、その保存中更新内容コミットデータについて、マッピングデータ112内のデータ状態表を参照して、データ状態表中の該当するテーブル、列のシリアル番号値と、保存中更新内容データのシリアル番号値との比較を行い(S2411)、その保存中更新内容コミットデータをマッピングデータ112に反映可能であるか否かの判定を行う(S2412)。   If the update content commit data being saved exists for the corresponding table (YES in S2407), the update content commit data being saved is referred to the data status table in the mapping data 112, and the data status table The serial number value of the table and column to be stored is compared with the serial number value of the update content data being saved (S 2411), and it is determined whether the update content commit data being saved can be reflected in the mapping data 112. This is performed (S2412).

保存中更新内容コミットデータをマッピングデータ112に反映可能である場合(S2412のYES)には、その保存中更新内容コミットデータのデータ値をマッピングデータ112内の該当テーブルへ反映し(S2413)、データ状態表のシリアル番号値の加算を行う(S2414)。   If the saved update content commit data can be reflected in the mapping data 112 (YES in S2412), the data value of the saved update content commit data is reflected in the corresponding table in the mapping data 112 (S2413), and the data The serial number values in the state table are added (S2414).

また、保存中更新内容コミットデータをマッピングデータ112に反映できない場合(S2412のNO)には、その「保存中更新内容コミットデータ」、および、個別の処理対象である「処理中更新内容コミットデータ」の破棄を行い(S2415)、該当するテーブル、列について、「テーブル、列のリトリーブ要求処理」を行い(S2416)、次の更新内容コミットデータの処理を行う。   Also, if the update content commit data being saved cannot be reflected in the mapping data 112 (NO in S2412), the "update content commit data being saved" and the "update content commit data being processed" that are individual processing targets are included. (S2415), “retrieve request processing of table and column” is performed for the corresponding table and column (S2416), and the next update content commit data is processed.

一方、保存中更新内容コミットデータの反映(S2413)とそれに続くシリアル番号値加算が完了した場合(S2414)、または、一時保存領域に、該当するテーブルについての保存中更新内容データが存在しない場合(S2407のNO)には、個別の処理対象である「処理中更新内容コミットデータ」について、次のような一連の処理(S2421〜S2426)を行う。   On the other hand, when the update content commit data being saved is reflected (S2413) and the subsequent addition of the serial number value is completed (S2414), or the update content data being saved for the corresponding table does not exist in the temporary save area ( In step S2407 (NO), the following series of processing (S2421 to S2426) is performed on “in-process update content commit data” that is an individual processing target.

すなわち、処理中更新内容コミットデータについて、マッピングデータ112内のデータ状態表とのシリアル番号値の比較を行い(S2421)、反映可能か否かの判定を行い(S2422)、反映可能である場合(S2422のYES)には、そのデータ値をマッピングデータ112へ反映し(S2423)、データ状態表のシリアル番号値の加算を行い(S2424)、次の更新内容データの処理を行う。   That is, for the update content commit data being processed, the serial number value is compared with the data state table in the mapping data 112 (S2421), whether or not it can be reflected is determined (S2422), and can be reflected ( In S2422 (YES), the data value is reflected in the mapping data 112 (S2423), the serial number value in the data state table is added (S2424), and the next update content data is processed.

また、処理中更新内容コミットデータが反映可能でない場合(S2422のNO)には、その処理中更新内容コミットデータを破棄すると共に、反映済の保存中更新内容コミットデータが存在する場合にはその保存中更新内容コミットデータを破棄し(S2425)、「テーブル、列のリトリーブ要求処理」を行い(S2426)、次の更新内容コミットデータの処理を行う。   In addition, if the update content commit data being processed cannot be reflected (NO in S2422), the commit information for the update content being processed is discarded, and if there is a saved update content commit data that has been reflected, the update content commit data is stored. The middle update content commit data is discarded (S 2425), “table / column retrieve request processing” is performed (S 2426), and the next update content commit data is processed.

このような「処理中更新内容コミットデータ」についての一連の処理(S2421〜S2426)は、前述した「保存中更新内容コミットデータ」についての一連の処理(S2411〜S2416)と同様である。   A series of processes (S2421 to S2426) for such “in-process update content commit data” is the same as the above-described series of processes (S2411 to S2416) for “stored update content commit data”.

なお、以上のようなデータ反映処理において、個々の更新内容コミットデータがテーブル単位、またはテーブルの列単位である場合には、データ反映処理を高速に行うために、複数の更新内容コミットデータについての個々のデータ反映処理を並列に実行してもよい。   In the data reflection process as described above, when individual update content commit data is in units of tables or columns of tables, in order to perform data reflection processing at high speed, Individual data reflection processes may be executed in parallel.

また、リトリーブ状態表165の確認を行い、リトリーブ中であるために一時保存領域へ保存していたデータについては、リトリーブ要求送信部163にてリトリーブ完了となった際に、そのリトリーブ完了について受信データ反映部123に通知を行うようにしてもよい。この場合には、受信データ反映部123は、一時保存領域に、リトリーブが完了したテーブルのデータが保存されているか否かを確認し、保存されている場合に、前述したような一連の処理(S2411〜S2414、または、S2416)を行うことで、リトリーブ完了直後に保存中のデータを反映させることが可能である。   The retrieval status table 165 is confirmed, and the data stored in the temporary storage area because the retrieval is in progress is received data when the retrieval is completed in the retrieval request transmission unit 163. You may make it notify to the reflection part 123. FIG. In this case, the reception data reflecting unit 123 checks whether or not the data of the table that has been retrieved is stored in the temporary storage area. By performing S2411 to S2414 or S2416), it is possible to reflect the data being saved immediately after the retrieval is completed.

あるいはまた、図21に示すように、マスター計算機の更新データマージ部131によりレプリケーション送信要求(S2105)を行う際に、マージされたマージデータに個々のマージデータ毎に割り振られるマージ番号を付加して送信し、レプリカ計算機の処理部12〜14のいずれかで、受信したマージデータについてマージ番号のチェックを行うようにしてもよい。この構成において、通信障害が発生した場合には、レプリカ計算機の受信データ反映部123からリトリーブ要求送信部163に通知を行い、マージ番号チェック結果に応じたデータのリトリーブ要求処理を行うことにより、マージデータを展開した個々の更新内容データについて、データ状態表と更新内容データとの比較を行う必要なしに、障害から復旧することも可能である。   Alternatively, as shown in FIG. 21, when a replication transmission request (S2105) is made by the update data merge unit 131 of the master computer, a merge number assigned to each merge data is added to the merged merge data. The merge number may be checked with respect to the received merge data by any of the processing units 12 to 14 of the replica computer. In this configuration, when a communication failure occurs, the received data reflection unit 123 of the replica computer notifies the retrieval request transmission unit 163, and performs a data retrieval request process according to the merge number check result, thereby merging. It is also possible to recover from a failure without having to compare the data status table and the update content data for each update content data that has been expanded.

[5.効果]
以上のような本実施形態によれば、次のような効果が得られる。
[5. effect]
According to the present embodiment as described above, the following effects can be obtained.

(1)マスター計算機においては、複数のデータ操作アプリケーションによるデータ更新操作結果について、データ変更処理とコミット処理を行うことによってデータベースが更新された場合に、更新された複数の変更内容コミットデータのマージが行われ、マージが行われたデータを分割・圧縮した後にレプリケーション送信する。これにより、コミット処理の都度、レプリケーション送信する場合と比較して通信ネットワークへ与える負荷を低減することができ、結果として、複数のレプリカ計算機へデータ更新内容を反映する場合のスループットを向上することができる。 (1) In the master computer, when the database is updated by performing the data change process and the commit process with respect to the data update operation results by the plurality of data operation applications, the merged data of the plurality of updated contents of the changed contents is merged. After the merged data is split and compressed, it is sent for replication. As a result, it is possible to reduce the load on the communication network as compared with the case of performing replication transmission for each commit process, and as a result, it is possible to improve the throughput when reflecting the data update contents to a plurality of replica computers. it can.

(2)レプリカ計算機においては、レプリケーション受信後に分割・圧縮されたレプリケーションデータを、複数の変更内容コミットデータへ展開し、変更内容コミットデータをデータベースへ反映する場合には、データ状態表を用いて反映可能な変更内容であるかを確認し、必要な場合にはテーブル、列のデータをマスター計算機からリトリーブする。これにより、通信ネットワーク内に一時的に障害が発生してレプリケーションデータが紛失した場合にも、マスター計算機のデータベースの複製データを確実に維持することができる。 (2) In replica computers, when replicating data that has been split / compressed after receiving replication is expanded into multiple commit data for changes, and the commit data for changes is reflected in the database, it is reflected using the data status table. Check if the change is possible, and if necessary, retrieve the table and column data from the master computer. Thereby, even when a failure occurs temporarily in the communication network and the replication data is lost, the replication data in the database of the master computer can be reliably maintained.

(3)初期起動時およびマスター切替時においてリトリーブ処理を行う場合に、マスター計算機からデータ状態表を取得して自計算機のデータ状態表と比較し、リトリーブが必要なテーブルおよび列のデータについてのみマスター計算機からデータ取得を行う。これにより、マスター計算機とのデータ内容の違いが少ない場合には、データベースの全内容を取得する場合と比較して、初期起動時およびマスター切替時のリトリーブ処理時間を大幅に短縮することができる。 (3) When retrieving is performed at initial startup and master switching, a data state table is acquired from the master computer and compared with the data state table of the local computer, and only the table and column data that need to be retrieved are mastered. Acquire data from the computer. As a result, when there is little difference in data contents with the master computer, the retrieval processing time at the initial startup and master switching can be greatly shortened as compared with the case of acquiring the entire contents of the database.

(4)マスター切替を行う場合に、モード管理により、マスター計算機ではマスター遷移中を経てマスター運用中となり、レプリカ計算機ではレプリカ遷移中を経てレプリカ計算機となる。新マスター計算機では、現マスター計算機からのレプリカ遷移中情報を受信した段階で、マスター運用中へ遷移する。またレプリカ計算機では、新マスター計算機からのマスター運用中情報を受信した段階でレプリカ運用中へ遷移する。これにより、ネットワーク内に存在するマスター計算機を、常に1台のみに保つことができる。ネットワーク障害等により、万一、マスター計算機が複数存在する状況が発生した場合にも、レプリカ計算機では、常に自計算機が認識しているマスター計算機からのレプリケーションデータのみを反映するため、データベースに不整合が発生することはない。 (4) When master switching is performed, the master computer is in the master operation state during the master transition, and the replica computer is in the replica computer state during the replica transition due to the mode management. In the new master computer, when the replica transition information from the current master computer is received, transition to master operation is made. The replica computer shifts to replica operation when it receives master operation information from the new master computer. Thereby, it is possible to always keep only one master computer existing in the network. In the unlikely event that there are multiple master computers due to a network failure, the replica computer always reflects only the replication data from the master computer recognized by its own computer, so it is inconsistent with the database. Will not occur.

(5)また、マスター計算機が複数存在する状況が発生した場合にも、その中の1台の計算機において、モード管理により、マスター遷移中、マスター運用中を送信することで、他の計算機は、全てレプリカ計算機へ遷移し、データベース全体のリトリーブ処理を行い、マスター計算機のデータベースのリトリーブを行うことができるため、このような障害発生時のリカバリ処理を容易に行うことが可能となる。 (5) In addition, even when a situation occurs in which there are multiple master computers, one of the computers can transmit the status of master transition and master operation by mode management. Since all transitions to the replica computer, retrieval processing of the entire database, and retrieval of the database of the master computer can be performed, recovery processing in the event of such a failure can be easily performed.

[6.他の実施形態]
なお、本発明は、前述した実施形態に限定されるものではなく、本発明の範囲内で他にも多種多様な変形例が実施可能である。例えば、図面に示したシステム構成や計算機の機能構成は、一例にすぎず、具体的なシステム構成や機能構成は適宜選択可能である。また、図面に示したデータ構成も一例にすぎず、具体的なデータ構成は適宜選択可能である。同様に、図面に示したフローチャートは、一例にすぎず、具体的な動作手順や各処理の詳細は適宜選択可能である。
[6. Other Embodiments]
It should be noted that the present invention is not limited to the above-described embodiments, and various other variations can be implemented within the scope of the present invention. For example, the system configuration and the functional configuration of the computer shown in the drawings are merely examples, and a specific system configuration and functional configuration can be selected as appropriate. Further, the data configuration shown in the drawings is merely an example, and a specific data configuration can be selected as appropriate. Similarly, the flowcharts shown in the drawings are merely examples, and specific operation procedures and details of each process can be selected as appropriate.

例えば、前述した実施形態においては、リトリーブ要求時におけるデータ状態表(データ特定情報)の比較を、レプリカ計算機側で行う場合について説明したが、データ状態表をレプリカ計算機からマスター計算機に送信することで、マスター計算機側でデータ状態表の比較を行い、比較結果に応じて送信するリトリーブデータを特定するようにしてもよい。   For example, in the above-described embodiment, the case where the comparison of the data state table (data specifying information) at the time of the retrieval request is performed on the replica computer side has been described, but by transmitting the data state table from the replica computer to the master computer, The master computer side may compare the data state table and specify the retrieve data to be transmitted according to the comparison result.

本発明を適用した一つの実施形態に係る分散データ等価システムを構成する各計算機を示すブロック構成図。The block block diagram which shows each computer which comprises the distributed data equivalent system which concerns on one Embodiment to which this invention is applied. 図1に示す複数の計算機を通信ネットワークで接続することによって構成される分散データ等価システムを示すブロック構成図。The block block diagram which shows the distributed data equivalent system comprised by connecting the some computer shown in FIG. 1 with a communication network. 図2に示す複数の計算機を、マスター計算機およびレプリカ計算機として動作させた場合のシステム構成を示すブロック構成図。FIG. 3 is a block configuration diagram showing a system configuration when a plurality of computers shown in FIG. 2 are operated as a master computer and a replica computer. 図3に示すデータファイルに格納される表形式データファイル(a)とデータ状態表(b)のデータ構造の一例を示す図。The figure which shows an example of the data structure of the tabular data file (a) and data status table (b) which are stored in the data file shown in FIG. 図3に示す更新データキャッシュのデータ構造の一例を示す図。The figure which shows an example of the data structure of the update data cache shown in FIG. 図3に示すレプリケーション管理表のデータ構造の一例を示す図。The figure which shows an example of the data structure of the replication management table | surface shown in FIG. 図3に示すモード管理表のデータ構造の一例を示す図。The figure which shows an example of the data structure of the mode management table shown in FIG. 図3に示すモード管理部で管理される4種類のモードから他のモードに遷移する場合の遷移条件として、モード遷移のトリガーと遷移先を示す図。FIG. 4 is a diagram illustrating a mode transition trigger and a transition destination as transition conditions when transitioning from four types of modes managed by the mode management unit illustrated in FIG. 3 to another mode. 図8に示す遷移条件のうち、モード受信時の遷移条件として、現在のモードにおいてモード情報を受信した場合の遷移先モードを示す図。The figure which shows the transition destination mode at the time of receiving mode information in the present mode as a transition condition at the time of mode reception among the transition conditions shown in FIG. 図8、図9に示す遷移条件で各モード遷移を行った後、遷移後の新モードに応じて決定される各動作を示す図。The figure which shows each operation | movement determined according to the new mode after a transition, after performing each mode transition on the transition conditions shown in FIG. 8, FIG. 図3に示すリトリーブ状態表のデータ構造の一例を示す図。The figure which shows an example of the data structure of the retrieve state table | surface shown in FIG. 図1〜図3に示す分散データ等価システムの各計算機による初期起動からシステム停止に至るまでの動作概要を示すフローチャート。The flowchart which shows the operation | movement outline | summary from the initial starting by each computer of the distributed data equivalent system shown in FIGS. 1-3 to a system stop. 図12に示す初期起動処理の処理手順の概要を示すフローチャート。The flowchart which shows the outline | summary of the process sequence of the initial starting process shown in FIG. (a)は、図13に示すデータベース全体のリトリーブ処理の処理手順を示すフローチャート、(b)は、(a)中のテーブル、列のリトリーブ要求処理の処理手順を示すフローチャート。FIG. 14A is a flowchart showing a processing procedure of a retrieval process for the entire database shown in FIG. 13, and FIG. 14B is a flowchart showing a processing procedure of a table / column retrieval request process in FIG. 図12に示す自計算機マスター設定時のモード変更処理における処理手順の概要を示すフローチャート。The flowchart which shows the outline | summary of the process sequence in the mode change process at the time of the own computer master setting shown in FIG. 図12に示す他計算機マスター設定時のモード変更処理における処理手順のうち、レプリカ遷移中モードに遷移するまでの前半部分の概要を示すフローチャート。The flowchart which shows the outline | summary of the first half part until it changes to the replica transition mode among the process steps in the mode change process at the time of other computer master setting shown in FIG. 図12に示す他計算機マスター設定時のモード変更処理における処理手順のうち、レプリカ運用中モードに遷移するまでの後半部分の概要を示すフローチャート。The flowchart which shows the outline | summary of the latter half part until it changes to replica operation mode among the process steps in the mode change process at the time of other computer master setting shown in FIG. 図1〜図3に示す分散データ等価システムにおいて、マスター計算機のデータ変更処理からレプリカ計算機のデータ反映処理に至るまでの分散データ等価処理手順の概要を示すフローチャート。The flowchart which shows the outline | summary of the distributed data equivalent process sequence from the data change process of a master computer to the data reflection process of a replica computer in the distributed data equivalent system shown in FIGS. 図3に示すマスター計算機のデータ処理部によるデータ変更処理手順の概要を示すフローチャート。The flowchart which shows the outline | summary of the data change process procedure by the data processing part of the master computer shown in FIG. 図3に示すマスター計算機のデータ処理部による変更内容のコミット処理手順の概要を示すフローチャート。FIG. 4 is a flowchart showing an outline of a change processing commit procedure performed by a data processing unit of the master computer shown in FIG. 3. FIG. 図3に示すマスター計算機のマージデータ処理部によるコミット実行後のマージ処理手順の概要を示すフローチャート。The flowchart which shows the outline | summary of the merge processing procedure after the commit execution by the merge data processing part of the master computer shown in FIG. 図3に示すマスター計算機とレプリカ計算機のレプリケーション処理部によるレプリケーション送信処理手順とレプリケーション受信処理手順の概要を示すフローチャート。4 is a flowchart showing an overview of a replication transmission processing procedure and a replication reception processing procedure by a replication processing unit of the master computer and the replica computer shown in FIG. 3. 図3に示すレプリカ計算機のマージデータ処理部によるマージデータ展開処理手順の概要を示すフローチャート。The flowchart which shows the outline | summary of the merge data expansion | deployment processing procedure by the merge data process part of the replica computer shown in FIG. 図3に示すレプリカ計算機のデータ処理部によるデータ反映処理手順の概要を示すフローチャート。4 is a flowchart showing an outline of a data reflection processing procedure by a data processing unit of the replica computer shown in FIG. 3.

符号の説明Explanation of symbols

11…データベース
12…データ処理部
13…マージデータ処理部
14…レプリケーション処理部
15…モード処理部
16…リトリーブ処理部
17…データ操作アプリケーション
18…モード設定アプリケーション
111…データファイル
112…マッピングデータ
121…データ参照処理部
122…データ更新処理部
123…受信データ反映部
123…更新データキャッシュ
131…更新データマージ部
132…マージデータ展開部
141…レプリケーション管理部
142…レプリケーション通信部
143…レプリケーション管理表
151…モード管理部
152…モード送信部
153…モード受信部
154…モード管理テーブル
161…リトリーブ要求受理部
162…リトリーブデータ送信部
163…リトリーブ要求送信部
164…リトリーブデータ受信部
165…リトリーブ状態表
DESCRIPTION OF SYMBOLS 11 ... Database 12 ... Data processing part 13 ... Merge data processing part 14 ... Replication processing part 15 ... Mode processing part 16 ... Retrieve processing part 17 ... Data operation application 18 ... Mode setting application 111 ... Data file 112 ... Mapping data 121 ... Data Reference processing unit 122 ... data update processing unit 123 ... received data reflection unit 123 ... update data cache 131 ... update data merge unit 132 ... merge data expansion unit 141 ... replication management unit 142 ... replication communication unit 143 ... replication management table 151 ... mode Management unit 152 ... mode transmission unit 153 ... mode reception unit 154 ... mode management table 161 ... retrieve request reception unit 162 ... retrieve data transmission unit 163 ... retrieve request transmission unit 164 ... retrieval Budeta receiving section 165 ... retrieve the state table

Claims (14)

ネットワークを介して接続された複数の計算機に目的データをそれぞれ格納し、特定の1つの計算機をマスターモード、その他の各計算機をレプリカモードで運用することによりマスター計算機およびレプリカ計算機としてそれぞれ動作させ、マスター計算機でデータ更新操作により目的データがオリジナルに更新された場合に、各レプリカ計算機の目的データをマスター計算機と同一内容に等価する分散データ等価方法において
前記各計算機は、
複数のアプリケーションからアクセス可能な共有領域に前記目的データを格納するデータファイルを配置してなるデータベースを備え、
前記複数の計算機のうち、どの計算機が前記マスター計算機であるかを特定するモード情報と自計算機のモードを特定するモード情報を含むモード情報を管理して、他計算機との間でモード情報の送受信を行うと共に、モード切替が必要な場合にはモード遷移および予め決められたモード遷移後の動作を実行するモード処理ステップを行い、
前記マスター計算機により、
前記データ更新操作の結果を更新キャッシュに一旦格納すると共に、コミット要求に応じて更新キャッシュの内容を1個の更新内容コミットデータとし、固有のデータ特定情報を付加して前記データファイルに格納するデータ更新ステップと、
予め設定されたマージ併合条件に従って決められる1個または複数個の前記更新内容コミットデータをマージしてマージデータを生成する更新データマージステップと、
前記モード情報に基づき、等価対象となる前記各レプリカ計算機を示す送信先情報を管理して、この送信先情報に基づき各レプリカ計算機に対して前記マージデータをレプリケーションデータとして送信するレプリケーション送信ステップを行い、
前記レプリカ計算機により、
前記モード情報に基づき、レプリケーションデータの送信元となる前記マスター計算機を示す送信元情報を管理して、この送信元情報に基づきマスター計算機からのレプリケーションデータを受信するレプリケーション受信ステップと、
前記レプリケーションデータである前記マージデータを、元の1個または複数個の前記更新内容コミットデータに展開するマージデータ展開ステップと、
展開された前記更新内容コミットデータを、各更新内容コミットデータ毎に、そのデータのリトリーブ状態を示すリトリーブ状態情報に基づき、前記データファイルに反映するか否か判定して、反映すると判定した更新内容コミットデータをその前記データ特定情報と共にデータファイルに反映する受信データ反映ステップを行い、
前記レプリカ計算機により、
自計算機と前記マスター計算機の前記データファイル間の差異をなくすためにデータファイルの一部または全部を一括してコピーするリトリーブに必要なリトリーブデータを要求するリトリーブ要求をマスター計算機に送信するリトリーブ要求送信ステップを行い、
前記マスター計算機により、
前記レプリカ計算機からの前記リトリーブ要求の受信に応答して前記リトリーブデータをそのレプリカ計算機に送信するリトリーブデータ送信ステップを行い、
前記レプリカ計算機により、
前記マスター計算機から前記リトリーブデータを受信した場合に、前記リトリーブを実行して前記リトリーブ状態情報を更新するリトリーブデータ受信ステップを行う、
ことを特徴とする分散データ等価方法。
By storing target data in multiple computers connected via a network, operating one specific computer in the master mode and each other computer in the replica mode to operate as a master computer and a replica computer, respectively. In the distributed data equivalent method in which the target data of each replica computer is equivalent to the same content as the master computer when the target data is updated to the original by the data update operation on the computer,
A database comprising a data file for storing the target data in a shared area accessible from a plurality of applications;
Manages mode information including mode information specifying which computer is the master computer of the plurality of computers and mode information specifying the mode of the own computer, and transmits / receives mode information to / from other computers In addition, when mode switching is necessary, a mode processing step is executed to execute the mode transition and the operation after the predetermined mode transition,
By the master computer,
Data that temporarily stores the result of the data update operation in the update cache, sets the content of the update cache as one update content commit data in response to a commit request, adds unique data specifying information, and stores the data in the data file An update step;
An update data merging step of generating merge data by merging one or a plurality of the update content commit data determined in accordance with a preset merge merge condition;
Based on the mode information, a transmission destination step is performed for managing transmission destination information indicating each replica computer to be equivalent, and transmitting the merge data as replication data to each replica computer based on the transmission destination information. ,
By the replica computer,
Based on the mode information, managing the transmission source information indicating the master computer that is the transmission source of replication data, and receiving a replication data from the master computer based on the transmission source information,
A merge data expansion step of expanding the merge data that is the replication data into the original one or a plurality of the update content commit data;
The update contents determined to be reflected by determining whether or not to reflect the expanded update content commit data to the data file based on the retrieve status information indicating the retrieve status of the data for each update content commit data Performing a received data reflecting step of reflecting the commit data in the data file together with the data specifying information;
By the replica computer,
Retrieval request transmission that sends a retrieval request to the master computer for retrieval data required for retrieval to copy all or part of the data file at once in order to eliminate the difference between the data file of the own computer and the master computer Do the steps,
By the master computer,
Performing a retrieve data transmission step of transmitting the retrieve data to the replica computer in response to reception of the retrieve request from the replica computer;
By the replica computer,
When the retrieve data is received from the master computer, a retrieve data reception step is performed for executing the retrieve and updating the retrieve state information.
A distributed data equivalent method characterized by the above.
前記データファイルは、前記目的データのデータ本体として、行と列から構成される表形式データを格納すると共に、その表形式データまたはそれを構成する列、行のいずれかの単位のデータを特定するデータ特定情報とそれぞれに割り当てられたシリアル番号から構成されるデータ状態表を格納しており、
前記リトリーブ状態情報は、前記表形式データまたはそれを構成する列、行のいずれかの単位の前記データを特定するデータ特定情報とそれぞれの前記リトリーブ状態から構成されるリトリーブ状態表であり、
前記リトリーブデータは、前記データ状態表を比較した結果として得られる前記表形式データまたはそれを構成する列、行のいずれかの単位のデータである、
ことを特徴とする請求項1に記載の分散データ等価方法。
The data file stores tabular data composed of rows and columns as the data body of the target data, and specifies data in any unit of the tabular data or the columns and rows constituting the tabular data. Stores a data status table consisting of data identification information and serial numbers assigned to each.
The retrieve state information is a retrieve state table composed of the table format data or data specifying information for specifying the data in any one of the columns and rows constituting the table and the respective retrieve states,
The retrieved data is data in units of either the tabular data obtained as a result of comparing the data state tables or the columns and rows constituting the data.
The distributed data equivalent method according to claim 1, wherein:
前記各計算機で管理される前記モード情報は、どの計算機が前記マスター計算機であるかを特定するマスター計算機情報と自計算機のモードを特定する自計算機モード情報を含むモード管理情報として管理され、
前記各計算機による前記モード処理ステップは、
自計算機の初期起動時において、他計算機がマスター計算機であることを特定するモード情報を受信した場合に、前記マスター計算機情報を当該他計算機に設定して維持すると共に、前記自計算機モード情報を前記レプリカモードに設定して維持する初期起動ステップと、
前記初期起動ステップ後に、自計算機上で前記アプリケーションによるマスター設定が行われた場合に、前記マスター計算機情報を自計算機に設定して維持し、かつ、前記自計算機モード情報を前記マスターモードに設定して維持すると共に、他計算機に自計算機がマスター計算機であることを特定するモード情報を送信するマスターモード変更ステップと、
前記初期起動ステップ後に、他計算機で前記アプリケーションによるマスター設定が行われた結果、当該他計算機がマスター計算機であることを特定するモード情報を受信した場合に、前記マスター計算機情報を当該他計算機に設定して維持すると共に、前記自計算機モード情報を前記レプリカモードに設定して維持するレプリカモード変更ステップを含む、
ことを特徴とする請求項1または請求項2に記載の分散データ等価方法。
The mode information managed by each computer is managed as mode management information including master computer information specifying which computer is the master computer and own computer mode information specifying the mode of the own computer,
The mode processing step by each computer is as follows:
At the time of initial startup of the own computer, when receiving mode information specifying that the other computer is a master computer, the master computer information is set and maintained in the other computer, and the own computer mode information is An initial startup step to set and maintain replica mode;
After the initial startup step, when master setting by the application is performed on the own computer, the master computer information is set and maintained in the own computer, and the own computer mode information is set in the master mode. And a master mode changing step for transmitting mode information identifying that the own computer is a master computer to other computers,
After the initial activation step, when the master setting by the application is performed on the other computer, as a result of receiving mode information specifying that the other computer is the master computer, the master computer information is set in the other computer. And including a replica mode change step for setting and maintaining the own computer mode information in the replica mode.
The distributed data equivalent method according to claim 1 or 2, characterized in that:
前記初期起動ステップおよび前記レプリカモード変更ステップの各々は、
他計算機がマスター計算機であることを特定するモード情報を受信した場合に、前記マスター計算機情報を当該他計算機に設定して維持するステップと、
前記レプリケーション受信ステップを開始可能にするステップと、
前記マスター計算機に対して前記リトリーブ要求送信ステップと前記リトリーブデータ受信ステップを行うことにより、そのマスター計算機と前記データファイル中のデータを一括等価するステップと、
前記自計算機モード情報を前記レプリカモードに設定して維持するステップを含み、
前記マスターモード変更ステップは、
自計算機上で前記アプリケーションによるマスター設定が行われた場合に、前記マスター計算機情報または他計算機からのモード情報の受信に基づき、前記マスター計算機として動作中の他計算機の有無を確認するステップと、
前記マスター計算機として動作中の他計算機が存在していないことを確認した場合に、前記マスター計算機情報を自計算機に設定して維持するステップと、
前記レプリケーション送信ステップを開始可能にするステップと、
前記リトリーブデータ送信ステップを開始可能にするステップと、
前記自計算機モード情報を前記マスターモードに設定して維持するステップと、
他計算機に自計算機が前記マスター計算機であることを特定するモード情報を送信するステップを含む、
ことを特徴とする請求項3に記載の分散データ等価方法。
Each of the initial activation step and the replica mode change step includes:
A step of setting and maintaining the master computer information in the other computer when receiving mode information specifying that the other computer is a master computer; and
Enabling the replication reception step to begin;
Performing the retrieve request transmission step and the retrieve data reception step on the master computer, and performing batch equalization of the master computer and the data in the data file;
Including setting and maintaining the own computer mode information in the replica mode;
The master mode changing step includes
When master setting by the application is performed on the own computer, based on reception of the mode information from the master computer information or another computer, checking the presence or absence of other computers operating as the master computer;
When it is confirmed that there is no other computer operating as the master computer, setting and maintaining the master computer information in the own computer; and
Enabling the replication sending step to begin;
Enabling the retrieval data transmission step to begin;
Setting and maintaining the computer mode information in the master mode;
Including transmitting to the other computer mode information specifying that the own computer is the master computer,
The distributed data equivalent method according to claim 3.
前記各計算機による前記モード処理ステップは、前記マスターモードと前記レプリカモードに加えて、マスターモードまたはレプリカモードになる途中の状態を、遷移中モードとして取り扱い、
前記マスターモード変更ステップは、
前記自計算機モード情報を前記遷移中モードに一旦設定して維持するステップと、遷移中モードから前記マスターモードに変更して維持するステップを含み、
前記レプリカモード変更ステップは、
前記自計算機モード情報を前記遷移中モードに一旦設定して維持するステップと、遷移中モードから前記マスターモードに変更して維持するステップを含む、
ことを特徴とする請求項3または請求項4に記載の分散データ等価方法。
In the mode processing step by each computer, in addition to the master mode and the replica mode, a state in the middle of becoming the master mode or the replica mode is handled as a transition mode,
The master mode changing step includes
Temporarily setting and maintaining the computer mode information in the transition mode; and changing and maintaining the transition mode from the master mode to the master mode;
The replica mode changing step includes:
Temporarily setting and maintaining the computer mode information in the transition mode, and changing and maintaining the transition mode from the master mode to the master mode,
5. The distributed data equivalent method according to claim 3 or 4, wherein:
前記各計算機による前記モード処理ステップは、前記マスターモードと前記レプリカモードに加えて、マスターモードになる途中の状態とレプリカモードになる途中の状態を、マスター遷移中モードおよびレプリカ遷移中モードとしてそれぞれ取り扱い、
前記マスターモード変更ステップは、
前記自計算機モード情報を前記マスター遷移中モードに一旦設定して維持するステップと、マスター遷移中モードから前記マスターモードに変更して維持するステップを含み、
前記レプリカモード変更ステップは、
前記自計算機モード情報を前記レプリカ遷移中モードに一旦設定して維持するステップと、レプリカ遷移中モードから前記マスターモードに変更して維持するステップを含む、
ことを特徴とする請求項5に記載の分散データ等価方法。
In addition to the master mode and the replica mode, the mode processing step by each computer treats a state in the middle of becoming the master mode and a state in the middle of becoming the replica mode as a master transition mode and a replica transition mode, respectively. ,
The master mode changing step includes
Including setting and maintaining the self-computer mode information once in the master transition mode, and changing and maintaining from the master transition mode to the master mode,
The replica mode changing step includes:
Temporarily setting and maintaining the own computer mode information in the replica transition mode, and changing and maintaining the replica mode from the master mode to the master mode,
6. The distributed data equivalent method according to claim 5, wherein:
前記マスターモード変更ステップは、
自計算機上で前記アプリケーションによるマスター設定が行われた場合に、前記自計算機モード情報を前記マスター遷移中モードに設定して維持するステップと、
他計算機に自計算機が前記マスター遷移中モードであることを示すマスター遷移中情報を送信するステップと、
前記マスター計算機情報または他計算機からのモード情報の受信に基づき、前記マスター計算機として動作中の他計算機の有無を確認するステップと、
前記マスター計算機として動作中の他計算機が存在していないことを確認した場合に、前記マスター計算機情報を自計算機に設定して維持するステップと、
前記レプリケーション送信ステップを開始可能にするステップと、
前記リトリーブデータ送信ステップを開始可能にするステップと、
前記自計算機モード情報を前記マスターモードに設定して維持するステップと、
他計算機に自計算機が前記マスターモードで前記マスター計算機として動作していることを示すマスター運用中情報を送信するステップを含み、
前記レプリカモード変更ステップは、
他計算機から前記マスター遷移中情報を受信した場合に、前記自計算機モード情報を前記レプリカ遷移中モードに設定して維持するステップと、
他計算機から前記マスター運用中情報を受信した場合に、前記マスター計算機情報を当該他計算機に設定して維持するステップと、
前記レプリケーション受信ステップを開始可能にするステップと、
前記マスター計算機に対して前記リトリーブ要求送信ステップと前記リトリーブデータ受信ステップを行うことにより、そのマスター計算機と前記データファイル中のデータを一括等価するステップと、
前記自計算機モード情報を前記レプリカモードに設定して維持するステップを含む、
ことを特徴とする請求項6に記載の分散データ等価方法。
The master mode changing step includes
When master setting by the application is performed on the own computer, the step of setting and maintaining the own computer mode information in the master transition mode,
Transmitting master transition information indicating that the local computer is in the master transition mode to another computer;
Checking the presence or absence of other computers operating as the master computer based on reception of the mode information from the master computer information or other computers,
When it is confirmed that there is no other computer operating as the master computer, setting and maintaining the master computer information in the own computer; and
Enabling the replication sending step to begin;
Enabling the retrieval data transmission step to begin;
Setting and maintaining the computer mode information in the master mode;
Including a step of transmitting master operating information indicating that the local computer is operating as the master computer in the master mode to another computer,
The replica mode changing step includes:
When the master transition information is received from another computer, the own computer mode information is set and maintained in the replica transition mode; and
A step of setting and maintaining the master computer information in the other computer when the master operation information is received from another computer;
Enabling the replication reception step to begin;
Performing the retrieve request transmission step and the retrieve data reception step on the master computer, and performing batch equalization of the master computer and the data in the data file;
Including setting and maintaining the own computer mode information in the replica mode,
The distributed data equivalent method according to claim 6.
前記初期起動ステップは、
自計算機の初期起動時において、他計算機がマスター計算機であることを特定するモード情報が得られない場合に、前記自計算機モード情報を前記遷移中モードまたは前記レプリカ遷移中モードに設定して維持するステップを含む、
ことを特徴とする請求項5乃至請求項7のいずれかに記載の分散データ等価方法。
The initial activation step includes:
When mode information specifying that another computer is a master computer cannot be obtained at the initial startup of the own computer, the own computer mode information is set to the transition mode or the replica transition mode and maintained. Including steps,
The distributed data equivalent method according to claim 5, wherein
前記初期起動ステップおよび前記レプリカモード変更ステップの各々は、
前記マスター計算機に対して前記リトリーブ要求送信ステップと前記リトリーブデータ受信ステップを行うことにより、そのマスター計算機と前記データファイル中のデータを一括等価するステップを含み、
前記リトリーブ要求送信ステップまたは前記リトリーブデータ送信ステップは、
前記リトリーブ要求について要求元である前記レプリカ計算機と要求先である前記マスター計算機の前記データファイル中に格納された前記データ特定情報の比較を行い、その比較結果に応じて前記リトリーブデータを特定するデータ特定情報比較ステップを含む、
ことを特徴とする請求項3乃至請求項5のいずれかに記載の分散データ等価方法。
Each of the initial activation step and the replica mode change step includes:
Including performing the retrieval request transmission step and the retrieval data reception step on the master computer to collectively equalize the master computer and the data in the data file,
The retrieval request transmission step or the retrieval data transmission step includes:
Data for identifying the retrieve data according to the comparison result by comparing the data specifying information stored in the data file of the replica computer that is the request source and the master computer that is the request destination for the retrieve request Including specific information comparison step,
6. The distributed data equivalent method according to claim 3, wherein
前記リトリーブ要求送信ステップは、前記マスター計算機に前記リトリーブ要求を送信する場合に、自計算機の前記データ特定情報をそのマスター計算機に送信するステップを含み、
前記リトリーブデータ送信ステップは、前記リトリーブ要求元である前記レプリカ計算機から送信された前記リトリーブ要求と前記データ特定情報を受信した場合に、前記データ特定情報比較ステップとして、そのデータ特定情報と自計算機のデータ特定情報の比較を行い、その比較結果に応じて前記リトリーブデータを特定するステップを含む、
ことを特徴とする請求項9に記載の分散データ等価方法。
The retrieval request transmission step includes a step of transmitting the data specifying information of the own computer to the master computer when transmitting the retrieval request to the master computer.
When the retrieval request is transmitted from the replica computer that is the retrieval request source and the data identification information is received, the data identification information and the local computer are compared as the data identification information comparison step. Comparing the data identification information and identifying the retrieved data according to the comparison result,
The distributed data equivalent method according to claim 9.
前記リトリーブ要求送信ステップは、
前記マスター計算機に前記リトリーブ要求を送信する前に、そのマスター計算機の前記データ特定情報の送信要求を送信するステップと、
前記マスター計算機から前記データ特定情報の送信要求に応じたデータ特定情報を受信した場合に、前記データ特定情報比較ステップとして、そのデータ特定情報と自計算機のデータ特定情報の比較を行い、その比較結果に応じて前記リトリーブデータを特定するステップを含み、
前記リトリーブデータ送信ステップは、前記レプリカ計算機から送信された前記データ特定情報の送信要求を受信した場合に、自計算機の前記データ特定情報をそのレプリカ計算機に送信するステップを含む、
ことを特徴とする請求項9に記載の分散データ等価方法。
The retrieval request transmission step includes:
Before transmitting the retrieval request to the master computer, transmitting a transmission request for the data specifying information of the master computer;
When data specifying information corresponding to the data specifying information transmission request is received from the master computer, as the data specifying information comparing step, the data specifying information is compared with the data specifying information of the own computer, and the comparison result Identifying the retrieved data in response to:
The retrieve data transmission step includes a step of transmitting the data specifying information of the own computer to the replica computer when the transmission request of the data specifying information transmitted from the replica computer is received.
The distributed data equivalent method according to claim 9.
前記更新データマージステップは、
前記マージ併合条件として、前回のマージ後に得られた前記更新内容コミットデータの総数、総データサイズ、前回のマージからの経過時間、を含む複数の条件項目の中から選択された単数または複数の条件項目の組み合わせから構成されたマージ併合条件が成立するか否かを判定するステップと、
前記マージ併合条件が成立した時点で、マージする前記更新内容コミットデータの数を決定するステップを含む、
ことを特徴とする請求項1乃至請求項11のいずれかに記載の分散データ等価方法。
The update data merging step includes:
One or more conditions selected from a plurality of condition items including the total number of the update content commit data obtained after the previous merge, the total data size, and the elapsed time since the previous merge as the merge merge condition Determining whether a merge merge condition configured from a combination of items is satisfied;
Determining the number of update content commit data to be merged when the merge merge condition is satisfied,
12. The distributed data equivalent method according to claim 1, wherein the distributed data equivalent method is any one of claims 1 to 11.
ネットワークを介して接続された複数の計算機に目的データをそれぞれ格納し、特定の1つの計算機をマスターモード、その他の各計算機をレプリカモードで運用することによりマスター計算機およびレプリカ計算機としてそれぞれ動作させ、マスター計算機でデータ更新操作により目的データがオリジナルに更新された場合に、各レプリカ計算機の目的データをマスター計算機と同一内容に等価する分散データ等価システムにおいて、
前記各計算機は、
複数のアプリケーションからアクセス可能な共有領域に前記目的データを格納するデータファイルを配置してなるデータベースと、
前記複数の計算機のうち、どの計算機が前記マスター計算機であるかを特定する情報と自計算機のモードを特定する情報を含むモード情報を管理して、モード切替が必要な場合にはモード遷移および予め決められたモード遷移後の動作を実行すると共に、他計算機との間でモード情報の送受信を行うモード処理部と、
前記マスターモード時に、前記データ更新操作の結果を更新キャッシュに一旦格納すると共に、コミット要求に応じて更新キャッシュの内容を1個の更新内容コミットデータとし、固有のデータ特定情報を付加して前記データファイルに格納するデータ更新処理部と、
前記マスターモード時に、予め設定されたマージ併合条件に従って決められる1個または複数個の前記更新内容コミットデータをマージしてマージデータを生成する更新データマージ部と、
前記マスターモード時に、前記モード情報に基づき、等価対象となる前記各レプリカ計算機を示す送信先情報を管理して、この送信先情報に基づき各レプリカ計算機に対して前記マージデータをレプリケーションデータとして送信し、前記レプリカモード時に、モード情報に基づき、レプリケーションデータの送信元となる前記マスター計算機を示す送信元情報を管理して、この送信元情報に基づきマスター計算機からのレプリケーションデータを受信するレプリケーション処理部と、
前記レプリカモード時に、前記レプリケーションデータである前記マージデータを、元の1個または複数個の前記更新内容コミットデータに展開するマージデータ展開部と、
前記レプリカモード時に、展開された前記更新内容コミットデータを、各更新内容コミットデータ毎に、そのデータのリトリーブ状態を示すリトリーブ状態情報に基づき、前記データファイルに反映するか否か判定して、反映すると判定した更新内容コミットデータをその前記データ特定情報と共にデータファイルに反映する受信データ反映部と、
前記レプリカモード時に、自計算機と前記マスター計算機の前記データファイル間の差異をなくすためにデータファイルの一部または全部を一括してコピーするリトリーブに必要なリトリーブデータを要求するリトリーブ要求をマスター計算機に送信すると共に、マスター計算機からリトリーブデータを受信した場合に、リトリーブを実行して前記リトリーブ状態情報を更新し、前記マスターモード時に、前記レプリカ計算機からのリトリーブ要求の受信に応答してリトリーブデータをそのレプリカ計算機に送信するリトリーブ処理部を備えている、
ことを特徴とする分散データ等価システム。
By storing target data in multiple computers connected via a network, operating one specific computer in the master mode and each other computer in the replica mode to operate as a master computer and a replica computer, respectively. In a distributed data equivalent system in which the target data of each replica computer is equivalent to the same content as the master computer when the target data is updated to the original by the data update operation on the computer,
Each of the computers is
A database in which data files for storing the target data are arranged in a shared area accessible from a plurality of applications;
Among the plurality of computers, mode information including information specifying which computer is the master computer and information specifying the mode of the own computer is managed. A mode processing unit that executes an operation after the determined mode transition and transmits / receives mode information to / from another computer,
In the master mode, the result of the data update operation is temporarily stored in the update cache, and the content of the update cache is set as one update content commit data in response to a commit request, and unique data specifying information is added to the data. A data update processing unit to be stored in the file;
An update data merging unit that generates merge data by merging one or a plurality of the update content commit data determined according to a preset merge merge condition in the master mode;
In the master mode, based on the mode information, it manages transmission destination information indicating each replica computer to be equivalent, and transmits the merge data as replication data to each replica computer based on the transmission destination information. A replication processing unit that manages transmission source information indicating the master computer that is a transmission source of replication data in the replica mode, and receives replication data from the master computer based on the transmission source information; ,
A merge data expansion unit that expands the merge data that is the replication data into the original one or a plurality of the update content commit data during the replica mode;
In the replica mode, the expanded update content commit data is determined for each update content commit data based on the retrieve status information indicating the retrieve status of the data, and whether or not to reflect the data file is reflected. Then, the received data reflecting unit that reflects the determined update content commit data in the data file together with the data specifying information,
In the replica mode, the master computer issues a retrieval request for retrieving data required for retrieval to copy all or part of the data file at once in order to eliminate the difference between the data file of the own computer and the master computer. When the retrieval data is received from the master computer, the retrieval is executed to update the retrieval state information. In the master mode, the retrieval data is received in response to the reception of the retrieval request from the replica computer. It has a retrieve processing unit that sends it to the replica computer.
A distributed data equivalent system.
ネットワークを介して接続された複数の計算機に目的データをそれぞれ格納し、特定の1つの計算機をマスターモード、その他の各計算機をレプリカモードで運用することによりマスター計算機およびレプリカ計算機としてそれぞれ動作させ、マスター計算機でデータ更新操作により目的データがオリジナルに更新された場合に、各レプリカ計算機の目的データをマスター計算機と同一内容に等価する分散データ等価システムを構築するために各計算機に適用される分散データ等価システム構築用プログラムにおいて、
前記計算機が、複数のアプリケーションからアクセス可能な共有領域に前記目的データを格納するデータファイルを配置してなるデータベースを備えている場合に、この計算機に、
前記複数の計算機のうち、どの計算機が前記マスター計算機であるかを特定する情報と自計算機のモードを特定する情報を含むモード情報を管理して、モード切替が必要な場合にはモード遷移および予め決められたモード遷移後の動作を実行すると共に、他計算機との間でモード情報の送受信を行うモード処理機能と、
前記マスターモード時に、前記データ更新操作の結果を更新キャッシュに一旦格納すると共に、コミット要求に応じて更新キャッシュの内容を1個の更新内容コミットデータとし、固有のデータ特定情報を付加して前記データファイルに格納するデータ更新処理機能と、
前記マスターモード時に、予め設定されたマージ併合条件に従って決められる1個または複数個の前記更新内容コミットデータをマージしてマージデータを生成する更新データマージ機能と、
前記マスターモード時に、前記モード情報に基づき、等価対象となる前記各レプリカ計算機を示す送信先情報を管理して、この送信先情報に基づき各レプリカ計算機に対して前記マージデータをレプリケーションデータとして送信し、前記レプリカモード時に、モード情報に基づき、レプリケーションデータの送信元となる前記マスター計算機を示す送信元情報を管理して、この送信元情報に基づきマスター計算機からのレプリケーションデータを受信するレプリケーション処理機能と、
前記レプリカモード時に、前記レプリケーションデータである前記マージデータを、元の1個または複数個の前記更新内容コミットデータに展開するマージデータ展開機能と、
前記レプリカモード時に、展開された前記更新内容コミットデータを、各更新内容コミットデータ毎に、そのデータのリトリーブ状態を示すリトリーブ状態情報に基づき、前記データファイルに反映するか否か判定して、反映すると判定した更新内容コミットデータをその前記データ特定情報と共にデータファイルに反映する受信データ反映機能と、
前記レプリカモード時に、自計算機と前記マスター計算機の前記データファイル間の差異をなくすためにデータファイルの一部または全部を一括してコピーするリトリーブに必要なリトリーブデータを要求するリトリーブ要求をマスター計算機に送信すると共に、マスター計算機からリトリーブデータを受信した場合に、リトリーブを実行して前記リトリーブ状態情報を更新し、前記マスターモード時に、前記レプリカ計算機からのリトリーブ要求の受信に応答してリトリーブデータをそのレプリカ計算機に送信するリトリーブ処理機能、
を実現させることを特徴とする分散データ等価システム構築用プログラム。
By storing target data in multiple computers connected via a network, operating one specific computer in the master mode and each other computer in the replica mode to operate as a master computer and a replica computer, respectively. Distributed data equivalence applied to each computer to construct a distributed data equivalent system in which the target data of each replica computer is equivalent to the same content as the master computer when the target data is updated to the original by the data update operation on the computer In the system construction program,
When the computer includes a database in which a data file for storing the target data is arranged in a shared area accessible from a plurality of applications,
Among the plurality of computers, mode information including information specifying which computer is the master computer and information specifying the mode of the own computer is managed. A mode processing function that executes the operation after the determined mode transition and transmits / receives mode information to / from other computers,
In the master mode, the result of the data update operation is temporarily stored in the update cache, and the content of the update cache is set as one update content commit data in response to a commit request, and unique data specifying information is added to the data. Data update processing function stored in the file,
An update data merge function for generating merge data by merging one or a plurality of update content commit data determined in accordance with a preset merge merge condition in the master mode;
In the master mode, based on the mode information, it manages transmission destination information indicating each replica computer to be equivalent, and transmits the merge data as replication data to each replica computer based on the transmission destination information. A replication processing function for managing transmission source information indicating the master computer that is a transmission source of replication data in the replica mode, and receiving replication data from the master computer based on the transmission source information; ,
A merge data expansion function for expanding the merge data as the replication data into the original one or a plurality of the update content commit data in the replica mode;
In the replica mode, the expanded update content commit data is determined for each update content commit data based on the retrieve status information indicating the retrieve status of the data, and whether or not to reflect the data file is reflected. Then, the update data commit function that reflects the determined update content commit data in the data file together with the data specifying information,
In the replica mode, the master computer issues a retrieval request for retrieving data required for retrieval to copy all or part of the data file at once in order to eliminate the difference between the data file of the own computer and the master computer. When the retrieval data is received from the master computer, the retrieval is executed to update the retrieval state information. In the master mode, the retrieval data is received in response to the reception of the retrieval request from the replica computer. Retrieve processing function to send to the replica computer,
A program for building a distributed data equivalent system characterized by realizing
JP2004160356A 2004-05-28 2004-05-28 Distributed data equivalence method and system, and program Expired - Fee Related JP4434838B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004160356A JP4434838B2 (en) 2004-05-28 2004-05-28 Distributed data equivalence method and system, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004160356A JP4434838B2 (en) 2004-05-28 2004-05-28 Distributed data equivalence method and system, and program

Publications (2)

Publication Number Publication Date
JP2005339411A JP2005339411A (en) 2005-12-08
JP4434838B2 true JP4434838B2 (en) 2010-03-17

Family

ID=35492882

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004160356A Expired - Fee Related JP4434838B2 (en) 2004-05-28 2004-05-28 Distributed data equivalence method and system, and program

Country Status (1)

Country Link
JP (1) JP4434838B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7940908B2 (en) * 2006-02-23 2011-05-10 Qualcomm Incorporated Sharing profile data between telecommunication devices
JP4989295B2 (en) * 2007-04-27 2012-08-01 三菱電機株式会社 Database equivalent system and database equivalent method
JP5366184B2 (en) * 2008-09-12 2013-12-11 株式会社Nec情報システムズ Data storage system and data storage method
JP4871980B2 (en) * 2009-08-10 2012-02-08 株式会社日立製作所 Data processing method, data processing program, and data processing system
JP2011253500A (en) * 2010-06-04 2011-12-15 Mitsubishi Electric Corp Data distribution system, distributed monitoring control system and data distribution method
JP6088450B2 (en) * 2014-02-18 2017-03-01 日本電信電話株式会社 Redundant database system, database device, and master replacement method

Also Published As

Publication number Publication date
JP2005339411A (en) 2005-12-08

Similar Documents

Publication Publication Date Title
CN110502507B (en) Management system, method, equipment and storage medium of distributed database
AU2019236685B2 (en) Distributed file system using consensus nodes
JP5192226B2 (en) Method for adding standby computer, computer and computer system
EP1704470B1 (en) Geographically distributed clusters
EP1814035B1 (en) Storage controller and data management method
US8666939B2 (en) Approaches for the replication of write sets
US20190129976A1 (en) Apparatus for controlling synchronization of metadata on network and method for the same
EP1704480B1 (en) Cluster database with remote data mirroring
US20050193248A1 (en) Computer system for recovering data based on priority of the data
WO2012140957A1 (en) Information storage system and data replication method thereof
CN103207867A (en) Method for processing data blocks, method for initiating recovery operation and nodes
CN108897641B (en) Log analysis service real-time synchronization system under database master-slave environment
JP2022531867A (en) Data reading methods, devices, computer devices and computer programs
JP4434838B2 (en) Distributed data equivalence method and system, and program
JP7117338B2 (en) REMOTE COPY SYSTEM AND REMOTE COPY MANAGEMENT METHOD
JP2004133598A (en) Duplex control program for a plurality of databases
JP2021114130A (en) Information processing device, information processing system, and data rearrangement program
JP4129353B2 (en) Distributed data management system, distributed data management method, and distributed data management program
JP6291977B2 (en) Distributed file system, backup file acquisition method, control device, and management device
CN116756165A (en) Database data recovery system, method, device and storage medium
JP5002636B2 (en) Data processing apparatus and database management method
CN118606398A (en) Data slicing processing method, device, equipment, storage medium and program product

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070112

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20071017

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091125

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091222

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130108

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130108

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140108

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees