JP2006338145A - Multiplex database system, synchronization method thereof, intermediation device and intermediation program - Google Patents

Multiplex database system, synchronization method thereof, intermediation device and intermediation program Download PDF

Info

Publication number
JP2006338145A
JP2006338145A JP2005159578A JP2005159578A JP2006338145A JP 2006338145 A JP2006338145 A JP 2006338145A JP 2005159578 A JP2005159578 A JP 2005159578A JP 2005159578 A JP2005159578 A JP 2005159578A JP 2006338145 A JP2006338145 A JP 2006338145A
Authority
JP
Japan
Prior art keywords
server
database
snapshot
database server
difference 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.)
Pending
Application number
JP2005159578A
Other languages
Japanese (ja)
Inventor
Takeshi Mishima
健 三島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2005159578A priority Critical patent/JP2006338145A/en
Publication of JP2006338145A publication Critical patent/JP2006338145A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a multiplex database system, capable of performing synchronization of a database server with minimized synchronization data and optionally separating or incorporating a database server without making the whole system foiled. <P>SOLUTION: In response to a synchronization request (incorporation request) of a new server 100, the intermediation device 200 acquires a snapshot from a server 100 in normal operation to restore a database 101 of the new server 100. The intermediation device 200 accumulates a query from a client after forming the snapshot as differential information, and transfers the differential information after restoration of the database from the snapshot in the new server 100. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、障害などによりサービスが停止することなく常時連続したサービス提供が要求される多重化データベースシステムに関し、特に該システムを構成するデータベースサーバに障害が発生した場合の復旧処理や新規のデータベースサーバの組み込み処理を、サービス提供を継続したまま実施するためのデータ同期化技術に関する。   The present invention relates to a multiplexed database system in which continuous service provision is required without a service being stopped due to a failure or the like, and more particularly, recovery processing when a failure occurs in a database server constituting the system or a new database server The present invention relates to a data synchronization technique for performing the embedded processing while continuing to provide services.

従来のデータベース同期化技術としては、例えば特許文献1に記載されているものが知られている。この従来技術では、それぞれデータベースを内蔵する複数のサーバがネットワーク等を介して相互接続されている。図46に示すように、特許文献1に記載されている実施例では、3個のサーバ1010,1020,1030を含み、それぞれネットワーク1040を介して相互接続されている。各サーバ1010,1020及び1030は、それぞれデータ更新制御部1011,1021,1031と、レプリケーション制御部1012,1022,1032と、データベース1013,1023,1033及び差分ファイル1014,1024,1034を含んでいる。   As a conventional database synchronization technique, for example, one described in Patent Document 1 is known. In this prior art, a plurality of servers each containing a database are interconnected via a network or the like. As shown in FIG. 46, the embodiment described in Patent Document 1 includes three servers 1010, 1020, and 1030, which are interconnected via a network 1040. Each of the servers 1010, 1020, and 1030 includes a data update control unit 1011, 1021, 1031, a replication control unit 1012, 1022, 1032, databases 1013, 1023, 1033, and difference files 1014, 1024, 1034.

サーバ1010のデータ更新制御部1011は、データベースの更新処理を行う。レプリケーション制御部1012は、差分ファイル1014によりデータベース1013の同期化処理を行う。データベース1013は、データを一括管理する。差分ファイル1014は、データベース1013の差分情報を格納する。また、サーバ1020及び1030のデータ更新制御部1021,1031、レプリケーション制御部1022,1032、データベース1023,1033及び差分ファイル1024,1034は、それぞれ上述したデータ更新制御部1011,レプリケーション制御部1012,データベース1013及び差分ファイル1014と同様の機能を有する。   The data update control unit 1011 of the server 1010 performs database update processing. The replication control unit 1012 performs synchronization processing of the database 1013 using the difference file 1014. The database 1013 collectively manages data. The difference file 1014 stores the difference information of the database 1013. The data update control units 1021, 1031, replication control units 1022, 1032, databases 1023, 1033, and difference files 1024, 1034 of the servers 1020 and 1030 are the data update control unit 1011, replication control unit 1012 and database 1013 described above, respectively. And the same function as the difference file 1014.

サーバ1010にデータ更新イベントが発生した場合、サーバ1010のデータ更新制御部1011は、自データベース1013の内容を更新した後、サーバ1020及びサーバ1030に対してデータ更新通知を送信する。サーバ1020及びサーバ1030のデータ更新制御部1021,1031は、自データベース1023,1033の内容を更新する。その後、サーバ1020及び1030は、それぞれサーバ1010に対してデータ更新完了通知を送信する。サーバ1010は、サーバ1020及びサーバ1030からのデータ更新完了通知がともに正常であれば、何も行わずに更新処理を終了する。差分ファイル1014,1024,1034には何も書き込まれない。   When a data update event occurs in the server 1010, the data update control unit 1011 of the server 1010 updates the content of the own database 1013, and then transmits a data update notification to the server 1020 and the server 1030. The data update control units 1021 and 1031 of the server 1020 and the server 1030 update the contents of the own databases 1023 and 1033. Thereafter, the servers 1020 and 1030 each transmit a data update completion notification to the server 1010. If both the data update completion notifications from the server 1020 and the server 1030 are normal, the server 1010 ends the update process without performing anything. Nothing is written in the difference files 1014, 1024, 1034.

サーバ1030が障害などでダウンしている時にサーバ1010にデータ更新イベントが発生した場合、サーバ1020はデータ更新完了通知をサーバ1010へ送信するが、サーバ1030はデータ更新完了通知をサーバ1010へ送信できない。サーバ1010は、サーバ1030からのデータ更新完了通知を待ち続けるが、タイムアウトし、サーバ1030での更新が正常に終了しなかったことを知る。サーバ1010は、差分ファイル1014に更新が失敗した装置の情報(この場合、サーバ1030)と更新内容を保存する。以上で、サーバ1010は更新処理を終了する。   When a data update event occurs in the server 1010 when the server 1030 is down due to a failure or the like, the server 1020 transmits a data update completion notification to the server 1010, but the server 1030 cannot transmit a data update completion notification to the server 1010. . The server 1010 continues to wait for a data update completion notification from the server 1030, but times out and knows that the update at the server 1030 has not ended normally. The server 1010 stores information on the device that failed to be updated in the difference file 1014 (in this case, the server 1030) and the update content. Thus, the server 1010 ends the update process.

サーバ1020にデータ更新イベントが発生した場合も、サーバ1020は上述と同様の処理を行い、差分ファイル1024に更新が失敗した装置の情報と更新内容を保存し、更新処理を終了する。   Even when a data update event occurs in the server 1020, the server 1020 performs the same processing as described above, stores the information of the apparatus that failed to be updated and the update content in the difference file 1024, and ends the update process.

以上のようにして、サーバ1030が復旧するまでの間、サーバ1010とサーバ1020は更新内容をそれぞれ差分ファイル1014,1024へ保存し続ける。   As described above, until the server 1030 is restored, the server 1010 and the server 1020 continue to store the updated contents in the difference files 1014 and 1024, respectively.

サーバ1030が障害から復旧すると、サーバ1030のレプリケーション制御部1032はサーバ1010に対してレプリケーション開始通知を送信する。サーバ1010のレプリケーション制御部1012は差分ファイル1014に保存されているデータを古い順に取り出し、サーバ1030へデータ更新通知を送信する。サーバ1030は自データベース1033の内容を更新した後、データ更新完了通知をサーバ1010へ送信する。サーバ1010は、データ更新完了通知を受信するたびに該当するデータを差分ファイル1014から削除する。   When the server 1030 recovers from the failure, the replication control unit 1032 of the server 1030 transmits a replication start notification to the server 1010. The replication control unit 1012 of the server 1010 extracts the data stored in the difference file 1014 in the oldest order and transmits a data update notification to the server 1030. After updating the content of its own database 1033, the server 1030 transmits a data update completion notification to the server 1010. Each time the server 1010 receives a data update completion notification, the server 1010 deletes the corresponding data from the difference file 1014.

差分ファイル1014が空になったら、サーバ1020の差分ファイル1024のデータを上記と同様にしてサーバ1030に送信する。差分ファイル1024も空になったら、サーバ1030の同期化が完了する。
特開2001−290687号公報
When the difference file 1014 becomes empty, the data of the difference file 1024 of the server 1020 is transmitted to the server 1030 in the same manner as described above. When the difference file 1024 becomes empty, the synchronization of the server 1030 is completed.
JP 2001-290687 A

しかしながら、上記特許文献1に記載のものでは、障害発生直後から正常稼働中のサーバがデータ更新内容を差分ファイルに蓄積しはじめるため、障害サーバの復旧までの時間が長くなると差分ファイルが巨大になってしまう。その結果、正常稼働中のサーバの記憶容量を食い潰してそのサーバが障害になってしまったり、障害から復旧したサーバの同期完了までに時間がかかるなどの問題がある。   However, in the case of the above-mentioned Patent Document 1, since a server that is operating normally immediately after the occurrence of a failure starts to accumulate data update contents in the difference file, the difference file becomes huge as the time until the failure server recovers becomes longer. End up. As a result, there is a problem that the storage capacity of a normally operating server is crushed and the server becomes a failure, or it takes a long time to complete the synchronization of the server recovered from the failure.

また、同期化の手順は障害が発生した時点のデータベースに、障害が発生した後の更新内容を反映させるという方法である。このことは、同期化するサーバーは障害が発生する直前までのデータベースを正常に保持していることが前提となっていることを意味する。したがって、ハードディスクの故障などデータベースが破壊される障害が発生した場合、このサーバを同期化させることが不可能であるという問題がある。また、同じ理由から、サーバをアップグレードする場合など、データを全く保持していない新しいサーバを同期化することができないという問題もある。   The synchronization procedure is a method of reflecting the updated contents after the failure occurs in the database at the time of the failure. This means that it is assumed that the server to be synchronized normally maintains the database up to just before the failure occurs. Therefore, there is a problem that it is impossible to synchronize the server when a failure such as a hard disk failure occurs that destroys the database. For the same reason, there is also a problem that a new server that does not hold any data cannot be synchronized, such as when upgrading a server.

さらに、同期化の手順は障害が発生した後の更新内容と障害が発生する直前までのデータベースを基に行う方式、つまり、障害発生時点をポイントとした方式であるため、障害復旧以外の目的にこの方式を使うことができない。すなわち、システム全体のサーバ台数を増やす目的で、新たなサーバを同期化させることはできないという問題がある。例えば、特許文献1の実施例では、システム全体のサーバ台数は3台であるが、これを4台に増やすために4台目のサーバを同期化させることはできない。   In addition, the synchronization procedure is a method based on the update contents after the failure occurs and the database until the failure occurs. This method cannot be used. That is, there is a problem that a new server cannot be synchronized for the purpose of increasing the number of servers in the entire system. For example, in the example of Patent Document 1, the total number of servers in the system is 3, but the fourth server cannot be synchronized in order to increase this number to 4.

また、システム全体のサーバ台数を減らすことができないという問題点もある。その理由は、サーバを1台切り離すと、永遠に差分ファイルを蓄積するためである。   Another problem is that the number of servers in the entire system cannot be reduced. The reason is that, when one server is disconnected, the difference file is accumulated forever.

さらに、トランザクションが失敗した場合にその失敗したトランザクションの更新内容を取り消す方法が無いという問題もある。   There is also a problem that when a transaction fails, there is no way to cancel the updated contents of the failed transaction.

さらに、障害でダウンしたサーバ以外の全てのサーバで、更新内容を分散して保存しているため、2台以上のサーバがダウンした場合には障害になったサーバを同期化できないという問題もある。   In addition, since the update contents are distributed and stored on all servers other than the server that is down due to a failure, there is also a problem that if two or more servers go down, the failed server cannot be synchronized. .

本発明は、上記事情に鑑みてなされたものであり、第1の目的とするところは、少ない同期化用データでデータベースサーバの同期化を図ることができる多重化データベースシステムを提供することにある。また、第2の目的とするところは、システム全体をダウンさせることなく、データベースサーバのデータ記憶状況に拘わらずデータベースサーバを任意に切り離し又は組み込むことができる多重化データベースシステムを提供することにある。   The present invention has been made in view of the above circumstances, and a first object is to provide a multiplexed database system capable of synchronizing a database server with a small amount of synchronization data. . A second object is to provide a multiplexed database system that can arbitrarily detach or incorporate a database server regardless of the data storage status of the database server without bringing down the entire system.

上記目的を達成するため、本願発明では、複数のデータベースサーバと、クライアントコンピュータからの処理要求を各データベースサーバに中継するとともに各データベースサーバからの正当な応答の1つをクライアントコンピュータに処理結果として返す仲介装置とを備えた多重化データベースシステムにおいて、仲介装置は、クライアントコンピュータからの処理要求を差分情報として記憶する差分情報記憶部と、データベースのスナップショットを記憶するスナップショット記憶部とを備える。そして、仲介装置は、新規データベースサーバの組込要求があると、(a)正常稼働中のデータベースサーバからデータベースのスナップショットを取得してスナップショット記憶部に記憶する処理を開始し、(b)クライアントコンピュータから受信する処理要求を差分情報として差分情報記憶部に順次記憶し、(c)スナップショットの取得を完了するとスナップショット記憶部に記憶したスナップショットを用いて新規データベースサーバのデータベースを復元させ、(d)新規データベースサーバにおいて前記スナップショットからのデータベースの復元が完了すると、差分情報記憶部に記憶されている処理要求を新規データベースサーバに順次送出し、(e)差分情報記憶部に記憶されている処理要求について新規データベースにおいて処理が終了すると新規データベースサーバをシステムに組み込む。   In order to achieve the above object, the present invention relays processing requests from a plurality of database servers and client computers to each database server and returns one of the valid responses from each database server as a processing result to the client computer. In a multiplexed database system including an intermediary device, the intermediary device includes a difference information storage unit that stores processing requests from client computers as difference information, and a snapshot storage unit that stores a snapshot of the database. Then, when there is a request for incorporating a new database server, the intermediary device (a) starts a process of acquiring a database snapshot from a normally operating database server and storing it in the snapshot storage unit, (b) The processing request received from the client computer is sequentially stored as difference information in the difference information storage unit, and (c) when the acquisition of the snapshot is completed, the database of the new database server is restored using the snapshot stored in the snapshot storage unit. (D) When restoration of the database from the snapshot is completed in the new database server, processing requests stored in the difference information storage unit are sequentially sent to the new database server, and (e) stored in the difference information storage unit The new processing request to the new database When the stomach processing is completed incorporate a new database server to the system.

このようなシステムによれば、仲介装置では新規データベースサーバの同期化用の差分情報を差分情報記憶部に記憶するが、この差分情報は新規データベースサーバからの組み込み要求を契機として差分情報記憶部への蓄積が開始される。したがって、データベースサーバを故障等によりシステムから切り離した後に再びシステムに組み込む場合、障害復旧までに長時間要しても、仲介装置に多大な差分情報が蓄積することがない。これにより、仲介装置の記憶容量を節約できるとともに差分情報の増大による仲介装置の負荷増大やダウンを防止できる。   According to such a system, the intermediary device stores the difference information for synchronization of the new database server in the difference information storage unit, but this difference information is sent to the difference information storage unit in response to an incorporation request from the new database server. Accumulation starts. Therefore, when the database server is separated from the system due to a failure or the like and then incorporated into the system again, a large amount of difference information is not accumulated in the mediation device even if it takes a long time to recover from the failure. As a result, the storage capacity of the mediation device can be saved, and an increase in load or down of the mediation device due to an increase in difference information can be prevented.

また、正常稼働中のデータベースサーバにおけるスナップショット及び仲介装置で記憶された差分情報に基づき新規データベースサーバのデータが復元されるので、組み込み時の新規データベースにおけるデータ蓄積状況はどのようなものであっても構わない。したがって、ディスク故障により切り離されたデータベースサーバの復帰や、新規のデータベースサーバの組み込み(すなわちデータベースサーバの増強)を実現できる。すなわち、任意のデータベースサーバの組み込みが可能となる。   In addition, since the data in the new database server is restored based on the snapshot in the database server in normal operation and the difference information stored in the mediation device, what is the data storage status in the new database at the time of installation? It doesn't matter. Therefore, it is possible to restore a database server that has been disconnected due to a disk failure or to incorporate a new database server (that is, increase the database server). That is, any database server can be incorporated.

さらに、正常稼働中のデータベースサーバにおけるスナップショットは仲介装置において記憶・保持されるので、該スナップショットにより正常稼働中のデータベースサーバの記憶容量を圧迫することがない。したがって、記憶容量の圧迫による正常稼働中のデータベースサーバの動作不良を未然に防止できる。   Furthermore, since the snapshot in the database server that is operating normally is stored and held in the intermediary device, the snapshot does not impose the storage capacity of the database server that is operating normally. Therefore, it is possible to prevent a malfunction of the database server during normal operation due to storage capacity compression.

さらに、データベースサーバをシステムから切り離しただけでは差分情報の記憶やスナップショットの作成は行われないので、データベースのシステムからの切り離しを任意に行うことができる。   Furthermore, since the difference information is not stored and the snapshot is not created simply by disconnecting the database server from the system, the database can be arbitrarily disconnected from the system.

なお、ここでシステムへのデータベースサーバの組み込みとは、多重化データベースシステムを構成するデータベースサーバとして機能するよう仲介装置が当該データベースサーバを取り扱うようにすることを意味する。また、システムからのデータベースサーバからの切り離しとは、多重化データベースシステムを構成するデータベースサーバとして機能しないよう仲介装置が当該データベースサーバを取り扱うようにすることを意味する。したがって、システムに組み込まれているデータベースサーバにはクライアントコンピュータからの処理要求が仲介装置を介して届くが、システムから切り離されたデータベースサーバにはクライアントコンピュータからの処理要求が届かない状態となる。なお、データベースサーバがシステムに組み込まれていること又は切り離されていることと、データベースサーバが仲介装置と通信可能又は不能であることとは無関係である点に留意されたい。つまり、データベースサーバと仲介装置が通信可能な状態にある場合であっても、データベースサーバがシステムに組み込まれていない場合もあり得る。   Here, the incorporation of the database server into the system means that the mediating apparatus handles the database server so as to function as a database server constituting the multiplexed database system. In addition, the separation from the database server from the system means that the mediating apparatus handles the database server so that it does not function as the database server constituting the multiplexed database system. Therefore, the processing request from the client computer reaches the database server incorporated in the system via the mediation device, but the processing request from the client computer does not reach the database server separated from the system. It should be noted that it is irrelevant whether the database server is incorporated in or disconnected from the system, and whether the database server can or cannot communicate with the mediation device. That is, even when the database server and the mediation apparatus are in a communicable state, the database server may not be incorporated in the system.

以上説明したように本発明によれば、少ない同期化用データでデータベースサーバの同期化を図ることができる。また、システム全体をダウンさせることなく、データベースサーバのデータ記憶状況に拘わらずデータベースサーバを任意に切り離し又は組み込むことができる。   As described above, according to the present invention, the database server can be synchronized with a small amount of synchronization data. Further, the database server can be arbitrarily separated or incorporated regardless of the data storage status of the database server without bringing down the entire system.

(第1の実施の形態)
本発明の第1の実施の形態に係る多重化データベースシステムについて図面を参照して説明する。図1は本実施の形態に係る多重化データベースシステムの全体構成を説明するブロック図である。
(First embodiment)
A multiplexed database system according to a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating the overall configuration of a multiplexed database system according to the present embodiment.

この多重化データベースシステムは、図1に示すように、複数のデータベースサーバ(以下「サーバ」と言う)100と仲介装置200とをネットワーク300で接続したものであり、ネットワーク400を介して1以上のクライアントコンピュータ(以下「クライアント」と言う)500からアクセスされるものである。本実施の形態では、図1に示すように、2台のサーバ100a及び100bを有しており、2台のクライアント500a及び500bからアクセスされる。以降の説明において各サーバ100を他のサーバ100と区別する場合には添え字「a」「b」を付加するものとする。クライアント500についても同様である。なお、図1の例では、サーバ100とクライアント500はそれぞれ別々のネットワーク300,400に接続されているが、同じネットワークに接続されていてもよい。   As shown in FIG. 1, this multiplexed database system is a system in which a plurality of database servers (hereinafter referred to as “servers”) 100 and an intermediary device 200 are connected by a network 300. It is accessed from a client computer (hereinafter referred to as “client”) 500. In the present embodiment, as shown in FIG. 1, two servers 100a and 100b are provided and accessed from two clients 500a and 500b. In the following description, when each server 100 is distinguished from other servers 100, subscripts “a” and “b” are added. The same applies to the client 500. In the example of FIG. 1, the server 100 and the client 500 are connected to different networks 300 and 400, respectively, but may be connected to the same network.

図1に示すように、仲介装置200は、ネットワーク400側にIPアドレス172.17.1.1を持っており、これをデータベースサーバのIPアドレスとして公開している。クライアント500はデータベースにアクセスしたいときはIPアドレス172.17.1.1へクエリを送信し、IPアドレス172.17.1.1の仲介装置200からそのクエリに対する応答パケットを受信する。これは、クライアント500等にとっては、IPアドレス172.17.1.1を持ったデータベースサーバとパケットを送受信していることと同じである。このIPアドレス172.17.1.1を持った仮想的なデータベースサーバを仮想サーバ800と呼ぶ。この仮想サーバ800の目的は、サーバ100が冗長化されていることを隠蔽するためである。つまり、サーバ100aとサーバ100b両方が稼働していようとサーバ100bがダウンしてサーバ100aのみが稼働していようとサーバ100aとサーバ100bの他に新たなサーバが追加されようとクライアントには影響は無く、動作を変更する必要がない。   As shown in FIG. 1, the intermediary device 200 has an IP address 172.17.1.1 on the network 400 side, and discloses this as the IP address of the database server. When the client 500 wants to access the database, it sends a query to the IP address 172.17.1.1, and receives a response packet to the query from the intermediary device 200 with the IP address 172.17.1.1. This is the same as transmitting / receiving packets to / from the database server having the IP address 172.17.1.1 for the client 500 or the like. A virtual database server having this IP address 172.17.1.1 is called a virtual server 800. The purpose of the virtual server 800 is to conceal that the server 100 is redundant. That is, whether both the server 100a and the server 100b are operating, whether the server 100b is down and only the server 100a is operating, whether a new server is added in addition to the server 100a and the server 100b, the client is affected. There is no need to change the operation.

サーバ100は、データを保存・管理するデータベース101を備えている。データベース101は、SQL(Structured Query Language)を解して処理を行うRDBMS(Relational Database Management System)である。このようなデータベース101としては種々のものがあり、例えばThe PostgreSQL Global Development GroupによるPostgreSQL(http://www.postgres.org/)や、Oracle社によるOracle(登録商標)(http://www.oracle.com)などが挙げられる。本実施の形態ではデータベース101としてPostgreSQLを用いるものとする。   The server 100 includes a database 101 that stores and manages data. The database 101 is an RDBMS (Relational Database Management System) that performs processing by solving SQL (Structured Query Language). There are various types of such databases 101, for example, PostSQL (http://www.postgres.org/) by The PostgreSQL Global Development Group, Oracle (registered trademark) by Oracle (http: // www. oracle.com). In the present embodiment, PostgreSQL is used as the database 101.

また、データベース101は、ネットワークを介して他の端末から、スナップショットの作成、及び、スナップショットからのデータベースの復元する機能を有しているものとする。この機能は、通常、データベース101のメンテナンスに係る機能として提供されている。例えば、PostgreSQLでは、pg_dump及びpsqlというツールが用意されており、これらのツールを用いることにより他の端末からスナップショットの取得及びスナップショットからの復元を実施できる。ここで、スナップショットとはデータベース全体の複製データやデータベースを復元するために必要なデータを意味する。一般的に、スナップショット作成開始時にコミットされていないデータがスナップショットに含まれるか否かや、スナップショット作成中にクエリの処理が可能か否かなどはデータベース101の仕様によって異なる。本実施の形態では、スナップショット作成開始時にコミットされているデータのみがスナップショットに反映される、スナップショット作成中でもクエリの処理が可能である、という事を前提とする。   In addition, the database 101 has functions of creating a snapshot and restoring the database from the snapshot from another terminal via the network. This function is usually provided as a function related to maintenance of the database 101. For example, in PostgreSQL, tools pg_dump and psql are prepared, and by using these tools, it is possible to acquire a snapshot from another terminal and restore from the snapshot. Here, the snapshot means replicated data of the entire database or data necessary for restoring the database. In general, whether or not uncommitted data is included in a snapshot at the start of snapshot creation, whether or not a query can be processed during snapshot creation, and the like depend on the specifications of the database 101. In this embodiment, it is assumed that only data that is committed at the start of snapshot creation is reflected in the snapshot, and that query processing is possible even during snapshot creation.

仲介装置200は、図2に示すように、本システム内のサーバ100を管理するサーバ管理表201と、トランザクションを管理するトランザクション管理表202と、サーバ100に送信するクエリを一時保存する送信キュー203と、クライアント500から受信したクエリを送信キュー203に投入する受信クエリ処理部204と、送信キュー203からクエリを取り出してサーバ100に送信するクエリ送信処理部205と、クエリ送信処理部205で送信したクエリに対する各サーバ100からの応答の正当性を判定する正当性判定部206と、正当性判定部206で正当と判定された応答を要求元のクライアント500等に送信する応答送信処理部207と、各サーバ100間の同期化処理を制御する同期化処理制御部208と、同期化処理時にサーバ100から取得したデータベース101のスナップショットを一時記憶するスナップショット記憶部209とを備えている。   As illustrated in FIG. 2, the mediation apparatus 200 includes a server management table 201 that manages the server 100 in the system, a transaction management table 202 that manages transactions, and a transmission queue 203 that temporarily stores queries to be transmitted to the server 100. The query received from the client 500 is input to the transmission queue 203, the query is extracted from the transmission queue 203 and transmitted to the server 100, and the query transmission processor 205 transmits the query. A legitimacy determination unit 206 that determines the legitimacy of a response from each server 100 to the query, a response transmission processing unit 207 that transmits a response determined to be legitimate by the legitimacy determination unit 206 to the requesting client 500 and the like, A synchronization processing control unit 208 that controls the synchronization processing between the servers 100; And a snapshot storage unit 209 for temporarily storing a snapshot of the database 101 obtained from the server 100 during the synchronization process.

サーバ管理表201は、サーバが正常稼働中でクエリの処理が可能であるか(active)、同期化処理中であるか(sync)という状態情報を保存している。また、サーバ100がシステムから切り離された場合には、当該サーバ100についてのエントリはサーバ管理表201から削除される。図3にサーバ管理表の一例を示す。サーバ管理表201は、図3に示すように、サーバ100を識別するためのサーバIDと、サーバの稼働状態から構成されている。図3の例では、サーバ100aとサーバ100bとが登録されており、稼働状態は共に正常稼働を示すactiveである。また、本実施形態では、サーバIDとしてサーバ100に付されたIPアドレスを用いた。   The server management table 201 stores state information indicating whether the server is operating normally and whether the query can be processed (active) or is being synchronized (sync). When the server 100 is disconnected from the system, the entry for the server 100 is deleted from the server management table 201. FIG. 3 shows an example of the server management table. As shown in FIG. 3, the server management table 201 is composed of a server ID for identifying the server 100 and an operating state of the server. In the example of FIG. 3, the server 100 a and the server 100 b are registered, and the operation state is “active” indicating both normal operation. In this embodiment, the IP address assigned to the server 100 is used as the server ID.

トランザクション管理表202は、現在実行中の又は実行開始を保留されているトランザクションの有無を記憶する。図4にトランザクション管理表202の一例を示す。図4に示すように、トランザクション管理表202は、クライアントを一意に識別するクライアントIDとトランザクションを一意に識別するトランザクションIDから構成される。これらのペアは、受信クエリ処理部204がトランザクション開始時にトランザクション管理表202に登録し、応答送信処理部207がトランザクション終了時にトランザクション管理表202から削除する。クライアントIDは、例えばクライアント500等のIPアドレスやポート番号である。トランザクションIDは新しいトランザクションが発生する毎に受信クエリ処理部204が新たに割り振る。   The transaction management table 202 stores the presence / absence of a transaction that is currently being executed or whose execution has been suspended. FIG. 4 shows an example of the transaction management table 202. As shown in FIG. 4, the transaction management table 202 includes a client ID for uniquely identifying a client and a transaction ID for uniquely identifying a transaction. These pairs are registered in the transaction management table 202 by the reception query processing unit 204 at the start of the transaction, and deleted from the transaction management table 202 by the response transmission processing unit 207 at the end of the transaction. The client ID is an IP address or a port number of the client 500, for example. The transaction ID is newly allocated by the reception query processing unit 204 every time a new transaction occurs.

送信キュー203は、クライアント500等から受信したクエリをサーバ100に送信する際の送信バッファとしての機能を有するとともに、同期化処理時にクライアント500から受信したクエリを差分情報として記憶蓄積する機能とを有するものである。   The transmission queue 203 has a function as a transmission buffer when transmitting a query received from the client 500 or the like to the server 100, and also has a function of storing and storing the query received from the client 500 during the synchronization processing as difference information. Is.

送信キュー203のデータ構造について図5を参照して説明する。送信キュー203は、クライアント500から受信したクエリの内容と、そのクエリの属するトランザクションIDと、各サーバ100への送信状態とを記憶する。トランザクションIDは、トランザクション管理表202から取得される。各サーバ100への送信状態は、システムに属する各サーバ100毎に記憶される。   The data structure of the transmission queue 203 will be described with reference to FIG. The transmission queue 203 stores the contents of the query received from the client 500, the transaction ID to which the query belongs, and the transmission state to each server 100. The transaction ID is acquired from the transaction management table 202. The transmission state to each server 100 is stored for each server 100 belonging to the system.

送信キュー203の各サーバ100への送信状態は、「未送信」,「送信完了」,「保留」,「保留解除」の4つの値を取りうる。「未送信」は、特に保留することなく当該サーバ100に送信予定であるが未だ送信されていない状態である。「送信完了」は、当該サーバ100への送信が完了した状態である。「保留」は、サーバ100のシステムへの組み込み処理中に、当該サーバ100へ転送されることなく保留されている状態である。「保留解除」は、「保留」状態が解除されたが未送信の状態である。送信キュー203の各エントリは、全てのサーバ100についての送信状態が「送信完了」になり、且つ、当該クエリの属するトランザクションが終了すると送信キュー203から削除される。   The transmission status of the transmission queue 203 to each server 100 can take four values: “not yet transmitted”, “transmission completed”, “hold”, and “hold release”. “Non-transmission” is a state in which the transmission is scheduled to be made to the server 100 without being suspended, but has not been transmitted yet. “Transmission complete” is a state in which transmission to the server 100 is completed. “Hold” is a state where the server 100 is held without being transferred to the server 100 during the process of incorporating the server 100 into the system. “Release hold” is a state where the “hold” state is released but not transmitted. Each entry in the transmission queue 203 is deleted from the transmission queue 203 when the transmission status for all the servers 100 is “transmission complete” and the transaction to which the query belongs is completed.

受信クエリ処理部204は、クライアント500からのクエリをネットワーク400経由で受信すると、当該クエリを解析して新規トランザクションの開始を検出した場合にはトランザクション管理表202に該トランザクションを登録するとともに、サーバ管理表201を参照して受信クエリを送信キュー203に投入する。   When receiving a query from the client 500 via the network 400, the received query processing unit 204 analyzes the query and detects the start of a new transaction, and registers the transaction in the transaction management table 202 and server management. Referring to the table 201, the reception query is input to the transmission queue 203.

受信クエリ処理部204が新規トランザクションの開始を検出する方法は、DBMSの種類によって異なる。例えば前述のPostgreSQLの場合は、トランザクションの開始はクライアント500等が「BEGIN」というSQLを送信した時であり、トランザクションの終了はクライアント500等が「COMMIT」「ROLLBACK」というSQLを送信した時である。また、Oracleの場合は、トランザクションの開始はクライアント500等が有効なSQLを送信したときであり(明示的なトランザクションの開始を宣言するSQLは無い)、トランザクションの終了はクライアント500等が「COMMIT」「ROLLBACK」というSQLを送信した時である。また、サーバ100がAUTO COMMITモードで動作する場合には、クライアント500等から受信したSQL文はそれぞれ1つの独立したトランザクションに属していると解釈できるので、クライアント500等からSQLを受信する毎に、該SQL実行前にトランザクションが開始されるとともにSQL実行後に当該トランザクションが終了したこととして扱うことができる。   The method by which the received query processing unit 204 detects the start of a new transaction differs depending on the type of DBMS. For example, in the case of the above PostgreSQL, the start of the transaction is when the client 500 or the like transmits an SQL “BEGIN”, and the end of the transaction is when the client 500 or the like transmits an SQL “COMMIT” or “ROLLBACK”. . In the case of Oracle, the transaction starts when the client 500 or the like transmits a valid SQL (there is no SQL for declaring the explicit transaction start), and the client 500 or the like ends the “COMMIT” transaction. This is a time when SQL “ROLLBACK” is transmitted. In addition, when the server 100 operates in the AUTO COMMIT mode, each SQL sentence received from the client 500 or the like can be interpreted as belonging to one independent transaction, so that every time an SQL is received from the client 500 or the like, It can be treated that the transaction is started before the SQL execution and the transaction is ended after the SQL execution.

受信クエリ処理部204が受信クエリを送信キュー203に投入する際には以下のようにして各サーバ100についての送信状態を設定する。サーバ管理表201のサーバ稼働状態が「active」である場合には、当該サーバ100については送信状態を「未送信」とする。また、サーバ管理表201のサーバ稼働状態が「sync」の場合であって、当該サーバ100に対するクエリの転送処理が未だ始まっていない場合には、当該サーバ100については送信状態を「保留」とする。すなわち、本実施の形態では、受信クエリを「保留」として送信キュー203に記憶することにより、差分情報の蓄積を図っている。また、サーバ管理表201のサーバ稼働状態が「sync」の場合であって、当該サーバ100に対するクエリの転送処理が始まっている場合には、当該サーバ100については送信状態を「保留解除」とする。   When the reception query processing unit 204 puts a reception query into the transmission queue 203, the transmission state for each server 100 is set as follows. When the server operating state of the server management table 201 is “active”, the transmission state of the server 100 is set to “untransmitted”. When the server operating state of the server management table 201 is “sync” and the query transfer process for the server 100 has not yet started, the transmission state of the server 100 is set to “hold”. . In other words, in the present embodiment, the difference information is accumulated by storing the received query as “hold” in the transmission queue 203. When the server operating state of the server management table 201 is “sync” and the query transfer process for the server 100 has started, the transmission state of the server 100 is set to “hold release”. .

クエリ送信処理部205は、送信キュー203を監視して、該送信キュー203に送信状態が「未送信」又は「保留解除」となっているクエリを古いものから順に取り出し、対象となるサーバ100に対して送信するとともに、送信キュー203の送信状態を「送信完了」に更新する。   The query transmission processing unit 205 monitors the transmission queue 203, extracts the queries whose transmission status is “untransmitted” or “hold release” from the oldest one to the target server 100. The transmission state of the transmission queue 203 is updated to “transmission complete”.

正当性判定部206は、クエリ送信処理部205で各サーバ100に送信したクエリに対する応答を受信して当該応答の正当性を判定する。この正当性判定は、一台以上のサーバ100間でのクエリ処理の正当性を判定するものである。具体的には、サーバ100が3台以上ある場合には多数決で決める方法や、受信した応答を所定のルールに基づいて判断する方法がある。例えば、クライアント500からの「参照」要求に対して「更新成功」という応答が返ってきた場合、正常であればそのような応答はあり得ないので(参照成功など参照に関する応答のはず)、この応答は正しくないと判断する。また、当該応答に係るパケット中にデータ長フィールドがある場合、このデータ長フィールドの値と実際に受信したパケット長を比較し、異なる場合は正しくないと判断する。また、複数のサーバ100の中からMasterサーバを予め1台決めておき、このサーバ100からの応答を常に正しいと判断する。また、上記複数の方法を併用する方法もある。例えば、3台で多数決を行った結果、応答の中身が全てバラバラであり、多数派の応答を決められない場合はMasterサーバの応答を正しいと判断する。正常稼働しているサーバ100が1つだけの場合は、そのサーバ100からの応答を正常と判断する。なお、正常稼働しているサーバ100の台数はサーバ管理表201を参照することにより認識できる。正当性判定部206は、正当性判定の結果、正当でない応答を返したサーバ100を検出すると、サーバ管理表201及び送信キュー203から当該サーバ100についてのエントリを削除する。これにより、当該サーバ100にはクエリが送信されなくなるので、該サーバ100はシステムから切り離されたことになる。   The validity determination unit 206 receives a response to the query transmitted to each server 100 by the query transmission processing unit 205 and determines the validity of the response. This validity determination is for determining the validity of query processing between one or more servers 100. Specifically, when there are three or more servers 100, there are a method of deciding by majority vote, and a method of judging a received response based on a predetermined rule. For example, when a response “update successful” is returned in response to a “reference” request from the client 500, there is no such response if it is normal (it should be a response related to reference such as successful reference). Judge that the response is not correct. Also, if there is a data length field in the packet related to the response, the value of this data length field is compared with the actually received packet length, and if they are different, it is determined that they are not correct. Also, one Master server is determined in advance from the plurality of servers 100, and the response from this server 100 is always determined to be correct. There is also a method using a plurality of the above methods in combination. For example, as a result of performing a majority decision with three units, the contents of the responses are all disjoint, and if the majority response cannot be determined, it is determined that the master server response is correct. If only one server 100 is operating normally, it is determined that the response from that server 100 is normal. The number of servers 100 operating normally can be recognized by referring to the server management table 201. When the validity determination unit 206 detects a server 100 that has returned an invalid response as a result of the validity determination, the validity determination unit 206 deletes the entry for the server 100 from the server management table 201 and the transmission queue 203. As a result, the query is not transmitted to the server 100, so that the server 100 is disconnected from the system.

応答送信処理部207は、正当性判定部206において正当と判断された応答であって、該応答の送信元サーバ100の稼働状態が「active」の場合、当該応答の1つを処理要求元のクライアント500等に返す。また、応答送信処理部207は、サーバ100から受信した応答がトランザクションの終了に係るものであるかを検出し、トランザクションの終了に係るものである場合には、当該トランザクションについてのエントリをトランザクション管理表202から削除する。また、応答送信処理部207は、終了したトランザクションに属するクエリであり且つ全てのサーバ100の送信状態が「送信完了」となったものを送信キュー203から削除する。また、応答送信処理部207は、「保留解除」のクエリが送信キュー203からなくなった場合には、「保留解除」となっていたサーバ100について、サーバ管理表201の稼働状態を「active」に更新する。これにより、当該サーバ100はシステムに組み込まれる。なお、システムへの組み込みのタイミングは、正常稼働中のサーバ100においてクエリの実行中であっても構わず、またトランザクションが継続中であっても構わない点に留意されたい。   The response transmission processing unit 207 is a response that is determined to be valid by the validity determination unit 206, and when the operating state of the transmission source server 100 of the response is “active”, one of the responses is sent to the processing request source. Return to the client 500 or the like. In addition, the response transmission processing unit 207 detects whether the response received from the server 100 is related to the end of the transaction. If the response is related to the end of the transaction, the response transmission processing unit 207 displays an entry about the transaction Delete from 202. In addition, the response transmission processing unit 207 deletes, from the transmission queue 203, a query that belongs to the completed transaction and in which the transmission state of all the servers 100 is “transmission complete”. In addition, when the “hold release” query disappears from the transmission queue 203, the response transmission processing unit 207 sets the operation state of the server management table 201 to “active” for the server 100 that has been “hold release”. Update. Thereby, the server 100 is incorporated into the system. It should be noted that the timing of incorporation into the system may be during execution of a query in the normally operating server 100, or the transaction may be ongoing.

同期化処理制御部208は、システム外のサーバ100(ここでは便宜上「新規サーバ100」と呼ぶ)をシステムに組み込む際に、該新規サーバ100とシステム内で正常稼働中のサーバとの同期化処理を制御する。ここで、新規サーバ100としては、システムに新たに追加するもの、一旦システムから切り離され再びシステムに組み込むものの双方が含まれる。   The synchronization processing control unit 208 performs synchronization processing between the new server 100 and a server that is operating normally in the system when the server 100 outside the system (hereinafter referred to as “new server 100” for convenience) is incorporated into the system. To control. Here, the new server 100 includes both a server that is newly added to the system and a server that is once disconnected from the system and incorporated into the system again.

同期化処理制御部208は、データベース同期化要求(システムの組み込み要求)を受信すると、(1)当該新規サーバ100について稼働状態を「sync」にしてサーバ管理表201に追加する、(2)送信キュー203の送信状態の欄に当該新規サーバ100についての列を追加する、(3)正常稼働中のサーバ100の中から同期化処理用のサーバを1台を選定して当該サーバ100について送信キュー203の送信状態が「未送信」となっているものは「保留」に更新する、(4)同期化処理用のサーバ100において実行中クエリの処理が完了するまで待機し、同期化処理用のサーバ100において実行中クエリの処理が完了したら該サーバ100のスナップショットを取得してスナップショット記憶部209に保存する処理を開始する、という処理を行う。なお、データベース同期化要求は、仲介装置200に接続したコンソール等などから入力するようにしてもよいし、ネットワークを介して他の装置から入力するようにしてもよい。   Upon receiving the database synchronization request (system integration request), the synchronization processing control unit 208 (1) sets the operating state of the new server 100 to “sync” and adds it to the server management table 201. (2) Transmission A column for the new server 100 is added to the transmission status column of the queue 203. (3) A server for synchronization processing is selected from the servers 100 operating normally and the transmission queue for the server 100 is selected. If the transmission status of 203 is “unsent”, it is updated to “pending”. (4) The server 100 for synchronization processing waits until processing of the query being executed is completed, When processing of the query being executed in the server 100 is completed, a process of acquiring a snapshot of the server 100 and storing it in the snapshot storage unit 209 is performed. To start, do a process of. The database synchronization request may be input from a console or the like connected to the mediation apparatus 200, or may be input from another apparatus via a network.

また、同期化処理制御部208は、データの整合性を維持するために、前記(1)から(4)のスナップショット作成開始までの処理は1つの処理として取り扱い、排他制御を行う。つまり、同期化処理制御部208は、前記(1)から(4)のスナップショット作成開始までの処理を行っている間は、各処理でアクセスするサーバ管理表201及び送信キュー203に対して、他の機能ブロック(例えば受信クエリ処理部204など)からのアクセスを中断させる。   Also, the synchronization processing control unit 208 handles the processes from (1) to (4) from the start of snapshot creation as one process and performs exclusive control in order to maintain data consistency. That is, the synchronization processing control unit 208 performs the processes from (1) to (4) until the snapshot creation start, with respect to the server management table 201 and the transmission queue 203 accessed in each process. Access from other functional blocks (for example, the received query processing unit 204) is interrupted.

前記(2)において同期化処理制御部208は、送信キュー203にクエリが残っている場合には、そのクエリについての新規サーバ100の送信状態は全て「保留」とする。前述したように、送信キュー203のエントリは、トランザクションが終了した際に削除される。したがって、送信キュー203に残っているクエリは、トランザクションが終了していないクエリであり、前記(4)で作成されるスナップショットには反映されないものである。前記(2)の処理では、このクエリについての送信状態を「保留」とすることで該クエリを差分情報として保持する。   When the query remains in the transmission queue 203 in (2), the synchronization processing control unit 208 sets all the transmission states of the new server 100 for the query to “pending”. As described above, the entry in the transmission queue 203 is deleted when the transaction ends. Therefore, the query remaining in the transmission queue 203 is a query whose transaction has not ended, and is not reflected in the snapshot created in (4). In the process (2), the transmission state for this query is set to “pending”, and the query is held as difference information.

また、同期化処理制御部208は、(5)スナップショットの作成が完了したら、当該スナップショットから新規サーバ100のデータベース101を復元させる、(6)データベース101の復元が完了すると送信キュー203に記憶されている新規サーバ100の欄の全てのクエリについて送信状態を「保留」から「保留解除」に変更する。これにより、クエリ送信処理部205が新規サーバ100に対して差分情報としてクエリの送信を開始する。「保留解除」になっていたクエリの処理が全て終了すると、応答送信処理部207が、当該新規サーバ100について、サーバ管理表201の稼働状態を「active」に更新することにより、新規サーバ100はシステムに組み込まれる。   Further, the synchronization processing control unit 208 (5) restores the database 101 of the new server 100 from the snapshot when the creation of the snapshot is completed, and (6) stores the data in the transmission queue 203 when the restoration of the database 101 is completed. The transmission state is changed from “hold” to “hold release” for all the queries in the new server 100 column. As a result, the query transmission processing unit 205 starts transmitting a query as difference information to the new server 100. When the processing of the query that has been “hold release” is completed, the response transmission processing unit 207 updates the operating state of the server management table 201 to “active” for the new server 100, so that the new server 100 Built into the system.

クライアント500は、多重化データベースシステムに対して更新クエリ(データベースを更新するリクエスト)や参照クエリ(データベースの内容を参照するリクエスト)などを発行するものである。   The client 500 issues an update query (request to update the database) and a reference query (request to refer to the contents of the database) to the multiplexed database system.

次に、本実施の形態に係る多重化データベースシステムの動作について図面を参照して説明する。まず、サーバ100aと100bが正常に動作している場合の動作を図6から図8を参照して説明する。   Next, the operation of the multiplexed database system according to the present embodiment will be described with reference to the drawings. First, the operation when the servers 100a and 100b are operating normally will be described with reference to FIGS.

初期状態では、データベース101aと101bは完全に同一であり、サーバ管理表201は図7のようになっているものとする。また、トランザクション管理表202と送信キュー203は空であるとする。各サーバ100a,100bには、テーブルtest_tableが存在しているとする。   In the initial state, the databases 101a and 101b are completely the same, and the server management table 201 is as shown in FIG. Further, it is assumed that the transaction management table 202 and the transmission queue 203 are empty. Assume that a table test_table exists in each of the servers 100a and 100b.

クライアント500aが172.17.1.1宛にトランザクション開始SQLを含んだパケットを送信すると、仲介装置200の受信クエリ処理部204はそのパケットを受信する(ステップS1)。受信クエリ処理部204は、トランザクションが開始されたことを検知し、トランザクション管理表202にクライアント500aのIPアドレスとトランザクション番号を登録する(ステップS2)。図8にこのときのトランザクション管理表202を示す。そして、このパケットに係るクエリを、サーバ管理表201を参照して正常稼働しているサーバ100(ここではサーバ100a及び100b)について送信状態を「未送信」にして送信キュー203に入れる。   When the client 500a transmits a packet including the transaction start SQL address to 172.17.1.1, the reception query processing unit 204 of the mediation apparatus 200 receives the packet (step S1). The reception query processing unit 204 detects that a transaction has started, and registers the IP address and transaction number of the client 500a in the transaction management table 202 (step S2). FIG. 8 shows the transaction management table 202 at this time. Then, the query related to this packet is placed in the transmission queue 203 with the transmission state set to “untransmitted” for the server 100 (in this case, the servers 100 a and 100 b) operating normally with reference to the server management table 201.

クエリ送信処理部205は、送信キュー203から送信状態が「未送信」のクエリを取り出し、対応するサーバ100に該パケットを送信する。ここでは、サーバ100aと100bが正常稼働しているので、サーバ100aとサーバ100bへ該パケットを転送する(それぞれステップS3とS4)。そして、各サーバ100への送信が完了したので各サーバ100について送信キュー203の送信状態を「送信完了」に更新する。正当性判定部206は、トランザクションが正常に開始されたことを通知する応答パケットをサーバ100aから受信するが(ステップS5)、この時点では、未だ全ての応答パケットが揃っているわけではないので(この場合、サーバ100bからの応答パケットが来ていない)、正当性判定部206は何もせずにサーバ100bからの応答パケットを待つ。そして、トランザクションが正常に開始されたことを通知する応答パケットをサーバ100bから受信すると(ステップS6)、これで全ての応答パケットが揃ったので、正当性判定部206はそれらの応答パケットを互いに比較することでサーバ100に障害が発生しているか否かをチェックする(ステップS7)。この場合、2つの応答パケットは共にトランザクションが正常に開始されたことを示すパケットであるため、障害は無いと判断する。そして、応答送信処理部207は正当な応答パケットの1つをクライアント500aに返す(ステップS8)。   The query transmission processing unit 205 extracts a query whose transmission state is “untransmitted” from the transmission queue 203 and transmits the packet to the corresponding server 100. Here, since the servers 100a and 100b are operating normally, the packets are transferred to the server 100a and the server 100b (steps S3 and S4, respectively). Since transmission to each server 100 is completed, the transmission state of the transmission queue 203 for each server 100 is updated to “transmission complete”. The correctness determination unit 206 receives a response packet notifying that the transaction has started normally from the server 100a (step S5), but at this point in time, all the response packets are not yet complete ( In this case, the response packet from the server 100b has not arrived), and the validity determination unit 206 does nothing and waits for the response packet from the server 100b. When the response packet notifying that the transaction has started normally is received from the server 100b (step S6), since all the response packets are now prepared, the validity judgment unit 206 compares the response packets with each other. By doing so, it is checked whether or not a failure has occurred in the server 100 (step S7). In this case, since both of the two response packets are packets indicating that the transaction has started normally, it is determined that there is no failure. Then, the response transmission processing unit 207 returns one of the valid response packets to the client 500a (Step S8).

次に、クライアント500aは、テーブルtest_tableを更新するSQL(UPDATE)を含んだパケットを172.17.1.1へ送信する(ステップS9)。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働しているサーバ100について送信状態を「未送信」にして送信キュー203に入れる。クエリ送信処理部205は、送信キュー203から当該クエリを取り出し、各サーバ100へパケットを転送し(それぞれステップS10とS11)、送信キュー203の送信状態を「送信完了」に更新する。サーバ100aは正常にUPDATE成功したことを通知する応答パケットを仲介装置200に送信し、仲介装置200の正当性判定部206がこの応答パケットを受信する(ステップS12)。この時点では全ての応答パケットが全て揃っているわけではないので、正当性判定部206は何もせず待機する。そして、正常にUPDATE成功したことを通知する応答パケットをサーバ100bから受信すると(ステップS13)、これで応答パケットが全て揃ったので、正当性判定部206はそれら応答パケットを互いに比較することでサーバ100に障害が発生しているか否かをチェックする(ステップS14)。この場合、2つの応答パケットは共にUPDATE成功したことを示すパケットであるため、障害は無いと判断する。そして、応答送信処理部207は、正当な応答パケットの1つをクライアント500aへ転送する(ステップS15)。   Next, the client 500a transmits to 172.17.1.1 a packet including SQL (UPDATE) for updating the table test_table (step S9). The reception query processing unit 204 refers to the server management table 201 and sets the transmission state of the normally operating server 100 to “untransmitted” and puts it in the transmission queue 203. The query transmission processing unit 205 extracts the query from the transmission queue 203, transfers the packet to each server 100 (steps S10 and S11, respectively), and updates the transmission state of the transmission queue 203 to “transmission completed”. The server 100a transmits a response packet notifying that UPDATE has been successfully completed to the mediation device 200, and the validity determination unit 206 of the mediation device 200 receives this response packet (step S12). At this time, not all response packets are prepared, and the validity determination unit 206 waits without doing anything. When a response packet notifying that UPDATE has been successfully completed is received from the server 100b (step S13), since all the response packets are now complete, the validity judgment unit 206 compares the response packets with each other to determine whether It is checked whether a failure has occurred in 100 (step S14). In this case, since both of the two response packets are packets indicating that UPDATE was successful, it is determined that there is no failure. Then, the response transmission processing unit 207 transfers one of the valid response packets to the client 500a (Step S15).

次に、クライアント500aは、テーブルtest_tableへの更新を確定する(実際にデータベースを更新する)SQL(COMMIT)を含んだパケットを172.17.1.1へ送信する(ステップS16)。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働しているサーバ100について送信状態を「未送信」にして送信キュー203に入れる。クエリ送信処理部205は、送信キュー203から当該クエリを取り出し各サーバ100へパケットを転送し(それぞれステップS17とS18)、送信キュー203の送信状態を「送信完了」に更新する。サーバ100aは正常にCOMMIT成功したことを通知するパケットを仲介装置200に送信し、仲介装置200の正当性判定部206がこの応答パケットを受信する(ステップS19)。この時点では全ての応答パケットが全て揃っているわけではないので、正当性判定部206は何もせず待機する。そして、正常にCOMMIT成功したことを通知する応答パケットをサーバ100bから受信すると(ステップS20)、これで応答パケットが全て揃ったので、正当性判定部206はそれら応答パケットを互いに比較することでサーバ100に障害が発生しているか否かをチェックする(ステップS21)。この場合、2つの応答パケットは共にCOMMIT成功したことを示すパケットであるため、障害は無いと判断する。応答送信処理部207は、正当な応答パケットの1つをクライアント500aへ転送する(ステップS22)。また、COMMITが正常に完了したことから、トランザクションが終了したことが分かるので、応答送信処理部207はトランザクション管理表202からこのトランザクションの登録を削除するとともに(ステップS23)、全てのサーバ100について送信状態が「送信完了」となっているクエリ(ここでは、「BEGIN」,「UPDATE」,「COMMIT」の3つのクエリ)を送信キュー203から削除する(ステップS23)。このときのトランザクション管理表202及び送信キュー203は再び初期状態(すなわち空)になる。   Next, the client 500a transmits to 172.17.1.1 a packet including SQL (COMMIT) that confirms update to the table test_table (actually updates the database) (step S16). The reception query processing unit 204 refers to the server management table 201 and sets the transmission state of the normally operating server 100 to “untransmitted” and puts it in the transmission queue 203. The query transmission processing unit 205 retrieves the query from the transmission queue 203, transfers the packet to each server 100 (steps S17 and S18, respectively), and updates the transmission state of the transmission queue 203 to “transmission completed”. The server 100a transmits a packet notifying that the COMMIT has been successful to the mediation device 200, and the validity determination unit 206 of the mediation device 200 receives this response packet (step S19). At this time, not all response packets are prepared, and the validity determination unit 206 waits without doing anything. When the response packet notifying that the COMMIT has been successfully received is received from the server 100b (step S20), since all the response packets are now prepared, the validity determination unit 206 compares the response packets with each other to determine the server. It is checked whether a failure has occurred in 100 (step S21). In this case, since both of the two response packets are packets indicating that the COMMIT has succeeded, it is determined that there is no failure. The response transmission processing unit 207 transfers one of the valid response packets to the client 500a (Step S22). In addition, since the COMMIT has been completed normally, it can be seen that the transaction has ended. Therefore, the response transmission processing unit 207 deletes the registration of the transaction from the transaction management table 202 (step S23) and transmits to all the servers 100. Queries whose status is “transmission completed” (here, three queries “BEGIN”, “UPDATE”, and “COMMIT”) are deleted from the transmission queue 203 (step S23). At this time, the transaction management table 202 and the transmission queue 203 are again in the initial state (that is, empty).

次に、サーバ100bが故障などで障害になった場合の動作を図9から図11を参照して説明する。初期状態では、データベース101aと101bは完全に同一であり、サーバ管理表201は前述した図7のようになっているとする。また、トランザクション管理表202と送信キュー203は空であるとする。   Next, an operation when the server 100b becomes a failure due to a failure or the like will be described with reference to FIGS. In the initial state, it is assumed that the databases 101a and 101b are completely the same, and the server management table 201 is as shown in FIG. Further, it is assumed that the transaction management table 202 and the transmission queue 203 are empty.

クライアント500aが172.17.1.1宛にトランザクション開始SQL(BEGIN)を含んだパケットを送信すると、仲介装置200の受信クエリ処理部204はそのパケットを受信する(ステップS30)。受信クエリ処理部204は、トランザクションが開始されたことを検知し、トランザクション管理表202にクライアント500aのIPアドレスとトランザクション番号を登録する(ステップS31)。図10にこのときのトランザクション管理表202を示す。そして、このパケットに係るクエリを、サーバ管理表201を参照して正常稼働しているサーバ100について送信状態を「未送信」にして送信キュー203に入れる。   When the client 500a transmits a packet including the transaction start SQL (BEGIN) to 172.17.1.1, the reception query processing unit 204 of the mediation device 200 receives the packet (step S30). The reception query processing unit 204 detects that a transaction has started, and registers the IP address and transaction number of the client 500a in the transaction management table 202 (step S31). FIG. 10 shows the transaction management table 202 at this time. Then, the query relating to this packet is placed in the transmission queue 203 with the transmission state “unsent” for the server 100 operating normally with reference to the server management table 201.

クエリ送信処理部205は、送信キュー203から送信状態が「未送信」のクエリを取り出し、対応する各サーバ100に該パケットを転送する(それぞれステップS32とS33)。次いで、送信キュー203の送信状態を「送信完了」に更新する。仲介装置200の正当性判定部206は、トランザクションが正常に開始されたことを通知する応答パケットをサーバ100aから受信するが(ステップS34)、この時点では、未だ全ての応答パケットが揃っているわけではないので(この場合、サーバ100bからの応答パケットが来ていない)、何もせずにサーバ100bからの応答パケットを待つ。そして、トランザクションが正常に開始されたことを通知する応答パケットをサーバ100bから受信すると(ステップS35)、これで全ての応答パケットが揃ったので、正当性判定部206はそれら応答パケットを互いに比較することでサーバ100に障害が発生しているか否かをチェックする(ステップS36)。この場合、2つの応答パケットは共にトランザクションが正常に開始されたことを示すパケットであるため、障害は無いと判断する。そして、応答送信処理部207は、正当な応答パケットの1つをクライアント500aへ転送する(ステップS37)。   The query transmission processing unit 205 extracts a query whose transmission state is “untransmitted” from the transmission queue 203 and transfers the packet to each corresponding server 100 (steps S32 and S33, respectively). Next, the transmission state of the transmission queue 203 is updated to “transmission completed”. The legitimacy determination unit 206 of the mediation apparatus 200 receives a response packet notifying that the transaction has started normally from the server 100a (step S34), but at this point, all the response packets are still ready. (In this case, the response packet from the server 100b does not come), and nothing is done to wait for the response packet from the server 100b. Then, when a response packet notifying that the transaction has been started normally is received from the server 100b (step S35), since all the response packets are now prepared, the validity judgment unit 206 compares the response packets with each other. Thus, it is checked whether or not a failure has occurred in the server 100 (step S36). In this case, since both of the two response packets are packets indicating that the transaction has started normally, it is determined that there is no failure. Then, the response transmission processing unit 207 transfers one of the valid response packets to the client 500a (Step S37).

ここで、サーバ100bは、ステップS35で応答パケットを返した後、故障などの障害が発生してダウンしたものとする(ステップS38)。   Here, it is assumed that the server 100b is down due to a failure such as a failure after returning the response packet in step S35 (step S38).

次に、クライアント500aは、テーブルtest_tableを更新するSQL(UPDATE)を含んだパケットを172.17.1.1へ送信する(ステップS39)。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働しているサーバ100について送信状態を「未送信」にして送信キュー203に入れる。この時点では、仲介装置200はサーバ100bのダウンを知らないので、サーバ100bが正常稼働しているという情報がサーバ管理表201に格納されたままである。したがって、受信クエリ処理部204は、サーバ100aの欄だけでなくサーバ100bの欄についても送信状態を「未送信」にして送信キュー203に受信クエリを格納する。クエリ送信処理部205は、送信キュー203から送信状態が「未送信」のクエリを取り出して各サーバ100a及び100bにパケットを転送する(それぞれステップS40とS41)。次いで、クエリ送信処理部205は、送信キュー203の送信状態を「送信完了」に更新する。サーバ100aは正常にUPDATE成功したことを通知する応答パケットを仲介装置200に送信し、仲介装置200の正当性判定部206がこの応答パケットを受信する(ステップS42)。この時点では応答パケットが全て揃っているわけではないので、正当性判定部206は何もせず待機する。しかし、サーバ100bはダウンしているのでサーバ100bからの応答パケットはいつまで経っても正当性判定部206には届かない。これにより正当性判定部206はタイムアウトし、サーバ100bのダウンを検知する。そして、正当性判定部206はサーバ管理表201からサーバ100bのエントリを削除する(ステップS43)。このときのサーバ管理表201を図11に示す。また、サーバ100bについての送信状態の欄を送信キュー203から削除する。このときの送信キュー203を図12に示す。次に、応答送信処理部207は応答パケットをクライアント500aへ転送する(ステップS44)。ここでは、クライアント500aにとって、サーバ100bが障害になったかどうかは認識せず、今までと同様に仮想サーバ800からサービスを受けることができることに注目すべきである。   Next, the client 500a transmits a packet containing SQL (UPDATE) for updating the table test_table to 172.17.1.1 (step S39). The reception query processing unit 204 refers to the server management table 201 and sets the transmission state of the normally operating server 100 to “untransmitted” and puts it in the transmission queue 203. At this point, since the mediation apparatus 200 does not know that the server 100b is down, the information that the server 100b is operating normally remains stored in the server management table 201. Therefore, the reception query processing unit 204 stores the reception query in the transmission queue 203 by setting the transmission state to “untransmitted” not only in the field of the server 100 a but also in the field of the server 100 b. The query transmission processing unit 205 extracts a query whose transmission state is “untransmitted” from the transmission queue 203 and transfers the packet to each of the servers 100a and 100b (steps S40 and S41, respectively). Next, the query transmission processing unit 205 updates the transmission state of the transmission queue 203 to “transmission complete”. The server 100a transmits a response packet notifying that UPDATE has been successfully completed to the mediation device 200, and the validity determination unit 206 of the mediation device 200 receives the response packet (step S42). At this point in time, not all response packets are available, so the validity judgment unit 206 waits without doing anything. However, since the server 100b is down, the response packet from the server 100b does not reach the correctness determination unit 206 indefinitely. As a result, the validity determination unit 206 times out and detects that the server 100b is down. Then, the validity judgment unit 206 deletes the entry of the server 100b from the server management table 201 (step S43). The server management table 201 at this time is shown in FIG. Also, the transmission status column for the server 100 b is deleted from the transmission queue 203. The transmission queue 203 at this time is shown in FIG. Next, the response transmission processing unit 207 transfers the response packet to the client 500a (step S44). Here, it should be noted that the client 500a does not recognize whether the server 100b has failed, and can receive services from the virtual server 800 as before.

次に、クライアント500aは、テーブルtest_tableへの更新を確定するSQL(COMMIT)を含んだパケットを172.17.1.1へ送信する(ステップS45)。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働しているサーバ100について送信状態を「未送信」にして送信キュー203に入れる。ここでは、サーバ100aについてのみ送信状態が「未送信」で送信キュー203にクエリが記憶される。そして、クエリ送信処理部205は、送信キュー203から当該クエリを取り出し、対応するサーバ、この場合、サーバ100aのみへ該パケットを転送する(ステップS46)。次いで、送信キュー203の送信状態を「送信完了」に更新する。サーバ100aは正常にCOMMIT成功したことを通知する応答パケットを送信し、仲介装置200の正当性判定部206がこの応答パケットを受信する(ステップS47)。ここでは、正常稼働中のサーバ100が1台のみなので正当性判定部206は当該応答パケットを正当と判断し、応答送信処理部207は該応答パケットをクライアント500aへ転送する(ステップS48)。また、COMMITが正常に完了したことから、トランザクションが終了したことが分かるので、応答送信処理部207はトランザクション管理表202からこのトランザクションの登録を削除するとともに(ステップS49)、全てのサーバ100について送信状態が「送信完了」となっているクエリ(ここでは、「BEGIN」,「UPDATE」,「COMMIT」の3つのクエリ)を送信キュー203から削除する(ステップS50)。このときのトランザクション管理表202及び送信キュー203は再び初期状態(すなわち空)になる。   Next, the client 500a transmits to 172.17.1.1 a packet including SQL (COMMIT) for confirming update to the table test_table (step S45). The reception query processing unit 204 refers to the server management table 201 and sets the transmission state of the normally operating server 100 to “untransmitted” and puts it in the transmission queue 203. Here, the query is stored in the transmission queue 203 with the transmission state “not transmitted” only for the server 100a. Then, the query transmission processing unit 205 extracts the query from the transmission queue 203 and transfers the packet only to the corresponding server, in this case, the server 100a (step S46). Next, the transmission state of the transmission queue 203 is updated to “transmission completed”. The server 100a transmits a response packet notifying that the COMMIT has been successful, and the validity determining unit 206 of the mediation apparatus 200 receives this response packet (step S47). Here, since only one server 100 is operating normally, the validity determination unit 206 determines that the response packet is valid, and the response transmission processing unit 207 transfers the response packet to the client 500a (step S48). Further, since the COMMIT has been completed normally, it can be seen that the transaction has ended, so the response transmission processing unit 207 deletes the registration of this transaction from the transaction management table 202 (step S49) and transmits to all the servers 100. Queries whose status is “transmission complete” (here, three queries “BEGIN”, “UPDATE”, and “COMMIT”) are deleted from the transmission queue 203 (step S50). At this time, the transaction management table 202 and the transmission queue 203 are again in the initial state (that is, empty).

次に、新規サーバ100をシステムに組み込む際のデータベースの同期化処理について詳細に説明する。本発明における同期化処理では、仲介装置200が同期化処理開始時において正常稼働しているサーバ100からデータベース101のスナップショットを取得し、このスナップショットを用いて新規サーバ100のデータベース101を復元する。さらに、この処理中に受信したクライアント500からのクエリを仲介装置200において差分情報として蓄積する。この差分情報の蓄積は送信キュー203を利用する。そして、新規サーバ100がスナップショットからのデータベース101の復元が完了したら仲介装置200から差分情報を取得して、この差分情報を処理する。   Next, database synchronization processing when the new server 100 is incorporated into the system will be described in detail. In the synchronization process according to the present invention, the mediation apparatus 200 acquires a snapshot of the database 101 from the server 100 that is operating normally at the start of the synchronization process, and restores the database 101 of the new server 100 using this snapshot. . Further, the query from the client 500 received during this processing is accumulated as difference information in the mediation apparatus 200. The difference information is accumulated using the transmission queue 203. When the new server 100 completes the restoration of the database 101 from the snapshot, the difference information is acquired from the mediation apparatus 200 and the difference information is processed.

以下に、サーバ100bをシステムに組み込む場合の同期化動作を図13から図27を参照して説明する。このとき注目すべきポイントは、クライアント500a及び500bに対するサービスを続けたままサーバ100bを追加する、つまり、システムダウンさせずにデータベース101aと101bを同期させることである。   Hereinafter, the synchronization operation when the server 100b is incorporated in the system will be described with reference to FIGS. The point to be noted at this time is to add the server 100b while continuing the service to the clients 500a and 500b, that is, to synchronize the databases 101a and 101b without bringing down the system.

データベース101bはデータベース101aと同期がとれていない状態、つまり、同一ではない状態である。例えば、データベース101bは、障害発生直前のデータを保持しているかもしれないし、全く新しいサーバの場合には、データを全く持っていない状態かもしれない。本発明では、前者の場合でも古いデータは削除し、データベース101bはデータを全く保持していないものとしてシステムに組み込む。つまり、古いデータを保持している必要はない。   The database 101b is not synchronized with the database 101a, that is, is not identical. For example, the database 101b may hold data immediately before the occurrence of a failure, or may not have any data in the case of a completely new server. In the present invention, even in the former case, old data is deleted, and the database 101b is incorporated into the system assuming that no data is held. That is, it is not necessary to keep old data.

ここでは、サーバ100aのみが正常稼働しているのでサーバ管理表201は図16のようになっているとする。また、トランザクション管理表202は空であるとする。さらに、送信キュー203は空であり、正常稼働中のサーバ100aについてのみ送信状態を記憶する構成となっている。   Here, since only the server 100a is operating normally, it is assumed that the server management table 201 is as shown in FIG. The transaction management table 202 is assumed to be empty. Further, the transmission queue 203 is empty, and the transmission state is stored only for the server 100a that is operating normally.

図13に示すように、クライアント500aが172.17.1.1宛のトランザクション開始SQL(BEGIN)を含んだパケットを送信すると、仲介装置200の受信クエリ処理部204はそのパケットを受信する(ステップS301)。受信クエリ処理部204は、トランザクションが開始されたことを検知し、トランザクション管理表202にクライアント500aのIPアドレスとトランザクション番号を登録する(ステップS302)。図17にこのときのトランザクション管理表202を示す。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働中のサーバ100aについて送信状態を「未送信」にして受信クエリを送信キュー203に入れる(ステップS303)。クエリ送信処理部205は、送信キュー203から当該クエリを取り出し、対応するサーバ100aに転送し(ステップS304)、送信キュー203の送信状態を「送信完了」に更新する(ステップS305)。仲介装置200の正当性判定部206は、トランザクションが正常に開始されたことを通知する応答パケットをサーバ100aから受信すると(ステップS306)、ここでは、正常稼働中のサーバ100が1台のみなので当該応答パケットを正当と判断し、応答送信処理部207は該応答パケットをクライアント500aへ転送する(ステップS307)。この時の送信キュー203を図18に示す。   As illustrated in FIG. 13, when the client 500a transmits a packet including the transaction start SQL (BEGIN) addressed to 172.17.1.1, the reception query processing unit 204 of the mediation apparatus 200 receives the packet (step S301). The reception query processing unit 204 detects that a transaction has started, and registers the IP address and transaction number of the client 500a in the transaction management table 202 (step S302). FIG. 17 shows the transaction management table 202 at this time. The reception query processing unit 204 refers to the server management table 201, sets the transmission state of the server 100a operating normally to “untransmitted”, and puts the reception query into the transmission queue 203 (step S303). The query transmission processing unit 205 extracts the query from the transmission queue 203, transfers it to the corresponding server 100a (step S304), and updates the transmission state of the transmission queue 203 to “transmission completed” (step S305). When the legitimacy determination unit 206 of the mediation apparatus 200 receives a response packet notifying that the transaction has started normally from the server 100a (step S306), since only one server 100 is operating normally here, The response transmission processing unit 207 determines that the response packet is valid, and transfers the response packet to the client 500a (step S307). The transmission queue 203 at this time is shown in FIG.

次いで、クライアント500aが172.17.1.1宛に、テーブルtest_tableを更新するSQL(UPDATE)を含んだパケットを送信すると、仲介装置200の受信クエリ処理部204はそのパケットを受信する(ステップS308)。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働中のサーバ100aについて送信状態を「未送信」にして受信クエリを送信キュー203に入れる(ステップS309)。この時の送信キュー203を図19に示す。   Next, when the client 500a transmits a packet including SQL (UPDATE) for updating the table test_table to 172.17.1.1, the reception query processing unit 204 of the mediation apparatus 200 receives the packet (step S308). The reception query processing unit 204 refers to the server management table 201, sets the transmission state of the server 100a operating normally to “untransmitted”, and puts the reception query into the transmission queue 203 (step S309). The transmission queue 203 at this time is shown in FIG.

ここで、仲介装置200のコンソール又はネットワークを介して他の端末などからデータベース同期化要求(システムへの組込要求)が入力されたものとする(ステップS310)。   Here, it is assumed that a database synchronization request (request for incorporation into the system) is input from another terminal or the like via the console of the mediation apparatus 200 or the network (step S310).

同期化処理制御部208は、データベース同期化要求があると、サーバ管理表201を参照して同期化用のサーバ100を選定する。ここでは、正常稼働中のサーバ100は1台のみなので、サーバ100aを選定する。そして、送信キュー203のサーバ100aについて送信状態が「未送信」となっているエントリを「保留」に更新する(ステップS311)。また、同期化処理制御部208は、同期化用のサーバ100aにおいて実行中クエリがないことを確認した後に、新規サーバ100bについて稼働状態を「sync」でサーバ管理表201に追加するとともに(ステップS312)、送信キュー203の送信状態の欄に当該サーバ100b用の列を追加する(ステップS313)。ここで、当該サーバ100bの送信状態は全て「保留」に設定する。この時のサーバ管理表201及び送信キュー203を図20,図21に示す。なお、同期化処理制御部208は、上記ステップS311〜S313の処理は1つの処理として取り扱い、排他制御を行う。つまり、ステップS311〜S313の処理中には、各ステップでアクセスするサーバ管理表201及び送信キュー203に対して、他の機能ブロック(例えば受信クエリ処理部204やクエリ送信処理部205など)からのアクセスを中断させる。   When there is a database synchronization request, the synchronization processing control unit 208 refers to the server management table 201 and selects the server 100 for synchronization. Here, since only one server 100 is operating normally, the server 100a is selected. Then, the entry whose transmission state is “untransmitted” for the server 100a in the transmission queue 203 is updated to “pending” (step S311). In addition, after confirming that there is no query being executed in the synchronization server 100a, the synchronization processing control unit 208 adds the operation state of the new server 100b to the server management table 201 with “sync” (step S312). ), A column for the server 100b is added to the transmission status column of the transmission queue 203 (step S313). Here, all the transmission states of the server 100b are set to “hold”. The server management table 201 and the transmission queue 203 at this time are shown in FIGS. The synchronization process control unit 208 handles the processes in steps S311 to S313 as one process and performs exclusive control. That is, during the processing of steps S311 to S313, the server management table 201 and the transmission queue 203 accessed in each step are sent from other functional blocks (for example, the reception query processing unit 204 and the query transmission processing unit 205). Interrupt access.

次いで、同期化処理制御部208は、サーバ100aのデータベース101aのスナップショットの作成を開始する(ステップS314)。スナップショットはスナップショット記憶部209に保存する。本実施の形態ではデータベース101としてPostgreSQLを利用したので、スナップショットの作成ツールとしてはpg_dumpを用いた。   Next, the synchronization processing control unit 208 starts creating a snapshot of the database 101a of the server 100a (step S314). The snapshot is stored in the snapshot storage unit 209. Since PostgreSQL is used as the database 101 in this embodiment, pg_dump is used as a snapshot creation tool.

上述したように、本実施の形態で用いるスナップショット作成ツールでは、スナップショット作成中にクエリの処理が可能である。そこで、同期化処理制御部208は、同期化用のサーバ100aについて送信キュー203の各クエリの送信状態を「保留」から「保留解除」に更新する(ステップS315)。この時の送信キュー203を図22に示す。これにより、クエリ送信処理部205による送信キュー203からのクエリの送信が再開する。具体的には、クエリ送信処理部205は、UPDATEクエリを送信キュー203から取り出して同期化用サーバ100aに送信するとともに(ステップS316)、送信状態を「送信完了」に更新する(ステップS317)。正当性判定部206は、当該クエリが正常処理されたことを通知する応答パケットをサーバ100aから受信すると(ステップS318)、ここでは、正常稼働中のサーバ100が1台のみなので当該応答パケットを正当と判断し、応答送信処理部207が該応答パケットをクライアント500aへ転送する(ステップS319)。この時の送信キュー203を図23に示す。また、スナップショット作成開始以降、クライアント500から受信したクエリは、同期化用サーバ100aについては「未送信」で、新規サーバ100bについては「保留」で送信キュー203に投入する。   As described above, the snapshot creation tool used in the present embodiment can process a query during snapshot creation. Therefore, the synchronization processing control unit 208 updates the transmission state of each query in the transmission queue 203 for the synchronization server 100a from “hold” to “hold release” (step S315). The transmission queue 203 at this time is shown in FIG. As a result, the transmission of the query from the transmission queue 203 by the query transmission processing unit 205 is resumed. Specifically, the query transmission processing unit 205 extracts the UPDATE query from the transmission queue 203 and transmits it to the synchronization server 100a (step S316), and updates the transmission state to “transmission completed” (step S317). When the validity determination unit 206 receives a response packet notifying that the query has been processed normally from the server 100a (step S318), the validity determination unit 206 determines that the response packet is valid because only one server 100 is operating normally. The response transmission processing unit 207 transfers the response packet to the client 500a (step S319). The transmission queue 203 at this time is shown in FIG. In addition, since the snapshot creation is started, the query received from the client 500 is put in the transmission queue 203 as “unsent” for the synchronization server 100a and “hold” for the new server 100b.

ここで、スナップショットの作成処理が完了したものとする(ステップS320)。同期化処理制御部208は、スナップショットの作成処理が完了すると、当該スナップショットを用いて新規サーバ100bのデータベース101bの復元処理を開始する(ステップS321)。本実施の形態ではデータベース101としてPostgreSQLを利用したので、スナップショットからの復元ツールとしてはpsqlを用いた。   Here, it is assumed that the snapshot creation processing has been completed (step S320). When the snapshot creation processing is completed, the synchronization processing control unit 208 starts restoration processing of the database 101b of the new server 100b using the snapshot (step S321). Since PostgreSQL is used as the database 101 in this embodiment, psql is used as a restoration tool from a snapshot.

前述したように、スナップショット作成開始以降、クライアント500から受信したクエリは、同期化用サーバ100aについては「未送信」で、新規サーバ100bについては「保留」で送信キュー203に投入する。図14の例では、受信クエリ処理部204は、クライアント500aからINSERTクエリを受信すると(ステップS322)、同期化用サーバ100aについては「未送信」で、新規サーバ100bについては「保留」で当該エリを送信キュー203に投入する(ステップS323)。この時の送信キュー203を図24に示す。そして、クエリ送信処理部205は、送信状態が「未送信」となっているクエリを取り出して対応する同期化用サーバ100aに転送するとともに(ステップS324)、送信状態を「送信完了」に更新する(ステップS325)。正当性判定部206は、当該クエリが正常処理されたことを通知する応答パケットをサーバ100aから受信すると(ステップS326)、ここでは、正常稼働中のサーバ100が1台のみなので当該応答パケットを正当と判断し、応答送信処理部207が該応答パケットをクライアント500aへ転送する(ステップS327)。   As described above, the query received from the client 500 after starting the snapshot creation is put in the transmission queue 203 as “unsent” for the synchronization server 100a and “hold” for the new server 100b. In the example of FIG. 14, when the received query processing unit 204 receives an INSERT query from the client 500a (step S322), the synchronization server 100a is “unsent” and the new server 100b is “pending”. Is put into the transmission queue 203 (step S323). The transmission queue 203 at this time is shown in FIG. Then, the query transmission processing unit 205 extracts a query whose transmission state is “unsent” and transfers it to the corresponding synchronization server 100a (step S324), and updates the transmission state to “transmission completed”. (Step S325). When the validity determination unit 206 receives from the server 100a a response packet notifying that the query has been processed normally (step S326), the validity determination unit 206 determines that the response packet is valid because only one server 100 is operating normally. The response transmission processing unit 207 transfers the response packet to the client 500a (step S327).

ここで、新規サーバ100bのデータベース101bの復元処理が完了したものとする(ステップS328)。同期化処理制御部208は、新規サーバ100bのデータベース101bのスナップショットからの復元が完了すると、送信キュー203に保留となっているクエリを差分情報として送出すべく、新規サーバ100bについて送信状態が「保留」となっているすべてのクエリを、送信状態「保留解除」に更新する(ステップS329)。この時の送信キュー203を図25に示す。これにより、クエリ送信処理部205による送信キュー203からの差分情報としてのクエリの送信が開始される。具体的には、クエリ送信処理部205は、BEGINクエリを送信キュー203から取り出して新規サーバ100bに送信するとともに(ステップS330)、送信状態を「送信完了」に更新する(ステップS331)。正当性判定部206は、当該クエリが正常処理されたことを通知する応答パケットを新規サーバ100bから受信する(ステップS332)。ここで、当該応答は差分情報としてのクエリの処理応答なので、当該応答はクライアント500へは転送しない。   Here, it is assumed that the restoration process of the database 101b of the new server 100b has been completed (step S328). When the restoration from the snapshot of the database 101b of the new server 100b is completed, the synchronization processing control unit 208 sets the transmission state of the new server 100b to “transmission query 203” as difference information. All queries that are “pending” are updated to the transmission state “pending release” (step S329). The transmission queue 203 at this time is shown in FIG. As a result, transmission of a query as difference information from the transmission queue 203 by the query transmission processing unit 205 is started. Specifically, the query transmission processing unit 205 extracts the BEGIN query from the transmission queue 203 and transmits it to the new server 100b (step S330), and updates the transmission state to “transmission completed” (step S331). The validity determination unit 206 receives from the new server 100b a response packet notifying that the query has been processed normally (step S332). Here, since the response is a query processing response as difference information, the response is not transferred to the client 500.

受信クエリ処理部204は、差分情報転送開始以降クライアント500から受信したクエリは、同期化用サーバ100aについては送信状態を「未送信」で、新規サーバ100bについては送信状態を「保留解除」で送信キュー203に投入する。図15の例では、クライアント500aからCOMMITクエリを受信すると(ステップS333)、受信クエリ処理部204は、同期化用サーバ100aについては送信状態を「未送信」で、新規サーバ100bについては送信状態を「保留解除」で送信キュー203に投入する(ステップS334)。この時の送信キュー203を図26に示す。   The received query processing unit 204 transmits the query received from the client 500 after the start of the difference information transfer with the transmission state “unsent” for the synchronization server 100a and the transmission state “unhold” for the new server 100b. Put it in the queue 203. In the example of FIG. 15, when a COMMIT query is received from the client 500a (step S333), the reception query processing unit 204 sets the transmission state for the synchronization server 100a to “unsent” and the transmission state for the new server 100b. “Release hold” is put into the transmission queue 203 (step S334). The transmission queue 203 at this time is shown in FIG.

以降、クエリ送信処理部205は、送信状態が「未送信」及び「保留解除」となっているクエリを対応するサーバ100に送信するとともに送信状態を「送信完了」に更新する。そして、送信状態が「未送信」であったクエリに対する応答に対しては、正当性判定部206が正当性の判定を行うとともに、応答送信処理部207が正当な応答の1つをクライアント500に返す。一方、送信状態が「保留解除」であったクエリに対する応答に対してはクライアント500への転送は行わない。   Thereafter, the query transmission processing unit 205 transmits the query whose transmission status is “untransmitted” and “hold release” to the corresponding server 100 and updates the transmission status to “transmission complete”. For the response to the query whose transmission state is “unsent”, the validity determination unit 206 determines the validity, and the response transmission processing unit 207 sends one of the valid responses to the client 500. return. On the other hand, the response to the query whose transmission state is “hold release” is not transferred to the client 500.

図15の例では、クエリ送信処理部205は、送信状態が「未送信」であるCOMMITクエリを取り出して対応する同期化用サーバ100aに転送するとともに(ステップS335)、送信状態を「送信完了」に更新する(ステップS336)。正当性判定部206は、当該クエリが正常処理されたことを通知する応答パケットをサーバ100aから受信すると(ステップS337)、ここでは、正常稼働中のサーバ100が1台のみなので当該応答パケットを正当と判断し、応答送信処理部207が該応答パケットをクライアント500aへ転送する(ステップS338)。また、このCOMMITクエリの処理によりトランザクションが終了するので、応答送信処理部207は当該トランザクションの登録をトランザクション管理表202から削除する(ステップS339)。   In the example of FIG. 15, the query transmission processing unit 205 extracts a COMMIT query whose transmission state is “untransmitted” and transfers it to the corresponding synchronization server 100a (step S335), and the transmission state is “transmission complete”. (Step S336). When the validity determination unit 206 receives from the server 100a a response packet notifying that the query has been processed normally (step S337), the validity determination unit 206 determines that the response packet is valid because only one server 100 is operating normally. The response transmission processing unit 207 transfers the response packet to the client 500a (step S338). Further, since the transaction is terminated by the processing of the COMMIT query, the response transmission processing unit 207 deletes the registration of the transaction from the transaction management table 202 (step S339).

また、図15の例では、クエリ送信処理部205は、送信状態が「保留解除」となっているUPDATEクエリ,INSERTクエリ、COMMITクエリを差分情報として順次、新規サーバ100bに転送し、送信状態を「送信完了」に更新する処理を繰り返す(ステップS340〜S348)。差分情報の送出が完了すると、すなわち送信キュー203に送信状態が「保留解除」となっているクエリがなくなると、新規サーバ100bをシステムに組み込むべくサーバ100bについてのサーバ管理表201の稼働状態を「active」に更新する(ステップS349)。この時のサーバ管理表201を図27に示す。   In the example of FIG. 15, the query transmission processing unit 205 sequentially transfers the UPDATE query, the INSERT query, and the COMMIT query whose transmission status is “pending release” as difference information to the new server 100b, and sets the transmission status. The process of updating to “transmission completed” is repeated (steps S340 to S348). When the transmission of the difference information is completed, that is, when there is no query in the transmission queue 203 whose transmission state is “pending release”, the operating state of the server management table 201 for the server 100b is set to “ update to "active" (step S349). FIG. 27 shows the server management table 201 at this time.

このような同期化処理により、もともとシステムに組み込まれていたが障害等のためにシステムから切り離されたサーバであっても、新規のサーバであっても、理論的には幾らでも追加できる。つまり、追加できるサーバ数に制限はない。   By such a synchronization process, any number of servers can be added theoretically, whether they are servers that were originally incorporated in the system or disconnected from the system due to a failure or the like, or new servers. In other words, there is no limit to the number of servers that can be added.

また、仲介装置200において差分情報として送信キュー203に記憶するデータは、同期化要求(システムの組み込み要求)があった後から蓄積を開始するので、仲介装置200において同期化用データが増大することがない。これにより、仲介装置200の記憶容量を節約でき、該記憶容量が溢れることによる障害発生を未然に防止できる。また、サーバ100の切り離しも任意に行うことができる。   In addition, since the data stored in the transmission queue 203 as difference information in the mediation device 200 starts to be accumulated after a synchronization request (system incorporation request) is made, the synchronization data increases in the mediation device 200. There is no. Thereby, the storage capacity of the intermediary device 200 can be saved, and the occurrence of a failure due to the overflow of the storage capacity can be prevented. Further, the server 100 can be arbitrarily separated.

したがって、本実施の形態に係る多重化データベースシステムでは、サーバの組み込み及び切り離しを任意に実施できるので、用途や予算などの要求に応じて柔軟なシステム設計を行うことができる。   Therefore, in the multiplexed database system according to the present embodiment, the server can be arbitrarily installed and disconnected, so that a flexible system design can be performed according to the demands such as usage and budget.

(第2の実施の形態)
本発明の第2の実施の形態に係る多重化データベースシステムについて図面を参照して説明する。本実施の形態が前述の第1の実施の形態と異なる点は、仮想サーバ800が3台のサーバ100を備えていること、及び、スナップショットの作成・復元ルーツとしてSQLを用いた汎用的なものを用いる点にある。以下、第1の実施の形態との相違点のみ詳述する。
(Second Embodiment)
A multiplexed database system according to a second embodiment of the present invention will be described with reference to the drawings. This embodiment is different from the first embodiment described above in that the virtual server 800 includes three servers 100 and that the SQL is used as a snapshot creation / restoration root. The point is to use things. Hereinafter, only differences from the first embodiment will be described in detail.

前記第1の実施の形態において同期化処理制御部208は、スナップショットの作成ツールとして、スナップショット作成開始時にコミットされているデータのみがスナップショットに反映され、スナップショット作成中でもクエリの処理が可能であるpg_dumpを用いた。一方、本実施の形態において同期化処理制御部208は、データベース101に対してSELECTなどの一般的なクエリを発行することによりスナップショットを取得し、INSERTクエリ等を発行することによりスナップショットからのデータベース101の復元を行う。このような方法を採用することにより、データベース101の種類に依存しない汎用的なシステムを構築可能となる。   In the first embodiment, the synchronization processing control unit 208, as a snapshot creation tool, reflects only data committed at the start of snapshot creation to the snapshot, and can process queries even during snapshot creation. Pg_dump was used. On the other hand, in the present embodiment, the synchronization processing control unit 208 acquires a snapshot by issuing a general query such as SELECT to the database 101, and issues an INSERT query or the like from the snapshot. The database 101 is restored. By adopting such a method, a general-purpose system independent of the type of the database 101 can be constructed.

ところで、このような汎用的なスナップショットの作成及びデータベースの復元方法では、スナップショット作成開始後に処理された更新クエリがスナップショットに反映するか否かが問題となる。このため、第1の実施の形態のようなシステム構成では、スナップショットの作成中にはクエリの処理を停止する必要がある。そして、これによりクライアント500へのサービス提供が停止してしまうという問題がある。そこで、本実施の形態では、クライアント500に対するサービス継続とスナップショット作成とをそれぞれ別のサーバ100で行うことにより、クライアント500へのサービス提供を継続するようにしている。以下、本実施の形態に係るシステムの動作について詳述する。   By the way, in such a general-purpose snapshot creation and database restoration method, it becomes a problem whether or not an update query processed after the start of snapshot creation is reflected in the snapshot. For this reason, in the system configuration as in the first embodiment, it is necessary to stop query processing while creating a snapshot. This causes a problem that service provision to the client 500 is stopped. Therefore, in the present embodiment, service continuation for the client 500 and snapshot creation are performed by different servers 100 so that service provision to the client 500 is continued. Hereinafter, the operation of the system according to the present embodiment will be described in detail.

ここでは、3台のサーバ100a〜100cのうち1台のサーバ100cがシステムから切り離されている状態から、該サーバ100cをシステムに再び組み込む場合について図28〜図45を参照して説明する。   Here, a case in which one server 100c among the three servers 100a to 100c is detached from the system and then the server 100c is incorporated into the system again will be described with reference to FIGS.

初期状態にけるサーバ管理表201を図33に示す。また、トランザクション管理表202は空であるものとする。送信キュー203は空であり図34に示すような構造となっている。   FIG. 33 shows the server management table 201 in the initial state. The transaction management table 202 is assumed to be empty. The transmission queue 203 is empty and has a structure as shown in FIG.

図28に示すように、クライアント500aが172.17.1.1宛のトランザクション開始SQL(BEGIN)を含んだパケットを送信すると、仲介装置200の受信クエリ処理部204はそのパケットを受信する(ステップS401)。受信クエリ処理部204は、トランザクションが開始されたことを検知し、トランザクション管理表202にクライアント500aのIPアドレスとトランザクション番号を登録する(ステップS402)。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働中のサーバ100a及び100bについて送信状態を「未送信」にして受信クエリを送信キュー203に入れる(ステップS403)。クエリ送信処理部205は、送信キュー203から当該クエリを取り出し、対応するサーバ100a及び100bに転送し(ステップS404,S405)、それぞれ送信キュー203の送信状態を「送信完了」に更新する(ステップS406)。仲介装置200の正当性判定部206は、トランザクションが正常に開始されたことを通知する応答パケットをサーバ100a及び100bから受信すると(ステップS407,S408)、各サーバ100a及び100bからの応答パケットの正当性を判定する。そして、応答送信処理部207は正当な応答パケットの1つをクライアント500aへ転送する(ステップS409)。この時の送信キュー203を図35に示す。   As illustrated in FIG. 28, when the client 500a transmits a packet including the transaction start SQL (BEGIN) addressed to 172.17.1.1, the reception query processing unit 204 of the mediation apparatus 200 receives the packet (step S401). The reception query processing unit 204 detects that a transaction has started, and registers the IP address and transaction number of the client 500a in the transaction management table 202 (step S402). The reception query processing unit 204 refers to the server management table 201 and sets the transmission state to “untransmitted” for the servers 100a and 100b that are operating normally, and puts the reception query into the transmission queue 203 (step S403). The query transmission processing unit 205 retrieves the query from the transmission queue 203, transfers it to the corresponding servers 100a and 100b (steps S404 and S405), and updates the transmission state of the transmission queue 203 to “transmission complete” (step S406). ). When the legitimacy determination unit 206 of the mediation apparatus 200 receives a response packet notifying that the transaction has started normally from the servers 100a and 100b (steps S407 and S408), the legitimacy of the response packet from each of the servers 100a and 100b. Determine sex. Then, the response transmission processing unit 207 transfers one of the valid response packets to the client 500a (Step S409). The transmission queue 203 at this time is shown in FIG.

次いで、クライアント500aが172.17.1.1宛に、テーブルtest_tableを更新するSQL(UPDATE)を含んだパケットを送信すると、仲介装置200の受信クエリ処理部204はそのパケットを受信する(ステップS410)。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働中のサーバ100a及び100bについて送信状態を「未送信」にして受信クエリを送信キュー203に入れる(ステップS411)。この時の送信キュー203を図36に示す。   Next, when the client 500a transmits a packet including SQL (UPDATE) for updating the table test_table to 172.17.1.1, the reception query processing unit 204 of the mediation apparatus 200 receives the packet (step S410). The reception query processing unit 204 refers to the server management table 201, sets the transmission state of the servers 100a and 100b that are operating normally to “untransmitted”, and puts the reception query into the transmission queue 203 (step S411). The transmission queue 203 at this time is shown in FIG.

ここで、仲介装置200のコンソール又はネットワークを介して他の端末などからデータベース同期化要求(システムへの組込要求)が入力されたものとする(ステップS412)。   Here, it is assumed that a database synchronization request (request for incorporation into the system) is input from another terminal or the like via the console of the mediation apparatus 200 or the network (step S412).

同期化処理制御部208は、データベース同期化要求があると、サーバ管理表201を参照して同期化用のサーバ100を1台選定する。ここでは、正常稼働中のサーバ100は2台なので、何れか一方のサーバを所定の規則に従って選定する。本実施の形態では、サーバ100bを同期化用サーバとして選定したものとする。同期化処理制御部208は、サーバ管理表201のサーバ100bについての稼働状態を「sync」に更新するとともに(ステップS413)、送信キュー203のサーバ100bについて送信状態が「未送信」となっているエントリを「保留」に更新する(ステップS414)。また、同期化処理制御部208は、同期化用のサーバ100bにおいて実行中クエリの処理が完了したことを確認した後に、要求元のサーバ100cについて稼働状態を「sync」でサーバ管理表201に追加するとともに(ステップS415)、送信キュー203の送信状態の欄に当該サーバ100c用の列を追加する(ステップS416)。ここで、当該サーバ100cの送信状態は全て「保留」に設定する。この時のサーバ管理表201及び送信キュー203を図37,図38に示す。なお、同期化処理制御部208は、上記ステップS413〜S416の処理は1つの処理として取り扱い、排他制御を行う。つまり、ステップS413〜S416の処理中には、各ステップでアクセスするサーバ管理表201及び送信キュー203に対して、他の機能ブロック(例えば受信クエリ処理部204やクエリ送信処理部205など)からのアクセスを中断させる。   When there is a database synchronization request, the synchronization processing control unit 208 refers to the server management table 201 and selects one server 100 for synchronization. Here, since there are two servers 100 operating normally, either one of the servers is selected according to a predetermined rule. In the present embodiment, it is assumed that the server 100b is selected as a synchronization server. The synchronization processing control unit 208 updates the operation state for the server 100b in the server management table 201 to “sync” (step S413), and the transmission state for the server 100b in the transmission queue 203 is “not transmitted”. The entry is updated to “pending” (step S414). In addition, the synchronization processing control unit 208 confirms that the processing of the query being executed in the synchronization server 100b is completed, and then adds the operation status of the requesting server 100c to the server management table 201 with “sync”. At the same time (step S415), a column for the server 100c is added to the transmission status column of the transmission queue 203 (step S416). Here, all the transmission states of the server 100c are set to “hold”. The server management table 201 and the transmission queue 203 at this time are shown in FIGS. The synchronization process control unit 208 handles the processes in steps S413 to S416 as one process and performs exclusive control. That is, during the processing of steps S413 to S416, the server management table 201 and the transmission queue 203 accessed in each step are sent from other functional blocks (for example, the reception query processing unit 204 and the query transmission processing unit 205). Interrupt access.

次いで、同期化処理制御部208は、サーバ100bのデータベース101bのスナップショットの作成を開始する(ステップS417)。スナップショットはスナップショット記憶部209に保存する。本実施の形態では前述したようにSELECTクエリを使ってデータベース101bの各テーブルのデータ等を取得する。   Next, the synchronization processing control unit 208 starts creating a snapshot of the database 101b of the server 100b (step S417). The snapshot is stored in the snapshot storage unit 209. In this embodiment, as described above, the data of each table in the database 101b is acquired using the SELECT query.

同期化処理制御部208が上記ステップS413〜S416の排他処理を終えると、図29に示すように、クエリ送信処理部205は、送信キュー203から送信状態が「未送信」のクエリを取り出し、対応するサーバ100aに転送するとともに(ステップS418)、送信キュー203の送信状態を「送信完了」に更新する(ステップS419)。仲介装置200の受信クエリ処理部204は、UPDATEが正常に処理されたことを通知する応答パケットをサーバ100aから受信すると(ステップS420)、ここでは、正常稼働中のサーバ100が1台のみなので当該応答パケットを正当と判断し、応答送信処理部207は該応答パケットのクライアント500aへ転送する(ステップS421)。   When the synchronization processing control unit 208 finishes the exclusive processing of steps S413 to S416, the query transmission processing unit 205 retrieves a query whose transmission state is “untransmitted” from the transmission queue 203 as shown in FIG. (Step S418), and the transmission state of the transmission queue 203 is updated to “transmission completed” (step S419). When the reception query processing unit 204 of the mediation apparatus 200 receives a response packet notifying that UPDATE has been processed normally from the server 100a (step S420), since only one server 100 is operating normally here, The response packet is determined to be valid, and the response transmission processing unit 207 transfers the response packet to the client 500a (step S421).

また、クライアント500bが172.17.1.1宛のトランザクション開始SQL(BEGIN)を含んだパケットを送信すると、仲介装置200の受信クエリ処理部204はそのパケットを受信する(ステップS422)。受信クエリ処理部204は、トランザクションが開始されたことを検知し、トランザクション管理表202にクライアント500bのIPアドレスとトランザクション番号を登録する(ステップS423)。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働中のサーバ100aについて送信状態を「未送信」にするとともに、同期化処理中のサーバ100b及び100cについて送信状態を「保留」にして受信クエリを送信キュー203に入れる(ステップS424)。クエリ送信処理部205は、送信キュー203から当該クエリを取り出し、送信状態が「未送信」であるサーバ100aに転送し(ステップS425)、送信キュー203のサーバ100aについての送信状態を「送信完了」に更新する(ステップS426)。仲介装置200の正当性判定部206は、トランザクションが正常に開始されたことを通知する応答パケットをサーバ100aから受信すると(ステップS427)、ここでは、正常稼働中のサーバ100が1台のみなので当該応答パケットを正当と判断し、応答送信処理部207は該応答パケットのクライアント500bへ転送する(ステップS428)。この時の送信キュー203を図39に示す。   When the client 500b transmits a packet including the transaction start SQL (BEGIN) addressed to 172.17.1.1, the reception query processing unit 204 of the mediation apparatus 200 receives the packet (step S422). The reception query processing unit 204 detects that a transaction has started, and registers the IP address and transaction number of the client 500b in the transaction management table 202 (step S423). The reception query processing unit 204 refers to the server management table 201 and sets the transmission state to “unsent” for the server 100a that is operating normally, and sets the transmission state to “hold” for the servers 100b and 100c that are performing the synchronization processing. The reception query is put in the transmission queue 203 (step S424). The query transmission processing unit 205 retrieves the query from the transmission queue 203, transfers it to the server 100a whose transmission state is “untransmitted” (step S425), and sets the transmission state for the server 100a in the transmission queue 203 to “transmission complete”. (Step S426). When the legitimacy determination unit 206 of the mediation apparatus 200 receives a response packet notifying that the transaction has started normally from the server 100a (step S427), since only one server 100 is operating normally here, The response packet is judged to be valid, and the response transmission processing unit 207 transfers the response packet to the client 500b (step S428). The transmission queue 203 at this time is shown in FIG.

ここで、スナップショットの作成処理が完了したものとする(ステップS429)。同期化処理制御部208は、スナップショットの作成処理が完了すると、当該スナップショットを用いて新規サーバ100cのデータベース101cの復元処理を開始する(ステップS430)。本実施の形態では、INSERTクエリ等を新規サーバ100cに発行することによりスナップショットからのデータベース101の復元を図る。   Here, it is assumed that the snapshot creation processing has been completed (step S429). When the snapshot creation processing is completed, the synchronization processing control unit 208 starts restoration processing of the database 101c of the new server 100c using the snapshot (step S430). In this embodiment, the database 101 is restored from the snapshot by issuing an INSERT query or the like to the new server 100c.

また、スナップショットの作成処理が完了すると、同期化処理制御部208は、該サーバ100bについて送信キュー203の送信状態が「保留」となっているものを「保留解除」に更新する(ステップS431)。この時の送信キュー203を図40に示す。以降、各クライアント500から受信したクエリは、サーバ100aについては送信状態を「未送信」で、サーバ100bについては送信状態を「保留解除」で、サーバ100cについては送信状態を「保留」にして送信キュー203に入れる。これにより、クエリ送信処理部205は、送信状態が「保留解除」となったクエリを差分情報として古いものから順にサーバ100bに送信する。   When the snapshot creation processing is completed, the synchronization processing control unit 208 updates the transmission status of the transmission queue 203 for the server 100b to “hold” (step S431). . The transmission queue 203 at this time is shown in FIG. Thereafter, the query received from each client 500 is transmitted with the transmission state “unsent” for the server 100a, the transmission state “unhold” for the server 100b, and the transmission state “hold” for the server 100c. Put in the queue 203. As a result, the query transmission processing unit 205 transmits the queries whose transmission status is “hold release” to the server 100b in order from the oldest as difference information.

具体的には、クエリ送信処理部205は、送信キュー203からUPDATEクエリを取り出してサーバ100bに転送するとともに(ステップS432)、送信キュー203の送信状態を「送信完了」に更新する(ステップS433)。仲介装置200の正当性判定部206は、更新が正常に処理されたことを通知する応答パケットをサーバ100bから受信する(ステップS434)。ここで、当該応答は差分情報としてのクエリの処理応答なので、当該応答はクライアント500へは転送しない。   Specifically, the query transmission processing unit 205 extracts the UPDATE query from the transmission queue 203 and transfers it to the server 100b (step S432), and updates the transmission state of the transmission queue 203 to “transmission completed” (step S433). . The validity determination unit 206 of the mediation apparatus 200 receives a response packet notifying that the update has been processed normally from the server 100b (step S434). Here, since the response is a query processing response as difference information, the response is not transferred to the client 500.

ここで、クライアント500bがINSERTクエリを仲介装置200に送信すると(ステップS435)、前述したように、仲介装置200の受信クエリ処理部204は、サーバ100aについては送信状態を「未送信」で、サーバ100bについては送信状態を「保留解除」で、サーバ100cについては送信状態を「保留」で当該クエリを送信キューに投入する(ステップS436)。この時の送信キュー203を図41に示す。クエリ送信処理部205は、送信キュー203から当該クエリを取り出し、送信状態が「未送信」であるサーバ100aに対して転送するとともに(ステップS437)、送信キュー203のサーバ100aについての送信状態を「送信完了」に更新する(ステップS438)。正当性判定部206は、INSERTが正常に処理されたことを通知するパケットをサーバ100aから受信すると(ステップS439)、ここでは、正常稼働中のサーバ100が1台のみなので当該応答パケットを正当と判断し、応答送信処理部207は該応答パケットをクライアント500bへ転送する(ステップS440)。   Here, when the client 500b transmits an INSERT query to the mediation device 200 (step S435), as described above, the reception query processing unit 204 of the mediation device 200 sets the transmission status to “unsent” for the server 100a. For 100b, the transmission state is “hold release”, and for the server 100c, the transmission state is “hold” and the query is put in the transmission queue (step S436). The transmission queue 203 at this time is shown in FIG. The query transmission processing unit 205 retrieves the query from the transmission queue 203 and transfers it to the server 100a whose transmission state is “untransmitted” (step S437), and sets the transmission state of the transmission queue 203 for the server 100a to “ Update to “transmission completed” (step S438). When the validity determining unit 206 receives from the server 100a a packet notifying that the INSERT has been processed normally (step S439), the response packet is regarded as valid because only one server 100 is operating normally. In response, the response transmission processing unit 207 transfers the response packet to the client 500b (step S440).

図41に示すように、この時点では送信キュー203において送信状態が「保留解除」になったクエリは、BEGINクエリとINSERTクエリの2つである。仲介装置200は、前述のステップS432〜S434と同様にして、当該2つのクエリを処理する(ステップS441〜S446)。   As shown in FIG. 41, at this time, there are two queries, the BEGIN query and the INSERT query, whose transmission status is “pending release” in the transmission queue 203. The mediation apparatus 200 processes the two queries in the same manner as in steps S432 to S434 described above (steps S441 to S446).

以上でサーバ100bに対しては、全ての差分情報の転送が終了し(すなわち送信キュー203から「保留解除」のクエリを全て送出し終わり)、且つ、差分情報としてのクエリの処理が正常に処理されたことになるので、サーバ100aのデータベース101aとサーバ100bのデータベース101bの同期化が完了したことになる。そこで、仲介装置200の応答送信処理部207は、サーバ100bをシステムに組み込むべくサーバ100bについてのサーバ管理表201の稼働状態を「active」に更新する(ステップS447)。なお、システムへの組み込みのタイミングは、正常稼働中のサーバ100aにおいてクエリの実行中であっても構わず、またトランザクションが継続中であっても構わない点に留意されたい。   As described above, the transfer of all the difference information to the server 100b is completed (that is, the transmission of all the “hold release” queries from the transmission queue 203), and the query processing as the difference information is processed normally. As a result, the synchronization of the database 101a of the server 100a and the database 101b of the server 100b is completed. Therefore, the response transmission processing unit 207 of the mediation apparatus 200 updates the operating state of the server management table 201 for the server 100b to “active” in order to incorporate the server 100b into the system (step S447). Note that the timing of incorporation into the system may be during execution of a query in the normally operating server 100a, or the transaction may be ongoing.

以降、クライアント500からのクエリは、サーバ100a及びサーバ100bについては送信状態を「未送信」で、サーバ100cについては送信状態を「保留」にして送信キュー203に入れる。具体的には、図30に示すように、クライアント500aが172.17.1.1宛のトランザクション確定SQL(COMMIT)を含んだパケットを送信すると、仲介装置200の受信クエリ処理部204はそのパケットを受信する(ステップS448)。受信クエリ処理部204は、サーバ管理表201を参照して正常稼働中のサーバ100a及び100bについては送信状態を「未送信」に、同期化処理中のサーバ100cについては送信状態を「保留」にして受信クエリを送信キュー203に入れる(ステップS449)。この時の送信キュー203を図42に示す。クエリ送信処理部205は、送信キュー203から当該クエリを取り出し、対応するサーバ100a及び100bに転送し(ステップS450,S451)、それぞれ送信キュー203の送信状態を「送信完了」に更新する(ステップS452)。仲介装置200の正当性判定部206は、トランザクションが正常にCOMMITされたことを通知する応答パケットをサーバ100a及び100bから受信すると(ステップS453,S454)、各サーバ100a及び100bからの応答パケットの正当性を判定する。そして、応答送信処理部207は正当な応答パケットの1つをクライアント500aへ転送する(ステップS455)。また、COMMITが正常に完了したことから、トランザクションが終了したことが分かるので、応答送信処理部207はトランザクション管理表202からこのトランザクションの登録を削除する(ステップS456)。   Thereafter, the query from the client 500 is placed in the transmission queue 203 with the transmission state “untransmitted” for the server 100a and the server 100b and the transmission state “held” for the server 100c. Specifically, as shown in FIG. 30, when the client 500a transmits a packet including a transaction confirmation SQL (COMMIT) addressed to 172.17.1.1, the reception query processing unit 204 of the mediation apparatus 200 receives the packet ( Step S448). The reception query processing unit 204 refers to the server management table 201 and sets the transmission state to “unsent” for the servers 100a and 100b that are operating normally, and sets the transmission state to “hold” for the server 100c that is performing the synchronization process. The reception query is put in the transmission queue 203 (step S449). The transmission queue 203 at this time is shown in FIG. The query transmission processing unit 205 extracts the query from the transmission queue 203, transfers it to the corresponding servers 100a and 100b (steps S450 and S451), and updates the transmission state of the transmission queue 203 to “transmission completed” (step S452). ). When the validity determination unit 206 of the intermediary device 200 receives a response packet notifying that the transaction has been successfully committed from the servers 100a and 100b (steps S453 and S454), the validity of the response packet from each of the servers 100a and 100b is confirmed. Determine sex. Then, the response transmission processing unit 207 transfers one valid response packet to the client 500a (step S455). Further, since the COMMIT has been completed normally, it can be seen that the transaction has ended, so the response transmission processing unit 207 deletes the registration of this transaction from the transaction management table 202 (step S456).

ここで、新規サーバ100cのデータベース101cの復元処理が完了したものとする(ステップS457)。同期化処理制御部208は、新規サーバ100cのデータベース101cのスナップショットからの復元が完了すると、送信キュー203に保留となっているクエリを差分情報として送出すべく、新規サーバ100cについて送信キュー203の送信状態が「保留」となっているものを「保留解除」に更新する(ステップS458)。この時の送信キュー203を図43に示す。以降、各クライアント500から受信したクエリは、サーバ100a及びサーバ100bについては送信状態を「未送信」で、サーバ100cについては送信状態を「保留解除」にして送信キュー203に入れる。これにより、クエリ送信処理部205は、送信状態が「保留解除」となったクエリを差分情報として古いものから順にサーバ100cに送信する。   Here, it is assumed that the restoration processing of the database 101c of the new server 100c has been completed (step S457). When the restoration from the snapshot of the database 101c of the new server 100c is completed, the synchronization processing control unit 208 sends the query held in the transmission queue 203 as difference information for the new server 100c in the transmission queue 203. The transmission status “pending” is updated to “pending release” (step S458). The transmission queue 203 at this time is shown in FIG. Thereafter, the query received from each client 500 is placed in the transmission queue 203 with the transmission state “unsent” for the server 100 a and the server 100 b and the transmission state “unhold” for the server 100 c. As a result, the query transmission processing unit 205 transmits, to the server 100c, in order from the oldest as the difference information, the queries whose transmission status is “hold release”.

具体的には、クエリ送信処理部205は、送信キュー203からBEGINクエリを取り出してサーバ100cに転送するとともに(ステップS459)、送信キュー203の送信状態を「送信完了」に更新する(ステップS460)。仲介装置200の正当性判定部206は、トランザクションが正常に開始されたことを通知する応答パケットをサーバ100cから受信する(ステップS461)。ここで、当該応答は差分情報としてのクエリの処理応答なので、当該応答はクライアント500へは転送しない。   Specifically, the query transmission processing unit 205 extracts the BEGIN query from the transmission queue 203 and transfers it to the server 100c (step S459), and updates the transmission state of the transmission queue 203 to “transmission completed” (step S460). . The validity determination unit 206 of the mediation apparatus 200 receives a response packet notifying that the transaction has started normally from the server 100c (step S461). Here, since the response is a query processing response as difference information, the response is not transferred to the client 500.

サーバ100cへの差分情報転送中にクライアント500bからUPDATEクエリを受信すると(ステップS462)、受信クエリ処理部204は、サーバ100a及び100bについては送信状態を「未送信」で、サーバ100cについては送信状態を「保留解除」で当該クエリーを送信キュー203に投入する(ステップS463)。この時の送信キュー203を図44に示す。クエリ送信処理部205は、送信キュー203から当該クエリを取り出し、送信状態が「未送信」であるサーバ100a及び100bに転送し(ステップS464,S465)、それぞれのサーバ100a及び100bについて送信キュー203の送信状態を「送信完了」に更新する(ステップS466)。正当性判定部206は、各サーバ100a及び100bからUPDATEが正常に処理されたことを通知するパケットを受信すると(ステップS467,S468)、各応答の正当性を判定して正当な応答の1つをクライアント500bに返す(ステップS469)。   When the UPDATE query is received from the client 500b during the transfer of the difference information to the server 100c (step S462), the reception query processing unit 204 sets the transmission status to “unsent” for the servers 100a and 100b, and the transmission status for the server 100c. The query is put into the transmission queue 203 by “hold release” (step S463). The transmission queue 203 at this time is shown in FIG. The query transmission processing unit 205 retrieves the query from the transmission queue 203, transfers it to the servers 100a and 100b whose transmission status is “untransmitted” (steps S464 and S465), and sets the transmission queue 203 for each of the servers 100a and 100b. The transmission state is updated to “transmission completed” (step S466). When the validity determining unit 206 receives a packet notifying that the UPDATE has been processed normally from each of the servers 100a and 100b (steps S467 and S468), the validity determining unit 206 determines the validity of each response and determines one of the valid responses. Is returned to the client 500b (step S469).

全ての差分情報の転送が終了し(すなわち送信キュー203から「保留解除」のクエリを全て送出し終わり)、且つ、差分情報としてのクエリの処理が正常に処理された時点で、サーバ100aのデータベース101aとサーバ100cのデータベース101cの同期化が完了するので、サーバ100cをシステムに組み込むべくサーバ100cについてのサーバ管理表201の稼働状態を「active」に更新する。なお、システムへの組み込みのタイミングは、正常稼働中のサーバ100においてクエリの実行中であっても構わず、またトランザクションが継続中であっても構わない点に留意されたい。   When the transfer of all the difference information is completed (that is, the transmission of all the “hold release” queries from the transmission queue 203 is completed) and the query processing as the difference information is normally processed, the database of the server 100a Since the synchronization of the database 101c between the server 101c and the server 100c is completed, the operating state of the server management table 201 for the server 100c is updated to “active” in order to incorporate the server 100c into the system. It should be noted that the timing of incorporation into the system may be during execution of a query in the normally operating server 100, or the transaction may be ongoing.

図44の例では、まず、トランザクションIDが5番のUPDATEクエリからトランザクションIDが6番のINSERTクエリについて、前述のステップS459〜S461と同様の処理を行う。以下、図44の例における、トランザクションIDが5番のCOMMITクエリと、トランザクションIDが6番のUPDATEクエリの処理について詳述する。   In the example of FIG. 44, first, the same processing as in steps S459 to S461 described above is performed for the INSERT query with the transaction ID No. 6 from the UPDATE query with the transaction ID No. 5. The processing of the COMMIT query with the transaction ID No. 5 and the UPDATE query with the transaction ID No. 6 in the example of FIG. 44 will be described in detail below.

クエリ送信処理部205は、送信キュー203からCOMMITクエリを取り出してサーバ100cに転送するとともに(ステップS490)、送信キュー203の送信状態を「送信完了」に更新する(ステップS491)。仲介装置200の正当性判定部206は、トランザクションが確定したことを通知する応答パケットをサーバ100cから受信する(ステップS492)。ここで、当該応答は差分情報としてのクエリの処理応答なので、当該応答はクライアント500へは転送しない。   The query transmission processing unit 205 retrieves the COMMIT query from the transmission queue 203 and transfers it to the server 100c (step S490), and updates the transmission state of the transmission queue 203 to “transmission completed” (step S491). The validity determination unit 206 of the mediation apparatus 200 receives a response packet notifying that the transaction has been confirmed from the server 100c (step S492). Here, since the response is a query processing response as difference information, the response is not transferred to the client 500.

この時点でトランザクションID5のトランザクションは全てのサーバ100において処理が終了し、且つ、送信キュー203にはトランザクションID5に属する各クエリは全てのサーバ100a,100b,100cについて送信状態が「送信完了」となったので、応答送信処理部207は、当該トランザクションに属するクエリのエントリを送信キュー203から削除する(ステップS493)。この時の送信キュー203を図45に示す。   At this time, the transaction with transaction ID 5 has been processed in all servers 100, and the transmission status of each query belonging to transaction ID 5 in the transmission queue 203 is “transmission complete” for all servers 100a, 100b, 100c. Therefore, the response transmission processing unit 207 deletes the query entry belonging to the transaction from the transmission queue 203 (step S493). The transmission queue 203 at this time is shown in FIG.

次いで、図32に示すように、クエリ送信処理部205は、送信キュー203からUPDATEクエリを取り出してサーバ100cに転送するとともに(ステップS494)、送信キュー203の送信状態を「送信完了」に更新する(ステップS495)。仲介装置200の正当性判定部206は、UPDATEが正常に処理されたことを通知する応答パケットをサーバ100cから受信する(ステップS496)。ここで、当該応答は差分情報としてのクエリの処理応答なので、当該応答はクライアント500へは転送しない。   Next, as shown in FIG. 32, the query transmission processing unit 205 extracts the UPDATE query from the transmission queue 203 and transfers it to the server 100c (step S494), and updates the transmission state of the transmission queue 203 to “transmission completed”. (Step S495). The validity determination unit 206 of the mediation apparatus 200 receives a response packet notifying that UPDATE has been processed normally from the server 100c (step S496). Here, since the response is a query processing response as difference information, the response is not transferred to the client 500.

この時点で送信キュー203には送信状態が「保留解除」のクエリがなくなったので、応答送信処理部207は、サーバ100cをシステムに組み込むべくサーバ100cについてのサーバ管理表201の稼働状態を「active」に更新する(ステップS497)。   At this point, since there is no query in the transmission queue 203 whose transmission state is “hold release”, the response transmission processing unit 207 sets the active state of the server management table 201 for the server 100c to “active” in order to incorporate the server 100c into the system. (Step S497).

以上のように本実施の形態では、スナップショットの作成方法として、該スナップショットの作成中にはクエリの処理を行うことができない方法を採用しているが、スナップショットの作成とクライアントからのクエリの処理を別々のサーバで処理することにより、クライアントへのサービスの提供を維持しつつ同期化処理を行うことができる。他の作用・効果については第1の実施の形態と同じである。   As described above, in this embodiment, as a snapshot creation method, a method in which query processing cannot be performed during creation of the snapshot is employed. By processing these processes with separate servers, the synchronization process can be performed while maintaining the provision of services to the clients. Other operations and effects are the same as those in the first embodiment.

なお、本実施の形態では、スナップショットを作成する同期化用のサーバ100bと、システムに再び組み込まれるサーバ100cとに対して、それぞれ独立したタイミングで差分情報を転送していたが、サーバ100cにおいてデータベースの復旧が完了した後に両サーバ100b,100cに対して同一の差分情報を転送するようにしてもよい。   In this embodiment, the difference information is transferred to the synchronization server 100b for creating the snapshot and the server 100c that is re-installed in the system at independent timings. The same difference information may be transferred to both servers 100b and 100c after the database recovery is completed.

また、本実施の形態では、システムに再び組み込まれるサーバ100cにおいてデータベースの復旧が完了した後に仲介装置200からサーバ100cに差分情報の転送を開始していたが、サーバ100cに差分情報を一時蓄積する機能がある場合にはデータベースの復旧完了を待たずに差分情報の転送を開始しても良い。これにより、仲介装置200からサーバ100への差分情報の転送速度を抑えられるので、差分情報転送によるトラフィック増大を防止できる。   Further, in the present embodiment, transfer of difference information from the mediation apparatus 200 to the server 100c is started after the database recovery is completed in the server 100c that is re-installed in the system. However, the difference information is temporarily stored in the server 100c. If there is a function, the transfer of difference information may be started without waiting for the completion of database recovery. Thereby, since the transfer speed of the difference information from the mediation apparatus 200 to the server 100 can be suppressed, an increase in traffic due to the difference information transfer can be prevented.

以上、本発明の実施形態について詳述したが、上記実施の形態は例示的なものであり、本発明はこれに限定されるものではない。本発明の範囲は特許請求の範囲に示されており、この特許請求の範囲の意味に入る全ての変形例は本発明に含まれるものである。なお、以下の各変形例は適宜組み合わせて上記各実施の形態に適用できる。   As mentioned above, although embodiment of this invention was explained in full detail, the said embodiment is an illustration and this invention is not limited to this. The scope of the invention is set forth in the appended claims, and all modifications that come within the meaning of the claims are intended to be embraced by the invention. Note that the following modifications can be applied to the above-described embodiments in appropriate combinations.

例えば、上記実施の形態の構成に加えて、仲介装置200が、差分情報として新規サーバ100等で処理されたクエリの処理結果の正当性を判定するようにしても良い。具体的には、仲介装置200は、正常稼働中のサーバ100におけるクエリの処理結果を仲介装置200において保存しておく。そして、当該クエリを差分情報として新規サーバ100等で処理された際に、新規サーバ100等での処理結果と正常稼働中のサーバ100での処理結果とを比較する。そして、両者が一致しない場合には、同期化処理を直ちに又は適当なタイミングで再試行すると好適である。   For example, in addition to the configuration of the above embodiment, the mediation apparatus 200 may determine the validity of the processing result of the query processed by the new server 100 or the like as difference information. Specifically, the intermediary device 200 stores a query processing result in the normally operating server 100 in the intermediary device 200. When the query is processed as difference information by the new server 100 or the like, the processing result of the new server 100 or the like is compared with the processing result of the server 100 that is operating normally. If they do not match, it is preferable to retry the synchronization process immediately or at an appropriate timing.

また、上記実施の形態では、送信状態が「保留解除」となっているクエリを送信キュー203から取り出して差分情報としてサーバ100に対して転送し、該転送中にクライアント500からクエリを受信すると、当該サーバ100についての送信状態を「保留解除」にして送信キュー203に投入する処理を行っている。そして、送信状態が「保留解除」となっているクエリが全てサーバ100において処理された後に当該サーバ100をシステムに組み込む処理を行っている。このような処理では、クライアント500からのクエリ受信頻度が高いとサーバ100のシステムへの組み込みに時間を要することが考えられる。そこで、例えば送信キュー203に送信状態が「保留解除」として記憶されているクエリが所定数以下となったら、受信クエリ処理部204が送信キュー203へのクエリの投入を一時停止するなど所定条件で差分情報の転送処理を優先させるようにしてもよい。   Further, in the above embodiment, when a query whose transmission state is “hold release” is taken out from the transmission queue 203 and transferred to the server 100 as difference information, and a query is received from the client 500 during the transfer, Processing for setting the transmission state of the server 100 to “hold release” and putting it in the transmission queue 203 is performed. Then, after all the queries whose transmission status is “hold release” are processed in the server 100, the server 100 is incorporated into the system. In such processing, if the frequency of receiving queries from the client 500 is high, it may be necessary to incorporate the server 100 into the system. Therefore, for example, when the number of queries stored in the transmission queue 203 as “reserved release” falls below a predetermined number, the received query processing unit 204 temporarily stops the input of queries to the transmission queue 203 under predetermined conditions. You may make it give priority to the transfer process of difference information.

また、上記実施の形態では、クライアント500から受信した全てのクエリを送信キュー203に保存しておき、同期化処理時には該送信キュー203に保存されているクエリを差分情報としてサーバ100に転送しているが、SELECTクエリのようにデータベース101の更新を行わない参照系クエリについては差分情報としてのサーバ100への転送を行わないようにしてもよい。これにより、同期化処理の処理時間を短縮化できる。   In the above embodiment, all queries received from the client 500 are stored in the transmission queue 203, and the query stored in the transmission queue 203 is transferred to the server 100 as difference information during the synchronization process. However, a reference query that does not update the database 101, such as a SELECT query, may not be transferred to the server 100 as difference information. Thereby, the processing time of a synchronization process can be shortened.

さらに、UPDATEクエリのようにデータベース101の更新を行う更新系クエリのみを転送し、参照系クエリやトランザクション制御クエリ(BEGIN,ROLLBACK等)の転送を行わないようにしてもよい。そして、当該更新系クエリを差分情報としてサーバ100に転送する際には、サーバ100においてAutoCommitモードで当該クエリを処理させるようにする。これにより、更に同期化処理の短縮化及び記憶容量の節約が可能となる。ただし、この場合にはサーバ100に対してクエリを転送する順序が、正常稼働中のサーバ100で処理された順序と一致することを保証する必要がある。これを実現するためには、各更新系クエリに対する正常稼働中サーバ100からの処理応答から正常稼働中サーバ100における各クエリの実際の処理順序を把握し、当該順序に従って各クエリを転送すればよい。   Further, only an update query that updates the database 101 such as an UPDATE query may be transferred, and a reference query or a transaction control query (BEGIN, ROLLBACK, etc.) may not be transferred. When the update query is transferred to the server 100 as difference information, the server 100 is made to process the query in the AutoCommit mode. As a result, the synchronization process can be further shortened and the storage capacity can be saved. However, in this case, it is necessary to ensure that the order in which queries are transferred to the server 100 matches the order processed by the server 100 that is operating normally. In order to realize this, it is only necessary to grasp the actual processing order of each query in the normal operating server 100 from the processing response from the normal operating server 100 with respect to each update query, and to transfer each query according to the order. .

また、上記実施の形態では、サーバ100においてトランザクションが継続中であっても仲介装置200がスナップショットの作成を開始していたが、継続中のトランザクションが無くなった時点でスナップショットの作成指示を送信するようにしてもよい。これにより、データベース101として、トランザクションの継続中にはスナップショットの作成ができないものや、トランザクションの継続中であってもスナップショットの作成は開始できるが当該スナップショットにトランザクションに係るクエリが反映されるか否かが不確定なものを利用することができる。   In the above-described embodiment, the mediation apparatus 200 starts creating a snapshot even when a transaction is ongoing in the server 100. However, when there is no ongoing transaction, a snapshot creation instruction is transmitted. You may make it do. As a result, the database 101 cannot create a snapshot while the transaction is ongoing, or can start creating a snapshot even while the transaction is ongoing, but the query related to the transaction is reflected in the snapshot. It is possible to use an uncertain whether or not.

また、上記の実施の形態では、同期化処理中に送信キュー203から各クエリを削除するタイミングは、当該クエリが属するトランザクションが全てのサーバ100において終了した時点としていた。この方法では、通常動作時におけるクエリの削除タイミングと同じなので実装が容易であるという利点がある。一方、同期化処理中には、送信キュー203のクエリが差分情報としてサーバ100において処理されたら随時削除するようにしてもよい。また、同期化処理が完了した後に一括して削除するようにしても良い。   Further, in the above embodiment, the timing for deleting each query from the transmission queue 203 during the synchronization process is the time when the transaction to which the query belongs is completed in all the servers 100. This method has the advantage of being easy to implement because it is the same as the query deletion timing during normal operation. On the other hand, during the synchronization process, if the query in the transmission queue 203 is processed as difference information in the server 100, it may be deleted as needed. Further, it may be deleted in a lump after the synchronization processing is completed.

また、上記の実施の形態では、クエリのバッファリング機能と同期化処理用の差分情報の記憶機能とを送信キュー203に統合させていたが、それぞれ機能毎に記憶手段を設けるようにしてもよい。なお、この場合には、サーバ100が3台構成となっているときには、システムに組み込もうとするサーバ100と、同期化処理用サーバ100とで差分情報記憶部を共有できるので、記憶容量を節約できるという点で有利である。   In the above-described embodiment, the query buffering function and the synchronization information storage function for synchronization processing are integrated in the transmission queue 203. However, a storage unit may be provided for each function. . In this case, when the number of servers 100 is three, the difference information storage unit can be shared between the server 100 to be incorporated into the system and the synchronization processing server 100. This is advantageous in that it can be saved.

また、上記の実施の形態に加えて更に、各サーバ100にデータベース101やデータベース制御部102の障害を検出する障害検出手段を設けてもよい。この障害検出手段は、データベース101やデータベース制御部102の動作を定期的に監視することで障害を検出し、障害検出時には仲介装置200に障害発生を通知する。これにより、仲介装置200では各サーバ100やネットワークでの障害発生検出をより確実且つ効率的に行うことができる。   Further, in addition to the above-described embodiment, each server 100 may be provided with a failure detection unit that detects a failure of the database 101 or the database control unit 102. This failure detection means detects a failure by periodically monitoring the operations of the database 101 and the database control unit 102, and notifies the mediation device 200 of the occurrence of the failure when a failure is detected. Thereby, the mediation apparatus 200 can more reliably and efficiently detect the occurrence of a failure in each server 100 or the network.

また、各サーバは要求に応じて同じ応答をするならば同じ実装である必要はない。すなわち、バージョン、仕様、プログラム言語、コンパイラの種類、コンパイラオプション、ハードウェアかソフトウェアか、などが異なっていてもよい。サーバには、PostgreSQLなどのフリーソフトウェアやOracleなどの市販のソフトウェア、独自開発のソフトウェア、いずれを使ってもよい。また、それらが混在していてもよい。例えば、サーバ100aはPostgreSQLでサーバ100bはOracleでも良い。   In addition, if each server responds in response to a request, it does not have to be the same implementation. That is, the version, specifications, programming language, compiler type, compiler options, hardware or software, and the like may be different. For the server, free software such as PostgreSQL, commercially available software such as Oracle, or proprietary software may be used. Moreover, they may be mixed. For example, the server 100a may be PostgreSQL and the server 100b may be Oracle.

また、上記実施の形態では、サーバはパソコン上のソフトウェアで実現しているが、ハードウェアで実装しても良い。   In the above-described embodiment, the server is realized by software on a personal computer, but may be implemented by hardware.

また、上記実施の形態では、仮想サーバ800を構成する仲介装置200は1台のみであったが、複数台設けて冗長性を持たせることにより、より可用性の高い構成とすることも可能である。仲介装置を多重化させる技術については、例えば本願出願人による特開2003−345679号公報に記載されたものなどを用いればよい。   In the above embodiment, only one mediation device 200 is included in the virtual server 800. However, by providing a plurality of mediation devices 200 to provide redundancy, a configuration with higher availability can be achieved. . As a technique for multiplexing the mediation device, for example, what is described in Japanese Patent Application Laid-Open No. 2003-345679 by the applicant of the present application may be used.

また、上記実施の形態では、クライアント500とサーバ100はそれぞれ別のネットワーク300,400に属するようにし、仲介装置200が両ネットワーク300,400を仲介するようなネットワーク構成としたが、本発明ではネットワーク構成は不問である。例えば、1つのネットワークにクライアント500,サーバ100,仲介装置200が属するように構成してもよい。   In the above embodiment, the client 500 and the server 100 belong to different networks 300 and 400, respectively, and the mediation apparatus 200 mediates both the networks 300 and 400. The configuration is unquestioned. For example, the client 500, the server 100, and the mediation apparatus 200 may be configured to belong to one network.

第1の実施形態に係る多重化データベースシステムの構成図Configuration diagram of a multiplexed database system according to the first embodiment 第1の実施形態に係る仲介装置の機能ブロック図Functional block diagram of an intermediary device according to the first embodiment 第1の実施形態に係るサーバ管理表の一例を示す図The figure which shows an example of the server management table which concerns on 1st Embodiment 第1の実施形態に係るトランザクション管理表の一例を示す図The figure which shows an example of the transaction management table which concerns on 1st Embodiment 第1の実施形態に係る送信キューの一例を示す図The figure which shows an example of the transmission queue which concerns on 1st Embodiment. 各サーバが正常稼働している場合の多重化データベースシステムの動作を説明するシーケンスチャートSequence chart explaining the operation of the multiplexed database system when each server is operating normally 図5の動作におけるサーバ管理表の一例Example of server management table in the operation of FIG. 図5の動作におけるトランザクション管理表の一例Example of transaction management table in the operation of FIG. サーバが故障した場合の多重化データベースシステムの動作を説明するシーケンスチャートSequence chart explaining operation of multiplexed database system when server fails 図9の動作におけるトランザクション管理表の一例Example of transaction management table in operation of FIG. 図9の動作におけるサーバ管理表の一例An example of the server management table in the operation of FIG. 図9の動作における送信キューの一例An example of a transmission queue in the operation of FIG. 第1の実施形態に係る多重化データベースシステムにおける同期化処理を説明するシーケンスチャートSequence chart for explaining synchronization processing in the multiplexed database system according to the first embodiment 第1の実施形態に係る多重化データベースシステムにおける同期化処理を説明するシーケンスチャートSequence chart for explaining synchronization processing in the multiplexed database system according to the first embodiment 第1の実施形態に係る多重化データベースシステムにおける同期化処理を説明するシーケンスチャートSequence chart for explaining synchronization processing in the multiplexed database system according to the first embodiment 図13乃至図15の動作におけるサーバ管理表の一例An example of the server management table in the operations of FIGS. 図13乃至図15の動作におけるトランザクション管理表の一例An example of the transaction management table in the operations of FIGS. 図13乃至図15の動作における送信キューの一例An example of a transmission queue in the operations of FIGS. 図13乃至図15の動作における送信キューの一例An example of a transmission queue in the operations of FIGS. 図13乃至図15の動作におけるサーバ管理表の一例An example of the server management table in the operations of FIGS. 図13乃至図15の動作における送信キューの一例An example of a transmission queue in the operations of FIGS. 図13乃至図15の動作における送信キューの一例An example of a transmission queue in the operations of FIGS. 図13乃至図15の動作における送信キューの一例An example of a transmission queue in the operations of FIGS. 図13乃至図15の動作における送信キューの一例An example of a transmission queue in the operations of FIGS. 図13乃至図15の動作における送信キューの一例An example of a transmission queue in the operations of FIGS. 図13乃至図15の動作における送信キューの一例An example of a transmission queue in the operations of FIGS. 図13乃至図15の動作におけるサーバ管理表の一例An example of the server management table in the operations of FIGS. 第2の実施形態に係る多重化データベースシステムにおける同期化処理を説明するシーケンスチャートSequence chart for explaining synchronization processing in the multiplexed database system according to the second embodiment 第2の実施形態に係る多重化データベースシステムにおける同期化処理を説明するシーケンスチャートSequence chart for explaining synchronization processing in the multiplexed database system according to the second embodiment 第2の実施形態に係る多重化データベースシステムにおける同期化処理を説明するシーケンスチャートSequence chart for explaining synchronization processing in the multiplexed database system according to the second embodiment 第2の実施形態に係る多重化データベースシステムにおける同期化処理を説明するシーケンスチャートSequence chart for explaining synchronization processing in the multiplexed database system according to the second embodiment 第2の実施形態に係る多重化データベースシステムにおける同期化処理を説明するシーケンスチャートSequence chart for explaining synchronization processing in the multiplexed database system according to the second embodiment 図28乃至図32の動作におけるサーバ管理表の一例An example of the server management table in the operations of FIGS. 図28乃至図32の動作における送信キューのデータ構造の一例An example of the data structure of the transmission queue in the operations of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 図28乃至図32の動作におけるサーバ管理表の一例An example of the server management table in the operations of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 図28乃至図32の動作における送信キューの一例An example of a transmission queue in the operation of FIGS. 従来のデータベース同期化システムの構成図Configuration diagram of conventional database synchronization system

符号の説明Explanation of symbols

100…サーバ、101…データベース、102…データベース制御部、200…仲介装置、201…サーバ管理表、202…トランザクション管理表、203…送信キュー、204…受信クエリ処理部、205…クエリ送信処理部、206…正当性判定部、207…応答送信処理部、208…同期化処理制御部、209…スナップショット記憶部、300,400…ネットワーク、500…クライアント   DESCRIPTION OF SYMBOLS 100 ... Server, 101 ... Database, 102 ... Database control part, 200 ... Mediation apparatus, 201 ... Server management table, 202 ... Transaction management table, 203 ... Transmission queue, 204 ... Reception query processing part, 205 ... Query transmission processing part, 206 ... Validity determination unit, 207 ... Response transmission processing unit, 208 ... Synchronization processing control unit, 209 ... Snapshot storage unit, 300, 400 ... Network, 500 ... Client

Claims (8)

複数のデータベースサーバと、クライアントコンピュータからの処理要求を各データベースサーバに中継するとともに各データベースサーバからの正当な応答の1つをクライアントコンピュータに処理結果として返す仲介装置とを備えた多重化データベースシステムにおいて、新規の又はこのシステムから切り離されたデータベースサーバ(以降「新規データベースサーバ」と言う)をシステムに組み込む際に各データベースサーバを同期化する方法であって、
仲介装置は、
クライアントコンピュータからの処理要求を差分情報として記憶する差分情報記憶部と、データベースのスナップショットを記憶するスナップショット記憶部とを備え、
新規データベースサーバの組込要求があると、
(a)正常稼働中のデータベースサーバからデータベースのスナップショットを取得してスナップショット記憶部に記憶する処理を開始し、
(b)クライアントコンピュータから受信する処理要求を差分情報として差分情報記憶部に順次記憶し、
(c)スナップショットの取得を完了するとスナップショット記憶部に記憶したスナップショットを用いて新規データベースサーバのデータベースを復元させ、
(d)新規データベースサーバにおいて前記スナップショットからのデータベースの復元が完了すると、差分情報記憶部に記憶されている処理要求を新規データベースサーバに順次送出し、
(e)差分情報記憶部に記憶されている処理要求について新規データベースにおいて処理が終了すると新規データベースサーバをシステムに組み込む
ことを特徴とする多重化データベースシステムにおける同期化方法。
In a multiplexed database system comprising a plurality of database servers and an intermediary device that relays processing requests from client computers to each database server and returns one of the valid responses from each database server as a processing result to the client computer A method of synchronizing each database server when a new or disconnected database server (hereinafter referred to as “new database server”) is incorporated into the system,
The intermediary device
A difference information storage unit that stores a processing request from a client computer as difference information, and a snapshot storage unit that stores a snapshot of a database;
When there is a request to install a new database server,
(A) Start processing to acquire a snapshot of the database from the database server that is operating normally and store it in the snapshot storage unit,
(B) The processing request received from the client computer is sequentially stored in the difference information storage unit as difference information,
(C) When the acquisition of the snapshot is completed, the database of the new database server is restored using the snapshot stored in the snapshot storage unit,
(D) When the restoration of the database from the snapshot is completed in the new database server, the processing requests stored in the difference information storage unit are sequentially sent to the new database server,
(E) A synchronization method in a multiplexed database system, wherein a new database server is incorporated into the system when processing for the processing request stored in the difference information storage unit is completed in the new database.
仲介装置は、前記ステップ(b)において、スナップショットに反映されない処理要求を差分情報として差分情報記憶部に順次記憶する
ことを特徴とする請求項1記載の多重化データベースシステムにおける同期化方法。
2. The synchronization method in a multiplexed database system according to claim 1, wherein in the step (b), the intermediary device sequentially stores processing requests not reflected in the snapshot as difference information in the difference information storage unit.
仲介装置は、前記ステップ(b)において、組み込み要求時に正常稼働中のサーバにおいてコミットされていないトランザクションに係る処理要求を組み込み要求時から遡って記憶する
ことを特徴とする請求項2記載の多重化データベースシステムにおける同期化方法。
3. The multiplexing according to claim 2, wherein the intermediary device stores, in the step (b), a processing request related to a transaction that has not been committed in a server that is operating normally at the time of the incorporation request, retroactively from the time of the incorporation request. A synchronization method in a database system.
仲介装置は、前記ステップ(a)において、正常稼働中のサーバにおいてトランザクションが処理されていないときにスナップショットの取得を開始する
ことを特徴とする請求項1記載の多重化データベースシステムにおける同期化方法。
2. The synchronization method in a multiplexed database system according to claim 1, wherein, in the step (a), the intermediary device starts acquiring a snapshot when a transaction is not processed in a normally operating server. 3. .
仲介装置は、正常稼働中のデータベースサーバが2台以上ある場合には、1台のデータベースサーバを同期化用データベースサーバとして選定し、該同期化用データベースサーバからスナップショットを取得し、スナップショット作成中にクライアントから受信した処理要求は他の正常稼働中のデータベースサーバに中継する
ことを特徴とする請求項1記載の多重化データベースシステムにおける同期化方法。
When there are two or more database servers in normal operation, the mediation device selects one database server as a synchronization database server, acquires a snapshot from the synchronization database server, and creates a snapshot. 2. The synchronization method in a multiplexed database system according to claim 1, wherein the processing request received from the client is relayed to another normally operating database server.
複数のデータベースサーバと、クライアントコンピュータからの処理要求を各データベースサーバに中継するとともに各データベースサーバからの正当な応答の1つをクライアントコンピュータに処理結果として返す仲介装置とを備えた多重化データベースシステムにおいて、
仲介装置は、
クライアントコンピュータからの処理要求を差分情報として記憶する差分情報記憶部と、
データベースのスナップショットを記憶するスナップショット記憶部と、
新規の又はこのシステムから切り離されたデータベースサーバ(以降「新規データベースサーバ」と言う)のシステムへの組込要求があると、(a)正常稼働中のデータベースサーバからデータベースのスナップショットを取得してスナップショット記憶部に記憶する処理を開始し、(b)クライアントコンピュータから受信する処理要求を差分情報として差分情報記憶部に順次記憶し、(c)スナップショットの取得を完了するとスナップショット記憶部に記憶したスナップショットを用いて新規データベースサーバのデータベースを復元させ、(d)新規データベースサーバにおいて前記スナップショットからのデータベースの復元が完了すると、差分情報記憶部に記憶されている処理要求を新規データベースサーバに順次送出し、(e)差分情報記憶部に記憶されている処理要求について新規データベースにおいて処理が終了すると新規データベースサーバをシステムに組み込む制御部とを備えた
ことを特徴とする多重化データベースシステム。
In a multiplexed database system comprising a plurality of database servers and an intermediary device that relays processing requests from client computers to each database server and returns one of the valid responses from each database server as a processing result to the client computer ,
The intermediary device
A difference information storage unit for storing a processing request from the client computer as difference information;
A snapshot storage unit for storing database snapshots;
When there is a request to incorporate a new or disconnected database server (hereinafter referred to as “new database server”) into the system, (a) a database snapshot is obtained from the database server that is operating normally. Starts processing to be stored in the snapshot storage unit, (b) sequentially stores processing requests received from the client computer as difference information in the difference information storage unit, and (c) completes acquisition of the snapshot in the snapshot storage unit. The database of the new database server is restored using the stored snapshot, and (d) when restoration of the database from the snapshot is completed in the new database server, the processing request stored in the difference information storage unit is transferred to the new database server To (e Multiplexing database system is characterized in that a control unit incorporating the process in the new database is completed a new database server system for processing requests stored in the difference information storage unit.
複数のデータベースサーバと、クライアントコンピュータからの処理要求を各データベースサーバに中継するとともに各データベースサーバからの正当な応答の1つをクライアントコンピュータに処理結果として返す仲介装置とを備えた多重化データベースシステムにおける仲介装置であって、
クライアントコンピュータからの処理要求を差分情報として記憶する差分情報記憶部と、
データベースのスナップショットを記憶するスナップショット記憶部と、
新規の又はこのシステムから切り離されたデータベースサーバ(以降「新規データベースサーバ」と言う)のシステムへの組込要求があると、(a)正常稼働中のデータベースサーバからデータベースのスナップショットを取得してスナップショット記憶部に記憶する処理を開始し、(b)クライアントコンピュータから受信する処理要求を差分情報として差分情報記憶部に順次記憶し、(c)スナップショットの取得を完了するとスナップショット記憶部に記憶したスナップショットを用いて新規データベースサーバのデータベースを復元させ、(d)新規データベースサーバにおいて前記スナップショットからのデータベースの復元が完了すると、差分情報記憶部に記憶されている処理要求を新規データベースサーバに順次送出し、(e)差分情報記憶部に記憶されている処理要求について新規データベースにおいて処理が終了すると新規データベースサーバをシステムに組み込む制御部とを備えた
ことを特徴とする仲介装置。
In a multiplexed database system comprising a plurality of database servers and an intermediary device that relays processing requests from client computers to each database server and returns one of the valid responses from each database server to the client computer as a processing result An intermediary device,
A difference information storage unit for storing a processing request from the client computer as difference information;
A snapshot storage unit for storing database snapshots;
When there is a request to incorporate a new or disconnected database server (hereinafter referred to as “new database server”) into the system, (a) a database snapshot is obtained from the database server that is operating normally. Processing to be stored in the snapshot storage unit is started, (b) processing requests received from the client computer are sequentially stored as difference information in the difference information storage unit, and (c) snapshot acquisition is completed when acquisition of the snapshot is completed. The database of the new database server is restored using the stored snapshot, and (d) when the restoration of the database from the snapshot is completed in the new database server, the processing request stored in the difference information storage unit is transferred to the new database server To (e Intermediary device being characterized in that a control unit incorporating a new database server system when the processing request stored in the difference information memory section processed in the new database ends.
複数のデータベースサーバと、クライアントコンピュータからの処理要求を各データベースサーバに中継するとともに各データベースサーバからの正当な応答の1つをクライアントコンピュータに処理結果として返す仲介装置とを備えた多重化データベースシステムにおける仲介装置を実現するプログラムであって、
コンピュータを、
クライアントコンピュータからの処理要求を差分情報として記憶する差分情報記憶部と、
データベースのスナップショットを記憶するスナップショット記憶部と、
新規の又はこのシステムから切り離されたデータベースサーバ(以降「新規データベースサーバ」と言う)のシステムへの組込要求があると、(a)正常稼働中のデータベースサーバからデータベースのスナップショットを取得してスナップショット記憶部に記憶する処理を開始し、(b)クライアントコンピュータから受信する処理要求を差分情報として差分情報記憶部に順次記憶し、(c)スナップショットの取得を完了するとスナップショット記憶部に記憶したスナップショットを用いて新規データベースサーバのデータベースを復元させ、(d)新規データベースサーバにおいて前記スナップショットからのデータベースの復元が完了すると、差分情報記憶部に記憶されている処理要求を新規データベースサーバに順次送出し、(e)差分情報記憶部に記憶されている処理要求について新規データベースにおいて処理が終了すると新規データベースサーバをシステムに組み込む制御部として機能させる
ことを特徴とする仲介プログラム。
In a multiplexed database system comprising a plurality of database servers and an intermediary device that relays processing requests from client computers to each database server and returns one of the valid responses from each database server to the client computer as a processing result A program for realizing an intermediary device,
Computer
A difference information storage unit for storing a processing request from the client computer as difference information;
A snapshot storage unit for storing database snapshots;
When there is a request to incorporate a new or disconnected database server (hereinafter referred to as “new database server”) into the system, (a) a database snapshot is obtained from the database server that is operating normally. Processing to be stored in the snapshot storage unit is started, (b) processing requests received from the client computer are sequentially stored as difference information in the difference information storage unit, and (c) snapshot acquisition is completed when acquisition of the snapshot is completed. The database of the new database server is restored using the stored snapshot, and (d) when restoration of the database from the snapshot is completed in the new database server, the processing request stored in the difference information storage unit is transferred to the new database server To (e Intermediation program, characterized in that the processing request stored in the difference information storage unit process in the new database to function as a control unit incorporating a new database server system upon completion.
JP2005159578A 2005-05-31 2005-05-31 Multiplex database system, synchronization method thereof, intermediation device and intermediation program Pending JP2006338145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005159578A JP2006338145A (en) 2005-05-31 2005-05-31 Multiplex database system, synchronization method thereof, intermediation device and intermediation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005159578A JP2006338145A (en) 2005-05-31 2005-05-31 Multiplex database system, synchronization method thereof, intermediation device and intermediation program

Publications (1)

Publication Number Publication Date
JP2006338145A true JP2006338145A (en) 2006-12-14

Family

ID=37558675

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005159578A Pending JP2006338145A (en) 2005-05-31 2005-05-31 Multiplex database system, synchronization method thereof, intermediation device and intermediation program

Country Status (1)

Country Link
JP (1) JP2006338145A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008217641A (en) * 2007-03-07 2008-09-18 Nec Corp Replication method, storage device and program
JP2009252149A (en) * 2008-04-10 2009-10-29 Nippon Telegr & Teleph Corp <Ntt> Database replication method, and database management system, and program
JP2010067115A (en) * 2008-09-12 2010-03-25 Nec Informatec Systems Ltd Data storage system and data storage method
JP2014099061A (en) * 2012-11-14 2014-05-29 Omron Corp Controller and program
JP2014197346A (en) * 2013-03-29 2014-10-16 オムロン株式会社 Controller and program
CN110597891A (en) * 2018-06-12 2019-12-20 武汉斗鱼网络科技有限公司 Device, system, method and storage medium for aggregating MySQL into PostgreSQL database
CN113420088A (en) * 2021-06-24 2021-09-21 广州欢网科技有限责任公司 Method, device and terminal for synchronizing cache database and database

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008217641A (en) * 2007-03-07 2008-09-18 Nec Corp Replication method, storage device and program
JP4715777B2 (en) * 2007-03-07 2011-07-06 日本電気株式会社 Replication method, storage apparatus, and program
JP2009252149A (en) * 2008-04-10 2009-10-29 Nippon Telegr & Teleph Corp <Ntt> Database replication method, and database management system, and program
JP2010067115A (en) * 2008-09-12 2010-03-25 Nec Informatec Systems Ltd Data storage system and data storage method
JP2014099061A (en) * 2012-11-14 2014-05-29 Omron Corp Controller and program
US9824229B2 (en) 2012-11-14 2017-11-21 Omron Corporation Controller with enhanced reliability
JP2014197346A (en) * 2013-03-29 2014-10-16 オムロン株式会社 Controller and program
CN110597891A (en) * 2018-06-12 2019-12-20 武汉斗鱼网络科技有限公司 Device, system, method and storage medium for aggregating MySQL into PostgreSQL database
CN113420088A (en) * 2021-06-24 2021-09-21 广州欢网科技有限责任公司 Method, device and terminal for synchronizing cache database and database
CN113420088B (en) * 2021-06-24 2024-04-26 广州欢网科技有限责任公司 Method, device and terminal for synchronizing cache database and database

Similar Documents

Publication Publication Date Title
JP4301849B2 (en) Information processing method and its execution system, its processing program, disaster recovery method and system, storage device for executing the processing, and its control processing method
US7925633B2 (en) Disaster recovery system suitable for database system
JP5467625B2 (en) Production-substitution system including a production system that processes transactions and a substitution system that is a backup system of the production system
JP2006338145A (en) Multiplex database system, synchronization method thereof, intermediation device and intermediation program
CN104486319B (en) Suitable for the configuration file real-time synchronization method and its system of high-availability system
CN103294701B (en) A kind of method that distributed file system and data process
US20180150501A1 (en) Database system, server device, computer program product, and information processing method
US20100333094A1 (en) Job-processing nodes synchronizing job databases
US20070220059A1 (en) Data processing node
US20060259517A1 (en) Data synchronizer with failover facility
US7330860B2 (en) Fault tolerant mechanism to handle initial load of replicated object in live system
JP2004295540A (en) Method for synchronizing transaction, database system, and database apparatus
JP2001356945A (en) Data backup recovery system
WO2003048936A1 (en) Fault tolerance using logical checkpointing in computing systems
EP1661000A1 (en) Recovery from failures within data processing systems
CN103782279A (en) File management system and file management method
WO2008117205A2 (en) Upgrading services associated with high availability systems
CN101770513A (en) Method and system for validation and correction in a distributed namespace
JP4870190B2 (en) Data processing method, computer, and data processing program
JP6520448B2 (en) INFORMATION PROCESSING SYSTEM, INFORMATION PROCESSING DEVICE, AND INFORMATION PROCESSING DEVICE CONTROL METHOD
CN102937955A (en) Main memory database achieving method based on My structured query language (SQL) double storage engines
CN102045187A (en) Method and equipment for realizing HA (high-availability) system with checkpoints
US8522069B2 (en) Process for secure backspacing to a first data center after failover through a second data center and a network architecture working accordingly
CN110196788B (en) Data reading method, device and system and storage medium
JP3823169B1 (en) Data control apparatus, system, method, and program