JP6611254B2 - Server apparatus, communication system, and communication method - Google Patents
Server apparatus, communication system, and communication method Download PDFInfo
- 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
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.
しかしながら、マスタ/スレーブによる冗長化構成をとっている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
このうち、エリア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
例えば、サービス提供装置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
これに対し、エリア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
例えば、サービス提供装置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
一方、ユーザ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
このように、従来の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
本発明は、上記に鑑みてなされたものであって、マスタ/スレーブによる冗長化構成をとっている構成において、ネットワーク障害によるエリア内のデータ更新処理サービスの中断を防止するサーバ装置、通信システム及び通信方法を提供することを目的とする。 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.
以下、図面を参照して、本発明の一実施形態を詳細に説明する。なお、この実施の形態により本発明が限定されるものではない。また、図面の記載において、同一部分には同一の符号を付して示している。 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
サービス提供装置10A〜10Dは、それぞれ接続するユーザ5A〜5B,5C〜5D,5E〜5F,5G〜5Hにサービスを提供する。マスタDBサーバ20は、サービス提供に必要なデータを記憶するマスタDB21を有する。スレーブDBサーバ30は、マスタDB21の複製データを記憶するスレーブDB31を有する。
The
このような構成の通信システム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
また、エリアBのサービス提供装置10C,10Dは、ネットワーク障害等によりマスタDBサーバ20と通信できない場合に、スレーブDB31にアクセスしてデータを参照し、データキャッシュを行って、このデータを用いてそれぞれ接続するユーザ5E〜5F,5G〜5Hにサービスを提供する。サービス提供装置10C,10Dは、ネットワーク障害が生じた場合に、それぞれ接続するユーザ5E〜5F,5G〜5Hの要求に応じて、スレーブDB31にアクセスして、スレーブDB31のデータを更新する。
In addition, when the
マスタDBサーバ20は、データ更新指示を受け付けてスレーブDBサーバ30にデータを同期させる。マスタDBサーバ20は、図示しない操作端末等によりマスタDB21のデータ更新が行われた場合に、更新されたデータをスレーブDBサーバ30に通知して、マスタDB21とスレーブDB31とを同期させるレプリケーションを行う。
The
そして、マスタ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
また、マスタDBサーバ20は、ネットワーク障害が回復した場合、スレーブDB31が保持するデータとマスタDB21が有するデータとについて、レコード単位でデータの一致度を確認する。続いて、マスタDBサーバ20は、データ間に差分がある場合にはデータの履歴情報を基に正しいデータを判断し、差分レプリケーションにより、スレーブDBサーバ30との間でデータの整合を行う。
Further, when the network failure is recovered, the
スレーブ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
また、スレーブDBサーバ30は、ネットワーク障害が回復した場合、スレーブDB31が保持するデータとマスタDB21が有するデータとについて、レコード単位でデータの一致度を確認する。続いて、スレーブDBサーバ30は、データ間に差分がある場合にはデータの履歴情報を基に正しいデータを判断し、差分レプリケーションにより、マスタDBサーバ20との間でデータの整合を行う。
In addition, when the network failure is recovered, the
このように、本実施の形態では、マスタDBサーバ20及びスレーブDBサーバ30は、ネットワーク障害が生じると、いずれも、マスタに暫定的に移行する。そして、マスタDBサーバ20及びスレーブDBサーバ30は、いずれも、対向サーバとは非同期でそれぞれのDBのデータ更新処理を実行する。したがって、本実施の形態では、スレーブDBサーバ30にしかアクセスできないエリアBにおいても、データ更新処理サービスを継続することが可能になる。
As described above, in the present embodiment, the
[サービス提供装置の構成]
まず、サービス提供装置10A〜10Dの構成について説明する。図2は、サービス提供装置10Cの構成を例示する模式図である。なお、サービス提供装置10A,10B、10Dは、サービス提供装置10Cと同様の機能構成である。以降、サービス提供装置10A〜10Dを区別なく表記する際は、サービス提供装置10と表記する。
[Configuration of service providing device]
First, the configuration of the
サービス提供装置10Cは、ワークステーションやパソコン等の汎用コンピュータで実現され、CPU(Central Processing Unit)等の演算処理装置がメモリに記憶された処理プログラムを実行することにより、図2に例示するように、データ参照部11およびサービス提供部12として機能する。
The
データ参照部11は、マスタDBサーバ20と通信できない場合に、マスタDBサーバ20に代えてスレーブDBサーバ30に、スレーブDB31のデータ参照或いはデータ更新の要求を送信する。具体的に、データ参照部11は、平常時、マスタDBサーバ20にマスタDB21のデータ参照の要求、或いは、マスタDB21のデータ更新の要求を送信する。また、データ参照部11は、ネットワーク障害等によりマスタDBサーバ20にアクセスできない場合には、スレーブDBサーバ30に、スレーブDB31のデータ参照の或いはデータ更新の要求を送信する。
When the
また、データ参照部11は、参照要求に応答してマスタDBサーバ20またはスレーブDBサーバ30から返送された参照応答に含まれるデータを、キャッシュメモリに記憶する(以下、データキャッシュと称する)。
Further, the
サービス提供部12は、データキャッシュされたデータを用いて、ユーザ5E〜5Fにサービスを提供する。例えば、サービス提供部12は、電話番号と転送番号とを対応づけたデータを用いて、ユーザ5E,5Fが指定した電話番号に対応する転送番号を、ユーザ5E,5Fに通知するサービスを提供する。
The
[マスタDBサーバの構成]
次に、マスタDBサーバ20の構成について説明する。図3は、マスタDBサーバ20の構成を例示する模式図である。マスタDBサーバ20は、ワークステーションやパソコン等の汎用コンピュータで実現され、図3に示すように、マスタDB21と、入力部22と、出力部23と、通信制御部24と、制御部25とを備える。
[Master DB server configuration]
Next, the configuration of the
マスタDB21は、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)等の半導体メモリ素子、または、ハードディスク、光ディスク等の記憶装置によって実現される。なお、マスタDB21は、通信制御部24(後述)を介して制御部25(後述)と通信する構成としてもよい。
The
マスタDB21は、サービス提供装置10が参照してサービス提供に用いるサービス情報を記憶する。図4は、マスタDB21が記憶するデータのデータ構成の一例を示す図である。
The
図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
入力部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
通信制御部24は、NIC(Network Interface Card)等で実現され、LAN(Local Area Network)やインターネット等の電気通信回線を介したスレーブDBサーバ30や上位OpS(Operation System)等の外部の装置と制御部25との通信を制御する。
The
制御部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
データ更新部251は、上位OpSやユーザ等から更新用のデータが入力された際、マスタDB21のデータを更新する。具体的に、データ更新部251は、通信制御部24あるいは入力部22を介してサービス情報を更新するためのデータが入力された際、対応するレコードのデータを入力されたデータに更新する。なお、データ更新部251は、平常時にサービス提供装置10A〜10Dからデータの参照要求を受信した際、マスタDB21のデータを該サービス提供装置10A〜10Dに参照させる。データ更新部251は、平常時にサービス提供装置10A〜10Dから更新要求を受信した際、マスタDB21のデータを更新する。また、データ更新部251は、ネットワーク障害時には、サービス提供装置10A,10Bによるデータの参照要求に応答する。
The
更新データ送信部252は、マスタDB21のデータが更新された後、スレーブDBサーバ30にデータが更新されたレコードを送信する。具体的に、更新データ送信部252は、データ更新部251がサービス情報を更新した場合に、直ちに、或いは所定のタイミングで、スレーブDBサーバ30に、更新されたデータと対応するレコードIDとを含むレコードを含め、マスタDB21とスレーブDB31との同期を指示するレプリケーションを送信する。
The update
暫定マスタ制御部253は、スレーブDBサーバ30との間でネットワーク障害が生じた場合、自装置をマスタに暫定的に移行してスレーブDBサーバ30とは非同期でマスタDB21のデータを更新する。暫定マスタ制御部253は、マスタ移行部254、暫定データ更新部255、信頼度通知部256及び整合部257を有する。マスタ移行部254は、スレーブDBサーバ30との間でネットワーク障害が生じた場合、マスタに暫定的に移行する。
When a network failure occurs with the
暫定データ更新部255は、暫定マスタ制御部253によって暫定的にマスタに移行された場合には、外部の装置からデータ更新の指示を受け付けた際に、対向装置とは非同期でマスタDB21のデータを更新する。すなわち、暫定データ更新部255は、スレーブDBサーバ30との間でネットワーク障害が生じた場合には、マスタDBサーバ20に収容されているサービス提供装置10A,10Bによるデータ更新要求に応じて、マスタDB21のデータの更新を行う。
When the provisional
この場合、暫定データ更新部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
信頼度通知部256は、サービス提供装置10A,10Bからデータ参照を要求された場合には、履歴情報を基に、データ参照を要求されたデータの信頼度を判断し、データ参照を要求されたデータとともに、判断した信頼度を応答する。
The
具体的には、信頼度通知部256は、データ参照を要求されたレコードIDのデータの更新回数が所定の閾値以上である場合に、データ参照を要求されたデータの信頼度が低いと判断する。これは、対向するスレーブDBサーバ30でも、このレコードIDのデータが更新されている可能性があり、マスタDB21のデータと、スレーブDB31のデータとが一致しない場合があると考えられるためである。閾値は、通信制御部24を介した上位OpS等の制御や、入力部22から入力された指示情報に応じて、レコードごとに設定される。閾値は、予め設定されていてもよいし、これまでのデータ更新回数の統計を基に定期的に変更されてもよい。
Specifically, the
一方、信頼度通知部256は、データ参照を要求されたレコードIDのデータの更新回数が所定の閾値未満である場合に、データ参照を要求されたデータの信頼度が高いと判断する。これは、対向するスレーブDBサーバ30でも、このレコードIDのデータが更新されている可能性が低く、マスタDB21のデータと、スレーブDB31のデータとが一致する可能性が高いと考えられるためである。
On the other hand, the
整合部257は、ネットワーク障害が回復した場合、スレーブDBサーバ30が保持するデータとマスタDB21が保持するデータとについて、レコード単位でデータの一致度を確認する。整合部257は、一致度を確認したデータ間に差分がある場合には、履歴情報を基に正しいデータを判断し、差分レプリケーションにより、スレーブDBサーバ30との間でこのデータの整合を行う。例えば、整合部257は、スレーブDBサーバ30が保持するデータとマスタDB21が有するデータとのうち、判断対象のレコードについてタイムスタンプが新しいデータが正しいデータであると判断する。
When the network failure is recovered, the
具体的に、図5を参照して、整合部257の整合処理について説明する。図5は、図3に示す整合部257の整合処理を説明する図である。図5では、ネットワーク障害回復時において、マスタDB21が有するデータをテーブルT1´とし、スレーブDB31が保持するデータをテーブルT2´とする。そして、整合部257が、例えば、レコードID「2」について整合処理を行う場合について説明する。
Specifically, the matching process of the
図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
そこで、整合部257は、履歴情報を基に、レコードID「2」については、テーブルT1´及びテーブルT2´のいずれが正しいデータであるかを判断する。まず、整合部257は、レコードID「2」についての、テーブルT1´とテーブルT2´の各タイムスタンプを比較する(図5の(3)参照)。
Therefore, the
そして、整合部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
[スレーブ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
スレーブDB31は、マスタDB21に記憶されるサービス情報を複製した冗長化情報を記憶する。入力部32は、キーボードやマウス等の入力デバイスを用いて実現され、操作者による入力操作に対応して、制御部35に対して処理開始などの各種指示情報を入力する。出力部33は、液晶ディスプレイなどの表示装置、プリンタ等の印刷装置、情報通信装置等によって実現される。
The
通信制御部34は、NIC等で実現され、LANやインターネットなどの電気通信回線を介したマスタDBサーバ20やサービス提供装置10等の外部の装置と制御部35との通信を制御する。
The
制御部35は、各種の処理手順などを規定したプログラム及び所要データを格納するための内部メモリを有し、これらによって種々の処理を実行する。例えば、制御部35は、CPUやMPUなどの電子回路である。制御部35は、図6に例示するように、参照データ管理部351、データ更新部352及び暫定マスタ制御部253を有する。
The
参照データ管理部351は、サービス提供装置10C,10Dからデータの参照要求を受信した際、マスタDB21のデータを該サービス提供装置10C,10Dに参照させる。また、参照データ管理部351は、マスタ不在時には、サービス提供装置10C,10Dからデータの参照要求を受信した際、スレーブDB31の冗長化情報を該サービス提供装置10C,10Dに参照させる。
When receiving a data reference request from the
データ更新部352は、マスタDBサーバ20から、同期の指示を受け付けた際、スレーブDB31のデータを更新する。すなわち、データ更新部352は、マスタDBサーバ20から、データが更新されたレコードを受信した際、スレーブDB31の対応するレコードのデータを、受信したデータに更新する。
The
暫定マスタ制御部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
[平常時の処理]
ここで、平常時の通信システム1の処理について説明する。図7は、平常時の通信システム1の処理の流れの一例を示す図である。
[Normal processing]
Here, the processing of the
例えば、エリア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
サービス提供装置10Cが、ユーザ5Fによるデータ参照要求を受けた場合(図7の(1−2)参照)、マスタDBサーバ20にデータ参照要求を送信し(図7の(2−2)参照)、マスタDBサーバ20によるデータ参照応答をユーザ5Fに送信する。或いは、サービス提供装置10Cは、マスタ不在時には、スレーブDBサーバ30に、データ参照要求を送信し(図7の(2−3)参照)、スレーブDBサーバ30によるデータ参照応答をユーザ5Fに送信する。
When the
[ネットワーク障害時の処理]
次に、ネットワーク障害時の通信システム1の処理について説明する。図8は、通信システム1のネットワーク障害時の処理の流れの一例を示す図である。
[Processing when a network failure occurs]
Next, processing of the
ネットワーク障害が発生し(図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
具体的には、エリア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
そこで、図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
例えば、エリア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
この結果、スレーブ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
そして、エリア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
この結果、マスタ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
続いて、図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
図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
スレーブDBサーバ30は、このデータ参照要求を受け、スレーブDB31のテーブルT2´から、レコードID「2」のデータを参照する。さらに、スレーブDBサーバ30は、レコードID「2」についてのデータの更新回数と閾値(例えば、10)を基に、レコードID「2」のデータの信頼度を判断する。
The
テーブル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
これに従い、サービス提供装置10Cは、スレーブDBサーバ30によるデータ参照応答と、データ信頼度についての通知をユーザ5Fに送信する(図10の(11)参照)。この結果、ユーザ5Fは、応答データの内容とともに、この応答データの信頼度を認知することができる(図10の(12)参照)。言い換えると、ネットワーク障害期間中に参照したデータの信頼度をユーザ側で判別できる。
Accordingly, the
続いて、図11を参照して、ネットワーク復旧後のマスタDB21及びスレーブDB31のデータに対する整合処理について説明する。図11は、通信システム1のネットワーク復旧後のデータに対する整合処理の流れの一例を示す図である。
Next, with reference to FIG. 11, the matching process for the data of the
まず、マスタDBサーバ20及びスレーブDBサーバ30の間でネットワークが復旧すると(図11の(13)参照)、それぞれが、データの差分をチェックする(図11の(14)参照)。この場合、マスタDBサーバ20及びスレーブDBサーバ30は、マスタDB21が保持するデータとスレーブDB31が保持するデータとについて、レコード単位で、データの一致度を確認する。
First, when the network is restored between the
具体的には、マスタ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
図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
[通信システムの処理手順]
次に、図12を参照して、通信システム1の処理手順について説明する。図12は、通信システム1の処理手順を示すシーケンス図である。
[Processing procedure of communication system]
Next, a processing procedure of the
図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
例えば、エリアAのサービス提供装置10Aが、ユーザ5Bによるデータ更新要求を受け(ステップS3−1)、マスタDBサーバ20にデータ更新要求を送信する(ステップS4−1)。マスタDBサーバ20は、データ更新要求があるか否かを判断する(ステップS5−1)。マスタDBサーバ20は、データ更新要求があると判断した場合(ステップS5−1:Yes)、マスタDB21のデータを更新する(ステップS6−1)。
For example, the
また、例えば、サービス提供装置10Aが、ユーザ5Aによるデータ参照要求を受け(ステップS7−1)、マスタDBサーバ20にデータ参照要求を送信する(ステップS8−1)。マスタDBサーバ20は、データ参照要求があるか否かを判断する(ステップS9−1)。マスタDBサーバ20は、データ参照要求があると判断した場合(ステップS9−1:Yes)、参照を要求されたデータの更新回数が、閾値未満であるか、または、参照を要求されたデータの更新回数が所定の閾値以上であるか、を判断する(ステップS10−1)。
Further, for example, the
マスタDBサーバ20は、参照を要求されたデータの更新回数が所定の閾値未満であると判断した場合(ステップS10−1:閾値未満)、このデータの信頼度が高いと判断する(ステップS11−1)。一方、マスタDBサーバ20は、参照を要求されたデータの更新回数が所定の閾値以上であると判断した場合(ステップS10−1:閾値以上)、このデータの信頼度が低いと判断する(ステップS12−1)。
When the
そして、マスタDBサーバ20は、サービス提供装置10Aに、要求されたデータを応答するとともに、該データの信頼度も通知する(ステップS13−1)。これに応じて、サービス提供装置10Aは、マスタDBサーバ20によるデータ参照応答と、データ信頼度についての通知をユーザ5Aに送信する(ステップS14−1)。
Then, the
続いて、マスタDBサーバ20は、データ更新要求がないと判断した場合(ステップS5−1:No)、データ参照要求がないと判断した場合(ステップS9−1:No)、或いは、データ参照応答処理後、ネットワークが復旧したか否かを判断する(ステップS15−1)。マスタDBサーバ20は、ネットワークが復旧していないと判断した場合(ステップS15−1:No)、ステップS5−1に戻る。
Subsequently, the
一方、エリア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
また、例えば、サービス提供装置10Cがユーザ5Fによるデータ参照要求を受け(ステップS7−2)、スレーブDBサーバ30にデータ参照要求を送信した場合(ステップS8−2)、スレーブDBサーバ30は、データ参照要求があると判断し(ステップS9−2:Yes)、参照を要求されたデータの更新回数について判断する(ステップS10−2)。
For example, when the
そして、スレーブDBサーバ30は、参照を要求されたデータの更新回数が所定の閾値未満であると判断した場合(ステップS10−2:閾値未満)、このデータの信頼度が高いと判断する(ステップS11−2)。一方、スレーブDBサーバ30は、参照を要求されたデータの更新回数が所定の閾値以上であると判断した場合(ステップS10−2:閾値以上)、このデータの信頼度が低いと判断する(ステップS12−2)。
Then, when the
そして、スレーブDBサーバ30は、サービス提供装置10Cに、要求されたデータを応答するとともに、該データの信頼度も通知し(ステップS13−2)、サービス提供装置10Cは、データ参照応答とデータ信頼度についての通知をユーザ5Fに送信する(ステップS14−2)。
Then, the
続いて、スレーブDBサーバ30は、データ更新要求がないと判断した場合(ステップS5−2:No)、データ参照要求がないと判断した場合(ステップS9−2:No)、或いは、データ参照応答処理後、ネットワークが復旧したか否かを判断する(ステップS15−2)。スレーブDBサーバ30は、ネットワークが復旧していないと判断した場合(ステップS15−2:No)、ステップS5−2に戻る。
Subsequently, the
そして、マスタDBサーバ20及びスレーブDBサーバ30は、ネットワークが復旧したと判断した場合(ステップS15−1:Yes、ステップS15−2:Yes)、対向する装置を検出し(ステップS16)、同期を取りながら、整合処理を行う(ステップS17−1、ステップS17−2)。マスタDBサーバ20及びスレーブDBサーバ30は、差分レプリケーション(ステップS18)によりデータの整合を行う。
When the
このように、マスタDBサーバ20及びスレーブDBサーバ30は、差分があるデータのみを双方でレプリケーションする差分レプリケーションを行い、差分があるデータのみを整合するため、全データを整合する場合と比較して整合処理時間を短縮することができる。続いて、マスタDBサーバ20は、暫定マスタからマスタに戻り(ステップS19−1)、スレーブDBサーバ30は、暫定マスタからスレーブに戻る(ステップS19−2)。
In this way, the
[整合処理]
次に、図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
そして、整合部257は、マスタDB21のレコードID「n」のデータとスレーブDB31のレコードID「n」のデータとが同一であるか否かを判断する(ステップS23)。整合部257は、比較したレコードID「n」のデータが同一であると判断した場合(ステップS23:Yes)、レコードID「n」のデータを維持する(ステップS24)。
Then, the
一方、整合部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
そして、整合部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
[実施の形態の効果]
このように、本実施の形態では、マスタDBサーバ20及びスレーブDBサーバ30は、いずれも、ネットワーク障害が生じると、マスタに暫定的に移行する。そして、マスタDBサーバ20及びスレーブDBサーバ30は、暫定的にマスタに移行された場合には、外部の装置からデータ更新の指示を受け付けた際に、いずれも、対向サーバとは非同期でデータベースのデータを更新する。
[Effect of the embodiment]
Thus, in this embodiment, both the
したがって、本実施の形態では、スレーブDBサーバ30にしかアクセスできないエリアBにおいても、データ更新処理サービスを継続することが可能になる。すなわち、本実施の形態によれば、マスタ/スレーブによる冗長化構成をとっている構成において、ネットワーク障害によるエリア内のデータ更新処理サービスの中断を防止できるため、ネットワーク障害が長期化した場合においても、サービスの提供が可能となる。
Therefore, in the present embodiment, the data update processing service can be continued even in the area B where only the
また、本実施の形態では、ネットワーク障害によって暫定マスタに移行したマスタDBサーバ20及びスレーブDBサーバ30は、データの参照要求を受けた場合、このデータの更新回数を基にデータの信頼度を判断し、データとともに、このデータの信頼度についてもユーザに応答する。したがって、本実施の形態によれば、ネットワーク障害期間中に参照したデータの信頼度をユーザ側で判別することができる。
In this embodiment, when the
また、本実施の形態では、ネットワーク復旧後、レコード単位でデータチェックを行う。そして、本実施の形態では、差分がある場合には、マスタ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
また、本実施の形態では、ネットワーク復旧後、マスタDBサーバ20及びスレーブDBサーバ30は、差分があるデータのみを双方でレプリケーションする差分レプリケーションを行う。言い換えると、マスタDBサーバ20及びスレーブDBサーバ30は、差分があるデータのみを整合するため、全データを整合する場合と比較して整合処理時間を短縮することができる。すなわち、本実施の形態によれば、ネットワーク障害が長期化した場合においても、サービスの提供が可能となるとともに、サービスの回復を適切かつ短時間で実行することができる。
In the present embodiment, after the network is restored, the
[他の実施の形態]
[システム構成等]
図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。さらに、各装置にて行なわれる各処理機能は、その全部又は任意の一部が、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
メモリ1010は、ROM(Read Only Memory)1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。
The
ハードディスクドライブ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
また、上述した実施の形態の処理で用いられる設定データは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。
The setting data used in the processing of the above-described embodiment is stored as
なお、プログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限らず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、プログラムモジュール1093及びプログラムデータ1094は、ネットワーク(LAN、WAN等)を介して接続された他のコンピュータに記憶されてもよい。そして、プログラムモジュール1093及びプログラムデータ1094は、他のコンピュータから、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。
The
以上、本発明者によってなされた発明を適用した実施の形態について説明したが、本実施の形態による本発明の開示の一部をなす記述及び図面により本発明は限定されることはない。すなわち、本実施の形態に基づいて当業者等によりなされる他の実施の形態、実施例及び運用技術等は全て本発明の範疇に含まれる。 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
22, 32
251 and 352
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 .
前記整合部は、前記対向装置が保持するデータと前記データベースが有するデータとのうちタイムスタンプが新しいデータが正しいと判断することを特徴とする請求項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 .
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)
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)
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 |
-
2016
- 2016-06-03 JP JP2016111762A patent/JP6611254B2/en active Active
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 |