JP5092234B2 - Information processing apparatus, distributed synchronization information system, information synchronization method, and program - Google Patents
Information processing apparatus, distributed synchronization information system, information synchronization method, and program Download PDFInfo
- Publication number
- JP5092234B2 JP5092234B2 JP2005360713A JP2005360713A JP5092234B2 JP 5092234 B2 JP5092234 B2 JP 5092234B2 JP 2005360713 A JP2005360713 A JP 2005360713A JP 2005360713 A JP2005360713 A JP 2005360713A JP 5092234 B2 JP5092234 B2 JP 5092234B2
- Authority
- JP
- Japan
- Prior art keywords
- update
- information
- data
- synchronization
- 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.)
- Expired - Fee Related
Links
- 230000010365 information processing Effects 0.000 title claims description 170
- 238000000034 method Methods 0.000 title claims description 80
- 230000005540 biological transmission Effects 0.000 claims description 93
- 230000001360 synchronised effect Effects 0.000 claims description 60
- 238000012217 deletion Methods 0.000 claims description 32
- 230000037430 deletion Effects 0.000 claims description 32
- 230000000644 propagated effect Effects 0.000 description 26
- 238000004891 communication Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000003780 insertion Methods 0.000 description 2
- 230000037431 insertion Effects 0.000 description 2
- 229920001690 polydopamine Polymers 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、情報処理装置、分散同期型情報システム、情報同期方法、及び、プログラムに関し、更に詳しくは、データベースを有する複数の情報装置間でデータベースのデータを同期する情報処理装置、分散同期型情報システム、情報同期方法、及び、プログラムに関する。 The present invention relates to an information processing device, a distributed synchronization information system, an information synchronization method, and a program, and more particularly, an information processing device that synchronizes database data among a plurality of information devices having a database, and distributed synchronization information. The present invention relates to a system, an information synchronization method, and a program.
従来、情報システムとして用いられているものには、LDAPやSun Microsystems社によるNISがある。これらの情報システムは、サーバ・クライアント方式のシステムとして構成されており、クライアントの端末を、ネットワークから切断した状態で持ち運ぶ場合には、端末側からデータベースにアクセスすることができない。端末を、ネットワークから切断した状態で使用する方法としては、サーバ上のデータベースを、端末にコピーして持ち運ぶ方法が考えられる。しかし、この場合には、ネットワークから切断された状態でもデータベースを参照することはできるものの、複数の端末でデータベースの更新が行われた場合には、データベース内のデータを複数の端末間で同期することができない。 Conventionally used information systems include LDAP and NIS by Sun Microsystems. These information systems are configured as a server / client system, and when a client terminal is carried while disconnected from the network, the database cannot be accessed from the terminal side. As a method of using the terminal while disconnected from the network, a method of copying the database on the server to the terminal and carrying it can be considered. However, in this case, the database can be referred to even when disconnected from the network. However, when the database is updated at a plurality of terminals, the data in the database is synchronized between the plurality of terminals. I can't.
端末をネットワークから切断してデータ更新を行った場合には、ネットワーク再接続時に、端末間でデータベース内の全てのデータを送受信し、双方のデータを比較することで、各端末のデータベースを同期することができる。しかし、その場合には、送受信データ量が膨大になるという問題がある。このような問題を解決する従来技術としては、例えば特許文献1に記載された技術がある。特許文献1では、サーバ上のデータベースをマスターとし、クライアント上のデータベースを非マスターとする。クライアントは、ネットワークから切断された後の更新を、差分情報としてテーブルに記憶する。ネットワーク再接続時には、サーバとの間で差分情報を送受信し、マスターと非マスターとで同期を取る。
When data is updated after the terminal is disconnected from the network, all data in the database is transmitted and received between the terminals when the network is reconnected, and the databases of each terminal are synchronized by comparing both data. be able to. However, in that case, there is a problem that the amount of transmitted / received data becomes enormous. As a conventional technique for solving such a problem, there is a technique described in
複数の情報機器(情報処理装置)間で情報を同期する技術としては、非特許文献1に記載された技術がある。非特許文献1では、各情報機器を対等に扱い、ネットワーク接続時に、それぞれが持つ更新情報を同期する。図21は、非特許文献1に記載の技術における情報同期の様子を示している。各情報機器は、データベース2101のデータに対して、更新情報のログ2102を保持する。ログ2102には、データベース2101について、どの部分をどのような値に更新したかを示す情報に加え、その更新を行った機器のIDと、更新を行った時刻とが含まれる。
As a technique for synchronizing information among a plurality of information devices (information processing apparatuses), there is a technique described in
非特許文献1では、2つの情報機器間で情報同期を行い、これを繰り返すことにより、複数の情報機器間で情報同期を行う。2つの情報機器間での情報同期では、一方の情報機器(受信側)は、自装置が持つログ2102を走査し、各機器IDについて、最も遅い更新時刻を求め、これを、他方の情報機器(送信側)に送信する。送信側機器は、ログ2102を走査し、各機器IDについて、受信側機器から通知された更新時刻以降に行われた更新を、受信側機器に渡す。これにより、送信側機器が保持していて、受信側機器が保持していない情報を、受信側機器に伝えることができる。受信側機器と送信側機器との立場を入れ替え、同様の操作を行うことにより、両者の情報を同期させることができる。
In
特許文献1では、マスターとなるデータベースはただ一つであり、全ての同期は、マスターとの間で1対1で行う必要がある。非マスターのクライアント同士が更新の同期を行う場合について考えると、クライアントが持っている情報は、マスターとの差分のみであるため、互いが未知の情報を交換することはできず、非マスターのクライアント同士では、同期を行うことができない。例えば、家庭内の機器群やPDAなど携帯型情報機器の同期を考える場合、特許文献1では、携帯する情報機器相互間で同期を行うことができない。また、マスターとなる情報機器は、同期時には常にネットワークに接続され、電源が投入されていなければならないという問題がある。
In
非特許文献1に記載の技術では、全ての更新情報をログ2102に保存する必要があり、ログ情報が膨大となるため、実装に際して、多量の記憶領域が必要になるという問題がある。ログ2102のどの部分が不要であるかを、何らかの手法で判断することも考えられるが、その場合には、アルゴリズムが複雑となる。また、非特許文献1では、更新情報をログ形式で管理しているため、ログ走査に時間がかかり、情報同期時の効率が悪い。更に、特許文献1を含め、従来技術では、情報同期が2つの情報機器間での同期のみに限定されており、複数の情報機器間で同期を行う場合には、2つの情報機器間での情報同期を繰り返し行う必要があり、情報同期時に、多数回の通信が必要であるという問題がある。
In the technique described in Non-Patent
本発明は、上記従来技術の問題点を解消し、多量の記憶領域を必要とせずに、各機器が記憶するデータを効率よく同期できる情報処理装置、分散同期型情報システム、情報同期方法、及び、プログラムを提供することを目的とする。 The present invention solves the above-mentioned problems of the prior art, an information processing apparatus capable of efficiently synchronizing data stored in each device without requiring a large amount of storage area, a distributed synchronization information system, an information synchronization method, and The purpose is to provide a program.
上記目的を達成するために、本発明の分散同期型情報システムは、それぞれがデータベースを有する複数の情報処理装置を備え、該情報処理装置の間で前記データベースを同期させる分散同期型情報システムにおいて、前記情報処理装置のそれぞれが、自装置が有するデータベースの各データと、該データに反映されている最新の更新を行った情報処理装置である更新装置を示す更新装置情報と該更新装置が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報と、を対応付けて記憶する記憶手段と、前記記憶手段に記憶されている同期情報を検索し、自装置が有するデータベースに反映されている更新の内で、更新装置それぞれが実行した最新の更新を特定する特定手段と、前記特定手段により特定された更新装置それぞれの最新の更新を示す最新更新情報を含む更新情報送信要求を他の情報処理装置に送信する更新情報送信要求手段と、前記更新情報送信要求を受信した他の情報処理装置から、前記他の情報処理装置が有するデータベースに反映された更新の内で前記最新更新情報が示す更新装置それぞれの最新の更新よりも後に該更新装置である情報処理装置が更新装置として更新を実行したデータの更新データと該更新データに対応する同期情報とを含む更新情報を受信し、受信した更新情報に基づいて、自装置内の前記データベースの対応するデータ及び該データに対応する同期情報を更新する第1のデータベース同期手段と、を備えたことを特徴とする。 In order to achieve the above object, a distributed synchronous information system according to the present invention includes a plurality of information processing apparatuses each having a database, and the distributed synchronous information system synchronizes the database among the information processing apparatuses. each of the information processing apparatus, and the data in the database by the local apparatus has, the latest update is an information processing apparatus that has performed the shows the updating device updates the device information and the device for updating are reflected in the data is performed storage means for storing in association with synchronization information, including the order information for determining the executed order of updates among the data update, find the synchronization information stored in the storage means, among the updates that are reflected in the database where the information processing apparatus having a specifying means for specifying the latest updates, each update device executes, by the specifying means And update information transmission request means for transmitting the update information transmission request that includes the latest update information indicating the most recent updating of the respective constant has been updated device to another information processing apparatus, another information processing apparatus that has received the update information transmission request From the update reflected in the database of the other information processing apparatus, the information processing apparatus that is the update apparatus executes the update as the update apparatus after the latest update of each update apparatus indicated by the latest update information and receiving the update information including the synchronization information corresponding to the updated data and the updated data of the data, based on the received update information, the corresponding data and synchronization information corresponding to the data of the database in its own apparatus a first database synchronization means for updating the characterized by comprising a.
本発明のデータベース同期方法は、それぞれがデータベースを有する複数の情報処理装置を備え、該情報処理装置の間で前記データベースを同期させる分散同期型情報システムにおけるデータベース同期方法において、前記情報処理装置が、データベース更新時に、更新されたデータと、該データに反映されている最新の更新を行った情報処理装置である更新装置を示す更新装置情報と前記更新装置が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報と、を対応付けて記憶するステップと、前記情報処理装置が、前記同期情報を検索し、自装置が有するデータベースに反映されている更新の内で、更新装置それぞれが実行した最新の更新を示す最新更新情報を含む更新情報送信要求を他の情報処理装置に送信するステップと、前記情報処理装置が、前記更新情報送信要求を受信した他の情報処理装置から、前記他の情報処理装置が有するデータベースに反映された更新の内で前記最新更新情報が示す更新装置それぞれの最新の更新よりも後に該更新装置である情報処理装置が更新装置として更新を実行したデータの更新データと該更新データに対応する同期情報とを含む更新情報を受信するステップと、前記情報処理装置が、受信した更新情報に基づいて、自装置内の前記データベースの対応するデータ及び該データに対応する同期情報を更新するステップと、を有することを特徴とする。 The method database synchronization of the invention, each provided with a plurality of information processing apparatus having a database, Oite the database synchronization method in a distributed synchronization information system for synchronizing the databases between the information processing apparatus, the information processing apparatus Are updated data, update device information indicating an update device that is an information processing device that has performed the latest update reflected in the data, and data update performed by the update device. And storing the synchronization information including the order information for determining the order in which the update has been executed in association with each other, and the information processing apparatus searches for the synchronization information and is reflected in the database of the own apparatus. Update information transmission request including the latest update information indicating the latest update executed by each of the update devices. Transmitting to the processing device; and the information processing device from the other information processing device that has received the update information transmission request, the latest update information in the update reflected in the database of the other information processing device Receiving update information including update data of data that has been updated by the information processing apparatus as the update apparatus and the synchronization information corresponding to the update data after the latest update of each of the update apparatuses indicated by And, based on the received update information, the information processing apparatus updates the corresponding data in the database in the own apparatus and the synchronization information corresponding to the data.
本発明の情報処理装置は、データベースを有し、ネットワークを介して接続される他の情報処理装置との間で前記データベースを同期する情報処理装置において、前記データベースの各データと、該データに反映されている最新の更新を行った情報処理装置である更新装置を示す更新装置情報と該更新装置が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報と、を対応付けて記憶する記憶手段と、前記記憶手段に記憶されている同期情報を検索し、自装置が有するデータベースに反映されている更新の内で、更新装置それぞれが実行した最新の更新を特定する特定手段と、前記特定手段により特定された更新装置それぞれの最新の更新を示す最新更新情報を含む更新情報送信要求を他の情報処理装置に送信する更新情報送信要求手段と、前記更新情報送信要求を受信した他の情報処理装置から、前記他の情報処理装置が有するデータベースに反映された更新の内で前記最新更新情報が示す更新装置それぞれの最新の更新よりも後に該更新装置である情報処理装置が更新装置として更新を実行したデータの更新データと該更新データに対応する同期情報とを含む更新情報を受信し、受信した更新情報に基づいて、自装置内の前記データベースの対応するデータ及び該データに対応する同期情報を更新する第1のデータベース同期手段と、を備えたことを特徴とする。 The information processing apparatus of the present invention has a database, the information processing apparatus for synchronizing the database with the other information processing apparatus connected via a network, and the data of the database, reflected in the data and a sequence information for determining the order in which the latest update to update device information and the updating device showing a updating device is an information processing apparatus that has performed is the execution of the update among the data update run being and synchronization information, storage means for storing in association with each other, searches the synchronization information stored in the storage unit, among the updates that are reflected in the database where the information processing apparatus has, latest each update device has performed specifying means for specifying the update other information processing update information transmission request that includes the latest update information indicating respective latest updates identified updated device by the specifying means And update information transmission request means for transmitting device, from said other information processing apparatus that has received the update information transmission request, the latest update information indicating updates among the reflected in the database by another information processing apparatus having updated receives the update information including the synchronization information device information processing apparatus is the further new device later than each of the most recent update corresponding to the updated data and the updated data of the data performed the update as an update device, the received based on the update information, comprising the corresponding, the first database synchronization means for updating the synchronization information corresponding to the data and the data of the database in its own device.
本発明のプログラムは、コンピュータが有するデータベースを、ネットワークを介して接続される他のコンピュータのデータベースと同期させるプログラムであって、前記コンピュータに、データベース更新時に、更新されたデータと、該データに反映されている最新の更新を行ったコンピュータである更新コンピュータを示す更新コンピュータ情報と前記更新コンピュータが実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報と、を対応付けて記憶するステップと、前記同期情報を検索し、自コンピュータが有するデータベースに反映されている更新の内で、更新コンピュータそれぞれが実行した最新の更新を示す最新更新情報を含む更新情報送信要求を他のコンピュータに送信するステップと、前記更新情報送信要求を受信した他のコンピュータから、前記他のコンピュータが有するデータベースに反映された更新の内で前記最新更新情報が示す更新コンピュータそれぞれの最新の更新よりも後に該更新コンピュータであるコンピュータが更新コンピュータとして更新を実行したデータの更新データと該更新データに対応する同期情報とを含む更新情報を受信するステップと、受信した更新情報に基づいて、自コンピュータが有するデータベースの対応するデータ及び該データに対応する同期情報を更新するステップと、を実行させることを特徴とする。 Program of the present invention, a database computer having a program for causing synchronized with the database of another computer connected via a network, the computer, at the time of database update, and the updated data, reflected in the data synchronization information including the order information for determining the latest update computer information and the updating computer of a computer and is updated computer that made the update was performed in the update among the data update execution order in which they are When the steps of storing in association with each other, to find the synchronization information, among the updates that are reflected in the database itself computer has, updates including the latest update information indicating the most recent updating each update computer executes Sending an information transmission request to another computer The from the update information transmission request another that received the computer, is the updated computer later than the latest update information indicates the update computers each latest updates among the updates that have been reflected in the database that the other computer has A step of receiving update information including update data of data that has been updated by the computer as an update computer and synchronization information corresponding to the update data , and a database corresponding to the own computer based on the received update information characterized in that to execute updating the synchronization information corresponding to the data and the data.
本発明の分散同期型情報システム、情報処理装置、データベース同期方法、及び、プログラムでは、データベースの各データに対応して、そのデータを更新した更新装置(更新コンピュータ)を示す更新装置情報(更新コンピュータ情報)と、該更新装置(該更新コンピュータ)が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報を記憶する。この同期情報を検索することで、自装置(コンピュータ)が有するデータベース内において、更新装置(更新コンピュータ)それぞれが実行した、最新の更新が何であるかを知ることができる。他の情報処理装置(コンピュータ)との同期時には、同期情報を検索して、自装置(自コンピュータ)が有するデータベースに反映されている更新の内で、更新装置(更新コンピュータ)それぞれが実行した最新の更新を示す最新更新情報を取得し、これを他の情報処理装置(コンピュータ)に送信し、その他の情報処理装置(コンピュータ)から、該他の情報処理装置(コンピュータ)が有するデータベースに反映された更新の内で前記最新更新情報が示す更新装置(更新コンピュータ)それぞれの最新の更新よりも後に該更新装置(更新コンピュータ)である情報処理装置(コンピュータ)が更新装置(更新コンピュータ)として更新を実行したデータの更新データを受信して、データベースの対応するデータを更新する。このようにすることにより、データベース内の全てのデータを比較しなくても、自装置のデータベースでされていない更新を取得することができ、データベース内の全データを送受信して比較する場合に比して、送受信されるデータ量を少なくすることができる。また、更新ログを保存する場合には、更新が行われるたびに更新ログの行が増えていき、更新回数の増加に伴って更新ログのサイズが増大するが、本発明では、データベースの各データに対応して同期情報を記憶するため、更新回数が増えても同期情報のサイズは増大せず、更新ログを保存する場合に比して、必要な記録領域が少なくて済む。 In the distributed synchronous information system, information processing apparatus, database synchronization method, and program of the present invention, update apparatus information (update computer) that indicates an update apparatus (update computer) that has updated the data corresponding to each data in the database and information), and stores the synchronization information including the order information for determining the executed order of updates among the data updates the update device (the updated computer) is executed. This synchronization information is searched that the, in the database where the information processing apparatus (computer) having, executed each update device (updated computer), it is possible to know the latest update is. When synchronizing with other information processing devices (computers) , the synchronization information is searched , and the update executed by each of the update devices (update computers) among the updates reflected in the database of the own device (own computer) get the latest update information indicating the update, which was transmitted to the other information processing apparatus (computer), the other information processing apparatus (computer), are reflected in the database the another information processing apparatus (computer) has It said among update latest update information indicates the update unit (update computer) information processing apparatus the further a new device (updated computer) later than each of the most recent update (computer) to update the update unit (update computer) The update data of the executed data is received and the corresponding data in the database is updated. By doing so, it is possible to obtain updates that are not made in the database of the own device without comparing all the data in the database, compared with the case where all the data in the database is transmitted and received and compared. Thus, the amount of data transmitted and received can be reduced. In addition, when an update log is stored, the number of update log lines increases each time an update is performed, and the size of the update log increases as the number of updates increases. Therefore, the size of the synchronization information does not increase even if the number of updates increases, and a smaller recording area is required than when an update log is stored.
本発明の分散同期型情報システムは、自装置内で更新装置としてデータベースのデータを更新すると、自装置が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報を作成し、当該更新されたデータに対応する同期情報に、該データの更新装置として自装置を示す最新更新情報と前記作成された順番情報とを反映させるために同期情報を更新する同期情報更新手段を更に備える構成を採用できる。本発明のデータベース同期方法は、前記同期情報を記憶するステップでは、前記情報処理装置は、自装置内で更新装置としてデータベースのデータを更新すると、自装置が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報を作成し、当該更新されたデータに対応する同期情報に、該データの更新装置として自装置を示す最新更新情報と前記作成された順番情報とを反映させるために同期情報を更新する構成を採用できる。 Distributed synchronization information system of the present invention, updating the data in the database and an update device in the own device, the order information for determining the order in which the own apparatus has been executed in the update among the data update run create and the update synchronization information corresponding to the data, the synchronization information update to update the synchronization information to reflect the order information and the latest update information indicating the own device as updating device of the data is the creation A configuration further comprising means can be adopted. The method database synchronization of the present invention, in the step of storing the synchronization information, the information processing apparatus, updating the data in the database and an update device in the self apparatus, wherein among the data updating device itself has performed create an order information for determining is performed in the update order, and the update synchronization information corresponding to the data, the order information and the latest update information indicating the own device as updating device of the data is the creation It is possible to adopt a configuration in which the synchronization information is updated to reflect the above.
本発明の分散同期型情報システム及びデータベース同期方法では、前記順番情報が、前記情報処理装置が更新装置として自装置のデータベースを更新するたびにインクリメントされる情報処理装置ごとのイベント番号である構成を採用できる。また、本発明のプログラムでは、前記順番情報が、前記コンピュータが更新コンピュータとしてデータベースを更新するたびにインクリメントされるコンピュータごとのイベント番号である構成を採用できる。この場合、イベント番号の大小を比較することにより、データベースを更新した更新装置(更新コンピュータ)ごとに、更新の順番を判定することができる。更新の順番を判定する情報としては、更新時刻を用いることもできる。その場合には、更新時刻の前後により、更新装置(更新コンピュータ)ごとに、更新の順番を判定できる。 In the distributed synchronous information system and the database synchronization method of the present invention, the order information is an event number for each information processing device that is incremented each time the information processing device updates its own database as the update device. Can be adopted. In the program of the present invention, a configuration may be employed in which the order information is an event number for each computer that is incremented each time the computer updates a database as an update computer. In this case, by comparing the event numbers, the update order can be determined for each update device (update computer) that updated the database. The information to determine the order of the update, it is also possible to use the update time. In this case, the update order can be determined for each update device (update computer) before and after the update time.
本発明の分散同期型情報システムでは、前記同期情報は、対応するデータに反映されている最新の更新が実行された更新時刻を含み、前記第1のデータベース同期手段は、前記更新情報に含まれる同期情報の更新時刻が、前記更新情報に含まれる同期情報に対応する自装置が記憶する同期情報の更新時刻よりも新しいと、前記更新情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新する構成を採用できる。本発明のデータベース同期方法では、前記同期情報は、対応するデータに反映されている最新の更新が実行された更新時刻を含み、前記データベースの対応するデータ及び該データに対応する同期情報を更新するステップでは、前記情報処理装置は、前記更新情報に含まれる同期情報の更新時刻が、前記更新情報に含まれる同期情報に対応する自装置が記憶する同期情報の更新時刻よりも新しいと、前記更新情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新する構成を採用できる。本発明のプログラムでは、前記同期情報は、対応するデータに反映されている最新の更新が実行された更新時刻を含み、前記データベースの対応するデータ及び該データに対応する同期情報を更新するステップでは、前記更新情報に含まれる同期情報の更新時刻が、前記更新情報に含まれる同期情報に対応する自装置が記憶する同期情報の更新時刻よりも新しいと、前記更新情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新する構成を採用できる。この場合、新しいデータが、古いデータによって更新されることを防ぐことができる。更新時刻は、順番情報に付加する形で同期情報に含めることができ、或いは、順番情報として更新時刻を用いる場合には、これと共用してもよい。 In the distributed synchronous information system of the present invention, the synchronization information includes an update time when the latest update reflected in the corresponding data is executed , and the first database synchronization means is included in the update information. If the update time of the synchronization information is newer than the update time of the synchronization information stored in the device corresponding to the synchronization information included in the update information, the corresponding data in the database and the data are stored in the data based on the update information. A configuration for updating the corresponding synchronization information can be employed. In the database synchronization method of the present invention, the synchronization information includes an update time at which the latest update reflected in the corresponding data is executed, and updates the corresponding data in the database and the synchronization information corresponding to the data. in step, said information processing apparatus, the update time of the synchronization information included in the update information, the newer than the update time of the synchronization information device itself stored corresponding to the synchronization information included in the update information, the update Based on the information, it is possible to adopt a configuration for updating the corresponding data in the database and the synchronization information corresponding to the data . In the program of the present invention, the synchronization information includes a modification time the latest update is performed which is reflected in the corresponding data in the corresponding data and updating the synchronization information corresponding to the data of the database If the update time of the synchronization information included in the update information is newer than the update time of the synchronization information stored in the device corresponding to the synchronization information included in the update information, the update information is stored in the database based on the update information . A configuration in which corresponding data and synchronization information corresponding to the data are updated can be adopted. In this case, new data can be prevented from being updated by old data. Update time may be included in the synchronization information in the form to be added to the order information, or, in the case of using the update time as the order information may be shared with this.
本発明の分散同期型情報システム及びデータベース同期方法では、前記同期情報が、現時点までに、該同期情報に対応するデータに反映された更新を実行した情報処理装置を示す情報と、該情報処理装置での前記更新の順番情報と、の組により前記データの更新の履歴を表す更新履歴を更に含む構成を採用できる。本発明のプログラムでは、記同期情報が、現時点までに、該同期情報に対応するデータに反映された更新を実行したコンピュータを示す情報と、該コンピュータでの前記更新の順番情報と、の組により前記データの更新の履歴を表す更新履歴を更に含む構成を採用できる。この場合、更新履歴を参照することで、どのような経路で更新が行われたかを知ることができる。 In the distributed synchronization type information system and the database synchronization method of the present invention, the synchronization information is information indicating an information processing apparatus that has executed an update reflected in data corresponding to the synchronization information up to the present time, and the information processing and the update order information in the equipment, the further comprises configuration update history indicating the history of update of the data by a set of possible adoption. The program of the present invention, the serial synchronization information, so far, the information indicating the computer that performed the update reflected in the data corresponding to the synchronous information, and order information of the update in the computer, the It is possible to employ a configuration that further includes an update history representing the update history of the data according to the set. In this case, by referring to the update history, it is possible to know what route is used for the update.
本発明の分散同期型情報システムでは、前記第1のデータベース同期手段は、受信した更新情報に含まれる更新履歴と、該更新履歴に対応する自装置が記憶する更新履歴とを比較し、受信した更新情報に含まれる更新履歴が、前記自装置が記憶する更新履歴を含み且つ前記自装置が記憶する更新履歴が示す最新の更新よりも後に実行された更新を含むと判定すると、前記更新情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新する構成を採用できる。本発明のデータベース同期方法は、前記情報処理装置が、前記同期情報を更新するステップの前に実行され、受信した更新情報に含まれる更新履歴と、該更新履歴に対応する自装置が記憶する更新履歴とを比較するステップを更に有し、前記情報処理装置は、受信した更新情報に含まれる更新履歴が、前記自装置が記憶する更新履歴を含み且つ前記自装置が記憶する更新履歴が示す最新の更新よりも後に実行された更新を含むと判定すると、前記更新情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新する構成を採用できる。本発明のプログラムでは、前記コンピュータに、受信した更新情報に含まれる更新履歴と、該更新履歴に対応する自装置が記憶する更新履歴とを比較するステップを前記同期情報を更新するステップの前に更に実行させ、前記データベースの対応するデータ及び該データに対応する同期情報を更新するステップでは、更新履歴を比較するステップで、受信した更新情報に含まれる更新履歴が、自装置が記憶する更新履歴を含み且つ前記自装置が記憶する更新履歴が示す最新の更新よりも後に実行された更新を含むと判定されると、前記更新情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新する構成を採用できる。受信した更新情報の同期情報に含まれる更新履歴が、自装置が記憶する同期情報の更新履歴を含み且つ前記自装置が記憶する更新履歴が示す最新の更新よりも後に実行された更新を含む場合には、途中の更新までは同じ経路で更新されており、その後、自装置以外の情報処理装置(コンピュータ)において、新たな更新がされたことを示している。このような場合には、受信した更新情報で、データベース及び同期情報を更新しても問題はなく、受信した更新情報でデータベースを更新することにより、他の情報処理装置(コンピュータ)との間でデータベースを同期することができる。 In the distributed synchronous information system of the present invention, the first database synchronization means compares the update history included in the received update information with the update history stored in the device corresponding to the update history, and receives the update history. When it is determined that the update history included in the update information includes an update history stored in the own device and an update executed after the latest update indicated by the update history stored in the own device, the update information includes Based on this, it is possible to adopt a configuration in which the corresponding data in the database and the synchronization information corresponding to the data are updated. In the database synchronization method of the present invention, the information processing apparatus is executed before the step of updating the synchronization information , and the update history included in the received update information and the update stored in the own apparatus corresponding to the update history are stored. The information processing apparatus further includes a step of comparing with a history, and the information processing apparatus includes an update history included in the received update information including an update history stored in the own apparatus and an update history indicated by the update history stored in the own apparatus. If it is determined that the update executed after the update is included, a configuration in which the corresponding data in the database and the synchronization information corresponding to the data are updated based on the update information can be employed. In the program of the present invention, before the step of updating the synchronization information, the computer compares the update history included in the received update information with the update history stored in the device corresponding to the update history. In the step of further executing and updating the corresponding data in the database and the synchronization information corresponding to the data, the update history included in the received update information is the update history stored in the own device in the step of comparing the update history And an update executed after the latest update indicated by the update history stored in the device, the data corresponding to the database and the data corresponding to the data are determined based on the update information. A configuration for updating the synchronization information can be employed. When the update history included in the synchronization information of the received update information includes an update history of the synchronization information stored in the own device and includes an update executed after the latest update indicated by the update history stored in the own device Indicates that the update is performed on the same route until the update in the middle, and then a new update is performed in the information processing apparatus (computer) other than the own apparatus. In such a case, there is no problem even if the database and the synchronization information are updated with the received update information. By updating the database with the received update information, it is possible to communicate with other information processing apparatuses (computers). You can synchronize the database.
本発明の分散同期型情報システムは、情報処理装置ごとに該情報処理装置が有するデータベースに反映された更新の内で更新装置それぞれが実行した最新の更新を示す更新伝播情報を参照して、自装置が記憶する前記更新履歴から、全ての情報処理装置のデータベースで反映されている更新より前の更新の履歴を削除する履歴削除手段を更に備える構成を採用できる。本発明のデータベース同期方法は、前記情報処理装置が、情報処理装置ごとに該情報処理装置が有するデータベースに反映された更新の内で更新装置それぞれが実行した最新の更新を示す更新伝播情報を参照して、自装置が記憶する前記更新履歴から、全ての情報処理装置のデータベースで反映されている更新より前の更新の履歴を削除するステップを更に有する構成を採用できる。本発明のプログラムは、前記コンピュータに、コンピュータごとに該コンピュータが有するデータベースに反映された更新の内で更新コンピュータそれぞれが実行した最新の更新を示す更新伝播情報を参照して、自装置が記憶する前記更新履歴から、全てのコンピュータのデータベースで反映されている更新より前の更新の履歴を削除するステップを更に実行させる構成を採用できる。各情報処理装置(コンピュータ)は、更新伝播情報により、各情報処理装置(コンピュータ)について、各情報処理装置(コンピュータ)が有するデータベースでどの時点の更新までの更新が行われたかを更新装置(更新コンピュータ)ごとに管理する。この更新伝播情報を調べることにより、更新装置(更新コンピュータ)ごとに、最低限、どの時点までの更新が全ての情報処理装置(コンピュータ)のデータベースでされたかを特定することができる。例えば、更新の順番を判定するための順番情報としてイベント番号を用いる場合、ある更新装置(更新コンピュータ)について、各情報処理装置(コンピュータ)での、その更新装置(更新コンピュータ)の最新の更新を示す情報のうちで最も古い更新を示す情報(イベント番号の最小値)がイベント番号「8」であれば、イベント番号「8」までの更新は、全ての情報処理装置(コンピュータ)のデータベースでされていると特定できる。この場合には、その更新装置(更新コンピュータ)におけるイベント番号「8」以前の更新履歴は、既に全ての情報処理装置(コンピュータ)のデータベースで更新されているので不要であると判定できる。このような不要な更新履歴を削除することにより、更新回数の増加に伴って更新履歴が増大することを避けることができる。 Distributed synchronization information system of the present invention, the latest update, each update device has performed among the updates that have been reflected in the database in which the information processing apparatus has for each information processing device with reference to indicate to update propagation information Thus, it is possible to employ a configuration further comprising history deletion means for deleting the update history before the update reflected in the database of all information processing apparatuses from the update history stored in the own apparatus . The method database synchronization of the present invention, the information processing apparatus, information processing apparatus latest indicates update to update propagation, each update device among the updates that have been reflected in the database in which the information processing apparatus has is executed for each It is possible to employ a configuration that further includes a step of deleting the update history before the update reflected in the database of all the information processing devices from the update history stored in the own device with reference to the information. Program of the present invention, in the computer, the latest update, each update computer is running within the updates that have been reflected in the database to which the computer has for each computer with reference to indicate to update propagation information, the own device A configuration can be adopted in which the step of deleting the history of updates prior to the update reflected in the database of all computers is further executed from the update history stored . Each information processing apparatus (computer), the update propagation information for each information processing apparatus (computer), updated device or update has been performed to update any point in the database the information processing apparatus (computer) has (updated Manage each computer) . By examining this update propagation information, it is possible to specify, at a minimum, for each update device (update computer) , up to which point the update has been performed in the database of all information processing devices (computers) . For example, when using an event number as the order information for determining the order of the update, for a renewal device (updated computer), in the information processing apparatus (computer), the latest update of the update device (updated computer) If the information indicating the oldest update (the minimum value of the event number) is the event number “8”, the update up to the event number “8” is performed in the database of all information processing apparatuses (computers). Can be identified. In this case, the event number "8" previous update history that put on the update unit (update computer) can be determined to be unnecessary because it is updated in the database already all information processing apparatus (computer). By deleting such an unnecessary update history, it is possible to avoid an increase in the update history as the number of updates increases.
本発明の分散同期型情報システムは、自装置内で更新装置としてデータベースのデータを更新すると、ネットワーク接続中の他の情報処理装置に、更新データと、該更新データに対応する同期情報とを送信する更新伝播手段と、他の情報処理装置の更新伝播手段によって送信された更新データ及び同期情報を受信し、受信した更新データ及び同期情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新する第2のデータベース同期手段と、を更に備える構成を採用できる。本発明のデータベース同期方法は、前記情報処理装置が、自装置内で更新装置としてデータベースのデータを更新すると、ネットワーク接続中の他の情報処理装置に、更新データと、該更新データに対応する同期情報とを送信するステップと、前記情報処理装置が、他の情報処理装置により送信された更新データ及び同期情報を受信し、受信した更新データ及び同期情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新するステップと、を更に有する構成を採用できる。本発明のプログラムは、前記コンピュータに、自装置内で更新コンピュータとしてデータベースのデータを更新すると、ネットワーク接続中の他のコンピュータに、更新データと、該更新データに対応する同期情報とを送信するステップと、他のコンピュータから送信された更新データ及び該更新データに対応する同期情報を受信し、受信した更新データ及び該更新データに対応する同期情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新するステップと、を更に実行させる構成を採用できる。この場合、ある情報処理装置(コンピュータ)で行われたデータベースの更新が、ネットワーク接続中の他の情報処理装置(コンピュータ)に反映されることで、ネットワーク接続中の情報処理装置(コンピュータ)間で、データベースを同期させることができる。 When the distributed synchronous information system of the present invention updates the data in the database as an update device in its own device, it transmits the update data and the synchronization information corresponding to the update data to other information processing devices connected to the network. to the update propagation means, receiving the update data and synchronization information transmitted by the update propagation means in the other information processing apparatus, based on the received update data and synchronization information, corresponding to the corresponding data and said data of said database a second database synchronization means for updating the synchronization information, the further comprises constituting a possible adoption. In the database synchronization method of the present invention, when the information processing apparatus updates the data in the database as an update apparatus within itself, the other information processing apparatuses connected to the network are notified of the update data and the synchronization corresponding to the update data. Transmitting information, and the information processing device receives update data and synchronization information transmitted by another information processing device, and based on the received update data and synchronization information, the corresponding data in the database and and updating the synchronization information corresponding to the data, the arrangement further comprising a can be adopted. The program according to the present invention includes a step of transmitting update data and synchronization information corresponding to the update data to another computer connected to the network when updating the data in the database as an update computer within the apparatus. When receives the synchronization information corresponding to the updated data and the updated data sent from another computer, based on the received update data and synchronization information corresponding to the updated data, the corresponding data and said data of said database further possible adopt a configuration to execute, and updating the synchronization information corresponding to. In this case, the updating of that made the database at a certain information processing apparatus (computer), that is reflected in the other information processing apparatus in the network connection (computer), among the information processing apparatus in the network connection (computer) The database can be synchronized.
本発明の分散同期型情報システムでは、他の情報処理装置から更新情報送信要求を受信すると、前記特定手段は、自装置が記憶する同期情報を検索して、受信した更新情報送信要求に含まれる最新更新情報が示す更新装置それぞれの最新の更新よりも後に該更新装置である情報処理装置が更新装置として実行した更新を特定し、前記特定された更新の更新データと、該更新データに対応する同期情報とを含む更新情報を、前記更新情報送信要求を送信した情報処理装置に向けて送信する更新情報送信手段を更に備える構成を採用できる。本発明のデータベース同期方法は、前記情報処理装置が、他の情報処理装置から更新情報送信要求を受信すると、自装置が記憶する同期情報を検索して、受信した更新情報送信要求に含まれる最新更新情報が示す更新装置それぞれの最新の更新よりも後に該更新装置である情報処理装置が更新装置として実行した更新を特定するステップと、前記情報処理装置が、前記特定された更新の更新データと、該更新データに対応する同期情報とを含む更新情報を、前記更新情報送信要求を送信した情報処理装置に向けて送信するステップと、を更に有する構成を採用できる。本発明のプログラムは、前記コンピュータに、他のコンピュータから更新情報送信要求を受信すると、自装置が記憶する同期情報を検索して、受信した更新情報送信要求に含まれる最新更新情報が示す更新コンピュータそれぞれの最新の更新よりも後に該更新コンピュータであるコンピュータが更新コンピュータとして実行した更新を特定するステップと、前記特定された更新の更新データと、該更新データに対応する同期情報とを含む更新情報を、前記更新情報送信要求を送信したコンピュータに向けて送信するステップと、を更に実行させる構成を採用できる。更新情報送信要求を受信した側の情報処理装置(コンピュータ)は、自装置内の同期情報を検索することで、受信した更新情報送信要求に含まれる最新更新情報が示す更新装置(更新コンピュータ)それぞれの最新の更新よりも後に該更新装置(更新コンピュータ)である情報処理装置(コンピュータ)が更新装置(更新コンピュータ)として実行した更新、つまり、更新情報送信要求を送信した側のマシンでされておらず、更新情報送信要求を受信した側のマシンでされている更新を特定できる。このように特定した更新データを含む更新情報を、更新情報送信要求を送信した側の情報処理装置(コンピュータ)に送信することで、少ないデータ量で、データベースを同期させることができる。また、ログ情報に比して情報量が少ない同期情報を検索することで更新情報を抽出するため、ログ情報を用いる場合に比して、検索を高速に行うことができる。 In the distributed synchronous information system of the present invention, when an update information transmission request is received from another information processing apparatus, the specifying unit searches for synchronization information stored in the own apparatus and is included in the received update information transmission request. The update performed by the information processing apparatus as the update apparatus after the latest update of each of the update apparatuses indicated by the latest update information is specified as the update apparatus , and the update data of the specified update and the update data correspond to the update data update information including the synchronization information, can be adopted further comprising configuration update information transmission means to transmit it to the information processing apparatus which has transmitted the update information transmission request. According to the database synchronization method of the present invention, when the information processing device receives an update information transmission request from another information processing device, the information processing device searches for synchronization information stored in the own device and the latest information included in the received update information transmission request. a step of after the update device each latest updates update information shown in the information processing apparatus is the further new device to specify the update you performed as updating device, the information processing apparatus, the update data of the identified updated , the update information including the synchronization information corresponding to the updated data, and transmitting toward the information processing apparatus which has transmitted the update information transmission request, can be adopted further comprising configure. When the program of the present invention receives an update information transmission request from another computer, the program of the present invention searches for synchronization information stored in its own device, and an update computer indicated by the latest update information included in the received update information transmission request Update information including a step of specifying an update executed as an update computer by a computer that is the update computer after each latest update, update data of the specified update, and synchronization information corresponding to the update data and sending toward the computer that sent the update information transmission request, the further can adopt a configuration to be executed. The information processing device (computer) on the side that has received the update information transmission request searches the synchronization information in its own device, thereby each of the update devices (update computers) indicated by the latest update information included in the received update information transmission request. The update performed by the information processing apparatus (computer), which is the update apparatus (update computer) after the latest update, is the update apparatus (update computer). First, it is possible to identify an update made on the machine that has received the update information transmission request. By transmitting the update information including the specified update data to the information processing apparatus (computer) that has transmitted the update information transmission request, the database can be synchronized with a small amount of data. In addition, since update information is extracted by searching for synchronization information that has a smaller amount of information than log information, the search can be performed at a higher speed than when log information is used.
本発明の分散同期型情報システムでは、ネットワークに再接続された情報処理装置が、ネットワークに接続されている他の情報処理装置のうちの1つから更新情報送信要求を受信すると、該再接続された情報処理装置の前記更新情報送信手段は、前記更新情報をネットワークに接続された他の情報処理装置に向けてマルチキャスト送信する構成を採用できる。本発明のデータベース同期方法は、ネットワークに再接続された情報処理装置が、ネットワークに接続されている他の情報処理装置のうちの1つから更新情報送信要求を受信すると、前記更新情報を、ネットワークに接続された他の情報処理装置に向けてマルチキャスト送信するステップを更に有する構成を採用できる。本発明のプログラムは、前記コンピュータに、前記コンピュータがネットワークに再接続した後に、ネットワークに接続された他のコンピュータのうちの1つから更新情報送信要求を受信すると、前記更新情報を、ネットワークに接続された他のコンピュータに向けてマルチキャスト送信するステップを更に実行させる構成を採用できる。この場合、ネットワーク接続中の他の情報処理装置のデータベース間の同期が取れているときには、ネットワークに接続した情報処理装置と、ネットワーク接続中の他の情報処理装置のそれぞれとの間で更新情報送信要求及び更新情報の送受信を行わなくても、各情報処理装置のデータベースを同期させることができる。従って、1対1の通信を繰り返してデータベースを同期させる場合に比して、効率よくデータベースを同期させることができる。 In the distributed synchronous information system of the present invention, when an information processing apparatus reconnected to the network receives an update information transmission request from one of the other information processing apparatuses connected to the network, the reconnection is performed. The update information transmitting means of the information processing apparatus can employ a configuration in which the update information is multicast transmitted to another information processing apparatus connected to the network. When the information processing apparatus reconnected to the network receives an update information transmission request from one of the other information processing apparatuses connected to the network, the database synchronization method of the present invention transmits the update information to the network It is possible to adopt a configuration further including a step of multicast transmission to another information processing apparatus connected to the. When the program of the present invention receives an update information transmission request from one of the other computers connected to the network after the computer is reconnected to the network, the program of the present invention connects the update information to the network. It is possible to adopt a configuration that further executes a step of multicast transmission to another computer. In this case, when the databases of the other information processing apparatuses connected to the network are synchronized, update information is transmitted between the information processing apparatus connected to the network and each of the other information processing apparatuses connected to the network. The database of each information processing apparatus can be synchronized without transmitting / receiving request and update information. Therefore, the database can be synchronized more efficiently than when the one-to-one communication is repeated to synchronize the database.
本発明の分散同期型情報システム、情報処理装置、データベース同期方法、及び、プログラムでは、データベースの各データに対応して、そのデータを更新した更新装置(更新コンピュータ)を示す更新装置情報(更新コンピュータ情報)と、該更新装置(該更新コンピュータ)が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報を記憶する。この同期情報を検索して、自装置が有するデータベースに反映されている更新の内で、情報処理装置それぞれが実行した最新の更新を示す最新更新情報を調べて、これを含む更新情報送信要求を他の情報処理装置(コンピュータ)に送信し、その他の情報装置(コンピュータ)から、該他の情報処理装置(コンピュータ)が有するデータベースに反映された更新の内で前記最新更新情報が示す情報処理装置(コンピュータ)それぞれの最新の更新よりも後に該情報処理装置(コンピュータ)が更新装置(更新コンピュータ)として更新を実行した更新データ及びそのデータに対応する同期情報を受信して、データベースの対応するデータ及び該データに対応する同期情報を更新する。このようにすることにより、データベース内の全てのデータを比較しなくても、自装置のデータベースでされていない更新を取得することができ、データベース内の全データを送受信して比較する場合に比して、送受信されるデータ量を少なくすることができる。また、データベースの各データに対応して同期情報を記憶するため、更新回数が増えても同期情報のサイズは増大せず、更新ログを保存する場合に比して、必要な記録領域が少なくて済む。 In the distributed synchronous information system, information processing apparatus, database synchronization method, and program of the present invention, update apparatus information (update computer) that indicates an update apparatus (update computer) that has updated the data corresponding to each data in the database and information), and stores the synchronization information including the order information for determining the executed order of updates among the data updates the update device (the updated computer) is executed. The synchronization information retrieved by the, among updates are reflected in the database where the information processing apparatus has, out the latest update information indicating the most recent updating each information processing apparatus has executed, the update information transmission request including the same transmitted to another information processing apparatus (computer), and other from the information device (a computer), the another information processing apparatus (computer) the latest update information is the information processing apparatus shown within the update reflected in the database having the (computer) each date of said information processing apparatus after the update (computer) receives the synchronization information corresponding to the updated data and its data to perform the update as an update unit (update computer), the corresponding database The data and the synchronization information corresponding to the data are updated. By doing so, it is possible to obtain updates that are not made in the database of the own device without comparing all the data in the database, compared with the case where all the data in the database is transmitted and received and compared. Thus, the amount of data transmitted and received can be reduced. In addition, since synchronization information is stored corresponding to each data in the database, the size of the synchronization information does not increase even if the number of updates increases, and the required recording area is less than when an update log is saved. That's it.
以下、図面を参照し、本発明の実施の形態を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
第1実施形態
図1は、本発明の第1実施形態の分散同期型情報システムの構成を示している。分散同期型情報システム10は、情報の同期を行う任意の数の情報機器で構成されており、同図の例では、マシンA100、マシンB110、及び、マシンC120の3台の情報機器により構成される。マシンA100は、アプリケーション101、関係データベース102、データベース内同期情報更新手段103、再接続時同期手段(第1のデータベース同期手段)104、及び、接続中同期手段(第2のデータベース同期手段)105を備える。同図では、図示を省略しているが、マシンB110及びマシンC120は、それぞれマシンA100と同様な構成を有する。各マシンは、例えば、関係データベース102のデータを利用して処理を行う携帯型端末装置として構成される。
First Embodiment FIG. 1 shows the configuration of a distributed synchronous information system according to a first embodiment of the present invention. The distributed synchronization
マシンA100、マシンB110、及び、マシンC120は、それぞれ任意のタイミングで、図示しないネットワークから切断され、或いは、ネットワークに再接続される。マシンA100、マシンB110、及び、マシンC120は、アプリケーション101により、関係データベース102を更新する。関係データベース102の更新には、既存の行(データ)の変更、新たな行の挿入、及び、既存の行の削除が含まれる。各マシンは、関係データベース102を更新すると、その更新を他のマシンに伝播し、各マシンの関係データベース102を同期させる。
The machine A100, the machine B110, and the machine C120 are each disconnected from a network (not shown) or reconnected to the network at an arbitrary timing. The machine A100, the machine B110, and the machine C120 update the
関係データベース102の更新は、任意のタイミングで行われ、マシンがネットワークに接続されている状態、及び、マシンがネットワークから切断された状態の双方で行われる。接続中同期手段105は、更新伝播手段108を有し、マシンがネットワークに接続された状態で、関係データベース102で行われた更新を、ネットワーク接続中の他のマシンに伝播し、各マシンの関係データベース102の記憶内容を同期させる。再接続時同期手段104は、更新情報送信要求手段106と、更新情報送信手段107とを有し、マシンがネットワークに切断された状態からネットワークに再接続した際に、再接続したマシン及びネットワーク接続中の他のマシンで行われた更新をそれぞれ伝播し、関係データベース102の記憶内容を同期させる。
The
図2は、関係データベース102のデータ構造の具体例を示している。関係データベース102は、通常のデータ(「主キー」、「データ」)に加え、各データに対応して付加された同期情報を記憶する。同図では、点線で囲んだ部分201が、同期情報に相当する。付加される同期情報には、データ(行)を更新した更新者、及び、更新の前後関係を判断するための情報が含まれる。また、削除フラグ、及び、更新時刻が含まれる。データベース内同期情報更新手段103(図1)は、アプリケーション101が関係データベース102を更新すると、更新されたデータ(行)に対応した同期情報を更新する。
FIG. 2 shows a specific example of the data structure of the
同期情報の「更新の前後を判断するための情報」としては、例えば、更新が行われた時刻、或いは、更新処理が起こるたびに各マシンで順番に振られた番号(イベント番号)を用いることができる。更新の前後を判断する情報としては、イベント番号を用いることが望ましい。これは、更新の前後を判断するための情報として更新時刻を用いると、システムの時刻が変更されることで前後関係が狂う可能性があるためである。図2の例では、更新の前後を判断するための情報として、イベント番号を用いている。 As the “information for determining before and after update” of the synchronization information, for example, the time at which the update was performed or a number (event number) assigned in order at each machine every time update processing occurs is used. Can do. As information for determining before and after the update, it is desirable to use an event number. This is because if the update time is used as information for determining before and after the update, the context may be out of order by changing the system time. In the example of FIG. 2, event numbers are used as information for determining before and after the update.
更新者及びイベント番号について説明する。更新者は、データ更新を行ったマシンを示す。イベント番号は、各マシンにおける更新の順序を示している。例えば、マシンA100で、関係データベース102が初めて更新される場合には、その更新に対して、イベント番号「1」が割り当てられる。その後、マシンA100で、関係データベース102が更新される場合には、イベント番号「2」が割り当てられる。このイベント番号は、マシンごとに管理され、他のマシンにおける更新とは無関係に、各マシン内で順次に割り当てられる。例えば、マシンA100でイベント番号「2」に対応する更新が行われた後に、マシンB110で関係データベース102が更新され、その後、更にマシンA100で関係データベース102が更新される場合には、その更新には、イベント番号「3」が割り当てられる。
The updater and the event number will be described. The updater indicates the machine that has updated the data. The event number indicates the update order in each machine. For example, when the
削除フラグは、その行が削除されたか否かを示す。アプリケーション101は、データを削除する際には、実際にはその行を削除せずに削除フラグを「Y」に変更する。削除フラグが「Y」に設定された行は、関係データベース102から削除されたものとして取り扱われる。このように、実際には行を削除せずに、削除フラグを用いて削除されたものとして取り扱うのは、再接続時同期手段104による同期において、何れかのマシンの関係データベース102にある行が存在し、他のマシンの関係データベース102にその行が存在しない場合に、その行がネットワークから切断している間に削除されたものであるのか、或いは、他のマシンにおいて追加されたかを区別する必要があるためである。
The deletion flag indicates whether or not the line has been deleted. When deleting data, the
ここで、あるマシンがネットワークから切断されている間に、その切断中のマシンと、ネットワーク接続中のマシンとが、それぞれの関係データベース102の同じ行に対して更新を行った場合について考える。この場合、切断中のマシンがネットワークに再接続し、関係データベース102を同期しようとすると、同じ行が別々に更新されたことにより、その行について、矛盾が生じることになる。この矛盾の解決方法としては、ユーザにどちらを優先するかを選択させる方法、特定のマシンを優先する方法、更新時間が新しい方を優先する方法などが考えられる。本実施形態では、同期情報に、更新時刻を含め、同一行に対して2つのマシンで更新があったときは、更新時刻が新しいものを優先する。
Here, consider a case where a machine that is disconnected and a machine that is connected to the network update the same row of each
同期情報は、図2に示したように、関係データベース102内のデータと同一行に含めることができる他、図3に示すように、データ部分と分離して、別のテーブルで管理することもできる。図3では、関係データベース102が、アプリケーション101が使用するデータを含む表301と、同期情報部分(図2の201)を含む表302とに分離されている。このように分離する場合、表301の行と、表302の行とは、各行に一意のキー、例えば主キーを用いて対応させればよい。データと同期情報とを分離する場合には、もともと関係データベースが有していたデータの表の構成を変更する必要がないため、既存の関係データベースに、同期情報の表を追加することで、分散型情報同期システムを構築できる。
The synchronization information can be included in the same row as the data in the
図4は、データベース内同期情報更新手段103の動作手順を示している。アプリケーション101は、SQLなどを用いて、関係データベース102を更新する(ステップS401)。この関係データベース102の更新において、新たに行を挿入(追加)する際には、ネットワークから切断されたマシンにおいて、新たに挿入された行の主キーと重複しないようにする。例えばマシン名を主キーに含め、或いは、新たに挿入する主キーとして利用できる値の範囲をマシンごとに設定しておけばよい。
FIG. 4 shows an operation procedure of the in-database synchronization
データベース内同期情報更新手段103は、関係データベース102が更新されると、更新内容が、行の挿入、行の書き換え、又は、行の削除の何れであるかを判断する(ステップS402)。更新の内容が行の書き換えであるときには、同期情報(図2の201、図3の302)の更新者、イベント番号、及び、更新時刻を更新する(ステップS406)。例えば、マシンA100で、アプリケーション101が関係データベース102の行を書き換えた場合には、マシンA内のデータベース内同期情報更新手段103は、同期情報の更新者を、「マシンA」とする。イベント番号については、マシンA内で既に割り当てた最大イベント番号を記憶しておき、その値に1を加えた値とする。また、更新時刻には、現在時刻を設定する。ここで、各マシンが持つ時刻情報は、何らかの手段で同期が取れていると仮定する。
When the
更新内容が行の挿入の場合、同期情報が、図3に示すようにデータと分離されているときには、同期情報の表302に新たに行を挿入する(ステップS403)。その際、例えば、挿入されたデータの表301の行の主キーと同じキーを、同期情報の主キーとして設定し、挿入されたデータの行との対応をとる。その後、ステップS406で、同期情報(図2の201、図3の302)の更新者、イベント番号、及び、更新時刻を更新する。更新内容が行の削除の場合、同期情報が図3に示すようにデータと分離されているときには、データの表301から該当する行を削除する(ステップS404)。同期情報(図2の201、図3の302)については、同期情報自体は削除せずに、削除フラグを「Y」にする(ステップS405)。その後、ステップS406へ進み、同期情報を更新する。 If the update content is a row insertion and the synchronization information is separated from the data as shown in FIG. 3, a new row is inserted into the synchronization information table 302 (step S403). At this time, for example, the same key as the primary key of the row of the inserted data table 301 is set as the primary key of the synchronization information, and the correspondence with the inserted data row is taken. Thereafter, in step S406, the updater, the event number, and the update time of the synchronization information (201 in FIG. 2 and 302 in FIG. 3) are updated. When the update content is deletion of a row, if the synchronization information is separated from the data as shown in FIG. 3, the corresponding row is deleted from the data table 301 (step S404). For the synchronization information (201 in FIG. 2 and 302 in FIG. 3), the deletion information is set to “Y” without deleting the synchronization information itself (step S405). Then, it progresses to step S406 and updates synchronous information.
図5は、接続中同期手段105の動作手順を示している。データベース内同期情報更新手段103が、同期情報を更新すると、接続中同期手段105の更新伝播手段108は、更新されたデータを、「主キー」等を利用して検索し、伝播すべき関係データベース102上のデータ、及び、同期情報を取得する(ステップS501)。その後、更新伝播手段108は、ステップS501で取得したデータを、伝播に適した形にエンコードする(ステップS502)。このエンコードには、例えば、XMLなどの形式を用いることができる。
FIG. 5 shows an operation procedure of the connecting synchronization means 105. When the in-database synchronization
更新伝播手段108は、現在ネットワークに接続中のマシンに対して、ステップS502でエンコードしたデータを送信する(ステップS503)。ステップS503では、関係データベース102が更新されたマシンは、ネットワーク接続中の他のマシンとの間で1対1の通信を行い、エンコードしたデータを送信する。或いは、マルチキャストを用い、ネットワーク接続中の全てのマシンに向けて、エンコードされたデータを送信する。ネットワーク接続中のマシンの接続中同期手段105は、他のマシンからエンコードされたデータを受信すると、受信データをデコードし、その内容に従って、自身のマシン内の関係データベース102を更新する(ステップS504)。このような動作により、ネットワーク接続中の各マシンの関係データベース102が同期される。
The
図6は、再接続時同期手段104の動作手順を示している。ネットワークに新たに接続したマシンがあると、再接続時同期手段104は、ネットワーク内に、新たに通信可能になったマシンを発見する(ステップS601)。ステップS601では、新たにネットワークに接続(再接続)したマシンの再接続時同期手段104は、既にネットワークに接続していた各マシンを、新たに通信可能になったマシンとして発見する。一方、既にネットワークに接続していたマシンの再接続時同期手段104は、新たにネットワークに接続したマシンを、新たに通信可能になったマシンとして発見する。新たに通信可能になったマシンの発見は、例えばUPnPなどが持つ機能を利用することで実現できる。
FIG. 6 shows an operation procedure of the reconnection synchronization means 104. When there is a machine newly connected to the network, the reconnection synchronization means 104 finds a machine that is newly communicable in the network (step S601). In step S601, the
再接続時同期手段104の更新情報送信要求手段106は、ステップS601で発見した各マシンに対し、自らを「更新情報受信側マシン」、発見したマシンを「更新情報送信側マシン」として、更新情報の送信を要求する。この要求を受けた更新情報送信側マシンの更新情報送信手段107は、更新情報受信側マシンでされていない関係データベース102の更新を含む更新情報を、更新情報受信側マシンに送信する。更新情報送信側マシンの再接続時同期手段104は、受信した更新情報に基づいて、関係データベース102を更新する(ステップS602)。再接続時同期手段104は、ステップS601で発見したマシンが複数あるときには、その発見した各マシンに対して、ステップS602を実行する。
The update information
図7は、ネットワーク再接続時の関係データベース102の更新の様子を示している。ここでは、マシンA100及びマシンC120は既にネットワークに接続しており、マシンB110がネットワークに再接続した場合について考える。この場合、ネットワークに再接続したマシンB110は、図6のステップS601で、既にネットワークに接続しているマシンA100及びマシンC120を、新たに通信可能になったマシンとして発見する。一方、マシンA100及びマシンC120は、それぞれ、再接続したマシンB110を、新たに通信可能になったマシンとして発見する。
FIG. 7 shows how the
マシンB110は、ステップS602で、自身を「更新情報受信側マシン」とし、発見したマシンA100及びマシンC120を「更新情報送信側マシン」として、マシンA100及びマシンC120に対し、それぞれ更新情報の送信を要求する。マシンA100及びマシンC120は、この要求を受け取ると、それぞれ、自装置の関係データベース102(図1)でされており、マシンB110の関係データベース102でされていない更新の情報をマシンB110に送信する。マシンB110は、マシンA100及びマシンC120から受信した情報に基づいて、関係データベース102を更新する。この更新により、マシンB110がネットワークから切断している間にマシンA100又はマシンC120で行われた更新が、マシンB110の関係データベース102に反映される。
In step S602, the machine B110 sets itself as the “update information receiving machine” and the discovered machines A100 and C120 as the “update information transmitting machine”, and transmits update information to the machine A100 and the machine C120, respectively. Request. Upon receipt of this request, the
一方、マシンA100及びマシンC120は、それぞれ、ステップS602で、自身を「更新情報受信側マシン」とし、発見したマシンB110を「更新情報送信側マシン」として、マシンB110に対して更新情報の送信を要求する。マシンB110は、自装置の関係データベース102ではされており、マシンA100及びマシンC120ではされていない更新を含む更新情報を、マシンA100及びマシンC120にそれぞれ送信する。マシンA100及びマシンC120は、それぞれ、マシンB110から受信した情報に基づいて、関係データベース102を更新する。この更新により、マシンB110がネットワークから切断している間にマシンB110で行われた更新が、マシンA100及びマシンC120の関係データベース102に反映される。
On the other hand, in step S602, each of the machine A100 and the machine C120 sets itself as an “update information receiving machine” and sets the discovered machine B110 as an “update information transmitting machine” to transmit update information to the machine B110. Request. The
図8及び図9は、それぞれ、図6のステップS602のネットワーク再接続時の更新処理の詳細な手順を示すもので、図8は、更新情報受信側マシンの動作手順を示し、図9は、更新情報送信側マシンの動作手順を示している。更新情報受信側マシンの再接続時同期手段104の更新情報送信要求手段106は、同期情報(図2又は図3)を参照し、各更新者について、イベント番号が最大である行を検索して(ステップS801)、各更新者の最大のイベント番号を取得する。イベント番号は、更新者ごとの更新の順序を示しており、ステップS801の検索は、「更新者ごとに最も近い更新は何か」を検索することに等しい。
8 and 9 show the detailed procedure of the update process at the time of network reconnection in step S602 of FIG. 6, respectively. FIG. 8 shows the operation procedure of the update information receiving machine, and FIG. The operation procedure of the update information transmission side machine is shown. The update information
ステップS801の検索は、関係データベース102のインデックス機能などを用いることで、表のサイズに依存しない時間で高速に行うことが可能である。また、各更新者について、最大のイベント番号を保持するテーブルを用意しておき、データベース更新の際に、データベース内同期情報更新手段103によって、そのテーブルを更新することで、同期情報の検索を省略することも可能である。更新情報送信要求手段106は、各更新者について、イベント番号が最大の行を検索すると、マシンごとの最大イベント番号の情報を含む更新情報送信要求を、更新情報送信側マシンに送信する(ステップS802)。
The search in step S801 can be performed at high speed in a time independent of the table size by using the index function of the
図10は、ネットワーク再接続時の更新処理において、2つのマシン間でやり取りされる情報の具体例を示している。マシンB110が更新情報送信側マシンである場合、マシンB110の関係データベース102が記憶するテーブル1011から、更新者「マシンA」について、最大イベント番号を検索すると、イベント番号「11」が得られる。同様に、更新者「マシンB」及び「マシンC」について、最大イベント番号を検索すると、マシンBについてはイベント番号「8」、マシンCについてはイベント番号「5」が得られる。マシンB110の更新情報送信要求手段106は、「マシンA、最大イベント番号11」、「マシンB、最大イベント番号8」、「マシンC、最大イベント番号5」を含む更新情報送信要求1020を、更新情報送信側マシンであるマシンA100に送信し、マシンAに、更新者ごとの最大イベント番号を通知する。
FIG. 10 shows a specific example of information exchanged between two machines in the update process at the time of network reconnection. When the machine B110 is an update information transmission side machine, an event number “11” is obtained by searching the maximum event number for the updater “machine A” from the table 1011 stored in the
更新情報送信側マシンでは、更新情報受信側マシンから、更新情報送信要求を受信して、各更新者についての最大イベント番号の通知を受ける(図9のステップS901)。更新情報送信手段107は、自装置の関係データベース102のテーブル1001を検索し、各更新者について、イベント番号が、更新情報受信側マシンから通知された最大イベント番号よりも大きなイベント番号の行を抽出する(ステップS902)。その後、抽出した行をエンコードし、これを更新情報(差分情報)として、更新情報受信側マシンに送信する(ステップS903)。ステップS902で、複数の行が抽出された場合には、抽出された各行を、更新情報受信側マシンに送信する。
The update information transmission side machine receives an update information transmission request from the update information reception side machine and receives notification of the maximum event number for each updater (step S901 in FIG. 9). The update
図10の例では、マシンA100の関係データベース102のテーブル1001を検索し、マシンB110から通知された各更新者の最大イベント番号を超えるイベント番号の行を抽出すると、主キー「3」の行(更新者「マシンC」、イベント番号「6」)が抽出される。この行は、最初にマシンC120において更新され、その後、マシンA100に伝播されて、マシンA100の関係データベース102においても更新された行である。このように、ステップS902では、更新情報送信側マシン(マシンA)とは異なるマシンによって更新された行が抽出されることがある。マシンA100の再接続時同期手段104は、抽出した主キー「3」の行を、更新情報1021としてマシンBに送信する。
In the example of FIG. 10, when the table 1001 of the
図8に戻り、更新情報受信側マシンの再接続時同期手段104は、更新情報送信側マシンから送信された更新情報を取得する(ステップS803)。再接続時同期手段104は、受信した更新情報をデコードし、更新情報送信側マシンにおいて、更新情報受信側マシンにおける最大イベント番号よりも大きなイベント番号の行として抽出された行に対応する行が、自身の関係データベース102に存在するか否かを判断する(ステップS804)。対応する行が存在するか否かは、例えば主キーを用いて判断する。存在しない場合には、取得した行を、同期情報を含め関係データベース102に挿入する(ステップS808)。
Returning to FIG. 8, the
対応する行が存在する場合、取得した行の「更新時刻」と、関係データベース102の対応する行の「更新時刻」とを比較し、取得した行の「更新時刻」が、関係データベース102の「更新時刻」よりも時間的に後であるか否かを判断する(ステップS805)。取得した行の「更新時刻」が時間的に前であれば、更新時刻が新しい方を優先して、取得した行を破棄する(ステップS809)。
When the corresponding row exists, the “update time” of the acquired row is compared with the “update time” of the corresponding row in the
取得した行の「更新時刻」が時間的に後であれば、再接続時同期手段104は、更新情報が行の削除を示すか否かを判断する(ステップS806)。更新情報が削除を示す場合には、対応する行の削除フラグを「Y」にする(ステップS807)。このとき、同期情報が図3に示すように、データと分離されているときには、データ側の表から、対応する行を削除する。行の削除を示していないときには、取得した行の内容で、関係データベース102の対応する行を更新する(ステップS810)。
If the “update time” of the acquired row is later in time, the reconnection synchronization means 104 determines whether or not the update information indicates deletion of the row (step S806). If the update information indicates deletion, the deletion flag of the corresponding row is set to “Y” (step S807). At this time, as shown in FIG. 3, when the synchronization information is separated from the data, the corresponding row is deleted from the data-side table. If deletion of a row is not indicated, the corresponding row in the
図10の例では、マシンB110の関係データベース102が記憶するテーブル1011には、マシンA100から送信された更新情報1021(主キー「3」の行)に対応する行が存在する。これら行の更新時刻を比較すると、マシンA100から受信した行の方が、新しい。このため、マシンB110は、マシンA100から受信した更新情報1021に従って、主キー「3」のデータを、「データ11」から「データ17」に更新する。また、この行に対応する同期情報を、更新情報1021の同期情報で上書きする。このような動作により、マシンB110がネットワークから切断されている間に、ネットワーク接続中のマシンで行われた更新の内容が、マシンB110の関係データベース102に反映される。
In the example of FIG. 10, the table 1011 stored in the
再接続時同期手段104は、ステップS803で、複数の行を含む更新情報を取得した場合には、その含まれる各行について、ステップS804〜S810の処理を実行する。その場合、処理の順序は、更新者とは無関係にイベント番号同士を比較し、イベント番号が小さい順に行うことが望ましい。これは、イベント番号が大きな行について更新を行っている間に障害が発生した場合、イベント番号が小さな行を再取得することができなくなることも考えられるからである。
When the
図10の例では、上記した、更新情報受信側マシンをマシンB110とし、更新情報送信側マシンをマシンA100としたネットワーク再接続時の同期に加えて、更新情報受信側マシンをマシンA100とし、更新情報送信側マシンをマシンB110としたネットワーク再接続時の同期も行われる。マシンA100を更新情報受信側マシンとしたネットワーク再接続時の同期では、マシンA100は、関係データベース102のテーブル1001を検索し、各更新者について最大イベント番号(「マシンA、最大イベント番号11」、「マシンB、最大イベント番号7」、「マシンC、最大イベント番号6」)を含む更新情報送信要求1030をマシンB110に送信する。
In the example of FIG. 10, in addition to the synchronization at the time of network reconnection with the update information receiving machine as machine B110 and the update information transmitting machine as machine A100, the update information receiving machine is set as machine A100 and updated. Synchronization at the time of network reconnection using the information transmission machine as the machine B110 is also performed. In synchronization at the time of network reconnection using the machine A100 as the update information receiving machine, the machine A100 searches the table 1001 of the
マシンB110は、関係データベース102を参照し、更新者ごとに、マシンA100から通知された最大イベント番号を超える行を抽出して、これをマシンA100に送信する。図10では、マシンB110は、主キー「1」の行(更新者「マシンB」、イベント番号「11」)を、マシンAから通知された最大イベント番号を超える行として抽出する。この行は、マシンB110がネットワークから切断されている間に、マシンB110のアプリケーション101によって更新された行である。マシンB110は、抽出した主キー「1」の行をエンコードして、更新情報1031としてマシンA100に送信する。
The machine B110 refers to the
マシンA100は、更新情報1031を受信すると、受信した更新情報1031に従って、関係データベース102を更新する。より詳細には、主キー「1」のデータを、「データ5」から「データ9」に更新する。また、この行に対応する同期情報を、受信した更新情報1031の同期情報で上書きする。これにより、ネットワーク切断中にマシンB110で行われた更新の内容が、マシンA100の関係データベース102に反映される。以上のように、ネットワーク上に新たに通信可能になったマシンが発見されたとき、複数のマシン間で、お互いが知らない更新情報の授受を行うことで、ネットワークに新たに接続(再接続した)したマシンについても、既にネットワークに接続しているマシンについても、同様な手順で、関係データベース102の内容を同期させることができる。
When the
本実施形態では、関係データベース102の各行(各データ)に対応して、データを更新した更新者と、更新者ごとの更新の順序を判断するための情報とを含む同期情報を付加する。各マシンは、ネットワーク接続中は、接続中同期手段105により、関係データベース102の内容を同期する。ネットワーク再接続時は、再接続時同期手段104により、新たに通信可能になったマシンに対し、更新者ごとの最新の更新を示す情報を通知し、更新情報の送信を要求し、相手側から、通知した最新の更新以後の更新の内容を受信して、関係データベース102を更新する。このようにすることで、マシン間で受け渡される情報は、そのマシンが実際に知らない情報のみとなり、冗長な情報の授受は行われない。従って、例えばデータベース内の全ての情報を授受する場合に比して、効率よく関係データベース102を同期させることができる。また、従来技術がログを用いているのとは異なり、行に同期情報を対応付けることで、同期の際に用いる情報の容量を少なくし、かつ、検索のコストを抑制することができる。
In the present embodiment, in correspondence with each row (each data) of the
ここで、同期情報として「更新時刻」のみを付加し、各マシンが、「以前、何れかのマシンと同期を行った時刻」を記憶する場合について考える。この場合、「以前、何れかのマシンと同期を行った時刻」以後に更新された情報を要求することで、本実施形態と同様に差分情報のみを取得できるようにも考えられる。しかし、例えば、マシンCがネットワークから切断された状態で、マシンCで「1:00」に更新が起こり、その後、マシンAとマシンBとが「2:00」に同期を行った後にマシンCがネットワークに再接続し、マシンAとマシンCとが同期を行う場合には、マシンAは「2:00」に同期を行っているため、「1:00」に行われた更新が、マシンCからマシンAに送信されないという問題が起こる。本実施形態では、上記手順に従って、更新情報の送信を要求するため、マシン間で、確実に更新情報が伝達されることが保証される。 Here, consider a case where only “update time” is added as the synchronization information, and each machine stores “the time when synchronization was performed with any machine before”. In this case, it may be considered that only the difference information can be acquired by requesting information updated after “time when synchronization with any machine was performed before” as in the present embodiment. However, for example, in the state where the machine C is disconnected from the network, the update occurs at “1:00” in the machine C, and after that, the machine C and the machine B synchronize at “2:00”. Reconnects to the network and machine A and machine C synchronize, machine A is synchronized to “2:00”, so the update made at “1:00” A problem arises that C is not sent to machine A. In the present embodiment, since transmission of update information is requested according to the above procedure, it is ensured that update information is reliably transmitted between machines.
第2実施形態
図11は、本発明の第2実施形態の分散同期型情報システムにおけるネットワーク接続中の同期の動作手順を示している。本実施形態の分散同期型情報システムは、図1に示す分散同期型情報システムと同様な構成を有しており、接続中同期手段105(図1)が、図5に示す手順に代えて、図11に示す手順で、ネットワーク接続中のマシンとの間で関係データベース102を同期する点で、第1実施形態と相違する。本実施形態では、接続中同期手段105は、再接続時同期手段104を利用して、関係データベース102の同期を取る。
Second Embodiment FIG. 11 shows an operation procedure of synchronization during network connection in the distributed synchronous information system according to the second embodiment of the present invention. The distributed synchronization type information system of this embodiment has the same configuration as the distributed synchronization type information system shown in FIG. 1, and the connecting synchronization means 105 (FIG. 1) replaces the procedure shown in FIG. The procedure shown in FIG. 11 is different from the first embodiment in that the
アプリケーション101が、関係データベース102を更新すると、更新があったマシンの接続中同期手段105は、ネットワーク接続中の各マシンに対し、データ更新があった旨を通知する(ステップS1101)。その際、接続中同期手段105は、データ更新を行ったマシン名を、データ更新があった旨の通知に含める。この通知を受け取った他のマシンの接続中同期手段105は、再接続時同期手段104の更新情報送信要求手段106により、自装置を「更新情報受信側マシン」、更新があったマシンを「更新情報送信側マシン」として、更新情報の送信を要求する(ステップS1102)。更新情報の送信要求を受け取ったマシンは、更新情報送信手段107により、その要求に応答して、更新情報を更新情報受信側マシンに送信する(ステップS1103)。更新情報受信側マシンは、受信した更新情報に従って、関係データベース102を更新する。
When the
ステップS1102及びステップS1103の更新情報送信要求及び更新情報の送信は、図8及び図9に示す、ネットワーク再接続時の同期と同様な手順に従って行われる。このように、本実施形態では、ネットワーク接続中の同期とネットワーク再接続時の同期とを、同様な手順で行うことにより、システム構成を単純化できる。 The update information transmission request and the transmission of update information in steps S1102 and S1103 are performed according to the same procedure as the synchronization at the time of network reconnection shown in FIGS. Thus, in the present embodiment, the system configuration can be simplified by performing synchronization during network connection and synchronization during network reconnection in the same procedure.
第3実施形態
図12は、本発明の第3実施形態の分散同期型情報システムにおけるネットワーク再接続時の同期の動作手順を示している。本実施形態の分散同期型情報システムは、図1に示す分散同期型情報システムと同様な構成を有しており、再接続時同期手段104(図1)が、図6に示す手順に代えて、図12に示す手順で、ネットワーク接続中のマシンとの間で関係データベース102を同期する点で、第1実施形態と相違する。
Third Embodiment FIG. 12 shows an operation procedure of synchronization at the time of network reconnection in the distributed synchronous information system according to the third embodiment of the present invention. The distributed synchronous information system of this embodiment has the same configuration as the distributed synchronous information system shown in FIG. 1, and the reconnection synchronization means 104 (FIG. 1) replaces the procedure shown in FIG. 12 is different from the first embodiment in that the
ネットワークに再接続した(新たに接続した)マシンの再接続時同期手段104は、既にネットワークに接続しているマシンの中から任意の1つを選び、そのマシンを「更新情報送信側マシン」、自身を「更新情報受信側マシン」として更新情報送信要求を送信し、図8及び図9に示す手順により、関係データベース102を更新する(ステップS1201)。既にネットワーク接続しているマシン間で、データの同期が取られていると仮定すると、ステップS1201により、ネットワークに再接続したマシンは、ネットワーク接続中の他のマシンでされ、自装置でされていない更新を、自装置の関係データベース102に反映できる。
The reconnection synchronization means 104 of the machine reconnected to the network (newly connected) selects any one of the machines already connected to the network, and designates the machine as “update information transmission side machine”, An update information transmission request is transmitted with itself as the “update information receiving machine”, and the
ネットワークに再接続したマシンの再接続時同期手段104は、自装置の関係データベース102を更新すると、ネットワーク接続中のマシンから任意の1つを選び、そのマシンに対し、各更新者についての最大イベント番号を送信するように指示する(ステップS1202)。この指示を受けたマシンの更新情報送信要求手段106は、そのマシン内の同期情報(関係データベース102)を検索して、更新者ごとの最大イベント番号を取得し、これを含む更新情報送信要求を、ネットワークに再接続したマシンに送信する。
When the reconnection synchronization means 104 of the machine reconnected to the network updates the
ネットワークに再接続したマシンの更新情報送信手段107は、更新者ごとの最大イベント番号を受け取り(ステップS1203)、関係データベース102を検索して、受け取った更新者ごとの最大イベント番号を超えるイベント番号の行を抽出する(ステップS1204)。このステップは、図9のステップS902に相当する。その後、抽出した行をエンコードし、これを更新情報として、ネットワーク接続中の全てのマシンに対してマルチキャスト送信する(ステップS1205)。ネットワーク接続中の各マシンは、更新情報を受信し、図8のステップS803〜S810と同様な手順により、関係データベース102を更新する。この更新により、既にネットワークに接続していた各マシンは、ネットワークに再接続したマシンでされ、自装置でされていない更新を、自装置の関係データベース102に反映できる。
The update
第1実施形態では、ネットワークに再接続したマシンと、ネットワーク接続中の各マシンとの間で、1対1の通信を行い、各マシンの関係データベース102を更新するため、ネットワーク接続中のマシン間で、情報の同期が取れている場合には、無駄な通信が行われることになる。本実施形態では、ネットワークに再接続したマシンは、ネットワーク接続中のマシンのうちの何れかとの間で通信を行い、更新情報を受信して関係データベース102を更新する。また、ネットワーク接続中のマシンの何れかから、更新者ごとの最大イベント番号を受信し、ネットワーク接続中の各マシンに向けて、更新情報をマルチキャスト送信する。このようにすることで、通信の回数及び通信料を削減し、無駄な通信を抑制することができる。
In the first embodiment, one-to-one communication is performed between a machine reconnected to the network and each machine connected to the network, and the
第4実施形態
本発明の第4実施形態の分散同期型情報システムは、図1に示す分散同期型情報システム10と同様な構成を有している。本実施形態では、同期情報(図2)に、「更新時刻」に代えて、「更新履歴」を含める。更新履歴は、更新を行った更新者、及び、その際のイベント番号の組を含み、どのマシンにおいて、いつ(どのイベント番号のときに)データが更新されたかの履歴を示している。本実施形態では、このような更新履歴を用いて、ネットワークからの切断時に、複数のマシンで同じ行が更新された際の矛盾を解決する。
Fourth Embodiment A distributed synchronization information system according to a fourth embodiment of the present invention has the same configuration as the distributed
図13は、更新履歴の更新の様子を示している。データベース内同期情報更新手段103は、データベースの更新時に、図4のステップS406で、更新時刻に代えて、更新履歴の更新を行う。同図において、「A3」、「B5」等は、更新を行ったマシン名、及び、その際のイベント番号を示している。図13の行1301の更新履歴は、対応する主キー「10」の行が、マシンAにおいてイベント番号「3」のときに挿入され、その後、マシンBにおいてイベント番号「5」のとき更新され、更に、マシンCにおいてイベント番号「7」のときに更新されたことを示している。マシンA及びマシンBがそれぞれ行1301を有するとき、マシンBがネットワークから切断し、主キー「10」の行を更新すると、マシンBのデータベース内同期情報更新手段103は、図13に行1302として示すように、行1301の更新履歴に、マシンBにおいてイベント番号「8」のときに更新されたことを示す「B8」を追加する。
FIG. 13 shows how the update history is updated. The in-database synchronization
マシンAは、マシンBがネットワークに再接続すると、ネットワーク再接続時の同期の動作により、マシンBから、行1302を更新情報として受信する。この更新情報の更新履歴と、マシンAが持つ行1301の更新履歴とを比較すると、取得した更新情報の同期情報の更新履歴(A3、B5、C7、B8)は、マシンAが有する行の更新履歴(A3、B5、C7)を含んでいる。このことは、行1301と行1302とは、ネットワークからの切断時に、別々に更新されたわけではなく、もともと同じ情報を持っており、それがネットワークから切断されている間にマシンBによって更新されたということを意味している。このように、取得した更新情報の更新履歴が、自身の更新履歴を含んでいる場合には、更新は、図13の順序1303に示すように直線状に行われている。このような場合には、矛盾は存在せず、また、行1302のデータが、行1301のデータよりも新しいとわかるため、マシンAは、行1301を行1302で更新すればよい。
When the machine B reconnects to the network, the machine A receives the
図14は、更新履歴の更新の様子の別の例を示している。同図に示す行1401の更新履歴は、「A3、B5、C7、A5、A7」であり、行1402の更新履歴は、「A3、B5、C7、B8」となっている。両者の更新履歴を比較すると、図14に順序1403として示すように、「C7」までの更新は同じであり、その後の更新が相違する。これは、ネットワーク切断後に、ネットワーク接続中のマシンとネットワークから切断したマシンとにおいて、又は、共にネットワークから切断したマシンにおいて、別々に更新が行われたことを意味している。この場合、マシンA及びマシンBがネットワークに再接続した際には、何らかの矛盾解決が必要になる。矛盾解決の方法としては、特定のマシンを優先する、或いは、ユーザに選択させるなどの方法がある
FIG. 14 shows another example of how the update history is updated. The update history of the
矛盾解決により、何れかの行を優先した場合には、マシン内でその行を新たに更新したものとして取り扱う。例えば、マシンCが行1402を有し、行1401と行1402について、「B8」の更新を「A5、A7」の更新に優先させる、つまり、行1402を優先する場合には、行1402の「データ9」はそのままで、更新者を「マシンC」、イベント番号を新たに割り当てた「11」として、関係データベース102を更新したものとする。その際、更新履歴に、「C11」を追加すると共に、「C11」が「A5、A7」の更新に優先してされたことを示す優先指示として、「優先:A5、A7」を付加する。このように優先指示を付加する理由は、例えばユーザにどちらかの更新を優先するかを選択させた場合に、その選択結果を保持することで、再度ユーザに選択を要求しないようにするためである。
If any line is prioritized due to conflict resolution, it is treated as a newly updated line in the machine. For example, when the machine C has a
次に、マシンDが行1401を有しており、このマシンDがネットワークに再接続した場合について考える。この場合、マシンDは、マシンCから、行1404を更新情報として受信する。行1401の更新履歴と、行1404の更新履歴とを比較すると、先頭「A3」から「C7」までは同じである。また、行1401の更新履歴から、行1404の更新履歴との共通部分を除いた部分は「A5、A7」であり、行1404の更新履歴には、「優先A5、A7」が含まれている。このように、更新情報受信側マシンの行の更新履歴の途中までが更新情報の更新履歴と同じであり、それ以降の部分が、更新情報の更新履歴において優先指示されているときには、取得した更新情報の更新履歴が、自身の更新履歴を含んでいるものとして取り扱う。このようにすることで、更新履歴に「A5、A7」を含む行についても、「C11」によって更新された行で更新することができる。
Next, consider a case where machine D has
図15は、ネットワーク再接続したマシンの動作手順を示している。同図に示す手順は、図8のステップS805がステップS1501に置き換わり、ステップS1502が追加されている点で、第1実施系におけるネットワークに再接続したマシンの動作手順と相違する。更新情報受信側マシンの再接続時同期手段104の更新情報送信要求手段106は、ステップS801で、更新マシンごとの最大イベント番号を検索する。その際、更新情報送信要求手段106は、同期情報201(図2)のイベント番号に加えて、更新履歴を含めて、各更新マシンについて最大のイベント番号を検索する。
FIG. 15 shows an operation procedure of the machine reconnected to the network. The procedure shown in the figure is different from the operation procedure of the machine reconnected to the network in the first embodiment in that step S805 of FIG. 8 is replaced with step S1501 and step S1502 is added. In step S801, the update information
再接続時同期手段104は、ステップS804で、関係データベース102に、更新情報送信側マシンから受信した更新情報に対応する行が存在すると判断すると、更新情報の同期情報に含まれる更新履歴と、関係データベース102の対応する行の同期情報の更新履歴とを比較する(ステップS1501)。比較の結果、取得した更新履歴の更新履歴が、自身の関係データベース102の対応する行の更新履歴を含む、或いは、優先指示によって、対応する行の更新履歴を含むとみなせる場合には、矛盾は起きていないので、ステップS806へ進んで、関係データベース102の対応する行を、取得した更新履歴の行で更新する。
When the
例えば、更新情報受信側マシンが図13に示す行1301を有し、更新情報として行1302を受信した場合には、ステップS1501では、行1301の更新履歴は、行1302の更新履歴に含まれると判断される。この場合、更新情報を受信した更新情報受信側マシンは、ステップS806からS807へと進み、取得した行1302で、関係データベース102を更新する。また、更新情報受信側マシンが図14に示す行1401を有し、更新情報として行1404を受信した場合には、行1401の更新履歴は、行1404の更新履歴には含まれないものの、更新履歴の共通部分「A3、B5、C7」の後ろが、行1404の更新履歴の優先指示で指定される「A5、A7」となっているため、ステップS1501では、行1401の更新履歴は、行1402の更新履歴に含まれるものとして取り扱われる。このため、関係データベース102の行1401は、更新情報の行1404により更新される。
For example, if the update information receiving machine has the
取得した更新情報の更新履歴と関係データベース102の対応する行の更新履歴とが、包含関係にないとき、又は、更新履歴の優先指示を参照しても更新履歴の包含関係がないときには、同じ行が複数のマシンで別々に更新されており、矛盾が発生している。この場合には、矛盾を解決するように、行を更新する(ステップS1502)。ステップS1502では、例えばユーザに矛盾する行のうちの何れを優先するかを選択させ、選択された行で、関係データベース102を更新する。或いは、更新時刻が遅い方を優先して、その行で更新しても良い。
When the update history of the acquired update information and the update history of the corresponding row in the
ステップS1502の更新では、優先する側の行について、更新者を自装置、イベント番号を新たに割り当てたイベント番号として、更新履歴に、今回更新分の情報を追加する。その際、選択されなかった行の更新履歴のうちで、選択された行の更新履歴との共通部分を除く部分を、優先指示として、更新された行の更新履歴に含める。例えば、図14の行1401と行1402について、行1402を優先させる場合には、行1401の更新履歴のうちで、行1402の更新履歴との共通部分を除く「A5、A7」を、行1404に示すように、今回更新分の履歴「C11」の優先指示として付加する。更新情報受信側マシンは、ステップS1502で関係データベース102を更新すると、接続中同期手段105により、ネットワーク接続中の各マシンに、更新した行を送信する。
In the update in step S1502, information for the current update is added to the update history with the updater as the own device and the event number newly assigned the event number for the priority row. At that time, a part of the update history of the unselected row excluding the common part with the update history of the selected row is included in the update history of the updated row as a priority instruction. For example, when priority is given to the
本実施形態では、同期情報に、どのような順序(経路)で更新が行われたかを示す更新履歴を含める。この更新情報を用い、ネットワーク再接続時の同期の動作において取得した更新情報の更新履歴が、自身の更新履歴を含むか否かを調べることにより、矛盾が発生しているか否か、つまり、受信した更新情報と、自装置の関係データベース102の対応する行とが、ネットワーク切断後に同時に更新されたものであるか、或いは、一方でのみ更新されたものであるかを、判別できる。また、矛盾を解決した際には、その結果を更新履歴に含めることで、ネットワーク接続中の他のマシンに矛盾解決の際にどちらの更新を優先したかを伝播することができ、再度、矛盾解決の判断を行うことを避けることができる。
In the present embodiment, the synchronization information includes an update history indicating in what order (route) the update is performed. By using this update information, whether or not there is a contradiction by checking whether the update history of the update information acquired in the synchronization operation at the time of network reconnection includes its own update history, that is, receiving It can be determined whether the updated information and the corresponding row in the
ここで、第1又は第2実施形態の動作と、本実施形態の動作とを組み合わせる場合には、図6を参照して説明したように、各マシンが新たに通信可能になったマシンを発見すると、おのおのが「更新情報受信側マシン」として同期を行う。従って、複数のマシンが既にネットワークに接続している状態で、あるマシンがネットワークイン再接続すると、更新情報の受信が同時に全マシンで行われ、全てのマシンで矛盾解決の動作が必要となる可能性がある。これに対し、第3実施形態の動作と本実施形態の動作とを組み合わせる場合には、第3実施形態では、更新情報をネットワーク接続中のマシンに対してマルチキャスト送信するため、矛盾解決の際に優先した更新の情報をネットワーク接続中の各マシンに伝播することができ、矛盾解決の動作は1回で済む。従って、本実施形態の動作は、第3実施形態の動作と組み合わせることが好ましい。 Here, when the operation of the first or second embodiment and the operation of the present embodiment are combined, as described with reference to FIG. 6, each machine discovers a new communicable machine. Then, each performs synchronization as an “update information receiving machine”. Therefore, when a machine is already connected to the network and a machine is reconnected to the network, update information is received on all machines at the same time, and all machines need to perform conflict resolution. There is sex. On the other hand, when combining the operation of the third embodiment and the operation of the present embodiment, in the third embodiment, update information is multicast-transmitted to machines connected to the network. The priority update information can be propagated to each machine connected to the network, and the conflict resolution operation can be performed only once. Therefore, the operation of the present embodiment is preferably combined with the operation of the third embodiment.
第5実施形態
本発明の第5実施形態の分散同期型情報システムは、図1に示す分散同期型情報システムと同様な構成に加え、履歴削除手段を有している。第4実施形態では、同期情報に更新履歴を含めたが、この更新履歴は、更新を行うたびに増大する。本実施形態では、各マシンにおいて、どの時点までの更新が伝播したかを管理し、更新履歴の不要部分を削除する。また、本実施形態では、各マシンにおいて、どの時点までの更新が伝播したかを管理して、同期情報の削除フラグが「Y」の行を削除する。
Fifth Embodiment A distributed synchronization information system according to a fifth embodiment of the present invention has a history deletion means in addition to the same configuration as the distributed synchronization information system shown in FIG. In the fourth embodiment, the update history is included in the synchronization information, but this update history increases each time an update is performed. In this embodiment, each machine manages how far the update has been propagated, and deletes unnecessary portions of the update history. Further, in this embodiment, in each machine, it is managed up to which point the update has been propagated, and the row whose synchronization information deletion flag is “Y” is deleted.
本実施形態では、各マシンは、各マシンにおいてどの時点の更新までが伝播したかを示す情報として、各マシンが持つ更新者ごとの最大イベント番号の情報を記憶する。図16は、各マシンが記憶する、各マシンが持つ更新者ごとの最大イベント番号の具体例を示している。例えば、マシンAが同図に示す表1601を記憶している場合には、マシンAは、自装置の関係データベース102については、更新者「マシンA」はイベント番号「20」まで、更新者「マシンB」はイベント番号「11」まで、更新者「マシンC」はイベント番号「15」の更新までが行われていることを認識(把握)している。また、マシンAは、マシンBの関係データベース102では、更新者「マシンA」はイベント番号「15」まで、更新者「マシンB」はイベント番号「11」まで、更新者「マシンC」はイベント番号「7」の更新までが行われていることを認識している。
In the present embodiment, each machine stores information on the maximum event number for each updater possessed by each machine as information indicating at what point in time the update has propagated in each machine. FIG. 16 shows a specific example of the maximum event number stored in each machine for each updater possessed by each machine. For example, when the machine A stores the table 1601 shown in the figure, the machine A can update the updater “machine A” up to the event number “20” and the updater “ Machine B ”recognizes (understands) that up to event number“ 11 ”and updater“ machine C ”have updated up to event number“ 15 ”. In the
各マシンが記憶する各マシンが持つ更新者ごとの最大イベント番号の表の作成について説明する。システム運用開始時の表1601における最大イベント番号の初期値は0である。各マシンは、自装置の関係データベース102を更新すると、自装置が記憶する各マシンが持つ更新者ごとの最大イベント番号の表1601の「自装置が持つ最大イベント番号」の行の更新者「自装置」の値を、データベース内同期情報更新手段103により新たに割り当てられたイベント番号に書き換える。例えば、マシンA内で、関係データベース102が更新された場合には、マシンAは、自装置が記憶する最大イベント番号の表1601の「マシンAが持つ最大イベント番号」の行の更新者「マシンA」の値を、新たに割り当てられたイベント番号に書き換える。
Creation of a table of maximum event numbers for each updater possessed by each machine stored in each machine will be described. The initial value of the maximum event number in the table 1601 at the start of system operation is 0. When each machine updates its own device
マシンAでデータが更新された場合、その更新は、接続中同期手段105により、ネットワーク接続中のマシンに伝播される。各マシンは、他のマシンにおける更新が伝播されると、自装置が記憶する最大イベント番号の表1601の「自装置が持つ最大イベント番号」の行の更新者「マシンA」の値を、更新内容と共に伝播されたイベント番号に書き換える。その際、ネットワーク接続中のマシンを判断し、「ネットワーク接続中の各マシンがもつ最大イベント番号」の行の更新者「マシンA」の値を、伝播されたイベント番号に書き換える。これは、ネットワーク接続中の各マシンに、マシンAでの更新が伝播されるためである。ネットワーク接続中のマシンは、例えば、データを送信した際に応答があるか否かによって判断することができる。或いは、死活信号を用いて、周期的に死活信号を受信できたマシンを、ネットワーク接続中のマシンと判断しても良い。 When the data is updated on the machine A, the update is propagated to the machine connected to the network by the connecting synchronization means 105. When an update in another machine is propagated, each machine updates the value of the updater “machine A” in the row “maximum event number held by own device” in the table 1601 of the maximum event number stored in the own device. Rewrite with the event number propagated with the content. At that time, the machine connected to the network is determined, and the value of the updater “machine A” in the row of “the maximum event number of each machine connected to the network” is rewritten to the propagated event number. This is because the update on the machine A is propagated to each machine connected to the network. For example, a machine connected to the network can determine whether or not there is a response when data is transmitted. Alternatively, a machine that can periodically receive the life / death signal using the life / death signal may be determined as a machine connected to the network.
例えば、マシンBは、マシンAから、ネットワーク接続中の同期の動作により、マシンAでの更新内容を受け取り、更新者を「マシンA」として、関係データベース102を更新する。その際、マシンBは、自装置が記憶する最大イベント番号の表1601の「マシンBが持つ最大イベント番号の行の更新者「マシンA」の値を、マシンAから伝播されたイベント番号に書き換える。また、マシンCがネットワークに接続していた場合には、マシンAにおける更新はマシンCにも伝播するため、マシンBが記憶する最大イベント番号の表1601の「マシンCが持つ最大イベント番号」の行の更新者「マシンA」の値を、マシンAから伝播されたイベント番号に書き換える。マシンCがネットワークから切断されていた場合には、マシンAにおける更新はマシンCには伝播されないため、「マシンCが持つ最大イベント番号」の値は書き換えない。
For example, the machine B receives the update contents in the machine A from the machine A through a synchronization operation during network connection, and updates the
ネットワーク再接続時の動作では、更新情報送信側マシンは、ステップS903(図9)で抽出した行をエンコードして送信する際に、記憶する各マシンの更新者ごとの最大イベント番号の表1601をエンコードして、抽出した行と共に、更新情報受信側マシンに送信する。更新情報受信側マシンは、ステップS803(図8)で更新情報を取得すると、更新情報送信側マシンから受信した各マシンが持つ最大イベント番号の表と、自装置が記憶する各マシンが持つ更新者ごとの最大イベント番号の表とを組み合わせて、記憶する最大イベント番号の表を更新する。その後、再接続時の同期の動作により、関係データベース102を更新し、その更新に伴って、最大イベント番号の表の自装置が持つ最大イベント番号の行を更新する。
In the operation at the time of network reconnection, when the update information transmission side machine encodes and transmits the row extracted in step S903 (FIG. 9), the table 1601 of the maximum event number for each updater of each machine stored is stored. Encode and send to the update information receiving machine along with the extracted lines. When the update information receiving machine acquires the update information in step S803 (FIG. 8), a table of the maximum event numbers of each machine received from the update information transmitting machine and the updater of each machine stored in its own device. The table of maximum event numbers to be stored is updated in combination with the table of maximum event numbers for each. Thereafter, the
図17は、再接続時の同期の動作における、各マシンが持つ最大イベント番号の表の更新の様子を示している。例えば、マシンAが表1701を記憶し、マシンBが表1702を記憶していたとする。マシンBを更新情報受信側マシンとし、マシンAを更新情報送信側マシンとすると、再接続時の同期では、マシンBは、マシンAから表1701を取得する。マシンBは、記憶する表1702の各項目の値と、受信した表1701の各項目の値とを比較し、値が大きいほうを選択して、各マシンが持つ更新者ごとの最大イベント番号の表を表1703に更新する。例えば、表1701におけるマシンAが持つ更新者「マシンB」の最大イベント番号は「11」であり、表1702におけるマシンAが持つ更新者「マシンB」の最大イベント番号は「7」である。この場合には、「11」を選択する。 FIG. 17 shows how the maximum event number table of each machine is updated in the synchronization operation during reconnection. For example, assume that machine A stores table 1701 and machine B stores table 1702. Assuming that machine B is an update information receiving machine and machine A is an update information transmitting machine, machine B acquires table 1701 from machine A in synchronization at the time of reconnection. The machine B compares the value of each item of the stored table 1702 with the value of each item of the received table 1701, selects the larger value, and determines the maximum event number for each updater possessed by each machine. The table is updated to table 1703. For example, the maximum event number of the updater “machine B” possessed by the machine A in the table 1701 is “11”, and the maximum event number of the updater “machine B” possessed by the machine A in the table 1702 is “7”. In this case, “11” is selected.
削除フラグが「Y」に設定された行(同期情報)の削除について説明する。削除フラグは、再接続時の同期において、ネットワークから切断されたマシンにおいて行が新たに挿入されたのか、ネットワーク接続中のマシンにおいて行が削除されたのかを判別するために用いられる。従って、行を削除する更新が全てのマシンに伝播されていることが確認できれば、その行自体を削除することができる。 Deletion of a line (synchronization information) in which the deletion flag is set to “Y” will be described. The deletion flag is used to determine whether a row has been newly inserted in a machine disconnected from the network or a row has been deleted in a machine connected to the network during synchronization at the time of reconnection. Therefore, if it can be confirmed that the update for deleting a row has been propagated to all machines, the row itself can be deleted.
各マシンが持つ更新者ごとの最大イベント番号の表1601(図16)において、更新者ごとに最小値を求めると、マシンAは「15」、マシンBは「7」、マシンCは「7」となる。これは、表1601を記憶するマシンは、各マシンで、更新者ごとに、最低限これらイベント番号までの更新がされていることを認識していることを意味する。つまり、全マシンに、更新者をマシンAとする更新はイベント番号「15」まで、更新者をマシンBとする更新はイベント番号「7」まで、更新者をマシンCとする更新はイベント番号「7」まで伝播されていると認識していることを意味する。従って、削除フラグが「Y」に設定された行のイベント番号が、その行を更新したマシンの最大イベント番号の最小値以下の値であれば、その行を削除することができる。 In the table 1601 (FIG. 16) of the maximum event numbers for each updater possessed by each machine, when the minimum value is obtained for each updater, the machine A is “15”, the machine B is “7”, and the machine C is “7”. It becomes. This means that the machine storing the table 1601 recognizes that each machine has been updated up to at least these event numbers for each updater. That is, for all machines, the update with the updater as machine A is up to event number “15”, the update with the updater as machine B is up to event number “7”, and the update with the updater as machine C is up to event number “15”. 7 ”means that it has been propagated. Therefore, if the event number of the line for which the deletion flag is set to “Y” is a value equal to or smaller than the minimum value of the maximum event number of the machine that updated the line, the line can be deleted.
各マシンは、任意のタイミングで、例えば定期的に、或いは、他のマシンとの同期時に、削除フラグが「Y」に設定された行のイベント番号と、各マシンが持つ更新者ごとの最大イベント番号の、その行を更新したマシンの最小値とを比較し、その行のイベント番号が、最大イベント番号の最小値以下であるときには、その行を削除する。図3に示すように、データと同期情報が分離されているときには、削除フラグが「Y」に設定された行に対応する同期情報を削除する。例えば、削除フラグが「Y」に設定された行の更新者がマシンCであり、イベント番号が「3」であれば、表1601における更新者「マシンC」の最大イベント番号の最小値は「7」であるため、その行を関係データベース102から削除する。
Each machine has an event number of a row in which the deletion flag is set to “Y” and a maximum event for each updater possessed by each machine at an arbitrary timing, for example, periodically or when synchronizing with other machines. The number is compared with the minimum value of the machine that updated the line, and if the event number of the line is less than or equal to the minimum value of the maximum event number, the line is deleted. As shown in FIG. 3, when the data and the synchronization information are separated, the synchronization information corresponding to the row in which the deletion flag is set to “Y” is deleted. For example, if the updater of the row in which the deletion flag is set to “Y” is the machine C and the event number is “3”, the minimum value of the maximum event number of the updater “machine C” in the table 1601 is “ 7 ”, the row is deleted from the
次に、更新履歴の削除について説明する。図18は、更新履歴削除前の行と更新履歴削除後の行とを示している。更新履歴については、全てのマシンに伝播した更新に関しては、更新履歴から削除しても問題がない。例えば、マシンAが、図16に示す表1601を記憶する場合には、マシンAは、各更新者についての最大イベント番号の最小値である「A15」、「B7」、「C7」までの更新は、全マシンに伝播していると認識している。このため、更新履歴削除手段は、図18に示す行1801については、この行の更新履歴「A3、B5、C7、A20」から「A3、B5、C7」を削除する。これにより、更新履歴削除後の行1802の更新履歴は「A20」のみとなる。履歴削除手段は、任意のタイミングで、例えば定期的に、或いは、他のマシンとの同期時に、更新履歴の不要部分を削除する。
Next, deletion of the update history will be described. FIG. 18 shows a line before update history deletion and a line after update history deletion. Regarding the update history, there is no problem even if the update propagated to all machines is deleted from the update history. For example, when the machine A stores the table 1601 shown in FIG. 16, the machine A updates up to “A15”, “B7”, and “C7”, which are the minimum values of the maximum event numbers for each updater. Recognizes that it has propagated to all machines. Therefore, the update history deleting means deletes “A3, B5, C7” from the update history “A3, B5, C7, A20” of this row for the
ただし、任意の2台がデータを同期しようとした際に、それぞれのマシンにおいて更新履歴から削除した内容が異なる場合がある。これは、各マシンが記憶する、各マシンが持つ更新者ごとの最大イベント番号の表における更新者ごとの最大イベント番号の最小値が、マシンごとに異なる場合があるためである。例えば、マシンAが図17に示す表1701(図16の表1601と同じ内容)を記憶し、マシンBが表1702を記憶する場合には、マシンAが記憶する表1701では、更新者「マシンA」の最大イベント番号の最小値は「15」であり、マシンBが記憶する表1702では、更新者「マシンA」の最大イベント番号の最小値は「11」となる。これは、マシンAは、自装置が更新者となる更新についてイベント番号「15」までの更新が全マシンに伝播していると認識しており、マシンBは、更新者「マシンA」の更新については、イベント番号「11」までの更新が全マシンに伝播していると認識していることを意味する。 However, when two arbitrary devices try to synchronize data, the contents deleted from the update history may be different in each machine. This is because the minimum value of the maximum event number for each updater in the table of the maximum event numbers for each updater stored in each machine may be different for each machine. For example, when machine A stores table 1701 shown in FIG. 17 (the same content as table 1601 in FIG. 16) and machine B stores table 1702, in table 1701 stored by machine A, the updater “machine The minimum value of the maximum event number of “A” is “15”, and in the table 1702 stored by the machine B, the minimum value of the maximum event number of the updater “machine A” is “11”. This is because machine A recognizes that updates up to event number “15” have been propagated to all machines for updates for which its own device is an updater, and machine B updates updater “machine A”. Means that updates up to event number “11” are recognized as being propagated to all machines.
図19は、マシンBにおける更新履歴の削除の様子を示している。同図に示す行1901は、図18に示す行1801と同じ主キーを有しており、「A20」の更新がされる前の状態を示している。マシンBが、各マシンが持つ更新者ごとの最大イベント番号として図17に示す表1702を記憶していた場合、更新者「マシンC」についての最大イベント番号の最小値は「6」である。従って、マシンBが、図19に示す行1901から更新履歴を削除すると、行1902に示すように、更新履歴は「C7」となる。この場合、マシンAとマシンBとが図15に示す手順で同期しようとすると、行1802(図18)の更新履歴と行1902の更新履歴とは包含関係にないため、本来は矛盾しない更新であるのに、矛盾した更新であると誤って認識することになる。
FIG. 19 shows how the update history is deleted in the machine B. The
そこで、更新情報送信側マシンにおいて、どの更新までを更新履歴から削除したかを、更新情報受信側マシンに伝達する。具体的には、更新情報送信側マシンは、更新情報受信側マシンに抽出した行をエンコードして送信する際に、自装置が記憶する「各マシンが持つ更新者ごとの最大イベント番号の表」をエンコードして送信する。更新情報受信側マシンは、更新情報送信側マシンから受信した「各マシンが持つ更新者ごとの最大イベント番号の表」、自装置が記憶する「各マシンが持つ更新者ごとの最大イベント番号の表」とのうちの値が大きいほうを選択して、「各マシンが待つ更新者ごとの最大イベント番号の表」を更新する。その後、更新された表について、更新者ごとに、最大イベント番号の最小値を求める。 Therefore, the update information transmission side machine notifies the update information reception side machine of what update has been deleted from the update history. Specifically, when the update information transmission side machine encodes and transmits the extracted row to the update information reception side machine, it stores the “table of maximum event numbers for each updater that each machine has” Encode and send. The update information receiving machine receives the "maximum event number table for each updater on each machine" received from the update information transmission machine, and the "maximum event number table for each updater on each machine" stored in its own device. The larger value of "" is selected, and the "table of maximum event numbers for each updater that each machine waits" is updated. Thereafter, for the updated table, the minimum value of the maximum event number is obtained for each updater.
図17の例では、マシンAが記憶する表1701と、マシンBが記憶する表1702とにより、マシンBが記憶する「各マシンが持つ最大イベント番号の表」は、表1703に示すように更新される。この場合、最大イベント番号の最小値は、「A11」、「B7」、「C6」(表1702)から、「A15」、「B7」、「C7」となる。更新情報受信側マシンは、ステップS1501(図15)で、更新履歴を比較する際に、自装置の関係データベース102の更新情報に対応する行の更新履歴から、更新した各マシンが持つ最大イベント番号の表の更新者ごとの最大イベント番号の最小値を用いて、更新履歴を削除する。その上で、更新情報の更新履歴と、関係データベース102の更新情報に対応する行の更新履歴とを比較し、矛盾が発生しているか否かを調べる。
In the example of FIG. 17, the table 1701 stored by the machine A and the table 1702 stored by the machine B update the “table of maximum event numbers held by each machine” as shown in the table 1703. Is done. In this case, the minimum value of the maximum event number is “A15”, “B7”, and “C7” from “A11”, “B7”, and “C6” (Table 1702). When the update information receiving machine compares the update histories in step S1501 (FIG. 15), it updates the maximum event number of each updated machine from the update history of the row corresponding to the update information in the
例えば、マシンBが図19に示す行1902を記憶し、更新情報として図18に示す行1802を受信した場合には、更新された表1703を参照して、行1902の更新履歴から「C7」を削除する。このように更新履歴が削除された行1903と、更新情報の更新履歴とを比較すると、行1903の更新履歴は“空”であるので、ステップS1501では、矛盾があるとは判断されず、ステップS810へ進んでデータが更新される。更新情報受信側マシンは、ステップS810でデータを更新した場合には、その更新に対応して、「各マシンがもつ更新者ごとの最大イベント番号の表」の自装置が持つ最大イベント番号の行を更新する。例えば、マシンBが、行1903を行1802で更新した場合には、マシンBは、表1703(図17)のマシンBが持つ最大イベント番号の行の更新者「マシンA」の値を、「20」に更新する。
For example, when the machine B stores the
本実施形態では、各マシンが、各マシンに更新者ごとにどの更新までが伝播したかを記憶し、その情報を参照して、既に全てのマシンに伝播しており、不要となった更新履歴や、削除フラグが「Y」に設定された行(同期情報)を削除する。このようにすることで、更新履歴や同期情報を記憶するために必要な記憶容量を少なくすることができ、記憶装置の記憶容量を有効に使用することができる。 In this embodiment, each machine memorizes what update has been propagated to each machine for each updater, refers to that information, has already propagated to all machines, and is no longer needed Or, the line (synchronization information) in which the deletion flag is set to “Y” is deleted. By doing so, the storage capacity necessary for storing the update history and the synchronization information can be reduced, and the storage capacity of the storage device can be used effectively.
第6実施形態
図20は、本発明の第6実施形態の分散同期型情報システムの構成を示している。本実施形態では、分散同期型情報システム10aは、ネットワークを介して接続された複数のコンピュータ(同図の例では、3台のコンピュータ2001〜2003)により構成される。各コンピュータには、記録媒体2011〜2013が接続されており、各記録媒体は、コンピュータを図1に示すアプリケーション101、データベース内同期情報更新手段103、再接続時同期手段104、及び、接続中同期手段105として機能させるプログラム、及び、関係データベース102が記憶されている。各コンピュータは、プログラムを読み込んで動作することにより、第1〜第5実施形態で説明した動作により、関係データベース102を同期する。
Sixth Embodiment FIG. 20 shows the configuration of a distributed synchronous information system according to a sixth embodiment of the present invention. In the present embodiment, the distributed
なお、図2では、同期情報に、更新の前後を判断する情報として「イベント番号」を含め、何れの更新を優先すべきかを判断する際に用いる情報として「更新時刻」を含めたが、更新の前後を判断するための情報として「更新時刻」を採用する場合には、更新の前後を判断するための情報と、何れの更新を優先すべきかを判断するための情報とを共用することができる。更新の前後を判断するための情報として、更新時刻を用いる場合には、上記各実施形態で説明した最大イベント番号を、直近の更新時刻と読みかえればよい。また、あるイベント番号以降のイベント番号の部分を、ある更新時刻以降の更新と読み替えればよい。 In FIG. 2, the synchronization information includes “event number” as information for determining before and after update, and “update time” as information used when determining which update should be prioritized. When “update time” is used as information for determining before and after the update, information for determining before and after the update and information for determining which update should be given priority may be shared. it can. When the update time is used as the information for determining before and after the update, the maximum event number described in each of the above embodiments may be read as the latest update time. Further, an event number portion after a certain event number may be read as an update after a certain update time.
以上、本発明をその好適な実施形態に基づいて説明したが、本発明の情報装置、分散同期型情報システム、情報同期方法、及び、プログラムは、上記実施形態例にのみ限定されるものではなく、上記実施形態の構成から種々の修正及び変更を施したものも、本発明の範囲に含まれる。 As mentioned above, although this invention was demonstrated based on the suitable embodiment, the information apparatus of this invention, a distributed synchronous type | mold information system, the information synchronization method, and a program are not limited only to the said embodiment example. Those modified and changed from the configuration of the above embodiment are also included in the scope of the present invention.
本発明は、パーソナルコンピュータや情報家電、携帯電話、PDAといった機器において、それらが利用する情報を同期する用途に適用できる。また、ネットワークで接続されたサーバ群の間で、データベース内の情報を同期するための用途にも適用できる。 The present invention can be applied to applications such as personal computers, information appliances, mobile phones, and PDAs that synchronize information used by them. Further, the present invention can be applied to a use for synchronizing information in a database between a group of servers connected via a network.
10:分散同期型情報システム
100、110、120:情報機器
101:アプリケーション
102:関係データベース
103:データベース内同期情報更新手段
104:再接続時同期手段
105:接続中同期手段
106:更新情報送信要求手段
107:更新情報送信手段
201:同期情報
2001、2002、2003:コンピュータ
2011、2012、2013:記録媒体
10: Distributed
Claims (30)
前記情報処理装置のそれぞれが、
自装置が有するデータベースの各データと、該データに反映されている最新の更新を行った情報処理装置である更新装置を示す更新装置情報と該更新装置が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報と、を対応付けて記憶する記憶手段と、
前記記憶手段に記憶されている同期情報を検索し、自装置が有するデータベースに反映されている更新の内で、更新装置それぞれが実行した最新の更新を特定する特定手段と、
前記特定手段により特定された更新装置それぞれの最新の更新を示す最新更新情報を含む更新情報送信要求を他の情報処理装置に送信する更新情報送信要求手段と、
前記更新情報送信要求を受信した他の情報処理装置から、前記他の情報処理装置が有するデータベースに反映された更新の内で前記最新更新情報が示す更新装置それぞれの最新の更新よりも後に該更新装置である情報処理装置が更新装置として更新を実行したデータの更新データと該更新データに対応する同期情報とを含む更新情報を受信し、受信した更新情報に基づいて、自装置内の前記データベースの対応するデータ及び該データに対応する同期情報を更新する第1のデータベース同期手段と、
を備えたことを特徴とする分散同期型情報システム。 In a distributed synchronous information system that includes a plurality of information processing devices each having a database, and synchronizes the database among the information processing devices,
Each of the information processing devices
Among the data of the database of the own device, the update device information indicating the update device that is the information processing device that has performed the latest update reflected in the data, and the update of the data update executed by the update device Storage means for associating and storing synchronization information including order information for determining the executed order;
Searching the synchronization information stored in the storage means, the specification means for specifying the latest update executed by each of the update devices among the updates reflected in the database of the own device,
Update information transmission request means for transmitting an update information transmission request including the latest update information indicating the latest update of each of the update apparatuses specified by the specifying means to other information processing apparatuses;
From the other information processing apparatus that has received the update information transmission request, the update is performed after the latest update of each of the update apparatuses indicated by the latest update information among the updates reflected in the database of the other information processing apparatus. The information processing apparatus that is the apparatus receives update information including update data of data that has been updated as an update apparatus and synchronization information corresponding to the update data, and the database in the own apparatus based on the received update information First database synchronization means for updating the corresponding data and the synchronization information corresponding to the data;
A distributed synchronous information system characterized by comprising:
他の情報処理装置の更新伝播手段によって送信された更新データ及び同期情報を受信し、受信した更新データ及び同期情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新する第2のデータベース同期手段と、
を更に備える、請求項1〜7の何れか一に記載の分散同期型情報システム。 When updating data in the database as an update device within the own device, update propagation means for transmitting the update data and synchronization information corresponding to the update data to other information processing devices connected to the network;
Receives update data and synchronization information transmitted by update propagation means of another information processing apparatus, and updates corresponding data in the database and synchronization information corresponding to the data based on the received update data and synchronization information A second database synchronization means;
The distributed synchronous information system according to any one of claims 1 to 7, further comprising:
前記特定された更新の更新データと、該更新データに対応する同期情報とを含む更新情報を、前記更新情報送信要求を送信した情報処理装置に向けて送信する更新情報送信手段を更に備える、請求項1〜8の何れか一に記載の分散同期型情報システム。 When receiving an update information transmission request from another information processing apparatus, the specifying unit searches for synchronization information stored in the own apparatus, and updates each update apparatus indicated by the latest update information included in the received update information transmission request. The update executed by the information processing apparatus as the update apparatus after the update of
Update information transmitting means for transmitting update information including update data of the specified update and synchronization information corresponding to the update data to an information processing apparatus that has transmitted the update information transmission request. Item 9. The distributed synchronous information system according to any one of Items 1 to 8.
前記情報処理装置が、データベース更新時に、更新されたデータと、該データに反映されている最新の更新を行った情報処理装置である更新装置を示す更新装置情報と前記更新装置が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報と、を対応付けて記憶するステップと、
前記情報処理装置が、前記同期情報を検索し、自装置が有するデータベースに反映されている更新の内で、更新装置それぞれが実行した最新の更新を示す最新更新情報を含む更新情報送信要求を他の情報処理装置に送信するステップと、
前記情報処理装置が、前記更新情報送信要求を受信した他の情報処理装置から、前記他の情報処理装置が有するデータベースに反映された更新の内で前記最新更新情報が示す更新装置それぞれの最新の更新よりも後に該更新装置である情報処理装置が更新装置として更新を実行したデータの更新データと該更新データに対応する同期情報とを含む更新情報を受信するステップと、
前記情報処理装置が、受信した更新情報に基づいて、自装置内の前記データベースの対応するデータ及び該データに対応する同期情報を更新するステップと、
を有することを特徴とする方法。 Each comprising a plurality of information processing apparatus having a database, Oite the database synchronization method in a distributed synchronization information system for synchronizing the databases between the information processing apparatus,
When the information processing apparatus updates the database, the updated data, the update apparatus information indicating the update apparatus that has performed the latest update reflected in the data, and the data update executed by the update apparatus Storing the synchronization information including the order information for determining the order in which the update is performed in association with each other;
The information processing apparatus searches for the synchronization information, and updates the update information transmission request including the latest update information indicating the latest update executed by each of the update apparatuses among the updates reflected in the database of the own apparatus. Sending to the information processing apparatus;
The latest information of each update device indicated by the latest update information in the update reflected in the database of the other information processing device from the other information processing device that has received the update information transmission request. Receiving update information including update data of data that has been updated by the information processing apparatus as the update apparatus after update and synchronization information corresponding to the update data;
The information processing device, based on the received update information, updating the corresponding data in the database in the own device and the synchronization information corresponding to the data;
A method characterized by comprising:
前記情報処理装置が、他の情報処理装置により送信された更新データ及び同期情報を受信し、受信した更新データ及び同期情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新するステップと、
を更に有する、請求項11〜17の何れか一に記載の方法。 When the information processing device updates the data in the database as an update device within itself, the step of transmitting update data and synchronization information corresponding to the update data to another information processing device connected to the network;
The information processing apparatus receives update data and synchronization information transmitted by another information processing apparatus, and based on the received update data and synchronization information, the corresponding data in the database and the synchronization information corresponding to the data are A step to update,
The method according to claim 11, further comprising:
前記情報処理装置が、前記特定された更新の更新データと、該更新データに対応する同期情報とを含む更新情報を、前記更新情報送信要求を送信した情報処理装置に向けて送信するステップと、
を更に有する、請求項11〜18の何れか一に記載の方法。 When the information processing apparatus receives an update information transmission request from another information processing apparatus, the information processing apparatus searches for synchronization information stored in the own apparatus and indicates each update apparatus indicated by the latest update information included in the received update information transmission request. Identifying an update executed by the information processing apparatus as the update apparatus after the latest update as an update apparatus;
The information processing apparatus transmitting update information including the update data of the identified update and synchronization information corresponding to the update data to the information processing apparatus that has transmitted the update information transmission request;
The method according to claim 11, further comprising:
前記データベースの各データと、該データに反映されている最新の更新を行った情報処理装置である更新装置を示す更新装置情報と該更新装置が実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報と、を対応付けて記憶する記憶手段と、
前記記憶手段に記憶されている同期情報を検索し、自装置が有するデータベースに反映されている更新の内で、更新装置それぞれが実行した最新の更新を特定する特定手段と、
前記特定手段により特定された更新装置それぞれの最新の更新を示す最新更新情報を含む更新情報送信要求を他の情報処理装置に送信する更新情報送信要求手段と、
前記更新情報送信要求を受信した他の情報処理装置から、前記他の情報処理装置が有するデータベースに反映された更新の内で前記最新更新情報が示す更新装置それぞれの最新の更新よりも後に該更新装置である情報処理装置が更新装置として更新を実行したデータの更新データと該更新データに対応する同期情報とを含む更新情報を受信し、受信した更新情報に基づいて、自装置内の前記データベースの対応するデータ及び該データに対応する同期情報を更新する第1のデータベース同期手段と、
を備えたことを特徴とする情報処理装置。 In an information processing apparatus having a database and synchronizing the database with another information processing apparatus connected via a network,
Each of the data in the database, update device information indicating an update device that is an information processing device that has performed the latest update reflected in the data, and the data update performed by the update device, the update was executed. Storage means for associating and storing synchronization information including order information for determining the order;
Searching the synchronization information stored in the storage means, the specification means for specifying the latest update executed by each of the update devices among the updates reflected in the database of the own device,
Update information transmission request means for transmitting an update information transmission request including the latest update information indicating the latest update of each of the update apparatuses specified by the specifying means to other information processing apparatuses;
From the other information processing apparatus that has received the update information transmission request, the update is performed after the latest update of each of the update apparatuses indicated by the latest update information among the updates reflected in the database of the other information processing apparatus. The information processing apparatus that is the apparatus receives update information including update data of data that has been updated as an update apparatus and synchronization information corresponding to the update data, and the database in the own apparatus based on the received update information First database synchronization means for updating the corresponding data and the synchronization information corresponding to the data;
An information processing apparatus comprising:
データベース更新時に、更新されたデータと、該データに反映されている最新の更新を行ったコンピュータである更新コンピュータを示す更新コンピュータ情報と前記更新コンピュータが実行したデータ更新の内で前記更新の実行された順番を判定するための順番情報とを含む同期情報と、を対応付けて記憶するステップと、
前記同期情報を検索し、自コンピュータが有するデータベースに反映されている更新の内で、更新コンピュータそれぞれが実行した最新の更新を示す最新更新情報を含む更新情報送信要求を他のコンピュータに送信するステップと、
前記更新情報送信要求を受信した他のコンピュータから、前記他のコンピュータが有するデータベースに反映された更新の内で前記最新更新情報が示す更新コンピュータそれぞれの最新の更新よりも後に該更新コンピュータであるコンピュータが更新コンピュータとして更新を実行したデータの更新データと該更新データに対応する同期情報とを含む更新情報を受信するステップと、
受信した更新情報に基づいて、自コンピュータが有するデータベースの対応するデータ及び該データに対応する同期情報を更新するステップと、
を実行させることを特徴とするプログラム。 A program for synchronizing a database of a computer with a database of another computer connected via a network, the computer having:
At the time of updating the database, the update is executed among the updated data, the update computer information indicating the update computer that has performed the latest update reflected in the data, and the data update executed by the update computer. Storing the synchronization information including the order information for determining the order,
The step of searching for the synchronization information and transmitting an update information transmission request including the latest update information indicating the latest update executed by each of the update computers to the other computers among the updates reflected in the database of the own computer When,
A computer that is the update computer after the latest update of each of the update computers indicated by the latest update information in the update reflected in the database of the other computer from the other computer that has received the update information transmission request Receiving update information including update data of data that has been updated as an update computer and synchronization information corresponding to the update data;
Updating the corresponding data in the database of the own computer and the synchronization information corresponding to the data based on the received update information;
A program characterized by having executed.
自装置内で更新コンピュータとしてデータベースのデータを更新すると、ネットワーク接続中の他のコンピュータに、更新データと、該更新データに対応する同期情報とを送信するステップと、
他のコンピュータから送信された更新データ及び該更新データに対応する同期情報を受信し、受信した更新データ及び該更新データに対応する同期情報に基づいて、前記データベースの対応するデータ及び該データに対応する同期情報を更新するステップと、
を更に実行させる、請求項22〜27の何れか一に記載のプログラム。 In the computer,
When updating the data in the database as an update computer in its own device, transmitting the update data and synchronization information corresponding to the update data to another computer connected to the network;
The update data transmitted from another computer and the synchronization information corresponding to the update data are received, and the data corresponding to the database and the data are supported based on the received update data and the synchronization information corresponding to the update data. Updating the synchronization information to be
28. The program according to any one of claims 22 to 27, wherein the program is further executed.
他のコンピュータから更新情報送信要求を受信すると、自装置が記憶する同期情報を検索して、受信した更新情報送信要求に含まれる最新更新情報が示す更新コンピュータそれぞれの最新の更新よりも後に該更新コンピュータであるコンピュータが更新コンピュータとして実行した更新を特定するステップと、
前記特定された更新の更新データと、該更新データに対応する同期情報とを含む更新情報を、前記更新情報送信要求を送信したコンピュータに向けて送信するステップと、
を更に実行させる、請求項22〜28の何れか一に記載のプログラム。 In the computer,
When an update information transmission request is received from another computer, the synchronization information stored in the own device is searched, and the update is performed after the latest update of each update computer indicated by the latest update information included in the received update information transmission request. Identifying an update performed by the computer that is the computer as the update computer;
Transmitting update information including the update data of the identified update and synchronization information corresponding to the update data to the computer that has transmitted the update information transmission request;
29. The program according to any one of claims 22 to 28, wherein the program is further executed.
前記コンピュータがネットワークに再接続した後に、ネットワークに接続された他のコンピュータのうちの1つから更新情報送信要求を受信すると、前記更新情報を、ネットワークに接続された他のコンピュータに向けてマルチキャスト送信するステップを更に実行させる、請求項29に記載のプログラム。 In the computer,
When the computer is reconnected to the network and receives an update information transmission request from one of the other computers connected to the network, the update information is multicast transmitted to the other computers connected to the network. 30. The program according to claim 29, further executing the step of:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005360713A JP5092234B2 (en) | 2005-12-14 | 2005-12-14 | Information processing apparatus, distributed synchronization information system, information synchronization method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005360713A JP5092234B2 (en) | 2005-12-14 | 2005-12-14 | Information processing apparatus, distributed synchronization information system, information synchronization method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007164523A JP2007164523A (en) | 2007-06-28 |
JP5092234B2 true JP5092234B2 (en) | 2012-12-05 |
Family
ID=38247336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005360713A Expired - Fee Related JP5092234B2 (en) | 2005-12-14 | 2005-12-14 | Information processing apparatus, distributed synchronization information system, information synchronization method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5092234B2 (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009122915A (en) * | 2007-11-14 | 2009-06-04 | Hitachi Ltd | Information terminal device and operation method thereof |
US20090234872A1 (en) * | 2008-03-11 | 2009-09-17 | Microsoft Corporation | Synchronization of disconnected/offline data processing/entry |
JP4719243B2 (en) * | 2008-04-16 | 2011-07-06 | 株式会社エヌ・ティ・ティ・ドコモ | Data synchronization method and communication apparatus |
US8412676B2 (en) * | 2008-10-21 | 2013-04-02 | Microsoft Corporation | Forgetting items with knowledge based synchronization |
US10303787B2 (en) | 2008-10-21 | 2019-05-28 | Microsoft Technology Licensing, Llc | Forgetting items with knowledge based synchronization |
JP5408723B2 (en) * | 2010-02-24 | 2014-02-05 | アルパイン株式会社 | In-vehicle device |
WO2012002384A1 (en) | 2010-06-29 | 2012-01-05 | かもめエンジニアリング株式会社 | Access control method, access control apparatus, and access control program |
US11841844B2 (en) * | 2013-05-20 | 2023-12-12 | Amazon Technologies, Inc. | Index update pipeline |
US10216768B1 (en) | 2014-02-17 | 2019-02-26 | Amazon Technologies, Inc. | Table and index communications channels |
JP6088452B2 (en) * | 2014-02-19 | 2017-03-01 | 日本電信電話株式会社 | Database system and data update method |
CN106156094B (en) * | 2015-04-01 | 2019-09-17 | 阿里巴巴集团控股有限公司 | A kind of the teledata synchronous method and device of database |
JP6727775B2 (en) * | 2015-08-31 | 2020-07-22 | キヤノン株式会社 | Server device, control system, control method, and program |
JP6996176B2 (en) * | 2017-09-11 | 2022-01-17 | カシオ計算機株式会社 | Database management system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6317754B1 (en) * | 1998-07-03 | 2001-11-13 | Mitsubishi Electric Research Laboratories, Inc | System for user control of version /Synchronization in mobile computing |
JP3756349B2 (en) * | 1999-06-17 | 2006-03-15 | シャープ株式会社 | Database management apparatus and recording medium on which program is recorded |
JP4025475B2 (en) * | 1999-11-10 | 2007-12-19 | 日本電気株式会社 | Database exchange system |
JP4225729B2 (en) * | 2001-03-06 | 2009-02-18 | シャープ株式会社 | Information management device |
JP2004046302A (en) * | 2002-07-08 | 2004-02-12 | Nec Corp | Data synchronization method between two or more pieces of information apparatus, information processor which performs this method and program for performing this method |
US7533134B2 (en) * | 2004-04-01 | 2009-05-12 | Microsoft Corporation | Systems and methods for the propagation of conflict resolution to enforce item convergence (i.e., data convergence) |
-
2005
- 2005-12-14 JP JP2005360713A patent/JP5092234B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2007164523A (en) | 2007-06-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5092234B2 (en) | Information processing apparatus, distributed synchronization information system, information synchronization method, and program | |
KR101484333B1 (en) | Propagation of Conflict Knowledge | |
JP4997950B2 (en) | Network management system, network management program, and network management method | |
US8671151B2 (en) | Maintaining item-to-node mapping information in a distributed system | |
EP2996308B1 (en) | Massively scalable object storage system | |
CN101009516B (en) | A method, system and device for data synchronization | |
US10831612B2 (en) | Primary node-standby node data transmission method, control node, and database system | |
CN104488248B (en) | A kind of file synchronisation method, server and terminal | |
CN112445626B (en) | Data processing method and device based on message middleware | |
CN113360456B (en) | Data archiving method, device, equipment and storage medium | |
US20090154476A1 (en) | Overlay network system which constructs and maintains an overlay network | |
JP3866466B2 (en) | Data structure management device, data structure management system, data structure management method, and recording medium for storing data structure management program | |
JP5395517B2 (en) | Distributed data management system, data management apparatus, data management method, and program | |
JP5012893B2 (en) | COMMUNICATION SYSTEM, COMMUNICATION DEVICE, AND COMPUTER PROGRAM | |
JP4971717B2 (en) | Directory distributed storage device and data processing request transfer program | |
US7779299B2 (en) | Efficiently re-starting and recovering synchronization operations between a client and server | |
JP6697101B2 (en) | Information processing system | |
CN100559794C (en) | A network of computers used to identify multiple nodes matching the same label | |
CN107465706B (en) | Distributed data object storage device based on wireless communication network | |
JP2009289161A (en) | Clustered storage system, node device thereof, and method and program for controlling data read/write | |
EP2375692A2 (en) | Apparatus and method for registering node and searching for floating internet protocol address using distributed network | |
JP2007317107A (en) | Information processing system, information processor, and control program | |
JP3501968B2 (en) | Database management device and recording medium on which the program is recorded | |
CN117014420A (en) | File synchronization method, device, equipment and medium | |
CN114880297A (en) | Distributed data deduplication method and system based on fingerprints |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20081112 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20100223 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110810 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110830 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20111027 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120424 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120608 |
|
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: 20120821 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120903 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5092234 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150928 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |