JP4199021B2 - Server apparatus and program - Google Patents
Server apparatus and program Download PDFInfo
- Publication number
- JP4199021B2 JP4199021B2 JP2003041681A JP2003041681A JP4199021B2 JP 4199021 B2 JP4199021 B2 JP 4199021B2 JP 2003041681 A JP2003041681 A JP 2003041681A JP 2003041681 A JP2003041681 A JP 2003041681A JP 4199021 B2 JP4199021 B2 JP 4199021B2
- Authority
- JP
- Japan
- Prior art keywords
- terminal device
- replica
- data
- stored
- request
- 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
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Mobile Radio Communication Systems (AREA)
Description
【0001】
【発明の属する技術分野】
同一のデータを記憶した複数のコンピュータ装置を含むコンピュータシステムにおいて、各コンピュータ装置に記憶されているデータ間の整合性を保ちつつデータ更新を行う技術に関する。
【0002】
【従来の技術】
近年、携帯電話機やPDA(Personal Digital Assistance)などの無線端末装置の高性能化に伴い、この種の無線端末装置を用いてサーバ装置に記憶されているデータを操作することが可能になっている。しかしながら、この種の無線端末装置は、サーバ装置に有線接続されている端末装置と異なり、常にサーバ装置と通信可能である訳ではない。例えば、無線端末装置が無線エリアに在圏していない場合(以下、「オフライン状態」という)には、サーバ装置との通信は不能であり、そのサーバ装置に記憶されているデータを操作することはできない。このような場合にもユーザが無線端末装置を用いて各種データ操作を行えるようにするために、サーバ装置に記憶されているデータの複製(以下、「レプリカ」という)を無線端末装置に記憶させておくことが提案されている。このようにすると、無線通信端末がオフライン状態であっても、その無線端末装置に記憶されているレプリカを閲覧したり、更新したりすることにより、ユーザは各種データ操作を行うことができる。そして、オフライン状態でレプリカの更新を行った場合には、無線端末装置が無線エリアに復帰したときに、この無線端末装置に記憶されているレプリカをサーバ装置へアップロードすることにより、無線端末装置に記憶されているレプリカとサーバ装置に記憶させているデータとを同期させることができる。
【0003】
上述したレプリカを無線端末装置に記憶させておくことにより、無線端末装置がオフライン状態であっても、ユーザにデータ操作を行わせることが可能になる。しかしながら、複数の無線端末装置が同一のサーバ装置に記憶されているデータを操作する場合に、オフライン状態でのレプリカの更新を無制限に許容すると、互いに異なる複数のレプリカ(以下、このようなレプリカを「競合データ」という)が存在することになってしまう。そして、競合データが発生している状況下で、無線端末装置にレプリカのアップロードを行わせてしまうと、最後にレプリカのアップロードを行った無線端末装置以外の無線端末装置に記憶されているレプリカとサーバ装置に記憶されているデータとの整合性が崩れてしまう。
【0004】
上記競合データの発生を回避するための技術として、特許文献1に開示されている技術がある。特許文献1に開示されている技術によれば、端末装置がデータを更新目的でサーバ装置からダウンロードする際に、このデータを他の端末装置が更新目的でアクセスすることをサーバ装置に禁止させる。以下では、データへの更新目的のアクセスを禁止することを「データをロックする」という。このようにすることにより、このデータを他の端末装置が更新目的でダウンロードすることが禁止される。そして、サーバ装置は、更新済みのデータが自装置へアップロードされた場合に、このデータのロックを解除するようにしている。このように、特許文献1に開示されている技術によれば、更新目的でデータのダウンロードを行える端末装置は1つに限定されるので、競合データの発生が回避される。
【0005】
【特許文献1】
特開平11−45201号公報
【0006】
【発明が解決しようとする課題】
ところで、特許文献1に開示されている技術は、サーバ装置に全てのデータを記憶させておき、実際にデータ操作を行う度に、端末装置にそのデータをサーバ装置からダウンロードさせる集中型データベースシステムを前提としている。これに対して、近年では、分散型データベースシステムでシステム構築することが主流になっている。その理由は、分散型データベースシステムに含まれている端末装置は上述したレプリカを予め記憶しており、データ操作の度にレプリカのダウンロードを行う必要がなく、集中型データベースシステムに比較して、端末装置とサーバ装置との間の通信トラヒックが軽減されるからである。
【0007】
しかしながら、上述した分散型データベースシステムについては、特許文献1に開示されている技術を用いたとしても、競合データの発生を回避することはできない。理由は以下に述べる通りである。分散型データベースシステムの各端末装置には予め更新目的でレプリカが記憶されている。つまり、システム全体に存在する更新目的のレプリカは常に複数ある。これに対して、特許文献1に開示されている技術では、更新目的のレプリカが複数の端末装置へダウンロードされることを禁止することにより、システム全体に存在する更新目的のレプリカが複数にならないようにしている。つまり、分散型データベースシステムと特許文献1に開示されている技術とは本質的に相容れないのである。
【0008】
もっとも、分散型データベースシステムに含まれている端末装置が全てサーバ装置に有線接続されているならば、レプリカの更新を行う際には必ずサーバ装置に記憶されているデータをロックするよう取り決めれば、競合データの発生を回避することができる。しかしながら、分散型データベースシステムに無線端末装置が含まれている場合に、このような取り決めを設けてしまうと、前述したオフライン状態でのレプリカ更新を行うことができないことになってしまう。その理由は、オフライン状態である無線端末装置はサーバ装置と通信することができないので、サーバ装置に記憶されているデータをロックすることはできないからである。
【0009】
本発明は、上記課題に鑑みて為されたものであり、データを記憶したサーバ装置と該データのレプリカを記憶した複数の端末装置とを含むコンピュータシステムにおいて、上記端末装置の少なくとも1つが無線端末装置であっても、サーバ装置に記憶されているデータと端末装置に記憶されているレプリカとの間の整合性を保ちつつデータ更新を行う技術を提供することを目的としている。
【0010】
【課題を解決するための手段】
上記課題を解決するために、本発明は、データを記憶する記憶手段と、前記データのレプリカを記憶した第1の端末装置および複数の第2の端末装置と通信網を介して通信する通信手段と、前記第1の端末装置から前記データをロックすることを前記通信網を介して要求された場合に、前記第2の端末装置の記憶している前記レプリカをロックすることを前記通信網を介して前記第2の端末装置へ要求する一方、前記データをロックするロック手段と、前記ロック手段による要求に応じて前記レプリカがロックされなかった第2の端末装置を一意に特定する識別子を記憶する記憶手段と、前記データが前記ロック手段によりロックされたことを、前記通信網を介して前記第1の端末装置へ通知する通知手段と、前記データがロックされたことを前記通知手段により通知された前記第1の端末装置から前記データを更新することを前記通信網を介して要求された場合に、その要求の内容に基づいて前記データを更新し前記データのロックを解除するとともに、前記ロック手段による要求に応じてロックされた第2の端末装置の記憶している前記レプリカを、その要求の内容に基づいて更新しロックを解除することを前記通信網を介して当該第2の端末装置へ要求する第1の更新手段と、前記記憶手段に記憶されている識別子によって特定される第2の端末装置に対して、当該第2の端末装置の記憶している前記レプリカをロックすることを前記通信網を介して要求する要求手段と、前記要求手段による要求に応じて前記レプリカがロックされた第2の端末装置に対して、当該第2の端末装置の記憶している前記レプリカを、前記第1の端末装置からの前記データの更新の要求の内容に基づいて更新することを、前記通信網を介して当該第2の端末装置へ要求する第2の更新手段とを有するサーバ装置を提供する。
【0011】
また、上記課題を解決するために、本発明は、前記通信網は無線通信網であり、該無線通信網の無線エリアに在圏している場合にのみ、該無線通信網を介して上記サーバ装置と通信する通信手段と、前記レプリカを記憶する記憶手段と、前記サーバ装置からの要求に基づいて前記レプリカをロックするロック手段と、前記ロック手段によりロックされた前記レプリカを前記サーバ装置からの要求に基づいて更新し、前記レプリカのロックを解除する更新手段とを有する端末装置を提供する。
【0012】
また、上記課題を解決するために、本発明は、コンピュータ装置に、当該コンピュータ装置に記憶されているデータのレプリカを記憶した第1の端末装置および複数の第2の端末装置と通信網を介して通信する通信手段と、前記第1の端末装置から前記データをロックすることを前記通信網を介して要求された場合に、前記第2の端末装置の記憶している前記レプリカをロックすることを前記通信網を介して前記第2の端末装置へ要求する一方、前記データをロックするロック手段と、前記ロック手段による要求に応じて前記レプリカがロックされなかった第2の端末装置を一意に特定する識別子を記憶する記憶手段と、前記データが前記ロック手段によりロックされたことを、前記通信網を介して前記第1の端末装置へ通知する通知手段と、前記データがロックされたことを前記通知手段により通知された前記第1の端末装置から前記データを更新することを前記通信網を介して要求された場合に、その要求の内容に基づいて前記データを更新し前記データのロックを解除するとともに、前記ロック手段による要求に応じてロックされた第2の端末装置の記憶している前記レプリカを、その要求の内容に基づいて更新しロックを解除することを前記通信網を介して当該第2の端末装置へ要求する第1の更新手段と、前記記憶手段に記憶されている識別子によって特定される第2の端末装置に対して、当該第2の端末装置の記憶している前記レプリカをロックすることを前記通信網を介して要求する要求手段と、前記要求手段による要求に応じて前記レプリカがロックされた第2の端末装置に対して、当該第2の端末装置の記憶している前記レプリカを、前記第1の端末装置からの前記データの更新の要求の内容に基づいて更新することを、前記通信網を介して当該第2の端末装置へ要求する第2の更新手段とを実現させるためのプログラムを提供する。
【0013】
また、上記課題を解決するために、本発明は、コンピュータ装置に、前記通信網は無線通信網であり、該無線通信網の無線エリアに在圏している場合にのみ、該無線通信網を介して上記サーバ装置と通信する通信手段と、当該コンピュータ装置に予め記憶されている前記レプリカを前記サーバ装置からの要求に基づいてロックするロック手段と、前記ロック手段によりロックされた前記レプリカを前記サーバ装置からの要求に基づいて更新し、前記レプリカのロックを解除する更新手段とを実現させるためのプログラムを提供する。
【0014】
このようなサーバ装置、端末装置およびプログラムを用いると、第1の端末装置に記憶されているレプリカの更新をユーザに指示された場合に、第2の端末装置に記憶されているレプリカがロックされるとともに、該サーバ装置に記憶されているデータがロックされる。そして、第1の端末装置に記憶されているレプリカの更新内容に基づいてサーバ装置に記憶されているデータと、第2の端末装置に記憶されているレプリカとが更新される。
【0015】
また、上記課題を解決するために、本発明は、前記通信網は無線通信網であり、該無線通信網の無線エリアに在圏している場合にのみ、該無線通信網を介して上記サーバ装置と通信する通信手段と、前記レプリカを記憶する記憶手段と、前記無線エリアに在圏していない状況下でユーザに前記レプリカを更新することを指示された場合に、前記レプリカの複製を生成し前記記憶手段へ書き込むとともに、該ユーザの指示に基づいて前記レプリカを更新する更新手段と、前記無線エリアへ復帰したときに、前記無線通信網を介して前記データを前記サーバ装置から取得し、前記記憶手段に記憶されている前記複製と前記データとが一致しているか否かを判定する判定手段と、前記複製と前記データとが一致していると前記判定手段により判定された場合にのみ、前記レプリカで前記データを書き換えることを前記サーバ装置へ要求する要求手段とを有する端末装置を提供する。
【0016】
また、上記課題を解決するために、本発明は、コンピュータ装置に、前記通信網は無線通信網であり、該無線通信網の無線エリアに在圏している場合にのみ、該無線通信網を介して上記サーバ装置と通信する通信手段と、当該コンピュータ装置に予め記憶されている前記レプリカを更新することを 前記無線エリアに在圏していない状況下で指示された場合に、前記レプリカの複製を生成し当該コンピュータ装置に記憶させるとともに、該ユーザの指示に基づいて前記レプリカを更新する更新手段と、前記無線エリアへ復帰したときに、前記無線通信網を介して前記データを前記サーバ装置から取得し、当該コンピュータ装置に記憶されている前記複製と前記データとが一致しているか否かを判定する判定手段と、
前記複製と前記データとが一致していると前記判定手段により判定された場合にのみ、前記レプリカで前記データを書き換えることを前記サーバ装置へ要求する要求手段とを実現させるためのプログラムを提供する。
【0017】
このような、端末装置およびプログラムを用いると、端末装置がオフライン状態である場合にレプリカの更新が行われると、オフライ状態の間に上述のサーバ装置でデータの更新が行われていない場合にのみ、そのレプリカの更新に基づいて該サーバ装置に記憶されているデータが更新される。
【0018】
【発明の実施の形態】
以下、図面を参照しつつ、本発明の実施形態について説明する。
【0019】
[A.構成]
(1:通信システム全体の構成)
図1は、本発明に係る通信システムの全体構成の一例を示す図である。サーバ装置10は、例えばパーソナルコンピュータなどの一般的なコンピュータ装置であり、LAN30に接続されている。
【0020】
端末装置20Aと20Bとは、例えばパケット通信機能を備えたPDAなどの無線端末装置であり、無線通信網40およびLAN30を介してサーバ装置10と通信することができる。以下では、端末装置20Aと20Bとを区別する必要がない場合には、単に「端末装置20」と表記する。なお、本実施形態においては、パケット通信機能を備えたPDAに本発明を適用する場合について説明するが、本発明の適用対象は係るPDAに限定されるものではなく、パケット通信機能を携帯電話機やPHS(Personal Handyphone System)であっても良い。また、図1には、2つの端末装置が例示されているが、実際には多数の端末装置が存在する。また、本実施形態では、無線端末装置のみが含まれている通信システムに本発明を適用する場合について説明するが、無線端末装置の他に、LAN30に有線接続された端末装置を含む通信システムに本発明を適用しても良いことは勿論である。要は、少なくとも1つの無線端末装置を含む複数の端末装置を有する通信システムであれば良い。
【0021】
無線通信網40は、例えば移動パケット通信網であり、ゲートウェイ(以下、「GW」という)41と基地局42とを含んでいる。GW41はLAN30に接続されており、LAN30における通信プロトコルと無線通信網40における通信プロトコルとを相互変換するためのものである。基地局42は一定の広さの無線セルを形成し、この無線セル内に在圏する端末装置20と無線通信するためのものである。
【0022】
本実施形態においては、図1に示される通信システムは、ある企業において使用されている顧客管理システムであるとする。具体的には、サーバ装置10と端末装置20とは、図2に示される顧客テーブルをロックフラグと対応づけて記憶しているものとする。図2に示されるように、顧客テーブルには、氏名、住所、電話番号、FAX番号およびメールアドレスなどの顧客データが格納されている。以下では、サーバ装置10に記憶されている顧客テーブルを「マスタテーブル」と称し、端末装置20に記憶されている顧客データを「レプリカテーブル」と称する。なお、本実施形態においては、サーバ装置10に記憶されているマスタテーブルと端末装置20に記憶されているレプリカテーブルとが同一のテーブルフォーマットを有する場合について説明するが、例えば、レプリカテーブルには、メールアドレスが含まれていないなど、両者のテーブルフォーマットが異なっているとしても勿論良い。また、本実施形態では、顧客管理システムに本発明を適用する場合について説明するが、本発明の適用対象は係る顧客管理システムに限定されるものではなく、在庫管理システムや受発注管理システムであってもよく、スケジュール管理システムであっても良い。要はデータベースシステムであれば何れであっても良い。
【0023】
上述したように、マスタテーブルやレプリカテーブルにはロックフラグが対応付けられている。このロックフラグは、“0”または“1”の何れかの値を有するデータであり、そのロックフラグを対応付けられているテーブルがロックされているか否かを示すデータである。具体的には、ロックフラグの値が“1”である場合には、そのロックフラグを対応付けられているテーブルがロックされていることを意味しており、逆に、ロックフラグの値が“0”である場合には、そのロックフラグを対応付けられているテーブルがロックされていないことを意味している。なお、本実施形態では、レプリカテーブルやマスタテーブルをテーブル単位でロックする場合について説明するが、レプリカテーブルやマスタテーブルに格納されている顧客データ毎にロックフラグを設け、顧客データ単位でロックを行うとしても勿論良い。
【0024】
図1に示される通信システムを所有している企業の社員は、営業活動を行う目的などで顧客の元へ赴く際に、端末装置20を携帯して行動し、この端末装置20に記憶されている顧客テーブルに格納されているデータを自由に閲覧したり更新したりすることができる。そして、図1に示されている通信システムにおいては、端末装置20Aと20Bとのいずれか一方で、レプリカテーブルに格納されている顧客データを更新することが指示された場合に、該当する顧客データを他の端末装置が更新しないようにするために、マスタテーブルをサーバ装置10にロックさせるとともに、他の端末装置にその端末装置に記憶されているレプリカテーブルをロックさせている。そして、マスタテーブルや他の端末装置に記憶されているレプリカテーブルがロックされた場合にのみ、顧客データの更新を行うようにしている。これにより、マスタテーブルに格納されている顧客データが同時に複数の端末装置から更新されることが排除され、競合データの発生が回避される。
【0025】
(2:サーバ装置10の構成)
次に、サーバ装置10のハードウェア構成を図3を参照しつつ説明する。図3に示されるように、サーバ装置10は制御部310と、通信部320と、記憶部330と、これら各構成要素を接続するバス340とを有している。
【0026】
制御部310は、例えばCPU(Central Processing Unit)であり、記憶部330に格納されているソフトウェアを実行することによりサーバ装置10の各部を制御するものである。
【0027】
通信部320はLAN30に接続されており、LAN30を介して端末装置20と通信するためのものである。この通信部320は、端末装置20から送信されてくる通信メッセージを受信し、受信した通信メッセージを制御部310へ引渡すとともに、制御部310から引渡された通信メッセージをLAN30へ送出する。
【0028】
記憶部330は、揮発性記憶部331と不揮発性記憶部332とを有している。揮発性記憶部331は、例えばRAM(Random Access Memory)であり、ソフトウェアを実行中の制御部310によりワークエリアとして使用される。一方、不揮発性記憶部332は、例えばハードディスクであり、上述したマスタテーブルを格納している。また、不揮発性記憶部332には、マスタテーブルの他に、OSを実現するためのOSソフトウェアや、図4に示されるフローチャートに従ったマスタ更新処理を制御部310に行わせるためのマスタ更新ソフトウェアが格納されている。制御部310は、これらのソフトウェアを実行することにより本発明に係るサーバ装置に特有な機能を実現する。
【0029】
具体的には、サーバ装置10の電源(図示省略)が投入されると、制御部310は、まず、不揮発性記憶部332からOSソフトウェアを読み出し、これを実行する。OSソフトウェアを実行中の制御部310には、サーバ装置10の各部を制御する機能、他のソフトウェアを実行する機能などが付与される。そして、OSソフトウェアの実行を完了し、OSを実現している状態の制御部310は、不揮発性記憶部332からマスタ更新ソフトウェアを読み出し、これを実行する。このマスタ更新ソフトウェアを実行中の制御部310には、本発明に係るサーバ装置に特徴的な2つの機能が付与される。
【0030】
第1の機能は、マスタテーブルのロックを要求する旨の通信メッセージ(以下、「マスタロック要求」という)を端末装置20から受信した場合に、他の端末装置にレプリカテーブルをロックさせるとともに、上記マスタテーブルをロックする機能である。第2の機能は、マスタテーブルの更新を要求する旨の通信メッセージ(以下、「マスタ更新要求」という)を受信した場合に、このマスタ更新要求の内容に基づいてマスタテーブルの格納内容を更新するとともに、レプリカテーブルの格納内容を他の端末装置20に更新させる機能である。
【0031】
(3:端末装置20の構成)
次いで、端末装置20の構成について説明する。図5は端末装置20のハードウェア構成の一例を示す図である。図5に示されているように、端末装置20のハードウェア構成がサーバ装置10のハードウェア構成(図3参照)と異なっている点は、表示部510と操作部520とを設けた点と、通信部320に替えて無線通信部530を設けた点とである。
【0032】
表示部510は、例えば液晶ディスプレイとその駆動回路であり、制御部310から引渡された画像情報に応じた画像を表示するものである。操作部520は、テンキーやカーソルキーなどの操作子を備えており、これら操作子の操作内容を示す情報を制御部310へ引渡すものである。無線通信部530は、アンテナ(図示省略)を備えており、基地局42と無線通信するためのものである。無線通信部530は、基地局42から送信されてきた情報を受信し、受信した情報を制御部310へ引渡すとともに、制御部310から引渡された情報を基地局42へ宛てて送出する。
【0033】
次に、端末装置20の不揮発性記憶部332の格納内容について説明する。端末装置20の不揮発性記憶部332の格納内容が、サーバ装置10の不揮発性記憶部332の格納内容と異なっている点は、マスタテーブルに替えてレプリカテーブルが格納されている点と、マスタ更新ソフトウェアに替えて、後述するレプリカ更新ソフトウェアとレプリカ同期ソフトウェアとが格納されている点とである。上記レプリカ更新ソフトウェアやレプリカ同期ソフトウェアを実行することにより、制御部310には、本発明に係る端末装置に特徴的な機能が付与される。
【0034】
具体的には、レプリカ更新ソフトウェアを実行中の制御部310は、図6に示す更新画面を表示部510に表示させ、領域602にレプリカテーブルに格納されている顧客データを表示させる。この更新画面を視認したユーザは操作部520を操作して、更新を所望する顧客データを書き換えることや、更新ボタンB1を押下することができる。そして、更新ボタンB1が押下されると、制御部310は、図7に示されるフローチャットに従って不揮発性記憶部332に格納されているレプリカテーブルの格納内容を更新画面の領域602へ入力されたデータで更新するとともに、このデータでマスタテーブルに格納されている顧客データを更新することを要求するマスタ更新要求をサーバ装置10へ送信する。一方、レプリカ同期ソフトウェアを実行中の制御部310は、図8に示されるフローチャートに従ったレプリカ同期処理を行い、不揮発性記憶部332に格納されているレプリカテーブルをサーバ装置10から送信されてくる通信メッセージに基づいてロックしたり、レプリカテーブルの格納内容を更新したりする。
【0035】
[B.動作]
次に、本実施形態におけるサーバ装置10および端末装置20の動作について図面を参照しつつ説明する。以下に説明する動作の前提として、サーバ装置10の制御部310はマスタ更新ソフトウェアを実行中であり、端末装置20Bの制御部310はレプリカ同期ソフトウェアを実行中であるものとする。更に、端末装置20Aの制御部310は、レプリカ更新ソフトウェアを実行中であり、図6に示される更新画面が表示部510に表示されているものとする。
【0036】
(1:端末装置20Aが無線エリアに在圏している場合)
まず、ユーザにレプリカテーブルの格納内容の更新を指示された端末装置20Aが無線エリアに在圏している場合について説明する。
【0037】
端末装置20Aの制御部310は、図7に示されるように、レプリカテーブルに格納している顧客データを更新する旨の指示を操作部520を介して入力されると、まず、サーバ装置10と通信可能であるか否かを判定する(ステップSB1)。具体的には、制御部310は、基地局42から送信されてくる電波の電波強度に基づいて、この基地局42の形成する無線エリアに在圏しているか否かを判定する。本動作例においては、端末装置20Aは、基地局42の形成する無線エリアに在圏しているため、ステップSB1の判定結果は“Yes”になる。
【0038】
ステップSB1の判定結果が“Yes”である場合には、制御部310は、サーバ装置10との間で、通信コネクションを確立し、無線通信部530を介してマスタロック要求をサーバ装置10へ送信する(ステップSB2)。そして、制御部310は、このマスタロック要求に対する応答メッセージがサーバ装置10から送信されてくることを待受ける。なお、本動作例においては、無線エリアに在圏していると判定した場合には即座に、マスタロック要求を送信する場合について説明したが、無線エリアにおける電界強度が所定の値以上である場合にのみ、マスタロック要求を送信するとしても勿論良い。このようにすると、弱電界であるにもかかわらず、マスタロック要求を送信するといった無駄な通信を行うことが防止され、端末装置20Aと基地局42とが確実に無線通信できる場合にのみ、マスタロック要求を送信するようにすることが可能になる。
【0039】
端末装置20Aから送信されたマスタロック要求は、無線通信網40とLAN30とを順に介してサーバ装置10へ到達する。図4に示されるように、サーバ装置10の制御部310は、通信部320を介してマスタロック要求を受信すると(ステップSA1)、このマスタロック要求を送信してきた端末装置以外の端末装置(本動作例では、端末装置20B)へレプリカテーブルのロックを要求する旨の通信メッセージ(以下、「レプリカロック要求」という)を送信する(ステップSA2)。そして、制御部310は、このレプリカロック要求に基づいてレプリカテーブルのロックが行われたか否かを判定する(ステップSA3)。具体的には、制御部310は、レプリカテーブルのロックが完了したことを示す応答メッセージ(以下、「レプリカロック完了応答」という)を、レプリカロック要求を送信してから所定の時間内に受信した場合にのみレプリカテーブルのロックが行われたと判定する。以降、本実施形態におけるサーバ装置10の制御部310と端末装置20Aの制御部310とは、端末装置20Bが無線エリアに在圏している場合と、在圏していない場合とで異なる動作を行う。まず、端末装置20Bが無線エリアに在圏していない場合について説明する。
【0040】
(1−1:端末装置20Bが無線エリアに在圏していない場合)
上記ステップSA2にて送信されたレプリカロック要求は、端末装置20Bが基地局42の無線エリアに在圏している場合には、LAN30と無線通信網40とを介して端末装置20Bへ到達する。しかしながら、本動作例では、端末装置20Bは無線エリアに在圏していない。このため、上記レプリカロック要求に対応するレプリカロック完了応答をサーバ装置10の制御部310が受信することはない。従って、本動作例においてはステップSA3の判定結果は“No”になる。
【0041】
ステップSA3の判定結果がNoである場合には、サーバ装置10の制御部310は、上述したステップSA1にて受信したマスタロック要求に対応する応答メッセージとして、マスタテーブルをロックしなかった旨の応答メッセージ(以下、「マスタロック不能応答」という)を通信部320を介して端末装置20Aへ送信する(ステップSA4)。このマスタロック不能応答はLAN30と無線通信網40とを順に介して端末装置20Aへ到達する。
【0042】
図7に戻って、端末装置20Aの制御部310は、上述したステップSB3において送信したマスタロック要求に対する応答メッセージを無線通信部530を介して受信すると、この応答メッセージの内容に基づいてマスタテーブルがロックされたか否かを判定する(ステップSB3)。本動作例においっては、上述したように、サーバ装置10の制御部310は、マスタテーブルのロックを行っておらず、その旨の応答メッセージを送信したから、ステップSB3の判定結果は“No”である。
【0043】
ステップSB3の判定結果が“No”である場合には、端末装置20Aの制御部310は、レプリカテーブルの更新を行えない旨のメッセージを更新画面(図6参照)の領域601へ表示する(ステップSB4)。以降、制御部310は、ステップSB2にて確立した通信コネクションを切断し、レプリカ更新動作を終了する。
【0044】
以上に説明したように、本実施形態に係る通信システムにおいては、端末装置20Bが無線エリアに在圏していない場合には、端末装置20Aにレプリカテーブルの格納内容を更新させないようにしている。これは、端末装置20Bが無線エリアに在圏していない状況下で、端末装置20Aにレプリカテーブルの格納内容を更新させてしまうと、端末装置20Aに記憶されているレプリカテーブルの格納内容と、端末装置20Bに記憶されているレプリカテーブルの格納内容との整合性が崩れ、競合データが発生してしまう恐れがあるからである。
【0045】
(1−2:端末装置20Bが無線エリアに在圏している場合)
次いで、端末装置20Bが無線エリアに在圏している場合について説明する。端末装置20Bが無線エリアに在圏している場合には、サーバ装置10から送信されたレプリカロック要求は端末装置20Bへ到達する。端末装置20Bの制御部310は、図8に示されるフローチャートに従ったレプリカ同期処理を行っており、無線通信部530を介してレプリカロック要求を受信(ステップSC1)すると、不揮発性記憶部332に格納されているレプリカテーブルをロックする(ステップSC2)。具体的には、制御部310は、レプリカテーブルに対応付けられているロックフラグの値を“1”へ書き換える。そして、制御部310は、レプリカロック完了応答を無線通信部530を介してサーバ装置10へ送信し(ステップSC3)、サーバ装置10からレプリカ更新要求が送信されてくることを待受ける。このようにして端末装置20Bから送信されたレプリカロック完了応答は無線通信網40とLAN30とを介してサーバ装置10へ到達する。
【0046】
図4に戻って、本動作例においては、サーバ装置10の制御部310は、ステップSA2にて送信したレプリカロック要求に対して、レプリカロック完了応答を受信するので、ステップSA3の判定結果は“Yes”になる。
【0047】
ステップSA3の判定結果が“Yes”である場合には、サーバ装置10の制御部310は、不揮発性記憶部332に格納されているマスタテーブルをロックし(ステップSA5)、マスタテーブルをロックした旨の応答メッセージ(以下、「マスタロック完了応答」という)を通信部320を介して端末装置20Aへ送信する(ステップSA6)。以降、制御部310は、端末装置20Aからマスタ更新要求が送信されてくることを待受ける。なお、本実施形態においては、マスタロック完了応答を送信した後に、端末装置20Aからマスタ更新要求が送信されてくることをサーバ装置10の制御部310に待受けさせる場合について説明するが、マスタロック完了応答を送信した後に、端末装置20Aとの通信コネクションを切断させるとしても勿論良い。このようにすると、端末装置20Aにおいて、例えば、更新データの入力に手間取るなど、レプリカテーブルの更新に要する時間が長い場合であっても、無線通信網40やLAN30などの通信リソースが無駄に使用されることが排除される。
【0048】
図7に戻って、サーバ装置10から送信された応答メッセージを受信し、その応答メッセージの内容に基づいてマスタテーブルのロックが行われたか否かを判定するまでの端末装置20Aの制御部310の動作は、端末装置20Bが無線エリアに在圏していない場合の端末装置20Aの制御部310の動作と同一である。但し、本動作例においては、マスタテーブルのロックが行われた旨の応答メッセージを上記ステップSB3で受信した点が異なっている。このため、ステップSB3の判定結果は“Yes”になる。
【0049】
ステップSB3の判定結果が“Yes”である場合には、端末装置20Aの制御部310は、レプリカテーブルに格納されている顧客データを更新画面(図6参照)の領域602へ入力されデータに基づいて更新し、その更新内容を確定(以下、「コミット」という)する(ステップSB5)。そして、制御部310は、マスタテーブルに格納されている顧客データを上記ユーザの指示に基づいて更新する旨のマスタ更新要求を無線通信部530を介してサーバ装置10へ送信し(ステップSB6)、レプリカ更新処理を終了する。なお、本動作例においては、サーバ装置10におけるマスタ更新処理の処理結果を得る前に、レプリカテーブルの更新内容をコミットする場合について説明したが、サーバ装置10におけるマスタ更新処理が正常に終了した場合にのみ、レプリカテーブルの更新内容をコミットするとしても勿論良い。
【0050】
図4に戻って、サーバ装置10の制御部310は、通信部320を介してマスタテーブル更新要求を受信(ステップSA7)すると、マスタテーブルに格納している顧客データをこのマスタ更新要求の内容に基づいて更新する(ステップSA8)。そして、制御部310は、その更新内容をコミットするとともに、マスタテーブルに対応付けられているロックフラグの値を“0”に書換え、ロックを解除する(ステップSA9)。その後、制御部310は、レプリカテーブルに格納されている顧客データをステップSA7にて受信したマスタ更新要求の内容に基づいて更新する旨のレプリカ更新要求を通信部320を介して端末装置20Bへ送信する(ステップSA10)。以降、制御部310は、端末装置20Aとの間の通信コネクションを切断し、マスタテーブル更新動作を完了する。なお、本動作例においては、端末装置20Bにおけるレプリカ更新処理の処理結果を得る前に、マスタテーブルの更新内容をコミットする場合について説明したが、端末装置20におけるレプリカ更新処理が正常に終了した場合にのみ、マスタテーブルの更新内容をコミットするとしても勿論良い。
【0051】
図8に戻って、端末装置20Bの制御部310はレプリカ更新要求を受信(ステップSC4)すると、レプリカテーブルに格納している顧客データをこのレプリカ更新要求に基づいて更新する(ステップSC5)。そして、端末装置20Bの制御部310は、ステップSC5におけるレプリカテーブルの更新内容をコミットしてレプリカテーブルのロックを解除し(ステップSC6)、レプリカ同期処理を終了する。
【0052】
以上説明したように、本実施形態によれば、端末装置20Aでレプリカテーブルの格納内容が更新されることに同期させて、サーバ装置10のマスタテーブルの格納内容と端末装置20Bのレプリカテーブルの格納内容とが更新されるために、競合データの発生が回避される。
【0053】
(2:端末装置20Aが無線エリアに在圏していない場合)
次いで、ユーザによりレプリカテーブルに格納している顧客データの更新を指示された端末装置20Aが無線エリアに在圏していない場合に、端末装置20Aの制御部310がレプリカ更新ソフトウェアに従って行う動作について説明する。
【0054】
図7に戻って、端末装置20Aが無線エリアに在圏していない場合には、ステップSB1の判定結果は“No”になる。ステップSB1の判定結果が“No”である場合には、端末装置20Aの制御部310は、図9に示されるフローチャートに従ったオフライン処理を行う(ステップSB7)。
【0055】
図9に示されるように、制御部310は、レプリカテーブルに格納している顧客データを更新することにより競合データが発生する恐れがあることをユーザへ警告するための警告メッセージを更新画面(図6参照)の領域601へ表示し(ステップSD1)、ユーザの入力操作を待受ける。操作部520を操作することにより、ユーザが何らかの入力操作を行うと、制御部310は操作部520からその操作内容を示すデータを取得し、顧客データの更新を継続することを指示されたのか、それとも顧客データの更新を中止することを指示されたのかを判定する(ステップSD2)。具体的には、制御部310は、上記警告メッセージを表示している状態の更新画面で、更新ボタンB1が押下された場合には、継続を指示されたと判定し、キャンセルボタンB2が押下された場合には、中止を指示されたと判定する。
【0056】
ステップSD2の判定結果が“No”である場合には、制御部310はオフライン更新処理を終了し、レプリカ更新処理を終了する。逆に、ステップSD2の判定結果が“Yes”である場合には、制御部310は、レプリカテーブルに格納されている顧客データのうち、ユーザに更新を指示された顧客データの複製(以下、「バックアップデータ」という)を作成し、このバックアップデータを不揮発性記憶部332へ格納する(ステップSD3)。そして、制御部310は、レプリカテーブルに格納している顧客データをユーザの指示内容に基づいて更新する(ステップSD4)。
【0057】
以降、制御部310は、無線エリアへ復帰するまで、無線エリアに在圏しているか否かの判定を繰り返し実行する(ステップSD5)。そして、ステップSD5の判定結果が“Yes”である場合には、制御部310は、サーバ装置10との間で、通信コネクションを確立し、ステップSD3にて不揮発性記憶部332へ格納したバックアップデータに対応する顧客データ(以下、「更新対象データ」という)をサーバ装置10から取得する(ステップSD6)。そして、制御部310は、更新対象データが既に更新されているか否かを判定する(ステップSD7)。具体的には、制御部310は、ステップSD6にて取得した更新対象データと不揮発性記憶部332に格納しているバックアップデータとが一致する場合には、更新されていないと判定し、逆に両者が一致しない場合には、更新されていると判定する。
【0058】
ステップSD7の判定結果が“Yes”である場合には、制御部310は、ステップSD6にて取得した更新対象データで不揮発性記憶部332に格納されているバックアップデータを更新する(ステップSD8)。そして、制御部310は、端末装置20Aがオフライン状態であった間にマスタテーブルに格納されている顧客データが更新されたことを示すメッセージを更新画面の領域601へ表示し(ステップSD9)、データの再入力をユーザへ促してオフライン処理を終了する。
【0059】
逆に、ステップSD7の判定結果が“No”である場合には、制御部310は、レプリカ更新処理(図7参照)のステップSB2、SB3およびSB6と同一の処理を行い、オフライン状態の間に行われた顧客データの更新を、サーバ装置10に記憶されているマスタテーブルへ反映させ、オフライン処理を終了する。
【0060】
[C.変形例]
以上、本発明の実施形態について説明したが、本発明は係る実施形態に限定されるものではなく、その技術思想の範囲内で様々な変形が可能である。なお、変形例としては、例えば、以下のようなものが考えられる。
【0061】
(変形例1)上述した実施形態では、レプリカテーブルに対応するマスタテーブルのみをサーバ装置10にロックさせる場合について説明した。しかしながら、サーバ装置10に、このマスタテーブルに格納されているデータに関連付けられている他のデータが記憶されている場合には、この他のデータもロックさせるとしても勿論良い。このようにすると、マスタテーブルに格納されているデータの更新とは無関係に上記他のデータが更新されることが防止され、マスタテーブルに格納されているデータと上記他のデータとの関連付けが崩れることが防止される。
【0062】
(変形例2)上述した実施形態では、端末装置20Aからマスタテーブルのロックを要求されたサーバ装置10に、他の端末装置20においてレプリカテーブルがロックされた場合にのみ、マスタテーブルをロックさせる場合について説明した。このようにすると、競合データが発生することを確実に回避することができるが、その反面、全ての端末装置が無線エリアに在圏している場合以外には、レプリカテーブルに格納されている顧客データの更新を行えないことになる。そして、各端末装置のユーザは他の端末装置が無線エリアに在圏しているか否かを知ることはできないため、レプリカテーブルの更新が失敗して初めて他の端末装置が無線エリアに在圏していないことを知ることになり、不便である。そこで、サーバ装置10に、全ての端末装置20が無線エリアに在圏しているか否かを定期的にサーバ装置10に判定させ、その判定結果を端末装置20へ配信させるようにしても良い。このようにすると、端末装置20のユーザは、マスタテーブルをロックしレプリカテーブルに格納されている顧客データの更新を行えるか否かを事前に知ることができ、利便性が向上するといった効果を奏する。
【0063】
また、無線エリアに在圏していない端末装置20がある場合であっても、レプリカテーブルに格納されている顧客データを更新することを許容するとしても勿論良い。但し、このような場合には、無線エリアに在圏していない端末装置20に記憶されているレプリカテーブルとサーバ装置10に記憶されているマスタテーブルとの整合性が崩れてしまい、競合データが発生する虞がある。このような競合データの発生を回避するために、端末装置20が無線エリアに復帰した時点で、この端末装置20に記憶されているレプリカテーブルを更新する必要がある。
【0064】
このようなことは、以下に述べる処理をサーバ装置10に行わせることにより実現可能である。サーバ装置10は、レプリカロック完了応答を送信してこない端末装置20がある場合であっても、その端末装置20を一意に特定する識別子(例えば、端末装置20が携帯電話である場合には、携帯電話番号)を記憶し、前述したステップSA5以降の処理(図4参照)を行うものとする。以降、サーバ装置10は、上記識別子で示される端末装置20へレプリカロック要求を定期的に送信し、この端末装置20から送信されてくるレプリカロック完了応答を受信した場合に、その端末装置20に対してステップSA10(図4参照)の処理を行う。以上に説明した処理をサーバ装置10に行わせることにより、上述した不便さが解消されるとともに、マスタテーブルとの整合性が崩れたレプリカテーブルが発生することが防止されるといった効果を奏する。なお、サーバ装置10が、端末装置20が無線エリアに復帰したこと検出する態様は、定期的の送信するレプリカロック要求に対応するレプリカロック完了応答を受信することにより検出する態様に限定されるものではない。例えば、無線通信網40から通知される情報に基づいて端末装置20が無線エリアに在圏しているか否かを検出する態様であっても勿論良い。
【0065】
(変形例3)上述した実施形態では、端末装置20に、本発明に係る端末装置の機能を実現させるためのソフトウェア(レプリカ更新ソフトウェアおよびレプリカ同期ソフトウェア)を予め記憶させておく場合について説明した。しかしながら、一般的なコンピュータ装置に係るソフトウェアをインストールすることにより、係るコンピュータ装置に本発明に係る端末装置と同一の機能を付与するとしても良い。例えばCD−ROM(Compact Disk-Read Only Memory)などのコンピュータ装置読み取り可能な記録媒体に係るソフトウェアを記録させておき、この記録媒体に記録されているソフトウェアを係るコンピュータ装置に読み取らせ記憶させることにより実現可能である。
【0066】
また、上述した実施形態では、サーバ装置10に、本発明に係るサーバ装置の機能を実現させるためのソフトウェア(マスタ更新ソフトウェア)を予め記憶させておく場合について説明した。しかしながら、LAN30に接続されている一般的なコンピュータ装置に、係るソフトウェア(マスタ更新ソフトウェア)をインストールすることにより、係るコンピュータ装置に、本発明に係るサーバ装置と同一の機能を付与するとしても勿論良い。
【0067】
【発明の効果】
本発明によれば、分散型データベースシステムに、サーバ装置と通信する端末装置として無線端末装置が少なくとも1つ含まれている場合であっても、サーバ装置に記憶されているデータと端末装置に記憶されているレプリカとの間の整合性を保ちつつデータ更新を行うことが可能になるといった効果を奏する。
【図面の簡単な説明】
【図1】 本発明の実施形態に係る通信システムの構成例を示す図である。
【図2】 同サーバ装置10に記憶されているマスタテーブルと同端末装置20に記憶されているレプリカテーブルのテーブルフォーマットの一例を示す図である。
【図3】 同サーバ装置10の構成例を示す図である。
【図4】 同サーバ装置10の制御部310が行うマスタ更新処理の流れを示すフローチャートである。
【図5】 同端末装置20の構成例を示す図である。
【図6】 同端末装置20の表示部510に表示されるデータ更新画面の一例を示す図である。
【図7】 同端末装置20の制御部310が行うレプリカ更新処理の流れを示すフローチャートである。
【図8】 同端末装置20の制御部310が行うレプリカ同期処理の流れを示すフローチャートである。
【図9】 同端末装置20の制御部310が行うオフライン処理の流れを示すフローチャートである。
【符号の説明】
10…サーバ装置、20、20A、20B…端末装置、30…LAN、40…無線通信網、41…GW、42…基地局、310…制御部、320…通信部、330…記憶部、331…揮発性記憶部、332…不揮発性記憶部、340…バス、510…表示部、520…操作部、530…無線通信部。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for updating data while maintaining consistency between data stored in each computer apparatus in a computer system including a plurality of computer apparatuses storing the same data.
[0002]
[Prior art]
2. Description of the Related Art In recent years, with the improvement in performance of wireless terminal devices such as mobile phones and PDAs (Personal Digital Assistance), it has become possible to operate data stored in server devices using this type of wireless terminal device. . However, this type of wireless terminal device is not always communicable with the server device, unlike a terminal device wired to the server device. For example, when the wireless terminal device is not located in the wireless area (hereinafter referred to as “offline state”), communication with the server device is impossible, and data stored in the server device is operated. I can't. In such a case, in order to allow the user to perform various data operations using the wireless terminal device, a copy of data stored in the server device (hereinafter referred to as “replica”) is stored in the wireless terminal device. It is proposed to keep. In this way, even when the wireless communication terminal is offline, the user can perform various data operations by browsing or updating the replica stored in the wireless terminal device. When the replica is updated in an off-line state, when the wireless terminal device returns to the wireless area, the replica stored in the wireless terminal device is uploaded to the server device. The stored replica and the data stored in the server device can be synchronized.
[0003]
By storing the above-described replica in the wireless terminal device, the user can perform data operations even when the wireless terminal device is offline. However, when a plurality of wireless terminal devices operate data stored in the same server device, if an unlimited number of replica updates are allowed in an offline state, a plurality of different replicas (hereinafter referred to as such replicas). "Competitive data") will exist. Then, in a situation where conflict data has occurred, if the wireless terminal device uploads a replica, the replica stored in the wireless terminal device other than the wireless terminal device that last uploaded the replica The consistency with the data stored in the server device is lost.
[0004]
As a technique for avoiding the generation of the competitive data, there is a technique disclosed in Patent Document 1. According to the technique disclosed in Patent Document 1, when a terminal device downloads data from a server device for the purpose of updating, the server device is prohibited from accessing this data by another terminal device for the purpose of updating. Hereinafter, prohibiting access to data for update is referred to as “locking data”. By doing so, it is prohibited for other terminal devices to download this data for the purpose of updating. Then, the server device releases the lock of the data when the updated data is uploaded to the own device. Thus, according to the technique disclosed in Patent Document 1, the number of terminal devices that can download data for the purpose of updating is limited to one, so that occurrence of competing data is avoided.
[0005]
[Patent Document 1]
JP-A-11-45201
[0006]
[Problems to be solved by the invention]
By the way, the technique disclosed in Patent Document 1 stores a centralized database system in which all data is stored in a server device and the terminal device downloads the data from the server device every time data is actually operated. It is assumed. On the other hand, in recent years, system construction using a distributed database system has become mainstream. The reason is that the terminal device included in the distributed database system stores the above-described replica in advance, and it is not necessary to download the replica every time data is operated. This is because communication traffic between the apparatus and the server apparatus is reduced.
[0007]
However, even with the above-described distributed database system, even if the technique disclosed in Patent Document 1 is used, the generation of competing data cannot be avoided. The reason is as described below. Each terminal device of the distributed database system stores a replica in advance for the purpose of updating. In other words, there are always a plurality of replicas for update existing in the entire system. On the other hand, in the technique disclosed in Patent Document 1, by prohibiting the update-purpose replicas from being downloaded to a plurality of terminal devices, the update-purpose replicas existing in the entire system do not become plural. I have to. That is, the distributed database system is essentially incompatible with the technique disclosed in Patent Document 1.
[0008]
However, if all of the terminal devices included in the distributed database system are wired to the server device, it is necessary to make sure that the data stored in the server device is locked when updating the replica. The occurrence of competing data can be avoided. However, if a wireless terminal device is included in the distributed database system and such an arrangement is provided, the above-described replica update in the offline state cannot be performed. The reason is that since the wireless terminal device in the offline state cannot communicate with the server device, the data stored in the server device cannot be locked.
[0009]
The present invention has been made in view of the above problems, and in a computer system including a server device storing data and a plurality of terminal devices storing replicas of the data, at least one of the terminal devices is a wireless terminal. It is an object of the present invention to provide a technique for updating data while maintaining consistency between data stored in a server device and a replica stored in a terminal device.
[0010]
[Means for Solving the Problems]
In order to solve the above problems, the present invention provides a storage means for storing data, and a first storing a replica of the data. Terminal equipment and plural Communication means for communicating with a second terminal device via a communication network, and when the first terminal device requests to lock the data via the communication network, the second terminal device Lock means for locking the data while requesting the second terminal device via the communication network to lock the stored replica; Storage means for storing an identifier for uniquely identifying the second terminal device for which the replica was not locked in response to a request by the locking means; Notifying means for notifying the first terminal device via the communication network that the data has been locked by the locking means, and the first notifying by the notifying means that the data has been locked. When the terminal device is requested to update the data via the communication network, the data is updated based on the content of the request and the lock of the data is released. Locked upon request by the locking means The replica stored in the second terminal device , Update and release the lock based on the contents of the request via the communication network Concerned Request to second terminal device First Update means and A request for requesting, via the communication network, the second terminal device specified by the identifier stored in the storage means to lock the replica stored in the second terminal device. And the second terminal device in which the replica is locked in response to a request by the requesting unit, the replica stored in the second terminal device is transmitted from the first terminal device. Second updating means for requesting the second terminal device to update based on the content of the data update request via the communication network; The server apparatus which has is provided.
[0011]
In order to solve the above problem, the present invention provides the server via the wireless communication network only when the communication network is a wireless communication network and is located in a wireless area of the wireless communication network. Communication means for communicating with the apparatus; storage means for storing the replica; locking means for locking the replica based on a request from the server apparatus; and the replica locked by the locking means from the server apparatus. There is provided a terminal device having update means for updating based on a request and releasing the lock of the replica.
[0012]
In order to solve the above problem, the present invention provides a computer device in which a replica of data stored in the computer device is stored. Terminal equipment and plural Communication means for communicating with a second terminal device via a communication network, and when the first terminal device requests to lock the data via the communication network, the second terminal device Lock means for locking the data while requesting the second terminal device via the communication network to lock the stored replica; Storage means for storing an identifier for uniquely identifying the second terminal device for which the replica was not locked in response to a request by the locking means; Notifying means for notifying the first terminal device via the communication network that the data has been locked by the locking means, and the first notifying by the notifying means that the data has been locked. When the terminal device is requested to update the data via the communication network, the data is updated based on the content of the request and the lock of the data is released. Locked upon request by the locking means The replica stored in the second terminal device , Update and release the lock based on the contents of the request via the communication network Concerned Request to second terminal device First Update means and A request for requesting, via the communication network, the second terminal device specified by the identifier stored in the storage means to lock the replica stored in the second terminal device. And the second terminal device in which the replica is locked in response to a request by the requesting unit, the replica stored in the second terminal device is transmitted from the first terminal device. Second updating means for requesting the second terminal device to update based on the content of the data update request via the communication network; A program for realizing the above is provided.
[0013]
In order to solve the above problems, the present invention provides a computer apparatus, wherein the communication network is a wireless communication network, and the wireless communication network is provided only when the wireless network is located in a wireless area. Communication means for communicating with the server device via the server, locking means for locking the replica stored in advance in the computer device based on a request from the server device, and the replica locked by the locking means There is provided a program for realizing update means for updating based on a request from a server device and releasing the lock of the replica.
[0014]
When such a server device, terminal device, and program are used, the replica stored in the second terminal device is locked when the user is instructed to update the replica stored in the first terminal device. At the same time, the data stored in the server device is locked. And the data memorize | stored in the server apparatus and the replica memorize | stored in the 2nd terminal device are updated based on the update content of the replica memorize | stored in the 1st terminal device.
[0015]
In order to solve the above problem, the present invention provides the server via the wireless communication network only when the communication network is a wireless communication network and is located in a wireless area of the wireless communication network. A communication means for communicating with the apparatus, a storage means for storing the replica, and a replica of the replica is generated when a user is instructed to update the replica in a situation where the replica is not located in the wireless area. And writing to the storage means, and updating means for updating the replica based on the user's instruction, and when returning to the wireless area, the data is acquired from the server device via the wireless communication network, A determination unit that determines whether the data stored in the storage unit matches the data, and a determination unit that determines that the copy matches the data. Only if, to provide a terminal device and a request means for requesting to rewrite the data in the replica to the server device.
[0016]
In order to solve the above problems, the present invention provides a computer apparatus, wherein the communication network is a wireless communication network, and the wireless communication network is provided only when the wireless network is located in a wireless area. The replica of the replica when instructed to update the replica stored in advance in the computer device in a situation not in the wireless area Is generated and stored in the computer device, and updating means for updating the replica based on an instruction of the user, and when returning to the wireless area, the data is transmitted from the server device via the wireless communication network. Determining means for acquiring and determining whether the copy and the data stored in the computer device match;
Provided is a program for realizing a request unit that requests the server device to rewrite the data with the replica only when the determination unit determines that the copy and the data match. .
[0017]
When such a terminal device and program are used, if the replica is updated when the terminal device is in an offline state, only when data is not updated in the server device during the offline state. The data stored in the server device is updated based on the update of the replica.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0019]
[A. Constitution]
(1: Overall communication system configuration)
FIG. 1 is a diagram showing an example of the overall configuration of a communication system according to the present invention. The
[0020]
The
[0021]
The
[0022]
In the present embodiment, it is assumed that the communication system shown in FIG. 1 is a customer management system used in a certain company. Specifically, the
[0023]
As described above, a lock flag is associated with the master table or the replica table. This lock flag is data having a value of “0” or “1”, and is data indicating whether or not the table associated with the lock flag is locked. Specifically, when the value of the lock flag is “1”, it means that the table associated with the lock flag is locked, and conversely, the value of the lock flag is “ If it is 0 ″, it means that the table associated with the lock flag is not locked. In this embodiment, a case where the replica table or master table is locked in units of tables will be described. However, a lock flag is provided for each customer data stored in the replica table or master table, and locking is performed in units of customer data. Of course it is good.
[0024]
The employee of the company that owns the communication system shown in FIG. 1 carries the terminal device 20 when visiting the customer for the purpose of conducting business activities, and is stored in the terminal device 20. Data stored in the customer table can be browsed and updated freely. In the communication system shown in FIG. 1, when any one of the
[0025]
(2: Configuration of server device 10)
Next, the hardware configuration of the
[0026]
The
[0027]
The
[0028]
The
[0029]
Specifically, when the power (not shown) of the
[0030]
When the first function receives a communication message requesting to lock the master table (hereinafter referred to as “master lock request”) from the terminal device 20, the first function locks the replica table to another terminal device, and This function locks the master table. The second function updates the stored contents of the master table based on the contents of the master update request when a communication message for requesting the update of the master table (hereinafter referred to as “master update request”) is received. At the same time, it is a function of causing the other terminal device 20 to update the stored contents of the replica table.
[0031]
(3: Configuration of the terminal device 20)
Next, the configuration of the terminal device 20 will be described. FIG. 5 is a diagram illustrating an example of a hardware configuration of the terminal device 20. As shown in FIG. 5, the hardware configuration of the terminal device 20 is different from the hardware configuration of the server device 10 (see FIG. 3) in that a
[0032]
The
[0033]
Next, the contents stored in the
[0034]
Specifically, the
[0035]
[B. Operation]
Next, operations of the
[0036]
(1: When the
First, a case will be described in which the
[0037]
As shown in FIG. 7, when an instruction to update customer data stored in the replica table is input via the
[0038]
When the determination result in step SB1 is “Yes”, the
[0039]
The master lock request transmitted from the
[0040]
(1-1: When the
The replica lock request transmitted in step SA2 reaches the
[0041]
When the determination result in step SA3 is No, the
[0042]
Returning to FIG. 7, when the
[0043]
If the determination result in step SB3 is “No”, the
[0044]
As described above, in the communication system according to the present embodiment, when the
[0045]
(1-2: When the
Next, a case where the
[0046]
Returning to FIG. 4, in the present operation example, the
[0047]
When the determination result in step SA3 is “Yes”, the
[0048]
Returning to FIG. 7, the
[0049]
When the determination result of step SB3 is “Yes”, the
[0050]
Returning to FIG. 4, when the
[0051]
Returning to FIG. 8, upon receiving the replica update request (step SC4), the
[0052]
As described above, according to the present embodiment, the storage content of the master table of the
[0053]
(2: When the
Next, the operation that the
[0054]
Returning to FIG. 7, if the
[0055]
As shown in FIG. 9, the
[0056]
If the determination result in step SD2 is “No”, the
[0057]
Thereafter, the
[0058]
When the determination result in step SD7 is “Yes”, the
[0059]
On the other hand, when the determination result in step SD7 is “No”, the
[0060]
[C. Modified example]
Although the embodiments of the present invention have been described above, the present invention is not limited to such embodiments, and various modifications can be made within the scope of the technical idea. In addition, as a modification, the following can be considered, for example.
[0061]
(Modification 1) In the above-described embodiment, the case where only the master table corresponding to the replica table is locked by the
[0062]
(Modification 2) In the above-described embodiment, the
[0063]
Further, even if there is a terminal device 20 that is not located in the wireless area, it is of course possible to update the customer data stored in the replica table. However, in such a case, the consistency between the replica table stored in the terminal device 20 that is not located in the wireless area and the master table stored in the
[0064]
Such a thing is realizable by making the
[0065]
(Modification 3) In the above-described embodiment, the case has been described in which the terminal device 20 stores in advance software (replica update software and replica synchronization software) for realizing the function of the terminal device according to the present invention. However, by installing software related to a general computer device, the same function as that of the terminal device according to the present invention may be given to the computer device. For example, software related to a computer-readable recording medium such as a CD-ROM (Compact Disk-Read Only Memory) is recorded, and the software recorded on the recording medium is read and stored in the computer apparatus. It is feasible.
[0066]
In the above-described embodiment, the case has been described in which the
[0067]
【The invention's effect】
According to the present invention, as a terminal device that communicates with a server device in a distributed database system wireless Even when at least one terminal device is included, it is possible to update data while maintaining consistency between the data stored in the server device and the replica stored in the terminal device The effect that becomes.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a configuration example of a communication system according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of a table format of a master table stored in the
3 is a diagram showing a configuration example of the
FIG. 4 is a flowchart showing a master update process performed by the
FIG. 5 is a diagram illustrating a configuration example of the terminal device 20;
6 is a diagram showing an example of a data update screen displayed on the
FIG. 7 is a flowchart showing a flow of replica update processing performed by the
FIG. 8 is a flowchart showing a flow of replica synchronization processing performed by the
FIG. 9 is a flowchart showing a flow of offline processing performed by the
[Explanation of symbols]
DESCRIPTION OF
Claims (2)
前記データのレプリカを記憶した第1の端末装置および複数の第2の端末装置と通信網を介して通信する通信手段と、
前記第1の端末装置から前記データをロックすることを前記通信網を介して要求された場合に、前記第2の端末装置の記憶している前記レプリカをロックすることを前記通信網を介して前記第2の端末装置へ要求する一方、前記データをロックするロック手段と、
前記ロック手段による要求に応じて前記レプリカがロックされなかった第2の端末装置を一意に特定する識別子を記憶する記憶手段と、
前記データが前記ロック手段によりロックされたことを、前記通信網を介して前記第1の端末装置へ通知する通知手段と、
前記データがロックされたことを前記通知手段により通知された前記第1の端末装置から前記データを更新することを前記通信網を介して要求された場合に、その要求の内容に基づいて前記データを更新し前記データのロックを解除するとともに、前記ロック手段による要求に応じてロックされた第2の端末装置の記憶している前記レプリカを、その要求の内容に基づいて更新しロックを解除することを前記通信網を介して当該第2の端末装置へ要求する第1の更新手段と、
前記記憶手段に記憶されている識別子によって特定される第2の端末装置に対して、当該第2の端末装置の記憶している前記レプリカをロックすることを前記通信網を介して要求する要求手段と、
前記要求手段による要求に応じて前記レプリカがロックされた第2の端末装置に対して、当該第2の端末装置の記憶している前記レプリカを、前記第1の端末装置からの前記データの更新の要求の内容に基づいて更新することを、前記通信網を介して当該第2の端末装置へ要求する第2の更新手段と
を有するサーバ装置。Storage means for storing data;
Communication means for communicating via a communication network with the first terminal device storing the replica of the data and a plurality of second terminal devices;
Locking the replica stored in the second terminal device via the communication network when the first terminal device requests locking the data via the communication network. A lock means for locking the data while making a request to the second terminal device;
Storage means for storing an identifier for uniquely identifying the second terminal device for which the replica was not locked in response to a request by the locking means;
Notification means for notifying the first terminal device via the communication network that the data is locked by the locking means;
When the first terminal device notified by the notification means that the data is locked is requested to update the data via the communication network, the data is based on the content of the request. with updated to unlock the data, it said replica being stored in the second terminal device locked as required by the locking means to unlock updated based on the content of the request a first updating means for requesting to said second terminal device through the communication network that,
Request means for requesting, via the communication network, the second terminal device specified by the identifier stored in the storage means to lock the replica stored in the second terminal device. When,
Updating the data stored in the second terminal device from the first terminal device to the second terminal device in which the replica is locked in response to a request from the requesting unit And a second updating means for requesting the second terminal device to update based on the content of the request via the communication network .
当該コンピュータ装置に記憶されているデータのレプリカを記憶した第1の端末装置および複数の第2の端末装置と通信網を介して通信する通信手段と、
前記第1の端末装置から前記データをロックすることを前記通信網を介して要求された場合に、前記第2の端末装置の記憶している前記レプリカをロックすることを前記通信網を介して前記第2の端末装置へ要求する一方、前記データをロックするロック手段と、
前記ロック手段による要求に応じて前記レプリカがロックされなかった第2の端末装置を一意に特定する識別子を記憶する記憶手段と、
前記データが前記ロック手段によりロックされたことを、前記通信網を介して前記第1の端末装置へ通知する通知手段と、
前記データがロックされたことを前記通知手段により通知された前記第1の端末装置から前記データを更新することを前記通信網を介して要求された場合に、その要求の内容に基づいて前記データを更新し前記データのロックを解除するとともに、前記ロック手段による要求に応じてロックされた第2の端末装置の記憶している前記レプリカを、その要求の内容に基づいて更新しロックを解除することを前記通信網を介して当該第2の端末装置へ要求する第1の更新手段と、
前記記憶手段に記憶されている識別子によって特定される第2の端末装置に対して、当該第2の端末装置の記憶している前記レプリカをロックすることを前記通信網を介して要求する要求手段と、
前記要求手段による要求に応じて前記レプリカがロックされた第2の端末装置に対して、当該第2の端末装置の記憶している前記レプリカを、前記第1の端末装置からの前記データの更新の要求の内容に基づいて更新することを、前記通信網を介して当該第2の端末装置へ要求する第2の更新手段と
を実現させるためのプログラム。Computer equipment,
Communication means for communicating via a communication network with a first terminal device and a plurality of second terminal devices storing a replica of data stored in the computer device;
Locking the replica stored in the second terminal device via the communication network when the first terminal device requests locking the data via the communication network. A lock means for locking the data while making a request to the second terminal device;
Storage means for storing an identifier for uniquely identifying the second terminal device for which the replica was not locked in response to a request by the locking means;
Notification means for notifying the first terminal device via the communication network that the data is locked by the locking means;
When the first terminal device notified by the notification means that the data is locked is requested to update the data via the communication network, the data is based on the content of the request. with updated to unlock the data, it said replica being stored in the second terminal device locked as required by the locking means to unlock updated based on the content of the request a first updating means for requesting to said second terminal device through the communication network that,
Request means for requesting, via the communication network, the second terminal device specified by the identifier stored in the storage means to lock the replica stored in the second terminal device. When,
Updating the data stored in the second terminal device from the first terminal device to the second terminal device in which the replica is locked in response to a request from the requesting unit A program for realizing second update means for requesting the second terminal device to update via the communication network based on the content of the request .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003041681A JP4199021B2 (en) | 2003-02-19 | 2003-02-19 | Server apparatus and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003041681A JP4199021B2 (en) | 2003-02-19 | 2003-02-19 | Server apparatus and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004252673A JP2004252673A (en) | 2004-09-09 |
JP4199021B2 true JP4199021B2 (en) | 2008-12-17 |
Family
ID=33025194
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003041681A Expired - Fee Related JP4199021B2 (en) | 2003-02-19 | 2003-02-19 | Server apparatus and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4199021B2 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4281705B2 (en) * | 2005-04-27 | 2009-06-17 | 日本電気株式会社 | Wireless communication system, ad hoc connection setting information distribution device, and ad hoc connection setting information distribution method used therefor |
JP4530031B2 (en) * | 2007-11-28 | 2010-08-25 | 富士ゼロックス株式会社 | Data processing apparatus and data processing program |
US8161019B2 (en) * | 2009-05-01 | 2012-04-17 | Microsoft Corporation | Cross-channel coauthoring consistency |
CN104641369B (en) | 2012-12-17 | 2018-05-01 | 株式会社日立制作所 | file server, information system and its control method |
JP6231623B2 (en) * | 2016-07-19 | 2017-11-15 | 株式会社日立製作所 | File server, information system, and information system control method |
JP2020166579A (en) * | 2019-03-29 | 2020-10-08 | 三菱自動車工業株式会社 | Information collection system |
-
2003
- 2003-02-19 JP JP2003041681A patent/JP4199021B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2004252673A (en) | 2004-09-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4563333B2 (en) | Portable base station system | |
US7194238B2 (en) | Identification of terminal | |
JP4724733B2 (en) | Video editing system, video editing server, communication terminal | |
JP5605795B2 (en) | Communication device, distribution system, distribution data processing method, and distribution data processing program | |
US20070130217A1 (en) | Many to many data synchronization | |
JP2008131594A (en) | Application control system and method | |
US20080096485A1 (en) | Wireless communication apparatus and wireless communication method | |
JP4199021B2 (en) | Server apparatus and program | |
JP2005078288A (en) | Information processor and presence information management method | |
JP2013172188A (en) | Communication terminal and message registration method and program | |
JP4091908B2 (en) | COMMUNICATION SYSTEM, COMMUNICATION TERMINAL DEVICE AND INFORMATION STORAGE MODULE | |
US8315612B2 (en) | Terminal device, communication processing method and phone-book management method | |
JP4057171B2 (en) | Information synchronization system and recording medium | |
JP4008836B2 (en) | Self-information registration method for communication partner user, self-information management node and communication terminal | |
JP2015045975A (en) | Management server, management system, control method and program | |
JP4772644B2 (en) | Message message distribution system and message message distribution method | |
JP2004200807A (en) | Control method of radio communication | |
JPH11234752A (en) | Town information supply system, town information acquisition thermal, base station and town information management server | |
JPWO2006013937A1 (en) | Information terminal device, electronic conference system, communication setting method, and communication setting program | |
JPH098946A (en) | Information processing unit | |
JP2012065259A (en) | Remote use control system | |
JP2007102391A (en) | Order management system | |
JP2001169353A (en) | Mobile set information save method and mobile set information restoration method | |
JP6615730B2 (en) | Setting assistance system, setting assistance device, and setting assistance method | |
CN101278261A (en) | Electronic apparatus with server device for managing setting data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050407 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080701 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080828 |
|
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: 20080930 |
|
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: 20081002 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111010 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121010 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131010 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |