JP6611254B2 - Server apparatus, communication system, and communication method - Google Patents

Server apparatus, communication system, and communication method Download PDF

Info

Publication number
JP6611254B2
JP6611254B2 JP2016111762A JP2016111762A JP6611254B2 JP 6611254 B2 JP6611254 B2 JP 6611254B2 JP 2016111762 A JP2016111762 A JP 2016111762A JP 2016111762 A JP2016111762 A JP 2016111762A JP 6611254 B2 JP6611254 B2 JP 6611254B2
Authority
JP
Japan
Prior art keywords
data
master
server
slave
database
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.)
Active
Application number
JP2016111762A
Other languages
Japanese (ja)
Other versions
JP2017219910A (en
Inventor
信一 河村
悟 秋山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2016111762A priority Critical patent/JP6611254B2/en
Publication of JP2017219910A publication Critical patent/JP2017219910A/en
Application granted granted Critical
Publication of JP6611254B2 publication Critical patent/JP6611254B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、サーバ装置、通信システム及び通信方法に関する。   The present invention relates to a server device, a communication system, and a communication method.

従来、マスタデータベース(DB)/スレーブDBによりDBが冗長化されたDBサーバシステムが知られている(特許文献1参照)。サービス提供装置は、通常、マスタDBのデータを参照してユーザにサービスを提供する。   Conventionally, a DB server system in which a DB is made redundant by a master database (DB) / slave DB is known (see Patent Document 1). The service providing apparatus usually provides a service to the user with reference to data in the master DB.

このようなDBサーバシステムにおいては、ネットワーク障害等によりマスタDBとスレーブDBとを同期させることができず、マスタDBとスレーブDBとを入れ替えるいわゆるマスタ/スレーブ交代ができない状態であっても、サービスを継続して提供する必要がある。   In such a DB server system, the master DB and the slave DB cannot be synchronized due to a network failure or the like, and even if the so-called master / slave replacement to replace the master DB and the slave DB is not possible, the service can be provided. It is necessary to provide it continuously.

特開2013−142996号公報JP2013-142996A

しかしながら、マスタ/スレーブによる冗長化構成をとっているDBサーバシステムにおいて、マスタとスレーブとが設置されているエリア間でネットワーク障害が発生すると、データ更新処理サービスの中断に繋がるという問題があった。   However, in a DB server system having a redundant configuration with a master / slave, if a network failure occurs between areas where the master and the slave are installed, there is a problem that the data update processing service is interrupted.

具体的に、図15を参照して、従来のDBサーバシステムについて説明する。図15は、従来のDBサーバシステムの通信方法を説明する図である。図15に示すように、従来のDBサーバシステムは、例えば、エリアAに、マスタDBサーバ20Pが設けられており、エリアA内のサービス提供装置10Ap,10Bpを収容する。サービス提供装置10Ap,10Bpは、ユーザ5Ap〜5Bp,5Cp〜5Dpとそれぞれ接続する。そして、エリアBに、スレーブDBサーバ30Pが設けられており、エリアB内のサービス提供装置10Cp,10Dpを収容する。サービス提供装置10Cp,10Dpは、ユーザ5Ep〜5Fp,5Gp〜5Hpとそれぞれ接続する。   Specifically, a conventional DB server system will be described with reference to FIG. FIG. 15 is a diagram for explaining a communication method of a conventional DB server system. As shown in FIG. 15, in the conventional DB server system, for example, a master DB server 20P is provided in the area A, and accommodates the service providing devices 10Ap and 10Bp in the area A. The service providing devices 10Ap and 10Bp are connected to users 5Ap to 5Bp and 5Cp to 5Dp, respectively. In the area B, the slave DB server 30P is provided and accommodates the service providing apparatuses 10Cp and 10Dp in the area B. The service providing apparatuses 10Cp and 10Dp are connected to users 5Ep to 5Fp and 5Gp to 5Hp, respectively.

このうち、エリアAでは、ネットワーク障害が発生した場合であっても(図15の(1)参照)、マスタDBサーバ20Pにアクセスできるため、サービス提供装置10Ap,10Bpは、データを参照する処理に加え、データを更新する処理も実行可能である。   Among these, in the area A, even when a network failure occurs (see (1) in FIG. 15), the master DB server 20P can be accessed, so that the service providing apparatuses 10Ap and 10Bp perform processing for referring to data. In addition, processing for updating data can be executed.

例えば、サービス提供装置10Apが、ユーザ5Apによるデータ更新要求を受け(図15の(2−1)参照)、マスタDBサーバ20Pにデータ更新要求を送信すると(図15の(3−1)参照)、マスタDBサーバ20Pは、データを更新する(図15の(4−1)参照)。また、サービス提供装置10Apが、ユーザ5Bpによるデータ参照要求を受けると(図15の(2−2)参照)、マスタDBサーバ20Pにデータ参照要求を送信して(図15の(3−2)参照)、マスタDBサーバ20Pによるデータ参照応答をユーザ5Bpに送信することもできる。   For example, when the service providing apparatus 10Ap receives a data update request from the user 5Ap (see (2-1) in FIG. 15) and transmits the data update request to the master DB server 20P (see (3-1) in FIG. 15). The master DB server 20P updates the data (see (4-1) in FIG. 15). When the service providing apparatus 10Ap receives a data reference request from the user 5Bp (see (2-2) in FIG. 15), the service providing apparatus 10Ap transmits a data reference request to the master DB server 20P ((3-2) in FIG. 15). Reference), a data reference response by the master DB server 20P can also be transmitted to the user 5Bp.

これに対し、エリアBでは、ネットワーク障害が発生した場合には(図15の(1)参照)、スレーブDBサーバ30Pにしかアクセスできないため、サービス提供装置10Cp,10Dpは、スレーブDBサーバ30Pにアクセスしてデータを参照する処理は行えるものの、データを更新する処理が行えない。   On the other hand, in the area B, when a network failure occurs (see (1) in FIG. 15), the service providing apparatuses 10Cp and 10Dp can access the slave DB server 30P because only the slave DB server 30P can be accessed. Although the process of referring to the data can be performed, the process of updating the data cannot be performed.

例えば、サービス提供装置10Cpが、ユーザ5Fpによるデータ参照要求を受けても(図15の(2−4)参照)、ネットワーク障害のため、マスタDBサーバ20Pとの間で通信できない(図15の(4−3)参照)。この場合には、サービス提供装置10Cpは、スレーブDBサーバ30Pにアクセスして(図15の矢印Yp参照)、データ参照要求を送信し(図15の(3−4)参照)、スレーブDBサーバ30Pによるデータ参照応答をユーザ5Fpに送信する。   For example, even when the service providing apparatus 10Cp receives a data reference request from the user 5Fp (see (2-4) in FIG. 15), communication with the master DB server 20P is impossible due to a network failure ((( 4-3)). In this case, the service providing apparatus 10Cp accesses the slave DB server 30P (see arrow Yp in FIG. 15), transmits a data reference request (see (3-4) in FIG. 15), and slave DB server 30P. The data reference response by is transmitted to the user 5Fp.

一方、ユーザ5Epによるデータ更新要求を受けた場合には(図15の(2−3)参照)、サービス提供装置10Cpは、ネットワーク障害のため、マスタDBサーバ20Pとの間で通信できず(図15の(4−3)参照)、マスタDBサーバ20Pにデータ更新要求を送信できない(図15の(3−3)参照)。   On the other hand, when receiving a data update request from the user 5Ep (see (2-3) in FIG. 15), the service providing apparatus 10Cp cannot communicate with the master DB server 20P due to a network failure (see FIG. 15). 15 (4-3)), the data update request cannot be transmitted to the master DB server 20P (see (3-3) in FIG. 15).

このように、従来のDBサーバシステムでは、スレーブDBサーバ30PにしかアクセスできないエリアBのサービス提供装置10Cp,10Dpは、スレーブDBサーバ30Pアクセスしてデータを参照する処理は行えるものの、データを更新する処理が行えない。この結果、スレーブDBサーバ30PにしかアクセスできないエリアBでは、データ更新処理サービスの中断(図15の(5)参照)に繋がるという問題があった。   As described above, in the conventional DB server system, the service providing apparatuses 10Cp and 10Dp in the area B that can only access the slave DB server 30P can access the slave DB server 30P and refer to the data, but update the data. Processing cannot be performed. As a result, there is a problem that in the area B where only the slave DB server 30P can be accessed, the data update processing service is interrupted (see (5) in FIG. 15).

本発明は、上記に鑑みてなされたものであって、マスタ/スレーブによる冗長化構成をとっている構成において、ネットワーク障害によるエリア内のデータ更新処理サービスの中断を防止するサーバ装置、通信システム及び通信方法を提供することを目的とする。   The present invention has been made in view of the above, and in a configuration having a redundant configuration by master / slave, a server device, a communication system, and a communication device for preventing interruption of data update processing service in an area due to a network failure An object is to provide a communication method.

上述した課題を解決し、目的を達成するために、本発明に係るサーバ装置は、マスタ或いはスレーブの関係で対向装置とネットワークを介して接続するサーバ装置であって、レコード単位で記録されたデータを有するデータベースと、自装置がマスタである場合には、外部の装置からデータ更新の指示を受け付けた際に、データベースのデータを更新し、自装置がスレーブである場合には、マスタである対向装置から同期の指示を受け付けた際に、データベースのデータを更新するデータ更新部と、自装置がマスタである場合であって、データ更新部によって外部の装置からデータ更新の指示を受け付けてデータベースのデータが更新された場合には、該更新したデータとの同期の指示をスレーブである対向装置に対して送信する更新データ送信部と、対向装置との間でネットワーク障害が生じた場合、自装置をマスタに暫定的に移行するマスタ移行部と、マスタ移行部によって暫定的にマスタに移行された場合には、外部の装置からデータ更新の指示を受け付けた際に、対向装置とは非同期でデータベースのデータを更新する暫定データ更新部と、を有することを特徴とする。   In order to solve the above-described problems and achieve the object, the server device according to the present invention is a server device connected to the opposite device via a network in a master or slave relationship, and data recorded in units of records If the device is a master and the device is a master, the data in the database is updated when a data update instruction is received from an external device. When the synchronization instruction is received from the device, the data update unit that updates the data in the database and the own device is the master, and the data update unit receives the data update instruction from the external device and When the data is updated, update data that transmits an instruction to synchronize with the updated data to the opposite device as a slave When a network failure occurs between the communication unit and the opposite device, a master transition unit that temporarily transitions its own device to the master and an external device that is provisionally transitioned to the master by the master transition unit And a provisional data update unit that updates data in the database asynchronously with the counterpart device when a data update instruction is received from the device.

本発明によれば、マスタ/スレーブによる冗長化構成をとっている構成において、ネットワーク障害によるエリア内のデータ更新処理サービスの中断を防止する。   According to the present invention, in a configuration having a redundant configuration with master / slave, interruption of data update processing service in an area due to a network failure is prevented.

図1は、本実施の形態に係る通信システムの概略構成を示す模式図である。FIG. 1 is a schematic diagram showing a schematic configuration of a communication system according to the present embodiment. 図2は、図1に示すサービス提供装置の構成を例示する模式図である。FIG. 2 is a schematic view illustrating the configuration of the service providing apparatus shown in FIG. 図3は、図1に示すマスタDBサーバの構成を例示する模式図である。FIG. 3 is a schematic view illustrating the configuration of the master DB server shown in FIG. 図4は、図3に示すマスタDBが記憶するデータのデータ構成の一例を示す図である。FIG. 4 is a diagram showing an example of the data configuration of data stored in the master DB shown in FIG. 図5は、図3に示す整合部の整合処理を説明する図である。FIG. 5 is a diagram for explaining the matching process of the matching unit shown in FIG. 図6は、図1に示すスレーブDBサーバの構成を例示する模式図である。FIG. 6 is a schematic view illustrating the configuration of the slave DB server shown in FIG. 図7は、図1に示す通信システムの平常時の処理の流れの一例を示す図である。FIG. 7 is a diagram illustrating an example of a normal process flow of the communication system illustrated in FIG. 1. 図8は、図1に示す通信システムのネットワーク障害時の処理の流れの一例を示す図である。FIG. 8 is a diagram illustrating an example of a processing flow when a network failure occurs in the communication system illustrated in FIG. 1. 図9は、図1に示す通信システムのネットワーク障害時のデータ更新処理について説明する図である。FIG. 9 is a diagram for explaining data update processing at the time of a network failure in the communication system shown in FIG. 図10は、図1に示す通信システムのネットワーク障害時のデータ参照処理の流れの一例を示す図である。FIG. 10 is a diagram illustrating an example of the flow of data reference processing when a network failure occurs in the communication system illustrated in FIG. 図11は、図1に示す通信システムのネットワーク復旧後のデータに対する整合処理の流れの一例を示す図である。FIG. 11 is a diagram showing an example of the flow of matching processing for data after network recovery of the communication system shown in FIG. 図12は、図1に示す通信システムの処理手順を示すシーケンス図である。FIG. 12 is a sequence diagram showing a processing procedure of the communication system shown in FIG. 図13は、図12に示す整合処理の処理手順を示すフローチャートである。FIG. 13 is a flowchart showing the procedure of the matching process shown in FIG. 図14は、プログラムが実行されることにより、マスタDBサーバ或いはスレーブDBサーバが実現されるコンピュータの一例を示す図である。FIG. 14 is a diagram illustrating an example of a computer in which a master DB server or a slave DB server is realized by executing a program. 図15は、従来のDBサーバシステムの通信方法を説明する図である。FIG. 15 is a diagram for explaining a communication method of a conventional DB server system.

以下、図面を参照して、本発明の一実施形態を詳細に説明する。なお、この実施の形態により本発明が限定されるものではない。また、図面の記載において、同一部分には同一の符号を付して示している。   Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. In addition, this invention is not limited by this embodiment. Moreover, in description of drawing, the same code | symbol is attached | subjected and shown to the same part.

[実施の形態]
まず、実施の形態に係る通信システムについて、通信システムの概略構成及び通信システムにおける通信処理の流れ及び具体例を説明する。
[Embodiment]
First, regarding the communication system according to the embodiment, a schematic configuration of the communication system, a flow of communication processing in the communication system, and a specific example will be described.

[通信システム]
図1は、本実施の形態に係る通信システムの概略構成を示す模式図である。図1に示すように、通信システム1は、エリアAのサービス提供装置10A,10Bと、エリアBのサービス提供装置10C,10Dと、エリアAのマスタデータベース(DB)サーバ20と、エリアBのスレーブDBサーバ30とが、ネットワークを介して、互いに通信可能に接続されて構成される。サービス提供装置10A〜10Dには、それぞれユーザ5A〜5B,5C〜5D,5E〜5F,5G〜5Hが接続する。
[Communications system]
FIG. 1 is a schematic diagram showing a schematic configuration of a communication system according to the present embodiment. As shown in FIG. 1, the communication system 1 includes service providing apparatuses 10A and 10B in area A, service providing apparatuses 10C and 10D in area B, a master database (DB) server 20 in area A, and a slave in area B. The DB server 30 is configured to be communicably connected to each other via a network. Users 5A to 5B, 5C to 5D, 5E to 5F, and 5G to 5H are connected to the service providing devices 10A to 10D, respectively.

サービス提供装置10A〜10Dは、それぞれ接続するユーザ5A〜5B,5C〜5D,5E〜5F,5G〜5Hにサービスを提供する。マスタDBサーバ20は、サービス提供に必要なデータを記憶するマスタDB21を有する。スレーブDBサーバ30は、マスタDB21の複製データを記憶するスレーブDB31を有する。   The service providing devices 10A to 10D provide services to connected users 5A to 5B, 5C to 5D, 5E to 5F, and 5G to 5H, respectively. The master DB server 20 has a master DB 21 that stores data necessary for service provision. The slave DB server 30 has a slave DB 31 that stores duplicate data of the master DB 21.

このような構成の通信システム1において、サービス提供装置10A〜10Dは、平常時に、それぞれ接続するユーザ5A〜5B,5C〜5D,5E〜5F,5G〜5Hの要求に応じて、或いは予め、マスタDB21にアクセスしてデータを参照し、参照したデータをキャッシュメモリに記憶するデータキャッシュを行う。そして、サービス提供装置10A〜10Dは、このデータを用いて、それぞれ接続するユーザ5A〜5B,5C〜5D,5E〜5F,5G〜5Hにサービスを提供する。また、サービス提供装置10A〜10Dは、平常時に、それぞれ接続するユーザ5A〜5B,5C〜5D,5E〜5F,5G〜5Hの要求に応じて、マスタDB21にアクセスして、マスタDB21のデータを更新する。   In the communication system 1 having such a configuration, the service providing apparatuses 10A to 10D are normally connected to the masters 5A to 5B, 5C to 5D, 5E to 5F, and 5G to 5H, respectively, in advance or in advance. The data cache is accessed by accessing the DB 21 and referring to the data, and storing the referenced data in the cache memory. Then, the service providing apparatuses 10A to 10D provide services to the users 5A to 5B, 5C to 5D, 5E to 5F, and 5G to 5H, respectively, that are connected using the data. In addition, the service providing apparatuses 10A to 10D access the master DB 21 in response to requests from the users 5A to 5B, 5C to 5D, 5E to 5F, and 5G to 5H to connect to the master DB 21 in normal times. Update.

また、エリアBのサービス提供装置10C,10Dは、ネットワーク障害等によりマスタDBサーバ20と通信できない場合に、スレーブDB31にアクセスしてデータを参照し、データキャッシュを行って、このデータを用いてそれぞれ接続するユーザ5E〜5F,5G〜5Hにサービスを提供する。サービス提供装置10C,10Dは、ネットワーク障害が生じた場合に、それぞれ接続するユーザ5E〜5F,5G〜5Hの要求に応じて、スレーブDB31にアクセスして、スレーブDB31のデータを更新する。   In addition, when the service providing apparatuses 10C and 10D in the area B cannot communicate with the master DB server 20 due to a network failure or the like, the slave B 31 accesses the slave DB 31 to refer to data, performs data cache, and uses this data. A service is provided to connected users 5E to 5F and 5G to 5H. When a network failure occurs, the service providing apparatuses 10C and 10D access the slave DB 31 and update the data of the slave DB 31 in response to requests from the users 5E to 5F and 5G to 5H to be connected.

マスタDBサーバ20は、データ更新指示を受け付けてスレーブDBサーバ30にデータを同期させる。マスタDBサーバ20は、図示しない操作端末等によりマスタDB21のデータ更新が行われた場合に、更新されたデータをスレーブDBサーバ30に通知して、マスタDB21とスレーブDB31とを同期させるレプリケーションを行う。   The master DB server 20 receives a data update instruction and synchronizes data with the slave DB server 30. The master DB server 20 notifies the slave DB server 30 of the updated data and performs replication to synchronize the master DB 21 and the slave DB 31 when the data update of the master DB 21 is performed by an operation terminal (not shown) or the like. .

そして、マスタDBサーバ20は、スレーブDBサーバ30との間でネットワーク障害が生じた場合、マスタに暫定的に移行してスレーブDBサーバ30とは非同期でマスタDB21のデータを更新する。言い換えると、マスタDBサーバ20は、当該マスタDBサーバ20に収容されているサービス提供装置10A,10BのエリアAに閉じた範囲でのマスタDB21のデータ更新処理を継続する。すなわち、マスタDBサーバ20は、スレーブDBサーバ30との間でネットワーク障害が生じた場合、対向装置であるスレーブDBサーバ30との間のレプリケーションは実行しない。   When a network failure occurs between the master DB server 20 and the slave DB server 30, the master DB server 20 temporarily moves to the master and updates data in the master DB 21 asynchronously with the slave DB server 30. In other words, the master DB server 20 continues the data update process of the master DB 21 in a range closed to the area A of the service providing apparatuses 10A and 10B accommodated in the master DB server 20. That is, when a network failure occurs between the master DB server 20 and the slave DB server 30, the master DB server 20 does not execute replication with the slave DB server 30 that is the opposite device.

また、マスタDBサーバ20は、ネットワーク障害が回復した場合、スレーブDB31が保持するデータとマスタDB21が有するデータとについて、レコード単位でデータの一致度を確認する。続いて、マスタDBサーバ20は、データ間に差分がある場合にはデータの履歴情報を基に正しいデータを判断し、差分レプリケーションにより、スレーブDBサーバ30との間でデータの整合を行う。   Further, when the network failure is recovered, the master DB server 20 checks the data matching degree in units of records between the data held by the slave DB 31 and the data held by the master DB 21. Subsequently, when there is a difference between the data, the master DB server 20 determines correct data based on the history information of the data, and performs data matching with the slave DB server 30 by differential replication.

スレーブDBサーバ30は、マスタDBサーバ20と同期しデータを更新する。スレーブDBサーバ30は、更新されたデータをマスタDBサーバ20から受信し、スレーブDB31をマスタDB21に同期させるレプリケーションを行う。そして、スレーブDBサーバ30は、マスタDBサーバ20との間でネットワーク障害が生じた場合、マスタに暫定的に移行してマスタDBサーバ20とは非同期でスレーブDB31のデータ更新処理を実行する。言い換えると、スレーブDBサーバ30は、当該スレーブDBサーバ30に収容されているサービス提供装置10C,10DのエリアBに閉じた範囲でのスレーブDB31のデータ更新処理を継続する。   The slave DB server 30 updates data in synchronization with the master DB server 20. The slave DB server 30 receives the updated data from the master DB server 20 and performs replication for synchronizing the slave DB 31 with the master DB 21. Then, when a network failure occurs between the slave DB server 30 and the master DB server 20, the slave DB server 30 temporarily transitions to the master and executes data update processing of the slave DB 31 asynchronously with the master DB server 20. In other words, the slave DB server 30 continues the data update process of the slave DB 31 in the range closed to the area B of the service providing apparatuses 10C and 10D accommodated in the slave DB server 30.

また、スレーブDBサーバ30は、ネットワーク障害が回復した場合、スレーブDB31が保持するデータとマスタDB21が有するデータとについて、レコード単位でデータの一致度を確認する。続いて、スレーブDBサーバ30は、データ間に差分がある場合にはデータの履歴情報を基に正しいデータを判断し、差分レプリケーションにより、マスタDBサーバ20との間でデータの整合を行う。   In addition, when the network failure is recovered, the slave DB server 30 checks the data matching degree for each record of the data held by the slave DB 31 and the data held by the master DB 21. Subsequently, when there is a difference between the data, the slave DB server 30 determines correct data based on the history information of the data, and performs data matching with the master DB server 20 by differential replication.

このように、本実施の形態では、マスタDBサーバ20及びスレーブDBサーバ30は、ネットワーク障害が生じると、いずれも、マスタに暫定的に移行する。そして、マスタDBサーバ20及びスレーブDBサーバ30は、いずれも、対向サーバとは非同期でそれぞれのDBのデータ更新処理を実行する。したがって、本実施の形態では、スレーブDBサーバ30にしかアクセスできないエリアBにおいても、データ更新処理サービスを継続することが可能になる。   As described above, in the present embodiment, the master DB server 20 and the slave DB server 30 both temporarily move to the master when a network failure occurs. Both the master DB server 20 and the slave DB server 30 execute data update processing of each DB asynchronously with the opposing server. Therefore, in the present embodiment, the data update processing service can be continued even in the area B where only the slave DB server 30 can be accessed.

[サービス提供装置の構成]
まず、サービス提供装置10A〜10Dの構成について説明する。図2は、サービス提供装置10Cの構成を例示する模式図である。なお、サービス提供装置10A,10B、10Dは、サービス提供装置10Cと同様の機能構成である。以降、サービス提供装置10A〜10Dを区別なく表記する際は、サービス提供装置10と表記する。
[Configuration of service providing device]
First, the configuration of the service providing apparatuses 10A to 10D will be described. FIG. 2 is a schematic view illustrating the configuration of the service providing apparatus 10C. The service providing apparatuses 10A, 10B, and 10D have the same functional configuration as the service providing apparatus 10C. Hereinafter, when the service providing apparatuses 10A to 10D are expressed without distinction, they are expressed as the service providing apparatus 10.

サービス提供装置10Cは、ワークステーションやパソコン等の汎用コンピュータで実現され、CPU(Central Processing Unit)等の演算処理装置がメモリに記憶された処理プログラムを実行することにより、図2に例示するように、データ参照部11およびサービス提供部12として機能する。   The service providing device 10C is realized by a general-purpose computer such as a workstation or a personal computer, and an arithmetic processing device such as a CPU (Central Processing Unit) executes a processing program stored in a memory, as illustrated in FIG. Functions as the data reference unit 11 and the service providing unit 12.

データ参照部11は、マスタDBサーバ20と通信できない場合に、マスタDBサーバ20に代えてスレーブDBサーバ30に、スレーブDB31のデータ参照或いはデータ更新の要求を送信する。具体的に、データ参照部11は、平常時、マスタDBサーバ20にマスタDB21のデータ参照の要求、或いは、マスタDB21のデータ更新の要求を送信する。また、データ参照部11は、ネットワーク障害等によりマスタDBサーバ20にアクセスできない場合には、スレーブDBサーバ30に、スレーブDB31のデータ参照の或いはデータ更新の要求を送信する。   When the data reference unit 11 cannot communicate with the master DB server 20, the data reference unit 11 transmits a data reference or data update request of the slave DB 31 to the slave DB server 30 instead of the master DB server 20. Specifically, the data reference unit 11 transmits a request for data reference of the master DB 21 or a request for data update of the master DB 21 to the master DB server 20 in normal times. If the data reference unit 11 cannot access the master DB server 20 due to a network failure or the like, the data reference unit 11 transmits a data reference request or data update request to the slave DB 31 to the slave DB server 30.

また、データ参照部11は、参照要求に応答してマスタDBサーバ20またはスレーブDBサーバ30から返送された参照応答に含まれるデータを、キャッシュメモリに記憶する(以下、データキャッシュと称する)。   Further, the data reference unit 11 stores data included in the reference response returned from the master DB server 20 or the slave DB server 30 in response to the reference request in the cache memory (hereinafter referred to as a data cache).

サービス提供部12は、データキャッシュされたデータを用いて、ユーザ5E〜5Fにサービスを提供する。例えば、サービス提供部12は、電話番号と転送番号とを対応づけたデータを用いて、ユーザ5E,5Fが指定した電話番号に対応する転送番号を、ユーザ5E,5Fに通知するサービスを提供する。   The service providing unit 12 provides services to the users 5E to 5F using the data cached data. For example, the service providing unit 12 provides a service for notifying the users 5E and 5F of the transfer number corresponding to the telephone number designated by the users 5E and 5F using the data in which the telephone number and the transfer number are associated with each other. .

[マスタDBサーバの構成]
次に、マスタDBサーバ20の構成について説明する。図3は、マスタDBサーバ20の構成を例示する模式図である。マスタDBサーバ20は、ワークステーションやパソコン等の汎用コンピュータで実現され、図3に示すように、マスタDB21と、入力部22と、出力部23と、通信制御部24と、制御部25とを備える。
[Master DB server configuration]
Next, the configuration of the master DB server 20 will be described. FIG. 3 is a schematic diagram illustrating the configuration of the master DB server 20. The master DB server 20 is realized by a general-purpose computer such as a workstation or a personal computer. As shown in FIG. 3, the master DB server 20 includes a master DB 21, an input unit 22, an output unit 23, a communication control unit 24, and a control unit 25. Prepare.

マスタDB21は、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)等の半導体メモリ素子、または、ハードディスク、光ディスク等の記憶装置によって実現される。なお、マスタDB21は、通信制御部24(後述)を介して制御部25(後述)と通信する構成としてもよい。   The master DB 21 is realized by a semiconductor memory device such as a RAM (Random Access Memory) or a flash memory, or a storage device such as a hard disk or an optical disk. The master DB 21 may be configured to communicate with a control unit 25 (described later) via a communication control unit 24 (described later).

マスタDB21は、サービス提供装置10が参照してサービス提供に用いるサービス情報を記憶する。図4は、マスタDB21が記憶するデータのデータ構成の一例を示す図である。   The master DB 21 stores service information used by the service providing apparatus 10 for providing services. FIG. 4 is a diagram illustrating an example of a data configuration of data stored in the master DB 21.

図4のテーブルT1に示すように、サービス情報は、各レコードを識別するレコードIDと、電話番号及び該電話番号の転送先である転送番号の情報内容を示すデータと、これらのデータに対するデータの更新時間を示すタイムスタンプと、このレコードのデータが更新された回数を示すデータ更新回数とを対応付けられた構成を有する。   As shown in the table T1 of FIG. 4, the service information includes a record ID for identifying each record, data indicating the telephone number and the information content of the transfer number that is the transfer destination of the telephone number, and data of these data. The time stamp indicating the update time is associated with the data update count indicating the number of times the data of this record has been updated.

図4のテーブルT1には、例えば、レコードID「2」の電話番号が「050-3333-4444」であり、転送番号が「090-3333-4444」であることが示されている。さらに、レコードID「2」については、タイムスタンプが「03/17 11:35:10」であり、データ更新回数が「14105」回であることが示されている。このサービス情報のデータ部分は、制御部25の制御により、あるいは予め、通信制御部24あるいは入力部22を介して上位OpSやユーザ等から取得される。   In the table T1 of FIG. 4, for example, the telephone number of the record ID “2” is “050-3333-4444”, and the transfer number is “090-3333-4444”. Further, for the record ID “2”, the time stamp is “03/17 11:35:10”, and the data update count is “14105”. The data portion of the service information is acquired from the upper OpS, the user, or the like under the control of the control unit 25 or in advance via the communication control unit 24 or the input unit 22.

入力部22は、キーボードやマウス等の入力デバイスを用いて実現され、操作者による入力操作に対応して、制御部25に対して処理開始などの各種指示情報を入力する。出力部23は、液晶ディスプレイなどの表示装置、プリンタ等の印刷装置、情報通信装置等によって実現される。   The input unit 22 is realized by using an input device such as a keyboard or a mouse, and inputs various instruction information such as processing start to the control unit 25 in response to an input operation by the operator. The output unit 23 is realized by a display device such as a liquid crystal display, a printing device such as a printer, an information communication device, or the like.

通信制御部24は、NIC(Network Interface Card)等で実現され、LAN(Local Area Network)やインターネット等の電気通信回線を介したスレーブDBサーバ30や上位OpS(Operation System)等の外部の装置と制御部25との通信を制御する。   The communication control unit 24 is realized by a NIC (Network Interface Card) or the like, and is connected to an external device such as a slave DB server 30 or an upper OpS (Operation System) via a telecommunication line such as a LAN (Local Area Network) or the Internet. Controls communication with the control unit 25.

制御部25は、各種の処理手順などを規定したプログラム及び所要データを格納するための内部メモリを有し、これらによって種々の処理を実行する。例えば、制御部25は、CPUやMPU(Micro Processing Unit)などの電子回路である。制御部25は、図3に例示するように、データ更新部251、更新データ送信部252及び暫定マスタ制御部253を有する。   The control unit 25 includes an internal memory for storing a program that defines various processing procedures and the necessary data, and executes various processes using these programs. For example, the control unit 25 is an electronic circuit such as a CPU or MPU (Micro Processing Unit). As illustrated in FIG. 3, the control unit 25 includes a data update unit 251, an update data transmission unit 252, and a provisional master control unit 253.

データ更新部251は、上位OpSやユーザ等から更新用のデータが入力された際、マスタDB21のデータを更新する。具体的に、データ更新部251は、通信制御部24あるいは入力部22を介してサービス情報を更新するためのデータが入力された際、対応するレコードのデータを入力されたデータに更新する。なお、データ更新部251は、平常時にサービス提供装置10A〜10Dからデータの参照要求を受信した際、マスタDB21のデータを該サービス提供装置10A〜10Dに参照させる。データ更新部251は、平常時にサービス提供装置10A〜10Dから更新要求を受信した際、マスタDB21のデータを更新する。また、データ更新部251は、ネットワーク障害時には、サービス提供装置10A,10Bによるデータの参照要求に応答する。   The data update unit 251 updates the data in the master DB 21 when update data is input from a higher level OpS or a user. Specifically, when data for updating service information is input via the communication control unit 24 or the input unit 22, the data update unit 251 updates the data of the corresponding record to the input data. When the data update unit 251 receives a data reference request from the service providing apparatuses 10A to 10D during normal times, the data updating unit 251 causes the service providing apparatuses 10A to 10D to refer to the data in the master DB 21. The data update unit 251 updates the data in the master DB 21 when receiving an update request from the service providing apparatuses 10A to 10D during normal times. The data update unit 251 responds to a data reference request by the service providing apparatuses 10A and 10B when a network failure occurs.

更新データ送信部252は、マスタDB21のデータが更新された後、スレーブDBサーバ30にデータが更新されたレコードを送信する。具体的に、更新データ送信部252は、データ更新部251がサービス情報を更新した場合に、直ちに、或いは所定のタイミングで、スレーブDBサーバ30に、更新されたデータと対応するレコードIDとを含むレコードを含め、マスタDB21とスレーブDB31との同期を指示するレプリケーションを送信する。   The update data transmission unit 252 transmits the record with the updated data to the slave DB server 30 after the data in the master DB 21 is updated. Specifically, the update data transmission unit 252 includes the record ID corresponding to the updated data in the slave DB server 30 immediately or at a predetermined timing when the data update unit 251 updates the service information. Replication including the record is instructed to synchronize the master DB 21 and the slave DB 31.

暫定マスタ制御部253は、スレーブDBサーバ30との間でネットワーク障害が生じた場合、自装置をマスタに暫定的に移行してスレーブDBサーバ30とは非同期でマスタDB21のデータを更新する。暫定マスタ制御部253は、マスタ移行部254、暫定データ更新部255、信頼度通知部256及び整合部257を有する。マスタ移行部254は、スレーブDBサーバ30との間でネットワーク障害が生じた場合、マスタに暫定的に移行する。   When a network failure occurs with the slave DB server 30, the temporary master control unit 253 tentatively shifts its own device to the master and updates data in the master DB 21 asynchronously with the slave DB server 30. The provisional master control unit 253 includes a master transfer unit 254, a provisional data update unit 255, a reliability notification unit 256, and a matching unit 257. When a network failure occurs with the slave DB server 30, the master migration unit 254 provisionally migrates to the master.

暫定データ更新部255は、暫定マスタ制御部253によって暫定的にマスタに移行された場合には、外部の装置からデータ更新の指示を受け付けた際に、対向装置とは非同期でマスタDB21のデータを更新する。すなわち、暫定データ更新部255は、スレーブDBサーバ30との間でネットワーク障害が生じた場合には、マスタDBサーバ20に収容されているサービス提供装置10A,10Bによるデータ更新要求に応じて、マスタDB21のデータの更新を行う。   When the provisional master control unit 253 tentatively transitions to the master, the provisional data update unit 255 receives the data update instruction from an external device and receives the data in the master DB 21 asynchronously with the opposite device. Update. That is, when a network failure occurs between the temporary data update unit 255 and the slave DB server 30, the temporary data update unit 255 responds to a data update request from the service providing apparatuses 10A and 10B accommodated in the master DB server 20 according to the data update request. Update the data in the DB 21.

この場合、暫定データ更新部255は、ネットワーク障害継続期間に、マスタDB21の各データに対しデータを更新した場合、該データにデータ更新についての履歴情報を対応付けてマスタDB21に記憶させる。この履歴情報として、暫定データ更新部255は、データの更新時間を示すタイムスタンプと、データの更新回数とを、マスタDB21に記憶させる。例えば、前述のテーブルT1(図4参照)において、レコードID「2」の転送番号が変更された場合には、このレコードID「2」に対する転送番号の更新時間をタイムスタンプ欄に記録し、データ更新回数をデータ更新回数欄に記録する。   In this case, when the data is updated for each piece of data in the master DB 21 during the network failure continuation period, the provisional data update unit 255 associates the data with history information about the data update and stores the data in the master DB 21. As this history information, the provisional data update unit 255 stores a time stamp indicating the data update time and the number of data updates in the master DB 21. For example, in the above-described table T1 (see FIG. 4), when the transfer number of the record ID “2” is changed, the update time of the transfer number for the record ID “2” is recorded in the time stamp column, and the data Record the update count in the data update count column.

信頼度通知部256は、サービス提供装置10A,10Bからデータ参照を要求された場合には、履歴情報を基に、データ参照を要求されたデータの信頼度を判断し、データ参照を要求されたデータとともに、判断した信頼度を応答する。   The reliability notification unit 256, when requested to refer to data from the service providing apparatuses 10A and 10B, determines the reliability of the data requested to be referred to based on the history information, and is requested to refer to the data. Along with the data, the determined reliability is returned.

具体的には、信頼度通知部256は、データ参照を要求されたレコードIDのデータの更新回数が所定の閾値以上である場合に、データ参照を要求されたデータの信頼度が低いと判断する。これは、対向するスレーブDBサーバ30でも、このレコードIDのデータが更新されている可能性があり、マスタDB21のデータと、スレーブDB31のデータとが一致しない場合があると考えられるためである。閾値は、通信制御部24を介した上位OpS等の制御や、入力部22から入力された指示情報に応じて、レコードごとに設定される。閾値は、予め設定されていてもよいし、これまでのデータ更新回数の統計を基に定期的に変更されてもよい。   Specifically, the reliability notification unit 256 determines that the reliability of the data requested for data reference is low when the number of updates of the data of the record ID requested for data reference is equal to or greater than a predetermined threshold. . This is because the data of this record ID may be updated even in the opposite slave DB server 30, and the data of the master DB 21 may not match the data of the slave DB 31. The threshold is set for each record in accordance with the control of the upper OpS and the like via the communication control unit 24 and the instruction information input from the input unit 22. The threshold value may be set in advance or may be periodically changed based on the statistics of the number of data updates so far.

一方、信頼度通知部256は、データ参照を要求されたレコードIDのデータの更新回数が所定の閾値未満である場合に、データ参照を要求されたデータの信頼度が高いと判断する。これは、対向するスレーブDBサーバ30でも、このレコードIDのデータが更新されている可能性が低く、マスタDB21のデータと、スレーブDB31のデータとが一致する可能性が高いと考えられるためである。   On the other hand, the reliability notification unit 256 determines that the reliability of the data requested for data reference is high when the number of updates of the data of the record ID requested for data reference is less than a predetermined threshold. This is because the data of the record ID is unlikely to be updated even in the opposing slave DB server 30, and the data of the master DB 21 and the data of the slave DB 31 are considered to be highly likely to match. .

整合部257は、ネットワーク障害が回復した場合、スレーブDBサーバ30が保持するデータとマスタDB21が保持するデータとについて、レコード単位でデータの一致度を確認する。整合部257は、一致度を確認したデータ間に差分がある場合には、履歴情報を基に正しいデータを判断し、差分レプリケーションにより、スレーブDBサーバ30との間でこのデータの整合を行う。例えば、整合部257は、スレーブDBサーバ30が保持するデータとマスタDB21が有するデータとのうち、判断対象のレコードについてタイムスタンプが新しいデータが正しいデータであると判断する。   When the network failure is recovered, the matching unit 257 checks the data matching degree in units of records for the data held by the slave DB server 30 and the data held by the master DB 21. If there is a difference between the data whose degree of coincidence is confirmed, the matching unit 257 determines correct data based on the history information, and performs matching of the data with the slave DB server 30 by differential replication. For example, the matching unit 257 determines that, among the data held by the slave DB server 30 and the data held by the master DB 21, the data with the new time stamp for the determination target record is correct data.

具体的に、図5を参照して、整合部257の整合処理について説明する。図5は、図3に示す整合部257の整合処理を説明する図である。図5では、ネットワーク障害回復時において、マスタDB21が有するデータをテーブルT1´とし、スレーブDB31が保持するデータをテーブルT2´とする。そして、整合部257が、例えば、レコードID「2」について整合処理を行う場合について説明する。   Specifically, the matching process of the matching unit 257 will be described with reference to FIG. FIG. 5 is a diagram for explaining the matching process of the matching unit 257 shown in FIG. In FIG. 5, at the time of network failure recovery, the data held by the master DB 21 is referred to as a table T1 ′, and the data held by the slave DB 31 is referred to as a table T2 ′. A case where the matching unit 257 performs matching processing for the record ID “2” will be described.

図5に示すように、整合部257は、テーブルT1´のレコードID「2」のデータと、テーブルT2´のレコードID「2」のデータとを比較する(図5の(1)参照)。この場合、テーブルT1´のセルC11のデータは、転送番号「090-9999-0000」である。これに対し、テーブルT2´のセルC21のデータは、転送番号「090-7777-8888」である。したがって、テーブルT1´とテーブルT2´との間で、レコードID「2」のデータが異なる(図5の(2)参照)。   As shown in FIG. 5, the matching unit 257 compares the data with the record ID “2” in the table T1 ′ and the data with the record ID “2” in the table T2 ′ (see (1) in FIG. 5). In this case, the data in the cell C11 of the table T1 ′ is the transfer number “090-9999-0000”. On the other hand, the data in the cell C21 of the table T2 ′ is the transfer number “090-7777-8888”. Therefore, the data of the record ID “2” is different between the table T1 ′ and the table T2 ′ (see (2) in FIG. 5).

そこで、整合部257は、履歴情報を基に、レコードID「2」については、テーブルT1´及びテーブルT2´のいずれが正しいデータであるかを判断する。まず、整合部257は、レコードID「2」についての、テーブルT1´とテーブルT2´の各タイムスタンプを比較する(図5の(3)参照)。   Therefore, the matching unit 257 determines which of the table T1 ′ and the table T2 ′ is correct data for the record ID “2” based on the history information. First, the matching unit 257 compares the time stamps of the table T1 ′ and the table T2 ′ for the record ID “2” (see (3) in FIG. 5).

そして、整合部257は、レコードID「2」について、タイムスタンプが新しいデータが正しいデータであると判断する。図5の例では、レコードID「2」におけるテーブルT2´のタイムスタンプは、「03/17 12:34:56」(セルC22参照)である。一方、レコードID「2」におけるテーブルT1´のタイムスタンプは、「03/17 12:35:10」(セルC12参照)であり、テーブルT1´の方が新しいデータであることが分かる。このため、整合部257は、図5の例では、レコードID「2」については、タイムスタンプが新しいテーブルT1´を正しいデータとして判断する(図5の(4)参照)。このように、整合部257は、レコード単位で履歴情報を基に正しいデータを判断した後、差分レプリケーションにより、スレーブDBサーバ30との間でデータの整合を行う。   Then, the matching unit 257 determines that the data with the new time stamp is correct for the record ID “2”. In the example of FIG. 5, the time stamp of the table T2 ′ in the record ID “2” is “03/17 12:34:56” (see the cell C22). On the other hand, the time stamp of the table T1 ′ in the record ID “2” is “03/17 12:35:10” (see the cell C12), and it can be seen that the table T1 ′ is newer data. For this reason, in the example of FIG. 5, the matching unit 257 determines that the table T1 ′ having a new time stamp is correct data for the record ID “2” (see (4) of FIG. 5). As described above, the matching unit 257 performs data matching with the slave DB server 30 by differential replication after determining correct data based on the history information for each record.

[スレーブDBサーバの構成]
次に、スレーブDBサーバ30の構成について説明する。図6は、スレーブDBサーバ30の構成を例示する模式図である。スレーブDBサーバ30は、ワークステーションやパソコン等の汎用コンピュータで実現され、図6に示すように、スレーブDB31と、入力部32と、出力部33と、通信制御部34と、制御部35とを備える。なお、スレーブDBサーバ30とマスタDBサーバ20とは、例えば同様のサーバ装置であり、スレーブDBサーバ30とマスタDBサーバ20との間で、マスタ、スレーブの機能の切り替えも可能である。
[Configuration of slave DB server]
Next, the configuration of the slave DB server 30 will be described. FIG. 6 is a schematic view illustrating the configuration of the slave DB server 30. The slave DB server 30 is realized by a general-purpose computer such as a workstation or a personal computer. As shown in FIG. 6, the slave DB server 30 includes a slave DB 31, an input unit 32, an output unit 33, a communication control unit 34, and a control unit 35. Prepare. The slave DB server 30 and the master DB server 20 are, for example, similar server devices, and the master and slave functions can be switched between the slave DB server 30 and the master DB server 20.

スレーブDB31は、マスタDB21に記憶されるサービス情報を複製した冗長化情報を記憶する。入力部32は、キーボードやマウス等の入力デバイスを用いて実現され、操作者による入力操作に対応して、制御部35に対して処理開始などの各種指示情報を入力する。出力部33は、液晶ディスプレイなどの表示装置、プリンタ等の印刷装置、情報通信装置等によって実現される。   The slave DB 31 stores redundancy information obtained by duplicating the service information stored in the master DB 21. The input unit 32 is realized by using an input device such as a keyboard or a mouse, and inputs various instruction information such as processing start to the control unit 35 in response to an input operation by the operator. The output unit 33 is realized by a display device such as a liquid crystal display, a printing device such as a printer, an information communication device, or the like.

通信制御部34は、NIC等で実現され、LANやインターネットなどの電気通信回線を介したマスタDBサーバ20やサービス提供装置10等の外部の装置と制御部35との通信を制御する。   The communication control unit 34 is realized by a NIC or the like, and controls communication between an external device such as the master DB server 20 and the service providing device 10 and the control unit 35 via an electric communication line such as a LAN or the Internet.

制御部35は、各種の処理手順などを規定したプログラム及び所要データを格納するための内部メモリを有し、これらによって種々の処理を実行する。例えば、制御部35は、CPUやMPUなどの電子回路である。制御部35は、図6に例示するように、参照データ管理部351、データ更新部352及び暫定マスタ制御部253を有する。   The control unit 35 has an internal memory for storing a program that defines various processing procedures and necessary data, and executes various processes using these programs. For example, the control unit 35 is an electronic circuit such as a CPU or MPU. As illustrated in FIG. 6, the control unit 35 includes a reference data management unit 351, a data update unit 352, and a provisional master control unit 253.

参照データ管理部351は、サービス提供装置10C,10Dからデータの参照要求を受信した際、マスタDB21のデータを該サービス提供装置10C,10Dに参照させる。また、参照データ管理部351は、マスタ不在時には、サービス提供装置10C,10Dからデータの参照要求を受信した際、スレーブDB31の冗長化情報を該サービス提供装置10C,10Dに参照させる。   When receiving a data reference request from the service providing apparatuses 10C and 10D, the reference data management unit 351 causes the service providing apparatuses 10C and 10D to refer to the data in the master DB 21. In addition, when the master is absent, the reference data management unit 351 causes the service providing apparatuses 10C and 10D to refer to the redundancy information of the slave DB 31 when receiving a data reference request from the service providing apparatuses 10C and 10D.

データ更新部352は、マスタDBサーバ20から、同期の指示を受け付けた際、スレーブDB31のデータを更新する。すなわち、データ更新部352は、マスタDBサーバ20から、データが更新されたレコードを受信した際、スレーブDB31の対応するレコードのデータを、受信したデータに更新する。   The data updating unit 352 updates the data in the slave DB 31 when receiving a synchronization instruction from the master DB server 20. That is, when the data update unit 352 receives a record with updated data from the master DB server 20, the data update unit 352 updates the data of the corresponding record in the slave DB 31 to the received data.

暫定マスタ制御部253は、マスタDBサーバ20における暫定マスタ制御部253と同様に、対向するマスタDBサーバ20との間でネットワーク障害が生じた場合、マスタに暫定的に移行してマスタDBサーバ20とは非同期でスレーブDB31のデータを更新する。暫定マスタ制御部253は、図3に示す暫定マスタ制御部253と同様に、マスタ移行部254、暫定データ更新部255、信頼度通知部256及び整合部257とを有し、サービス提供装置10C,10D、及び、スレーブDB31に応じて処理を実行する。   In the same way as the temporary master control unit 253 in the master DB server 20, the temporary master control unit 253 tentatively transitions to the master when a network failure occurs with the opposing master DB server 20, and the master DB server 20. The data of the slave DB 31 is updated asynchronously. The provisional master control unit 253 includes a master transfer unit 254, a provisional data update unit 255, a reliability notification unit 256, and a matching unit 257, similar to the provisional master control unit 253 illustrated in FIG. Processing is executed according to 10D and the slave DB 31.

[平常時の処理]
ここで、平常時の通信システム1の処理について説明する。図7は、平常時の通信システム1の処理の流れの一例を示す図である。
[Normal processing]
Here, the processing of the communication system 1 during normal times will be described. FIG. 7 is a diagram illustrating an example of a processing flow of the communication system 1 in a normal state.

例えば、エリアBのサービス提供装置10Cがユーザ5Eによるデータ更新要求を受け(図7の(1−1)参照)、マスタDBサーバ20にデータ更新要求を送信すると(図7の(2−1)参照)、マスタDBサーバ20は、データを更新する(図7の(3−1)参照)。続いて、マスタDBサーバ20は、更新されたデータをスレーブDBサーバ30に通知して、マスタDB21とスレーブDB31とを同期させるレプリケーションを行う(図7の(4−1)参照)。なお、エリアAのサービス提供装置10A,10B及びエリアBのサービス提供装置10Dによるデータ更新要求処理についても、同様に実行される。   For example, when the service providing apparatus 10C in area B receives a data update request from the user 5E (see (1-1) in FIG. 7) and transmits the data update request to the master DB server 20 ((2-1) in FIG. 7). The master DB server 20 updates the data (see (3-1) in FIG. 7). Subsequently, the master DB server 20 notifies the updated data to the slave DB server 30, and performs replication to synchronize the master DB 21 and the slave DB 31 (see (4-1) in FIG. 7). The data update request processing by the area A service providing apparatuses 10A and 10B and the area B service providing apparatus 10D is executed in the same manner.

サービス提供装置10Cが、ユーザ5Fによるデータ参照要求を受けた場合(図7の(1−2)参照)、マスタDBサーバ20にデータ参照要求を送信し(図7の(2−2)参照)、マスタDBサーバ20によるデータ参照応答をユーザ5Fに送信する。或いは、サービス提供装置10Cは、マスタ不在時には、スレーブDBサーバ30に、データ参照要求を送信し(図7の(2−3)参照)、スレーブDBサーバ30によるデータ参照応答をユーザ5Fに送信する。   When the service providing apparatus 10C receives a data reference request from the user 5F (see (1-2) in FIG. 7), the data providing request is transmitted to the master DB server 20 (see (2-2) in FIG. 7). Then, a data reference response by the master DB server 20 is transmitted to the user 5F. Alternatively, the service providing apparatus 10C transmits a data reference request to the slave DB server 30 when the master is absent (see (2-3) in FIG. 7), and transmits a data reference response by the slave DB server 30 to the user 5F. .

[ネットワーク障害時の処理]
次に、ネットワーク障害時の通信システム1の処理について説明する。図8は、通信システム1のネットワーク障害時の処理の流れの一例を示す図である。
[Processing when a network failure occurs]
Next, processing of the communication system 1 at the time of network failure will be described. FIG. 8 is a diagram illustrating an example of a processing flow when the communication system 1 has a network failure.

ネットワーク障害が発生し(図8の(A)参照)、エリアAとエリアBとの間で通信が不能となると、マスタDBサーバ20及びスレーブDBサ−バ30は、それぞれ暫定マスタに移行する。すなわち、マスタDBサーバ20は、マスタから暫定マスタに移行し(図8の(1−1)参照)、スレーブDBサ−バ30は、スレーブから暫定マスタに移行する(図8の(1−2)参照)。そして、マスタDBサーバ20及びスレーブDBサ−バ30は、それぞれ閉じたエリアA,BでのDBのデータ更新処理を継続する。   When a network failure occurs (see FIG. 8A) and communication between area A and area B becomes impossible, the master DB server 20 and the slave DB server 30 each move to a temporary master. That is, the master DB server 20 shifts from the master to the temporary master (see (1-1) in FIG. 8), and the slave DB server 30 shifts from the slave to the temporary master ((1-2 in FIG. 8). )reference). Then, the master DB server 20 and the slave DB server 30 continue the DB data update process in the closed areas A and B, respectively.

具体的には、エリアAにおいては、例えば、サービス提供装置10Aがユーザ5Bによるデータ更新要求を受けると(図8の(2−1)参照)、マスタDBサーバ20にデータ更新要求を送信する(図8の(3−1)参照)。これに応じて、マスタDBサーバ20は、データを更新する(図8の(4−1)参照)。これに対し、エリアBにおいては、例えば、サービス提供装置10Cがユーザ5Eによるデータ更新要求を受けると(図8の(2−2)参照)、スレーブDBサーバ30にデータ更新要求を送信する(図8の(3−2)参照)。これに応じて、スレーブDBサーバ30は、データを更新する(図8の(4−2)参照)。   Specifically, in the area A, for example, when the service providing apparatus 10A receives a data update request from the user 5B (see (2-1) in FIG. 8), the data update request is transmitted to the master DB server 20 ( (See (3-1) in FIG. 8). In response to this, the master DB server 20 updates the data (see (4-1) in FIG. 8). On the other hand, in area B, for example, when the service providing apparatus 10C receives a data update request from the user 5E (see (2-2) in FIG. 8), the data update request is transmitted to the slave DB server 30 (see FIG. 8). 8 (see 3-2)). In response to this, the slave DB server 30 updates the data (see (4-2) in FIG. 8).

そこで、図9を参照して、通信システム1のネットワーク障害時のデータ更新処理について説明する。図9は、ネットワーク障害時の通信システム1のデータ更新処理の流れの一例を示す図である。図9には、マスタDB21のテーブルT1´及びスレーブDB31のテーブルT2´も示している。まず、ネットワーク障害が発生し(図9の(A)参照)、エリアAとエリアBとの間で通信が不能となると、マスタDBサーバ20及びスレーブDBサ−バ30は、それぞれ暫定マスタに移行する(図9の(1−1)及び(1−2)参照)。   Therefore, with reference to FIG. 9, a data update process at the time of a network failure of the communication system 1 will be described. FIG. 9 is a diagram illustrating an example of the flow of data update processing of the communication system 1 when a network failure occurs. FIG. 9 also shows a table T1 ′ of the master DB 21 and a table T2 ′ of the slave DB 31. First, when a network failure occurs (see FIG. 9A) and communication between the area A and the area B becomes impossible, the master DB server 20 and the slave DB server 30 move to temporary masters, respectively. (Refer to (1-1) and (1-2) in FIG. 9).

例えば、エリアBでは、ユーザ5Eが、レコードID「2」の転送番号を「090-3333-4444」から「090-7777-8888」へ更新するデータ更新要求をサービス提供装置10Cに送信する(図9の(2)参照)。これに応じて、サービス提供装置10Cがデータ更新要求をスレーブDBサーバ30に送信する(図9の(3)参照)。この場合、スレーブDBサーバ30は、暫定マスタとして機能するため、スレーブDB31のデータを、データ更新要求に応じて更新する(図9の(4)参照)。   For example, in area B, the user 5E transmits a data update request for updating the transfer number of the record ID “2” from “090-3333-4444” to “090-7777-8888” to the service providing apparatus 10C (FIG. 9 (2)). In response to this, the service providing apparatus 10C transmits a data update request to the slave DB server 30 (see (3) in FIG. 9). In this case, since the slave DB server 30 functions as a provisional master, the slave DB 31 updates the data in the slave DB 31 in response to the data update request (see (4) in FIG. 9).

この結果、スレーブDBサーバ30は、レコードID「2」転送番号を「090-7777-8888」に変更する(図9のセルC21参照)。そして、スレーブDBサーバ30は、レコードID「2」のタイムスタンプ欄に、データ更新時間「03/17 12:34:56」を記載する(図9のセルC22参照)。続いて、スレーブDBサーバ30は、レコードID「2」のデータ更新回数欄のデータ更新回数「14105」を「14106」に更新する(図9のセルC23参照)。これによって、スレーブDB31のデータは、テーブルT2´に更新される。   As a result, the slave DB server 30 changes the record ID “2” transfer number to “090-7777-8888” (see cell C21 in FIG. 9). Then, the slave DB server 30 writes the data update time “03/17 12:34:56” in the time stamp column of the record ID “2” (see cell C22 in FIG. 9). Subsequently, the slave DB server 30 updates the data update count “14105” in the data update count column of the record ID “2” to “14106” (see cell C23 in FIG. 9). As a result, the data in the slave DB 31 is updated to the table T2 ′.

そして、エリアAでは、ユーザ5Bが、レコードID「2」の転送番号を「090-3333-4444」から「090-9999-0000」へ更新するデータ更新要求をサービス提供装置10Aに送信する(図9の(5)参照)。これに応じて、サービス提供装置10Aがデータ更新要求をマスタDBサーバ20に送信する(図9の(6)参照)。この場合、マスタDBサーバ20は、暫定マスタとして機能するため、マスタDB21のデータを、データ更新要求に応じて更新する(図9の(7)参照)。   In area A, the user 5B transmits a data update request for updating the transfer number of the record ID “2” from “090-3333-4444” to “090-9999-0000” to the service providing apparatus 10A (FIG. 9 (5)). In response to this, the service providing apparatus 10A transmits a data update request to the master DB server 20 (see (6) in FIG. 9). In this case, since the master DB server 20 functions as a provisional master, the data of the master DB 21 is updated in response to the data update request (see (7) in FIG. 9).

この結果、マスタDBサーバ20は、レコードID「2」転送番号を「090-9999-0000」に変更する(図9のセルC11参照)。そして、マスタDBサーバ20は、レコードID「2」のタイムスタンプ欄に、データ更新時間「03/17 12:35:10」を記載する(図9のセルC12参照)。続いて、マスタDBサーバ20は、レコードID「2」のデータ更新回数欄のデータ更新回数「14105」を「14106」に更新する(図9のセルC13参照)。これによって、マスタDB21のデータは、テーブルT1´に更新される。   As a result, the master DB server 20 changes the record ID “2” transfer number to “090-9999-0000” (see cell C11 in FIG. 9). Then, the master DB server 20 writes the data update time “03/17 12:35:10” in the time stamp column of the record ID “2” (see cell C12 in FIG. 9). Subsequently, the master DB server 20 updates the data update count “14105” in the data update count column of the record ID “2” to “14106” (see cell C13 in FIG. 9). As a result, the data in the master DB 21 is updated to the table T1 ′.

続いて、図10を参照して、ネットワーク障害時のデータ参照処理について説明する。図10は、通信システム1のネットワーク障害時のデータ参照処理の流れの一例を示す図である。なお、図10では、エリアBにおけるデータ参照処理を例について説明するが、エリアAにおいても、同様の処理を行うことによって、データ参照処理を実行する。   Next, a data reference process at the time of network failure will be described with reference to FIG. FIG. 10 is a diagram illustrating an example of the flow of data reference processing when a network failure occurs in the communication system 1. In FIG. 10, an example of the data reference process in the area B will be described, but the data reference process is executed in the area A by performing the same process.

図10に示すように、例えば、エリアBにおいて、ユーザ5Fが、レコードID「2」のデータ参照要求をサービス提供装置10Cに送信する(図10の(8)参照)。これに応じて、サービス提供装置10Cが、レコードID「2」のデータ参照要求をスレーブDBサーバ30に送信する(図10の(9)参照)。   As shown in FIG. 10, for example, in area B, the user 5F transmits a data reference request with the record ID “2” to the service providing apparatus 10C (see (8) in FIG. 10). In response to this, the service providing apparatus 10C transmits a data reference request with the record ID “2” to the slave DB server 30 (see (9) in FIG. 10).

スレーブDBサーバ30は、このデータ参照要求を受け、スレーブDB31のテーブルT2´から、レコードID「2」のデータを参照する。さらに、スレーブDBサーバ30は、レコードID「2」についてのデータの更新回数と閾値(例えば、10)を基に、レコードID「2」のデータの信頼度を判断する。   The slave DB server 30 receives this data reference request, and refers to the data of the record ID “2” from the table T2 ′ of the slave DB 31. Furthermore, the slave DB server 30 determines the reliability of the data with the record ID “2” based on the number of times the data is updated with respect to the record ID “2” and a threshold (for example, 10).

テーブルT2´では、レコードID「2」のデータ更新回数は「14106」であり(テーブルT2´のセルC23参照)、閾値「10」以上となるため、データの信頼度が低いことが判断できる。このため、スレーブDBサーバ30は、サービス提供装置10Cに、レコードID「2」の電話番号「050-3333-4444」及び転送番号「090-7777-8888」を応答するとともに、このレコードID「2」のデータ信頼の信頼度が「低い」ことを通知する(図10の(10)参照)。   In the table T2 ′, the data update count of the record ID “2” is “14106” (see the cell C23 of the table T2 ′), which is equal to or greater than the threshold value “10”, so it can be determined that the data reliability is low. Therefore, the slave DB server 30 responds to the service providing apparatus 10C with the telephone number “050-3333-4444” and the transfer number “090-7777-8888” of the record ID “2” and the record ID “2”. Is notified that the reliability of data reliability is “low” (see (10) in FIG. 10).

これに従い、サービス提供装置10Cは、スレーブDBサーバ30によるデータ参照応答と、データ信頼度についての通知をユーザ5Fに送信する(図10の(11)参照)。この結果、ユーザ5Fは、応答データの内容とともに、この応答データの信頼度を認知することができる(図10の(12)参照)。言い換えると、ネットワーク障害期間中に参照したデータの信頼度をユーザ側で判別できる。   Accordingly, the service providing apparatus 10C transmits a data reference response by the slave DB server 30 and a notification about the data reliability to the user 5F (see (11) in FIG. 10). As a result, the user 5F can recognize the reliability of the response data along with the content of the response data (see (12) in FIG. 10). In other words, the user can determine the reliability of the data referred to during the network failure period.

続いて、図11を参照して、ネットワーク復旧後のマスタDB21及びスレーブDB31のデータに対する整合処理について説明する。図11は、通信システム1のネットワーク復旧後のデータに対する整合処理の流れの一例を示す図である。   Next, with reference to FIG. 11, the matching process for the data of the master DB 21 and the slave DB 31 after the network recovery will be described. FIG. 11 is a diagram illustrating an example of a flow of matching processing for data after the network recovery of the communication system 1.

まず、マスタDBサーバ20及びスレーブDBサーバ30の間でネットワークが復旧すると(図11の(13)参照)、それぞれが、データの差分をチェックする(図11の(14)参照)。この場合、マスタDBサーバ20及びスレーブDBサーバ30は、マスタDB21が保持するデータとスレーブDB31が保持するデータとについて、レコード単位で、データの一致度を確認する。   First, when the network is restored between the master DB server 20 and the slave DB server 30 (see (13) in FIG. 11), each checks a data difference (see (14) in FIG. 11). In this case, the master DB server 20 and the slave DB server 30 check the data matching degree in units of records for the data held by the master DB 21 and the data held by the slave DB 31.

具体的には、マスタDB21のテーブルT1´とスレーブDB31のテーブルT2´とを、レコードごとに比較する。例えば、レコードID「2」については、テーブルT1´の転送番号が「090-9999-0000」(セルC11参照)であるのに対し、テーブルT2´の転送番号は「090-7777-8888」と異なる(セルC21参照)。また、テーブルT1´とテーブルT2´とにおいて、データ更新回数が同一である。そこで、テーブルT1´とテーブルT2´とのタイムスタンプを比較する。   Specifically, the table T1 ′ of the master DB 21 and the table T2 ′ of the slave DB 31 are compared for each record. For example, for record ID “2”, the transfer number in table T1 ′ is “090-9999-0000” (see cell C11), whereas the transfer number in table T2 ′ is “090-7777-8888”. Different (see cell C21). Further, the table T1 ′ and the table T2 ′ have the same data update count. Therefore, the time stamps of the table T1 ′ and the table T2 ′ are compared.

図11の例では、テーブルT2´のタイムスタンプが「03/17 12:34:56」(セルC22参照)であるのに対し、テーブルT1´のタイムスタンプは「03/17 12:35:10」(セルC12参照)であり、テーブルT1´の方が新しい。このため、マスタDBサーバ20及びスレーブDBサーバ30は、レコードID「2」については、テーブルT1´を正しいデータとして判断する(図11の(14)参照)。そして、マスタDBサーバ20及びスレーブDBサーバ30は、双方で差分レプリケーションを行うことにより、スレーブDBサーバ30との間でデータの整合を行う(図11の(15)参照)。その後、マスタDBサーバ20は、暫定マスタからマスタに戻り、スレーブDBサーバ30は、暫定マスタからスレーブに戻る。   In the example of FIG. 11, the time stamp of the table T2 ′ is “03/17 12:34:56” (see cell C22), whereas the time stamp of the table T1 ′ is “03/17 12:35:10”. (See cell C12) and the table T1 'is newer. Therefore, the master DB server 20 and the slave DB server 30 determine that the table T1 ′ is correct data for the record ID “2” (see (14) in FIG. 11). Then, the master DB server 20 and the slave DB server 30 perform data replication with the slave DB server 30 by performing differential replication on both sides (see (15) in FIG. 11). Thereafter, the master DB server 20 returns from the temporary master to the master, and the slave DB server 30 returns from the temporary master to the slave.

[通信システムの処理手順]
次に、図12を参照して、通信システム1の処理手順について説明する。図12は、通信システム1の処理手順を示すシーケンス図である。
[Processing procedure of communication system]
Next, a processing procedure of the communication system 1 will be described with reference to FIG. FIG. 12 is a sequence diagram illustrating a processing procedure of the communication system 1.

図12に示すように、マスタDBサーバ20及びスレーブDBサーバ30は、ネットワークに障害が発生したことを検知すると(ステップS1-1及びステップS1−2)、それぞれ暫定マスタに移行する(ステップS2-1及びステップS2−2)。以降、マスタDBサーバ20及びスレーブDBサーバ30は、それぞれ閉じたエリアA,BでのDBのデータ更新処理を継続する。   As shown in FIG. 12, when the master DB server 20 and the slave DB server 30 detect that a failure has occurred in the network (steps S1-1 and S1-2), the master DB server 20 and the slave DB server 30 respectively transition to the temporary master (step S2−). 1 and step S2-2). Thereafter, the master DB server 20 and the slave DB server 30 continue the DB data update process in the closed areas A and B, respectively.

例えば、エリアAのサービス提供装置10Aが、ユーザ5Bによるデータ更新要求を受け(ステップS3−1)、マスタDBサーバ20にデータ更新要求を送信する(ステップS4−1)。マスタDBサーバ20は、データ更新要求があるか否かを判断する(ステップS5−1)。マスタDBサーバ20は、データ更新要求があると判断した場合(ステップS5−1:Yes)、マスタDB21のデータを更新する(ステップS6−1)。   For example, the service providing apparatus 10A in area A receives a data update request from the user 5B (step S3-1), and transmits the data update request to the master DB server 20 (step S4-1). The master DB server 20 determines whether or not there is a data update request (step S5-1). When it is determined that there is a data update request (step S5-1: Yes), the master DB server 20 updates the data in the master DB 21 (step S6-1).

また、例えば、サービス提供装置10Aが、ユーザ5Aによるデータ参照要求を受け(ステップS7−1)、マスタDBサーバ20にデータ参照要求を送信する(ステップS8−1)。マスタDBサーバ20は、データ参照要求があるか否かを判断する(ステップS9−1)。マスタDBサーバ20は、データ参照要求があると判断した場合(ステップS9−1:Yes)、参照を要求されたデータの更新回数が、閾値未満であるか、または、参照を要求されたデータの更新回数が所定の閾値以上であるか、を判断する(ステップS10−1)。   Further, for example, the service providing apparatus 10A receives a data reference request from the user 5A (step S7-1), and transmits the data reference request to the master DB server 20 (step S8-1). The master DB server 20 determines whether there is a data reference request (step S9-1). If the master DB server 20 determines that there is a data reference request (step S9-1: Yes), the update count of the data requested to be referenced is less than the threshold value or the data requested to be referenced. It is determined whether the number of updates is equal to or greater than a predetermined threshold (step S10-1).

マスタDBサーバ20は、参照を要求されたデータの更新回数が所定の閾値未満であると判断した場合(ステップS10−1:閾値未満)、このデータの信頼度が高いと判断する(ステップS11−1)。一方、マスタDBサーバ20は、参照を要求されたデータの更新回数が所定の閾値以上であると判断した場合(ステップS10−1:閾値以上)、このデータの信頼度が低いと判断する(ステップS12−1)。   When the master DB server 20 determines that the number of updates of data requested to be referenced is less than a predetermined threshold (step S10-1: less than the threshold), the master DB server 20 determines that the reliability of this data is high (step S11-). 1). On the other hand, when the master DB server 20 determines that the update count of the data requested to be referenced is equal to or greater than a predetermined threshold (step S10-1: equal to or greater than the threshold), the master DB server 20 determines that the reliability of the data is low (step S10-1). S12-1).

そして、マスタDBサーバ20は、サービス提供装置10Aに、要求されたデータを応答するとともに、該データの信頼度も通知する(ステップS13−1)。これに応じて、サービス提供装置10Aは、マスタDBサーバ20によるデータ参照応答と、データ信頼度についての通知をユーザ5Aに送信する(ステップS14−1)。   Then, the master DB server 20 responds to the service providing apparatus 10A with the requested data and notifies the reliability of the data (step S13-1). In response to this, the service providing apparatus 10A transmits a data reference response by the master DB server 20 and a notification about the data reliability to the user 5A (step S14-1).

続いて、マスタDBサーバ20は、データ更新要求がないと判断した場合(ステップS5−1:No)、データ参照要求がないと判断した場合(ステップS9−1:No)、或いは、データ参照応答処理後、ネットワークが復旧したか否かを判断する(ステップS15−1)。マスタDBサーバ20は、ネットワークが復旧していないと判断した場合(ステップS15−1:No)、ステップS5−1に戻る。   Subsequently, the master DB server 20 determines that there is no data update request (step S5-1: No), determines that there is no data reference request (step S9-1: No), or data reference response. After the processing, it is determined whether or not the network has been restored (step S15-1). When the master DB server 20 determines that the network has not been restored (step S15-1: No), the master DB server 20 returns to step S5-1.

一方、エリアBにおいても、スレーブDBサーバ30は、暫定マスタに移行するため、マスタDBサーバ20と同様の処理を行う。すなわち、エリアBのサービス提供装置10Cがユーザ5Eによるデータ更新要求を受け(ステップS3−2)、スレーブDBサーバ30にデータ更新要求を送信した場合(ステップS4−2)、スレーブDBサーバ30は、データ更新要求があると判断し(ステップS5−2:Yes)、スレーブDB31のデータを更新する(ステップS6−2)。   On the other hand, in the area B, the slave DB server 30 performs the same processing as the master DB server 20 in order to shift to the temporary master. That is, when the service providing apparatus 10C in area B receives a data update request from the user 5E (step S3-2) and transmits a data update request to the slave DB server 30 (step S4-2), the slave DB server 30 It is determined that there is a data update request (step S5-2: Yes), and the data in the slave DB 31 is updated (step S6-2).

また、例えば、サービス提供装置10Cがユーザ5Fによるデータ参照要求を受け(ステップS7−2)、スレーブDBサーバ30にデータ参照要求を送信した場合(ステップS8−2)、スレーブDBサーバ30は、データ参照要求があると判断し(ステップS9−2:Yes)、参照を要求されたデータの更新回数について判断する(ステップS10−2)。   For example, when the service providing apparatus 10C receives a data reference request from the user 5F (step S7-2) and transmits a data reference request to the slave DB server 30 (step S8-2), the slave DB server 30 It is determined that there is a reference request (step S9-2: Yes), and a determination is made regarding the number of times the data requested to be referenced has been updated (step S10-2).

そして、スレーブDBサーバ30は、参照を要求されたデータの更新回数が所定の閾値未満であると判断した場合(ステップS10−2:閾値未満)、このデータの信頼度が高いと判断する(ステップS11−2)。一方、スレーブDBサーバ30は、参照を要求されたデータの更新回数が所定の閾値以上であると判断した場合(ステップS10−2:閾値以上)、このデータの信頼度が低いと判断する(ステップS12−2)。   Then, when the slave DB server 30 determines that the number of updates of data requested to be referenced is less than a predetermined threshold (step S10-2: less than the threshold), the slave DB server 30 determines that the reliability of the data is high (step S10-2). S11-2). On the other hand, if the slave DB server 30 determines that the update count of the data requested to be referenced is equal to or greater than a predetermined threshold (step S10-2: equal to or greater than the threshold), the slave DB server 30 determines that the reliability of the data is low (step S10-2). S12-2).

そして、スレーブDBサーバ30は、サービス提供装置10Cに、要求されたデータを応答するとともに、該データの信頼度も通知し(ステップS13−2)、サービス提供装置10Cは、データ参照応答とデータ信頼度についての通知をユーザ5Fに送信する(ステップS14−2)。   Then, the slave DB server 30 responds to the service providing apparatus 10C with the requested data and also notifies the reliability of the data (step S13-2), and the service providing apparatus 10C receives the data reference response and the data reliability. A notification about the degree is transmitted to the user 5F (step S14-2).

続いて、スレーブDBサーバ30は、データ更新要求がないと判断した場合(ステップS5−2:No)、データ参照要求がないと判断した場合(ステップS9−2:No)、或いは、データ参照応答処理後、ネットワークが復旧したか否かを判断する(ステップS15−2)。スレーブDBサーバ30は、ネットワークが復旧していないと判断した場合(ステップS15−2:No)、ステップS5−2に戻る。   Subsequently, the slave DB server 30 determines that there is no data update request (step S5-2: No), determines that there is no data reference request (step S9-2: No), or data reference response. After the processing, it is determined whether or not the network has been restored (step S15-2). If the slave DB server 30 determines that the network has not been restored (step S15-2: No), the slave DB server 30 returns to step S5-2.

そして、マスタDBサーバ20及びスレーブDBサーバ30は、ネットワークが復旧したと判断した場合(ステップS15−1:Yes、ステップS15−2:Yes)、対向する装置を検出し(ステップS16)、同期を取りながら、整合処理を行う(ステップS17−1、ステップS17−2)。マスタDBサーバ20及びスレーブDBサーバ30は、差分レプリケーション(ステップS18)によりデータの整合を行う。   When the master DB server 20 and the slave DB server 30 determine that the network has been restored (step S15-1: Yes, step S15-2: Yes), the opposite device is detected (step S16) and synchronization is performed. The matching process is performed while taking it (steps S17-1 and S17-2). The master DB server 20 and the slave DB server 30 perform data matching by differential replication (step S18).

このように、マスタDBサーバ20及びスレーブDBサーバ30は、差分があるデータのみを双方でレプリケーションする差分レプリケーションを行い、差分があるデータのみを整合するため、全データを整合する場合と比較して整合処理時間を短縮することができる。続いて、マスタDBサーバ20は、暫定マスタからマスタに戻り(ステップS19−1)、スレーブDBサーバ30は、暫定マスタからスレーブに戻る(ステップS19−2)。   In this way, the master DB server 20 and the slave DB server 30 perform differential replication in which only the data with the difference is replicated in both, and only the data with the difference is matched. The alignment processing time can be shortened. Subsequently, the master DB server 20 returns from the temporary master to the master (step S19-1), and the slave DB server 30 returns from the temporary master to the slave (step S19-2).

[整合処理]
次に、図12に示す整合処理(ステップS17−1)の処理手順について説明する。図13は、図12に示す整合処理の処理手順を示すフローチャートである。
[Alignment processing]
Next, the processing procedure of the matching process (step S17-1) shown in FIG. 12 will be described. FIG. 13 is a flowchart showing the procedure of the matching process shown in FIG.

図13に示すように、マスタDBサーバ20において、整合部257は、まず、整合対象となるレコードIDの番号「n」を初期化し、n=1とする(ステップS21)。続いて、整合部257は、対向装置のデータと比較する(ステップS22)。具体的には、整合部257は、マスタDB21のレコードID「n」のデータと、マスタDBサーバ20と対向するスレーブDBサーバ30のスレーブDB31のレコードID「n」のデータと、を比較する。   As shown in FIG. 13, in the master DB server 20, the matching unit 257 first initializes the record ID number “n” to be matched and sets n = 1 (step S21). Subsequently, the matching unit 257 compares the data with the counter device (step S22). Specifically, the matching unit 257 compares the data of the record ID “n” of the master DB 21 with the data of the record ID “n” of the slave DB 31 of the slave DB server 30 facing the master DB server 20.

そして、整合部257は、マスタDB21のレコードID「n」のデータとスレーブDB31のレコードID「n」のデータとが同一であるか否かを判断する(ステップS23)。整合部257は、比較したレコードID「n」のデータが同一であると判断した場合(ステップS23:Yes)、レコードID「n」のデータを維持する(ステップS24)。   Then, the matching unit 257 determines whether the data of the record ID “n” of the master DB 21 is the same as the data of the record ID “n” of the slave DB 31 (Step S23). When the matching unit 257 determines that the data of the compared record ID “n” is the same (step S23: Yes), the matching unit 257 maintains the data of the record ID “n” (step S24).

一方、整合部257は、マスタDB21のレコードID「n」のデータとスレーブDB31のレコードID「n」のデータとが同一でないと判断した場合(ステップS23:No)、マスタDB21のレコードID「n」のタイムスタンプとスレーブDB31のレコードID「n」のタイムスタンプとを比較する(ステップS25)。整合部257は、タイムスタンプが新しい方を、正しいデータであると判断し(ステップS26)、正しいと判断したデータを、レコード「n」に記録する(ステップS27)。   On the other hand, when the matching unit 257 determines that the data of the record ID “n” of the master DB 21 and the data of the record ID “n” of the slave DB 31 are not the same (step S23: No), the record ID “n” of the master DB 21 And the time stamp of the record ID “n” of the slave DB 31 are compared (step S25). The matching unit 257 determines that the data with the newer time stamp is correct data (step S26), and records the data determined to be correct in the record “n” (step S27).

そして、整合部257は、n=Nであるか否かを判断する(ステップS28)。ここで、「N」は、レコードIDの番号「n」の最大値である。整合部257は、n=Nでないと判断した場合(ステップS28:No)、次のレコードIDについてデータの整合を行うため、n=n+1とし(ステップS29)、ステップS22に戻る。これに対し、整合部257は、n=Nであると判断した場合(ステップS28:Yes)、整合処理を終了する。なお、スレーブDBサーバ30も、同様の処理手順を行うことによって、整合処理(図12のステップS17−2)を実行することができる。   Then, the matching unit 257 determines whether n = N (step S28). Here, “N” is the maximum value of the record ID number “n”. If the matching unit 257 determines that n = N is not satisfied (step S28: No), the matching unit 257 sets n = n + 1 (step S29) to perform data matching for the next record ID, and returns to step S22. On the other hand, when the matching unit 257 determines that n = N (step S28: Yes), the matching process ends. The slave DB server 30 can also execute the matching process (step S17-2 in FIG. 12) by performing the same processing procedure.

[実施の形態の効果]
このように、本実施の形態では、マスタDBサーバ20及びスレーブDBサーバ30は、いずれも、ネットワーク障害が生じると、マスタに暫定的に移行する。そして、マスタDBサーバ20及びスレーブDBサーバ30は、暫定的にマスタに移行された場合には、外部の装置からデータ更新の指示を受け付けた際に、いずれも、対向サーバとは非同期でデータベースのデータを更新する。
[Effect of the embodiment]
Thus, in this embodiment, both the master DB server 20 and the slave DB server 30 tentatively move to the master when a network failure occurs. Then, when the master DB server 20 and the slave DB server 30 are temporarily transferred to the master, when receiving a data update instruction from an external device, the master DB server 20 and the slave DB server 30 are both asynchronous with the opposite server. Update the data.

したがって、本実施の形態では、スレーブDBサーバ30にしかアクセスできないエリアBにおいても、データ更新処理サービスを継続することが可能になる。すなわち、本実施の形態によれば、マスタ/スレーブによる冗長化構成をとっている構成において、ネットワーク障害によるエリア内のデータ更新処理サービスの中断を防止できるため、ネットワーク障害が長期化した場合においても、サービスの提供が可能となる。   Therefore, in the present embodiment, the data update processing service can be continued even in the area B where only the slave DB server 30 can be accessed. In other words, according to the present embodiment, in a configuration having a redundant configuration by master / slave, it is possible to prevent interruption of the data update processing service in the area due to a network failure, so even when the network failure is prolonged. The service can be provided.

また、本実施の形態では、ネットワーク障害によって暫定マスタに移行したマスタDBサーバ20及びスレーブDBサーバ30は、データの参照要求を受けた場合、このデータの更新回数を基にデータの信頼度を判断し、データとともに、このデータの信頼度についてもユーザに応答する。したがって、本実施の形態によれば、ネットワーク障害期間中に参照したデータの信頼度をユーザ側で判別することができる。   In this embodiment, when the master DB server 20 and the slave DB server 30 that have been transferred to the temporary master due to a network failure receive a data reference request, the reliability of the data is determined based on the number of times the data is updated. In addition to the data, the user also responds to the reliability of the data. Therefore, according to the present embodiment, the reliability of the data referred to during the network failure period can be determined on the user side.

また、本実施の形態では、ネットワーク復旧後、レコード単位でデータチェックを行う。そして、本実施の形態では、差分がある場合には、マスタDBサーバ20及びスレーブDBサーバ30のどちらが正しいデータを保持しているかを、履歴情報であるタイムスタンプを基に判断して、正しいデータに書き換えている。このため、ネットワーク復旧後、マスタDBサーバ20及びスレーブDBサーバ30が保持するデータに差分があった場合であっても、正しいデータに整合することができる。   In this embodiment, data check is performed in units of records after network recovery. In the present embodiment, when there is a difference, the master DB server 20 or the slave DB server 30 determines which one holds the correct data based on the time stamp that is history information, and correct data. Has been rewritten. For this reason, even if there is a difference in the data held by the master DB server 20 and the slave DB server 30 after the network recovery, it can be matched with correct data.

また、本実施の形態では、ネットワーク復旧後、マスタDBサーバ20及びスレーブDBサーバ30は、差分があるデータのみを双方でレプリケーションする差分レプリケーションを行う。言い換えると、マスタDBサーバ20及びスレーブDBサーバ30は、差分があるデータのみを整合するため、全データを整合する場合と比較して整合処理時間を短縮することができる。すなわち、本実施の形態によれば、ネットワーク障害が長期化した場合においても、サービスの提供が可能となるとともに、サービスの回復を適切かつ短時間で実行することができる。   In the present embodiment, after the network is restored, the master DB server 20 and the slave DB server 30 perform differential replication in which only data having a difference is replicated in both. In other words, since the master DB server 20 and the slave DB server 30 match only data having a difference, the matching processing time can be shortened as compared with the case of matching all data. That is, according to the present embodiment, it is possible to provide a service even when a network failure is prolonged, and it is possible to perform service recovery appropriately and in a short time.

[他の実施の形態]
[システム構成等]
図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。さらに、各装置にて行なわれる各処理機能は、その全部又は任意の一部が、CPU及び当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。
[Other embodiments]
[System configuration, etc.]
Each component of each illustrated device is functionally conceptual and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to the one shown in the figure, and all or a part of the distribution / integration is functionally or physically distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. Further, all or a part of each processing function performed in each device can be realized by a CPU and a program that is analyzed and executed by the CPU, or can be realized as hardware by wired logic.

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

[プログラム]
図14は、プログラムが実行されることにより、マスタDBサーバ20或いはスレーブDBサーバ30が実現されるコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010、CPU1020を有する。また、コンピュータ1000は、ハードディスクドライブインタフェース1030、ディスクドライブインタフェース1040、シリアルポートインタフェース1050、ビデオアダプタ1060、ネットワークインタフェース1070を有する。これらの各部は、バス1080によって接続される。
[program]
FIG. 14 is a diagram illustrating an example of a computer in which the master DB server 20 or the slave DB server 30 is realized by executing a program. The computer 1000 includes a memory 1010 and a CPU 1020, for example. The computer 1000 also includes a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These units are connected by a bus 1080.

メモリ1010は、ROM(Read Only Memory)1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。   The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012. The ROM 1011 stores a boot program such as BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to a mouse 1110 and a keyboard 1120, for example. The video adapter 1060 is connected to the display 1130, for example.

ハードディスクドライブ1090は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、マスタDBサーバ20或いはスレーブDBサーバ30の各処理を規定するプログラムは、コンピュータ1000により実行可能なコードが記述されたプログラムモジュール1093として実装される。プログラムモジュール1093は、例えばハードディスクドライブ1090に記憶される。例えば、マスタDBサーバ20或いはスレーブDBサーバ30における機能構成と同様の処理を実行するためのプログラムモジュール1093が、ハードディスクドライブ1090に記憶される。なお、ハードディスクドライブ1090は、SSD(Solid State Drive)により代替されてもよい。   The hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, a program that defines each process of the master DB server 20 or the slave DB server 30 is implemented as a program module 1093 in which a code executable by the computer 1000 is described. The program module 1093 is stored in the hard disk drive 1090, for example. For example, a program module 1093 for executing processing similar to the functional configuration in the master DB server 20 or the slave DB server 30 is stored in the hard disk drive 1090. The hard disk drive 1090 may be replaced by an SSD (Solid State Drive).

また、上述した実施の形態の処理で用いられる設定データは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。   The setting data used in the processing of the above-described embodiment is stored as program data 1094 in, for example, the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads the program module 1093 and the program data 1094 stored in the memory 1010 and the hard disk drive 1090 to the RAM 1012 as necessary, and executes them.

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

以上、本発明者によってなされた発明を適用した実施の形態について説明したが、本実施の形態による本発明の開示の一部をなす記述及び図面により本発明は限定されることはない。すなわち、本実施の形態に基づいて当業者等によりなされる他の実施の形態、実施例及び運用技術等は全て本発明の範疇に含まれる。   Although the embodiment to which the invention made by the present inventor is applied has been described above, the present invention is not limited by the description and the drawings that form part of the disclosure of the present invention according to this embodiment. That is, other embodiments, examples, operation techniques, and the like made by those skilled in the art based on the present embodiment are all included in the scope of the present invention.

1 通信システム
5A〜5H ユーザ
10,10A〜10D サービス提供装置
11 データ参照部
12 サービス提供部
20 マスタデータベース(DB)サーバ
21 マスタDB
22,32 入力部
23,33 出力部
24,34 通信制御部
25,35 制御部
30 スレーブDBサーバ
31 スレーブDB
251、352 データ更新部
252 更新データ送信部
253 暫定マスタ制御部
254 マスタ移行部
255 暫定データ更新部
256 信頼度通知部
257 整合部
351 参照データ管理部
DESCRIPTION OF SYMBOLS 1 Communication system 5A-5H User 10, 10A-10D Service provision apparatus 11 Data reference part 12 Service provision part 20 Master database (DB) server 21 Master DB
22, 32 Input unit 23, 33 Output unit 24, 34 Communication control unit 25, 35 Control unit 30 Slave DB server 31 Slave DB
251 and 352 Data update unit 252 Update data transmission unit 253 Temporary master control unit 254 Master transfer unit 255 Temporary data update unit 256 Reliability notification unit 257 Matching unit 351 Reference data management unit

Claims (5)

マスタ或いはスレーブの関係で対向装置とネットワークを介して接続するサーバ装置であって、
レコード単位で記録されたデータを有するデータベースと、
自装置が前記マスタである場合には、外部の装置からデータ更新の指示を受け付けた際に、前記データベースのデータを更新し、自装置が前記スレーブである場合には、前記マスタである対向装置から同期の指示を受け付けた際に、前記データベースのデータを更新するデータ更新部と、
自装置が前記マスタである場合であって、前記データ更新部によって外部の装置からデータ更新の指示を受け付けて前記データベースのデータが更新された場合には、該更新したデータとの同期の指示を前記スレーブである対向装置に対して送信する更新データ送信部と、
前記対向装置との間でネットワーク障害が生じた場合、自装置をマスタに暫定的に移行するマスタ移行部と、
前記マスタ移行部によって暫定的にマスタに移行された場合には、外部の装置からデータ更新の指示を受け付けた際に、前記対向装置とは非同期で前記データベースのデータを更新し、ネットワーク障害継続期間に前記データベースの各データに対しデータを更新した場合、該データにデータ更新についての履歴情報を対応付けて前記データベースに記憶させる暫定データ更新部と、
外部の装置からデータ参照を要求された場合には、前記履歴情報を基にデータ参照を要求されたデータの信頼度を判断し、データ参照を要求されたデータとともに判断した信頼度を応答する信頼度通知部と、
を有し、
前記暫定データ更新部は、前記履歴情報として、データの更新回数を前記データベースに記憶させ、
前記信頼度通知部は、前記更新回数が所定の閾値以上である場合に前記データ参照を要求されたデータの信頼度が低いと判断し、前記更新回数が所定の閾値未満である場合に前記データ参照を要求されたデータの信頼度が高いと判断することを特徴とするサーバ装置。
A server device connected to the opposite device via a network in a master or slave relationship,
A database having data recorded in record units;
When the own device is the master, the data in the database is updated upon receiving a data update instruction from an external device. When the own device is the slave, the opposite device that is the master A data update unit that updates the data in the database when receiving a synchronization instruction from
When the own device is the master and the data update unit accepts a data update instruction from an external device and the data in the database is updated, an instruction to synchronize with the updated data is issued. An update data transmission unit for transmitting to the opposite device as the slave;
When a network failure occurs with the opposite device, a master transition unit that provisionally migrates its own device to the master,
When the master migration unit tentatively migrates to the master, when receiving a data update instruction from an external device, the data in the database is updated asynchronously with the opposite device, and a network failure continuation period and when said updated data for each data in the database, provisional data updating unit that associates the history information about the data update to the data Ru is stored in the database,
When a data reference is requested from an external device, the reliability of the data requested to be referred to is determined based on the history information, and the reliability to which the reliability determined with the data requested for data reference is returned A degree notification section;
Have
The provisional data update unit stores the update number of data in the database as the history information,
The reliability notification unit determines that the reliability of the data requested for data reference is low when the number of updates is equal to or greater than a predetermined threshold, and the data when the number of updates is less than a predetermined threshold. A server device that judges that the reliability of data requested to be referenced is high .
ットワーク障害が回復した場合、前記対向装置が保持するデータと前記データベースが有するデータとについて、レコード単位でデータの一致度を確認し、データ間に差分がある場合には前記履歴情報を基に正しいデータを判断し、差分があるデータのみを双方でレプリケーションする差分レプリケーションにより、前記対向装置との間で前記データの整合を行う整合部をさらに有することを特徴とする請求項1に記載のサーバ装置。 If network failure is recovered, the data of the data and the database that the opposing device held have to check the coincidence of the data record-by-record basis, based on the history information if there is a difference between the data 2. The server according to claim 1, further comprising: a matching unit configured to match the data with the opposite apparatus by differential replication in which correct data is determined and only data having a difference is replicated in both. apparatus. 前記暫定データ更新部は、前記履歴情報として、データの更新時間を示すタイムスタンプを前記データベースに記憶させ、
前記整合部は、前記対向装置が保持するデータと前記データベースが有するデータとのうちタイムスタンプが新しいデータが正しいと判断することを特徴とする請求項2に記載のサーバ装置。
The provisional data update unit stores a time stamp indicating a data update time in the database as the history information,
The server device according to claim 2, wherein the matching unit determines that data having a new time stamp is correct among data held by the opposite device and data held by the database.
マスタデータベースサーバと、前記マスタデータベースサーバとネットワークを介して接続するスレーブデータベースサーバとを有する通信システムであって、
前記マスタデータベースサーバは、
レコード単位で記録されたデータを有するマスタデータベースと、
外部の装置からデータ更新の指示を受け付けた際に、前記マスタデータベースのデータを更新する第1のデータ更新部と、
前記第1のデータ更新部によって外部の装置からデータ更新の指示を受け付けて前記マスタデータベースのデータが更新された場合には、該更新したデータとの同期の指示を前記スレーブデータベースサーバに対して送信する更新データ送信部と、
前記スレーブデータベースサーバとの間でネットワーク障害が生じた場合、自装置をマスタに暫定的に移行する第1のマスタ移行部と、
前記第1のマスタ移行部によって暫定的にマスタに移行された場合には、外部の装置からデータ更新の指示を受け付けた際に、前記スレーブデータベースサーバとは非同期で前記マスタデータベースのデータを更新し、ネットワーク障害継続期間に前記マスタデータベースの各データに対しデータを更新した場合、該データにデータ更新についての履歴情報を対応付けて前記マスタデータベースに記憶させる第1の暫定データ更新部と、
外部の装置からデータ参照を要求された場合には、前記履歴情報を基にデータ参照を要求されたデータの信頼度を判断し、データ参照を要求されたデータとともに判断した信頼度を応答する第1の信頼度通知部と、
を有し、
前記第1の暫定データ更新部は、前記履歴情報として、データの更新回数を前記マスタデータベースに記憶させ、
前記第1の信頼度通知部は、前記更新回数が所定の閾値以上である場合に前記データ参照を要求されたデータの信頼度が低いと判断し、前記更新回数が所定の閾値未満である場合に前記データ参照を要求されたデータの信頼度が高いと判断し、
前記スレーブデータベースサーバは、
前記レコード単位で記録されたデータを有するスレーブデータベースと、
前記マスタデータベースサーバから同期の指示を受け付けた際に、前記スレーブデータベースのデータを更新する第2のデータ更新部と、
前記マスタデータベースサーバとの間でネットワーク障害が生じた場合、自装置をマスタに暫定的に移行する第2のマスタ移行部と、
前記第2のマスタ移行部によって暫定的にマスタに移行された場合には、外部の装置からデータ更新の指示を受け付けた際に、前記マスタデータベースサーバとは非同期で前記スレーブデータベースのデータを更新し、ネットワーク障害継続期間に前記スレーブデータベースの各データに対しデータを更新した場合、該データにデータ更新についての履歴情報を対応付けて前記スレーブデータベースに記憶させる第2の暫定データ更新部と、
外部の装置からデータ参照を要求された場合には、前記履歴情報を基にデータ参照を要求されたデータの信頼度を判断し、データ参照を要求されたデータとともに判断した信頼度を応答する第2の信頼度通知部と、
を有し、
前記第2の暫定データ更新部は、前記履歴情報として、データの更新回数を前記スレーブデータベースに記憶させ、
前記第2の信頼度通知部は、前記更新回数が所定の閾値以上である場合に前記データ参照を要求されたデータの信頼度が低いと判断し、前記更新回数が所定の閾値未満である場合に前記データ参照を要求されたデータの信頼度が高いと判断することを特徴とする通信システム。
A communication system having a master database server and a slave database server connected to the master database server via a network,
The master database server is
A master database having data recorded in record units;
A first data updating unit that updates data in the master database when receiving an instruction to update data from an external device;
When the data update instruction is received from the external device by the first data update unit and the data in the master database is updated, the synchronization instruction with the updated data is transmitted to the slave database server. An update data transmission unit to perform,
A first master migration unit that provisionally migrates its own device to a master when a network failure occurs with the slave database server;
Wherein when the first of the tentatively shifts to the master by the master transition, when accepting the instruction data update from an external device, and updates the data of the master database asynchronously with the slave database server , if the network failure duration was updated data for each data of the master database, the first interim data updating unit that associates the history information about the data update to the data Ru is stored in the master database,
When an external device requests data reference, the reliability of the data requested for data reference is determined based on the history information, and the reliability determined with the data requested for data reference is returned. 1 reliability notification unit;
Have
The first provisional data update unit stores the number of data updates as the history information in the master database,
The first reliability notification unit determines that the reliability of the data requested for data reference is low when the number of updates is equal to or greater than a predetermined threshold, and the number of updates is less than the predetermined threshold It is determined that the reliability of the data requested for the data reference is high,
The slave database server is
A slave database having data recorded in record units;
A second data updating unit that updates data in the slave database when receiving a synchronization instruction from the master database server;
A second master migration unit that provisionally migrates its own device to a master when a network failure occurs with the master database server;
Wherein when it is migrated to a second tentative master by the master transition, when accepting the instruction data update from an external device, and updates the data of the slave database asynchronously with the master database server , if the network failure duration was updated data for each data of the slave database, the second provisional data updating unit that associates the history information about the data update to the data Ru is stored in the slave database,
When an external device requests data reference, the reliability of the data requested for data reference is determined based on the history information, and the reliability determined with the data requested for data reference is returned. 2 reliability notification units;
Have a,
The second provisional data update unit stores the number of data updates in the slave database as the history information,
The second reliability notification unit determines that the reliability of the data requested for data reference is low when the update count is equal to or greater than a predetermined threshold, and the update count is less than the predetermined threshold And determining that the data requested to be referred to is highly reliable .
マスタ或いはスレーブの関係で対向装置とネットワークを介して接続するサーバ装置が実行する通信方法であって、
前記サーバ装置は、レコード単位で記録されたデータを有するデータベースを有し、
自装置が前記マスタである場合には、外部の装置からデータ更新の指示を受け付けた際に、前記データベースのデータを更新し、自装置が前記スレーブである場合には、前記マスタである対向装置から同期の指示を受け付けた際に、前記データベースのデータを更新するデータ更新工程と、
自装置が前記マスタである場合であって、前記データ更新工程によって外部の装置からデータ更新の指示を受け付けて前記データベースのデータが更新された場合には、該更新したデータとの同期の指示を前記スレーブである対向装置に対して送信する更新データ送信工程と、
前記対向装置との間でネットワーク障害が生じた場合、自装置をマスタに暫定的に移行する移行工程と、
前記移行工程によって暫定的にマスタに移行された場合には、外部の装置からデータ更新の指示を受け付けた際に、前記対向装置とは非同期で前記データベースのデータを更新し、ネットワーク障害継続期間に前記データベースの各データに対しデータを更新した場合、該データにデータ更新についての履歴情報を対応付けて前記データベースに記憶させる暫定データ更新工程と、
外部の装置からデータ参照を要求された場合には、前記履歴情報を基にデータ参照を要求されたデータの信頼度を判断し、データ参照を要求されたデータとともに判断した信頼度を応答する信頼度通知工程と、
を含み、
前記暫定データ更新工程は、前記履歴情報として、データの更新回数を前記データベースに記憶させ、
前記信頼度通知工程は、前記更新回数が所定の閾値以上である場合に前記データ参照を要求されたデータの信頼度が低いと判断し、前記更新回数が所定の閾値未満である場合に前記データ参照を要求されたデータの信頼度が高いと判断することを特徴とする通信方法。
A communication method executed by a server device connected to a counter device via a network in a master or slave relationship,
The server device has a database having data recorded in units of records,
When the own device is the master, the data in the database is updated upon receiving a data update instruction from an external device. When the own device is the slave, the opposite device that is the master A data update step of updating the data in the database when receiving a synchronization instruction from
If the device itself is the master, and the data update instruction is received from an external device in the data update process and the data in the database is updated, an instruction to synchronize with the updated data is issued. An update data transmission step for transmitting to the opposite device as the slave;
When a network failure occurs with the opposite device, a transition step of tentatively transferring the own device to the master,
When transitioning to the master provisionally by the migration step, when receiving a data update instruction from an external device, the data in the database is updated asynchronously with the opposite device, and the network failure continuation period is reached. when updating the data for each data of said database, and provisional data updating process in association with history information about the data update to the data Ru is stored in the database,
When a data reference is requested from an external device, the reliability of the data requested to be referred to is determined based on the history information, and the reliability to which the reliability determined with the data requested for data reference is returned Degree notification process,
Including
In the provisional data update step, as the history information, the number of data updates is stored in the database,
The reliability notification step determines that the reliability of the data requested for data reference is low when the number of updates is equal to or greater than a predetermined threshold, and the data when the number of updates is less than a predetermined threshold. A communication method characterized by determining that the reliability of data requested to be referenced is high .
JP2016111762A 2016-06-03 2016-06-03 Server apparatus, communication system, and communication method Active JP6611254B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016111762A JP6611254B2 (en) 2016-06-03 2016-06-03 Server apparatus, communication system, and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016111762A JP6611254B2 (en) 2016-06-03 2016-06-03 Server apparatus, communication system, and communication method

Publications (2)

Publication Number Publication Date
JP2017219910A JP2017219910A (en) 2017-12-14
JP6611254B2 true JP6611254B2 (en) 2019-11-27

Family

ID=60656198

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016111762A Active JP6611254B2 (en) 2016-06-03 2016-06-03 Server apparatus, communication system, and communication method

Country Status (1)

Country Link
JP (1) JP6611254B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7373314B2 (en) 2019-07-01 2023-11-02 キヤノンメディカルシステムズ株式会社 Communication control device and communication control method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3487732B2 (en) * 1997-06-16 2004-01-19 Necソフト株式会社 Apparatus and method for avoiding duplicate database data inconsistency
JP3196930B2 (en) * 1998-01-09 2001-08-06 日本電気株式会社 Automatic database matching method in NMS duplex system
US7120824B2 (en) * 2003-05-09 2006-10-10 International Business Machines Corporation Method, apparatus and program storage device for maintaining data consistency and cache coherency during communications failures between nodes in a remote mirror pair
US7627611B2 (en) * 2006-08-17 2009-12-01 Osisoft, Inc. Conflict resolution in database replication through autonomous node qualified folding

Also Published As

Publication number Publication date
JP2017219910A (en) 2017-12-14

Similar Documents

Publication Publication Date Title
US11321303B2 (en) Conflict resolution for multi-master distributed databases
US11086555B1 (en) Synchronously replicating datasets
US20210360066A1 (en) Utilizing Cloud-Based Storage Systems To Support Synchronous Replication Of A Dataset
US10169163B2 (en) Managing backup operations from a client system to a primary server and secondary server
WO2019154394A1 (en) Distributed database cluster system, data synchronization method and storage medium
US8874508B1 (en) Systems and methods for enabling database disaster recovery using replicated volumes
EP3928208B1 (en) System and method for self-healing in decentralized model building for machine learning using blockchain
US10216589B2 (en) Smart data replication recoverer
CN108804306B (en) Method and system for automatic test system
US11144405B2 (en) Optimizing database migration in high availability and disaster recovery computing environments
WO2018068661A1 (en) Paxos protocol-based methods and apparatuses for online capacity expansion and reduction of distributed consistency system
JP2007241486A (en) Memory system
Go et al. Reliable, consistent, and efficient data sync for mobile apps
CN111078667A (en) Data migration method and related device
CN114490677A (en) Data synchronization in a data analysis system
US10089375B2 (en) Idling individually specified objects during data replication
US20190196918A1 (en) Methods and systems of operating a database management system dmbs in a strong consistency mode
US20090132534A1 (en) Remote replication synchronizing/accessing system and method thereof
JP6611254B2 (en) Server apparatus, communication system, and communication method
US8677088B1 (en) Systems and methods for recovering primary sites after failovers to remote secondary sites
US10719532B2 (en) Storage constrained synchronization engine
US20170091253A1 (en) Interrupted synchronization detection and recovery
US11061927B2 (en) Optimization of relocated queries in federated databases using cross database table replicas
US11442828B2 (en) Handling failures in distributed data system
US20240069779A1 (en) Object storage based asynchronous mailbox, eventual consistency for cross-region communication

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180618

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190318

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190326

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190517

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20191023

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191025

R150 Certificate of patent or registration of utility model

Ref document number: 6611254

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150