JP4199021B2 - Server apparatus and program - Google Patents

Server apparatus and program Download PDF

Info

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
Application number
JP2003041681A
Other languages
Japanese (ja)
Other versions
JP2004252673A (en
Inventor
武司 横山
裕徳 小林
智子 大鹿
義則 三木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Docomo Inc
Original Assignee
NTT Docomo Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NTT Docomo Inc filed Critical NTT Docomo Inc
Priority to JP2003041681A priority Critical patent/JP4199021B2/en
Publication of JP2004252673A publication Critical patent/JP2004252673A/en
Application granted granted Critical
Publication of JP4199021B2 publication Critical patent/JP4199021B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

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 server device 10 is a general computer device such as a personal computer, and is connected to the LAN 30.
[0020]
The terminal devices 20A and 20B are wireless terminal devices such as PDAs having a packet communication function, for example, and can communicate with the server device 10 via the wireless communication network 40 and the LAN 30. Hereinafter, when it is not necessary to distinguish between the terminal devices 20A and 20B, they are simply referred to as “terminal device 20”. In the present embodiment, the case where the present invention is applied to a PDA having a packet communication function will be described. However, the application target of the present invention is not limited to the PDA, and the packet communication function may PHS (Personal Handyphone System) may be used. Moreover, although two terminal devices are illustrated in FIG. 1, there are actually a large number of terminal devices. In the present embodiment, a case where the present invention is applied to a communication system including only a wireless terminal device will be described. However, in addition to the wireless terminal device, a communication system including a terminal device wired to the LAN 30 is used. Of course, the present invention may be applied. In short, any communication system having a plurality of terminal devices including at least one wireless terminal device may be used.
[0021]
The wireless communication network 40 is, for example, a mobile packet communication network, and includes a gateway (hereinafter referred to as “GW”) 41 and a base station 42. The GW 41 is connected to the LAN 30 and is used for mutual conversion between a communication protocol in the LAN 30 and a communication protocol in the wireless communication network 40. The base station 42 forms a wireless cell having a certain size and is used for wireless communication with the terminal device 20 located in the wireless cell.
[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 server device 10 and the terminal device 20 store the customer table shown in FIG. 2 in association with the lock flag. As shown in FIG. 2, the customer table stores customer data such as name, address, telephone number, FAX number, and mail address. Hereinafter, the customer table stored in the server device 10 is referred to as “master table”, and the customer data stored in the terminal device 20 is referred to as “replica table”. In the present embodiment, a case where the master table stored in the server device 10 and the replica table stored in the terminal device 20 have the same table format will be described. Of course, the table formats of both may be different, such as not including an email address. In the present embodiment, the case where the present invention is applied to a customer management system will be described. However, the application target of the present invention is not limited to the customer management system, but includes an inventory management system and an order management system. Or a schedule management system. In short, any database system may be used.
[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 terminal devices 20A and 20B is instructed to update the customer data stored in the replica table, the corresponding customer data In order to prevent other terminal devices from updating, the master table is locked by the server device 10, and the replica table stored in the terminal device is locked by the other terminal device. The customer data is updated only when the master table or the replica table stored in another terminal device is locked. Thereby, it is excluded that customer data stored in the master table is updated from a plurality of terminal devices at the same time, and the occurrence of competing data is avoided.
[0025]
(2: Configuration of server device 10)
Next, the hardware configuration of the server device 10 will be described with reference to FIG. As illustrated in FIG. 3, the server device 10 includes a control unit 310, a communication unit 320, a storage unit 330, and a bus 340 that connects these components.
[0026]
The control unit 310 is a CPU (Central Processing Unit), for example, and controls each unit of the server device 10 by executing software stored in the storage unit 330.
[0027]
The communication unit 320 is connected to the LAN 30 and communicates with the terminal device 20 via the LAN 30. The communication unit 320 receives a communication message transmitted from the terminal device 20, delivers the received communication message to the control unit 310, and sends the communication message delivered from the control unit 310 to the LAN 30.
[0028]
The storage unit 330 includes a volatile storage unit 331 and a nonvolatile storage unit 332. The volatile storage unit 331 is, for example, a RAM (Random Access Memory), and is used as a work area by the control unit 310 that is executing software. On the other hand, the non-volatile storage unit 332 is a hard disk, for example, and stores the above-described master table. In addition to the master table, the non-volatile storage unit 332 includes OS software for realizing the OS, and master update software for causing the control unit 310 to perform master update processing according to the flowchart shown in FIG. Is stored. The control unit 310 implements functions unique to the server device according to the present invention by executing these software.
[0029]
Specifically, when the power (not shown) of the server apparatus 10 is turned on, the control unit 310 first reads the OS software from the nonvolatile storage unit 332 and executes it. The control unit 310 that is executing the OS software is provided with a function of controlling each unit of the server device 10 and a function of executing other software. Then, the control unit 310 that completes the execution of the OS software and implements the OS reads the master update software from the nonvolatile storage unit 332 and executes it. The control unit 310 that is executing the master update software is provided with two functions that are characteristic of the server device according to the present invention.
[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 display unit 510 and an operation unit 520 are provided. The wireless communication unit 530 is provided in place of the communication unit 320.
[0032]
The display unit 510 is, for example, a liquid crystal display and its drive circuit, and displays an image corresponding to the image information delivered from the control unit 310. The operation unit 520 includes operation elements such as a numeric keypad and a cursor key, and delivers information indicating the operation contents of these operation elements to the control unit 310. The wireless communication unit 530 includes an antenna (not shown) and is used for wireless communication with the base station 42. The wireless communication unit 530 receives the information transmitted from the base station 42, delivers the received information to the control unit 310, and sends the information delivered from the control unit 310 to the base station 42.
[0033]
Next, the contents stored in the nonvolatile storage unit 332 of the terminal device 20 will be described. The storage content of the non-volatile storage unit 332 of the terminal device 20 is different from the storage content of the non-volatile storage unit 332 of the server device 10 in that the replica table is stored instead of the master table and the master update Instead of software, replica update software and replica synchronization software described later are stored. By executing the replica update software and the replica synchronization software, the control unit 310 is provided with functions characteristic of the terminal device according to the present invention.
[0034]
Specifically, the control unit 310 that is executing the replica update software causes the display unit 510 to display the update screen illustrated in FIG. 6, and displays customer data stored in the replica table in the area 602. A user who visually recognizes the update screen can operate the operation unit 520 to rewrite customer data desired to be updated or press the update button B1. When the update button B1 is pressed, the control unit 310 inputs the stored contents of the replica table stored in the nonvolatile storage unit 332 into the update screen area 602 according to the flow chat shown in FIG. And a master update request for updating the customer data stored in the master table with this data is transmitted to the server device 10. On the other hand, the control unit 310 that is executing the replica synchronization software performs replica synchronization processing according to the flowchart shown in FIG. 8, and the replica table stored in the nonvolatile storage unit 332 is transmitted from the server device 10. Lock based on the communication message or update the contents stored in the replica table.
[0035]
[B. Operation]
Next, operations of the server device 10 and the terminal device 20 in the present embodiment will be described with reference to the drawings. As a premise of the operation described below, it is assumed that the control unit 310 of the server device 10 is executing master update software, and the control unit 310 of the terminal device 20B is executing replica synchronization software. Furthermore, it is assumed that the control unit 310 of the terminal device 20A is executing the replica update software, and the update screen shown in FIG.
[0036]
(1: When the terminal device 20A is in the wireless area)
First, a case will be described in which the terminal device 20A instructed by the user to update the contents stored in the replica table is in the wireless area.
[0037]
As shown in FIG. 7, when an instruction to update customer data stored in the replica table is input via the operation unit 520, the control unit 310 of the terminal device 20A first receives the server device 10 and It is determined whether or not communication is possible (step SB1). Specifically, the control unit 310 determines whether or not the user is in a wireless area formed by the base station 42 based on the radio wave intensity of the radio wave transmitted from the base station 42. In this operation example, since the terminal device 20A is located in the wireless area formed by the base station 42, the determination result in step SB1 is “Yes”.
[0038]
When the determination result in step SB1 is “Yes”, the control unit 310 establishes a communication connection with the server device 10 and transmits a master lock request to the server device 10 via the wireless communication unit 530. (Step SB2). Then, control unit 310 waits for a response message to the master lock request to be transmitted from server device 10. In this operation example, the case where the master lock request is immediately transmitted when it is determined that the user is in the wireless area has been described, but the electric field strength in the wireless area is equal to or greater than a predetermined value. Of course, the master lock request may be transmitted only to the above. This prevents unnecessary communication such as transmitting a master lock request despite a weak electric field, and only when the terminal device 20A and the base station 42 can reliably perform wireless communication. It becomes possible to send a lock request.
[0039]
The master lock request transmitted from the terminal device 20A reaches the server device 10 via the wireless communication network 40 and the LAN 30 in order. As shown in FIG. 4, when the control unit 310 of the server device 10 receives the master lock request via the communication unit 320 (step SA1), the terminal device other than the terminal device that has transmitted the master lock request (this book) In the operation example, a communication message (hereinafter referred to as “replica lock request”) requesting the lock of the replica table is transmitted to the terminal device 20B) (step SA2). Then, control unit 310 determines whether or not the replica table has been locked based on this replica lock request (step SA3). Specifically, control unit 310 receives a response message indicating that the lock of the replica table has been completed (hereinafter referred to as “replica lock completion response”) within a predetermined time after transmitting the replica lock request. Only when it is determined that the replica table has been locked. Thereafter, the control unit 310 of the server device 10 and the control unit 310 of the terminal device 20A in this embodiment perform different operations depending on whether the terminal device 20B is in the wireless area or not. Do. First, a case where the terminal device 20B is not located in the wireless area will be described.
[0040]
(1-1: When the terminal device 20B is not located in the wireless area)
The replica lock request transmitted in step SA2 reaches the terminal device 20B via the LAN 30 and the wireless communication network 40 when the terminal device 20B is located in the wireless area of the base station 42. However, in this operation example, the terminal device 20B is not located in the wireless area. Therefore, the control unit 310 of the server device 10 does not receive a replica lock completion response corresponding to the replica lock request. Therefore, in this operation example, the determination result in step SA3 is “No”.
[0041]
When the determination result in step SA3 is No, the control unit 310 of the server device 10 responds that the master table has not been locked as a response message corresponding to the master lock request received in step SA1 described above. A message (hereinafter referred to as “master lock impossible response”) is transmitted to the terminal device 20A via the communication unit 320 (step SA4). This master lock impossible response reaches the terminal device 20A through the LAN 30 and the wireless communication network 40 in order.
[0042]
Returning to FIG. 7, when the control unit 310 of the terminal device 20A receives the response message to the master lock request transmitted in step SB3 described above via the wireless communication unit 530, the control unit 310 stores the master table based on the content of the response message. It is determined whether or not it is locked (step SB3). In this operation example, as described above, the control unit 310 of the server device 10 does not lock the master table and transmits a response message to that effect, so the determination result in step SB3 is “No”. ".
[0043]
If the determination result in step SB3 is “No”, the control unit 310 of the terminal device 20A displays a message indicating that the replica table cannot be updated in the area 601 of the update screen (see FIG. 6) (step S1). SB4). Thereafter, control unit 310 disconnects the communication connection established in step SB2, and ends the replica update operation.
[0044]
As described above, in the communication system according to the present embodiment, when the terminal device 20B is not located in the wireless area, the storage content of the replica table is not updated by the terminal device 20A. This is because if the terminal device 20A updates the stored contents of the replica table in a situation where the terminal device 20B is not located in the wireless area, the stored contents of the replica table stored in the terminal device 20A, This is because the consistency with the stored contents of the replica table stored in the terminal device 20B is lost, and there is a risk that competitive data may be generated.
[0045]
(1-2: When the terminal device 20B is in the wireless area)
Next, a case where the terminal device 20B is in the wireless area will be described. When the terminal device 20B is in the wireless area, the replica lock request transmitted from the server device 10 reaches the terminal device 20B. The control unit 310 of the terminal device 20B performs replica synchronization processing according to the flowchart shown in FIG. 8 and receives the replica lock request via the wireless communication unit 530 (step SC1), the nonvolatile storage unit 332 stores the replica lock request. The stored replica table is locked (step SC2). Specifically, control unit 310 rewrites the value of the lock flag associated with the replica table to “1”. Then, control unit 310 transmits a replica lock completion response to server device 10 via wireless communication unit 530 (step SC3), and waits for a replica update request to be transmitted from server device 10. The replica lock completion response transmitted from the terminal device 20B in this way reaches the server device 10 via the wireless communication network 40 and the LAN 30.
[0046]
Returning to FIG. 4, in the present operation example, the control unit 310 of the server device 10 receives the replica lock completion response in response to the replica lock request transmitted in step SA2, so the determination result in step SA3 is “ “Yes”.
[0047]
When the determination result in step SA3 is “Yes”, the control unit 310 of the server device 10 locks the master table stored in the nonvolatile storage unit 332 (step SA5), and locks the master table. The response message (hereinafter referred to as “master lock completion response”) is transmitted to the terminal device 20A via the communication unit 320 (step SA6). Thereafter, the control unit 310 waits for a master update request to be transmitted from the terminal device 20A. In the present embodiment, a case where the control unit 310 of the server device 10 waits for a master update request to be transmitted from the terminal device 20A after transmitting a master lock completion response will be described. Of course, the communication connection with the terminal device 20A may be disconnected after the response is transmitted. In this way, communication resources such as the wireless communication network 40 and the LAN 30 are wasted in the terminal device 20A even when the time required for updating the replica table is long, for example, it takes time to input update data. Is excluded.
[0048]
Returning to FIG. 7, the control unit 310 of the terminal device 20 </ b> A until receiving the response message transmitted from the server device 10 and determining whether or not the master table is locked based on the content of the response message. The operation is the same as the operation of the control unit 310 of the terminal device 20A when the terminal device 20B is not in the wireless area. However, the present operation example is different in that a response message indicating that the master table is locked is received in step SB3. For this reason, the determination result of step SB3 is “Yes”.
[0049]
When the determination result of step SB3 is “Yes”, the control unit 310 of the terminal device 20A inputs the customer data stored in the replica table to the area 602 of the update screen (see FIG. 6) and based on the data. And update the contents (hereinafter referred to as “commit”) (step SB5). And the control part 310 transmits the master update request | requirement of updating the customer data stored in the master table based on the said user's instruction | indication to the server apparatus 10 via the wireless communication part 530 (step SB6), The replica update process is terminated. In this operation example, the case where the update contents of the replica table are committed before obtaining the processing result of the master update processing in the server device 10 has been described. However, when the master update processing in the server device 10 is normally completed. Of course, it is possible to commit the update contents of the replica table only.
[0050]
Returning to FIG. 4, when the control unit 310 of the server device 10 receives the master table update request via the communication unit 320 (step SA7), the customer data stored in the master table is converted into the content of the master update request. Update based on this (step SA8). Then, control unit 310 commits the updated contents, rewrites the value of the lock flag associated with the master table to “0”, and releases the lock (step SA9). Thereafter, control unit 310 transmits a replica update request for updating the customer data stored in the replica table based on the content of the master update request received in step SA7 to terminal device 20B via communication unit 320. (Step SA10). Thereafter, the control unit 310 disconnects the communication connection with the terminal device 20A and completes the master table update operation. In this operation example, the case where the update contents of the master table are committed before obtaining the processing result of the replica update processing in the terminal device 20B has been described. However, when the replica update processing in the terminal device 20 is normally completed. Of course, the update contents of the master table may be committed.
[0051]
Returning to FIG. 8, upon receiving the replica update request (step SC4), the control unit 310 of the terminal device 20B updates the customer data stored in the replica table based on the replica update request (step SC5). Then, the control unit 310 of the terminal device 20B commits the updated contents of the replica table in step SC5 to release the lock of the replica table (step SC6), and ends the replica synchronization processing.
[0052]
As described above, according to the present embodiment, the storage content of the master table of the server device 10 and the storage of the replica table of the terminal device 20B are synchronized with the update of the storage content of the replica table in the terminal device 20A. Since the contents are updated, the occurrence of conflicting data is avoided.
[0053]
(2: When the terminal device 20A is not located in the wireless area)
Next, the operation that the control unit 310 of the terminal device 20A performs in accordance with the replica update software when the terminal device 20A instructed to update the customer data stored in the replica table by the user is not in the wireless area will be described. To do.
[0054]
Returning to FIG. 7, if the terminal device 20A is not located in the wireless area, the determination result in step SB1 is “No”. When the determination result of step SB1 is “No”, the control unit 310 of the terminal device 20A performs offline processing according to the flowchart shown in FIG. 9 (step SB7).
[0055]
As shown in FIG. 9, the control unit 310 updates a warning message for warning the user that there is a possibility that competitive data may be generated by updating the customer data stored in the replica table (FIG. 9). 6) (step SD1) and waits for the user's input operation. When the user performs some input operation by operating the operation unit 520, the control unit 310 acquires data indicating the operation content from the operation unit 520, and is it instructed to continue updating the customer data? Or, it is determined whether or not an instruction to stop updating the customer data is given (step SD2). Specifically, control unit 310 determines that continuation is instructed when update button B1 is pressed on the update screen displaying the warning message, and cancel button B2 is pressed. In this case, it is determined that the stop is instructed.
[0056]
If the determination result in step SD2 is “No”, the control unit 310 ends the offline update process and ends the replica update process. Conversely, when the determination result in step SD2 is “Yes”, the control unit 310 copies the customer data instructed to be updated by the user among the customer data stored in the replica table (hereinafter, “ Backup data ”is created, and this backup data is stored in the nonvolatile storage unit 332 (step SD3). Then, control unit 310 updates the customer data stored in the replica table based on the user instruction content (step SD4).
[0057]
Thereafter, the control unit 310 repeatedly determines whether or not the user is in the wireless area until returning to the wireless area (step SD5). If the determination result in step SD5 is “Yes”, the control unit 310 establishes a communication connection with the server device 10 and stores the backup data stored in the nonvolatile storage unit 332 in step SD3. Customer data (hereinafter referred to as “update target data”) is acquired from the server device 10 (step SD6). Then, control unit 310 determines whether or not the update target data has already been updated (step SD7). Specifically, the control unit 310 determines that the update target data acquired in step SD6 and the backup data stored in the non-volatile storage unit 332 match, and conversely If they do not match, it is determined that they have been updated.
[0058]
When the determination result in step SD7 is “Yes”, the control unit 310 updates the backup data stored in the nonvolatile storage unit 332 with the update target data acquired in step SD6 (step SD8). Then, the control unit 310 displays a message indicating that the customer data stored in the master table has been updated while the terminal device 20A is offline in the update screen area 601 (step SD9). Prompts the user to re-enter and terminates offline processing.
[0059]
On the other hand, when the determination result in step SD7 is “No”, the control unit 310 performs the same processing as that in steps SB2, SB3, and SB6 of the replica update processing (see FIG. 7). The updated customer data is reflected in the master table stored in the server device 10, and the offline processing is terminated.
[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 server device 10 has been described. However, if other data associated with the data stored in the master table is stored in the server device 10, it is of course possible to lock the other data. This prevents the other data from being updated regardless of the update of the data stored in the master table, and breaks the association between the data stored in the master table and the other data. It is prevented.
[0062]
(Modification 2) In the above-described embodiment, the server device 10 requested to lock the master table from the terminal device 20A causes the master table to be locked only when the replica table is locked in the other terminal device 20. Explained. In this way, it is possible to reliably avoid the occurrence of competing data, but on the other hand, customers who are stored in the replica table except when all terminal devices are located in the wireless area The data cannot be updated. Since the user of each terminal device cannot know whether or not the other terminal device is in the wireless area, the other terminal device is in the wireless area only after the replica table update fails. It is inconvenient to know that it is not. Therefore, the server device 10 may be caused to periodically determine whether or not all the terminal devices 20 are located in the wireless area and distribute the determination result to the terminal device 20. In this way, the user of the terminal device 20 can know in advance whether or not the customer data stored in the replica table can be updated by locking the master table, and the convenience is improved. .
[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 server device 10 is lost, and the conflicting data is lost. May occur. In order to avoid the occurrence of such contention data, it is necessary to update the replica table stored in the terminal device 20 when the terminal device 20 returns to the wireless area.
[0064]
Such a thing is realizable by making the server apparatus 10 perform the process described below. Even when there is a terminal device 20 that does not transmit a replica lock completion response, the server device 10 uniquely identifies the terminal device 20 (for example, when the terminal device 20 is a mobile phone, Mobile phone number) is stored, and the processing after step SA5 (see FIG. 4) is performed. Thereafter, when the server apparatus 10 periodically transmits a replica lock request to the terminal apparatus 20 indicated by the identifier and receives a replica lock completion response transmitted from the terminal apparatus 20, the server apparatus 10 On the other hand, the process of step SA10 (see FIG. 4) is performed. By causing the server device 10 to perform the processing described above, the above-described inconvenience is solved, and an effect that a replica table whose consistency with the master table is lost is prevented from being generated. In addition, the aspect which the server apparatus 10 detects that the terminal device 20 returned to the radio | wireless area is limited to the aspect detected by receiving the replica lock completion response corresponding to the replica lock request | requirement transmitted regularly. is not. For example, a mode in which it is possible to detect whether or not the terminal device 20 is located in a wireless area based on information notified from the wireless communication network 40 may be used.
[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 server device 10 stores in advance software (master update software) for realizing the function of the server device according to the present invention. However, by installing the software (master update software) in a general computer device connected to the LAN 30, it is of course possible to give the same function as the server device according to the present invention to the computer device. .
[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 server device 10 and a replica table stored in the terminal device 20;
3 is a diagram showing a configuration example of the server device 10. FIG.
FIG. 4 is a flowchart showing a master update process performed by the control unit 310 of the server apparatus 10;
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 display unit 510 of the terminal device 20. FIG.
FIG. 7 is a flowchart showing a flow of replica update processing performed by the control unit 310 of the terminal device 20;
FIG. 8 is a flowchart showing a flow of replica synchronization processing performed by the control unit 310 of the terminal device 20;
FIG. 9 is a flowchart showing a flow of offline processing performed by the control unit 310 of the terminal device 20;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 ... Server apparatus, 20, 20A, 20B ... Terminal apparatus, 30 ... LAN, 40 ... Wireless communication network, 41 ... GW, 42 ... Base station, 310 ... Control part, 320 ... Communication part, 330 ... Storage part, 331 ... Volatile memory unit, 332... Nonvolatile memory unit, 340... Bus, 510... Display unit, 520.

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 .
JP2003041681A 2003-02-19 2003-02-19 Server apparatus and program Expired - Fee Related JP4199021B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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