JP2004265063A - Information processing method and device - Google Patents

Information processing method and device Download PDF

Info

Publication number
JP2004265063A
JP2004265063A JP2003053901A JP2003053901A JP2004265063A JP 2004265063 A JP2004265063 A JP 2004265063A JP 2003053901 A JP2003053901 A JP 2003053901A JP 2003053901 A JP2003053901 A JP 2003053901A JP 2004265063 A JP2004265063 A JP 2004265063A
Authority
JP
Japan
Prior art keywords
event
issuance
client
prohibition
issued
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.)
Withdrawn
Application number
JP2003053901A
Other languages
Japanese (ja)
Inventor
Toshihiro Kobayashi
俊広 小林
Masakazu Fujiki
真和 藤木
Toshiichi Oshima
登志一 大島
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.)
Canon Inc
Original Assignee
Canon 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 Canon Inc filed Critical Canon Inc
Priority to JP2003053901A priority Critical patent/JP2004265063A/en
Priority to PCT/JP2004/002218 priority patent/WO2004077298A1/en
Priority to US10/546,168 priority patent/US7516204B2/en
Publication of JP2004265063A publication Critical patent/JP2004265063A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a mechanism guaranteeing the issue of a later operation command after the execution of a previously issued operation command in operation executed to shared data shared with a plurality of processes so as to remove restriction on the timing of operation command issue. <P>SOLUTION: In a system wherein each of the plurality of processes holds and uses the shared data shared with the plurality of processes connected via a network, the identity of the shared data held by each the process is maintained. When an operation request to the shared data is generated, an operation event showing the operation request is issued (T2501). By user's prescribed operation, a digestion event is issued (T2503). When an operation event responding to the issued operation event is received from a server, the operation to the shared data is executed according to the operation event. Until a digestion event corresponding to the issued digestion event is received (T2506) after the issue of the digestion event, the issue of the operation event based on the operation request is forbidden. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、複数のプロセス間でデータを共有する技術に関する。特に3次元仮想空間を記述するデータを保持するデータベースをネットワークを介して複数のプロセス間で共有させるのに好適な技術に関する。
【0002】
【従来の技術】
異なるコンピュータ端末間で3次元仮想空間を共有する技術は、遠隔会議システム、ネットワーク型対戦ゲーム、協調型デザインシステムなどを実現するために必須である。
【0003】
このような3次元仮想空間を共有するシステムでは、仮想空間の動画像をコンピュータグラフィクスにより描画するために、短い時間間隔で多量のデータを参照する。このとき、一つの装置(例えばサーバ)に保持されている仮想空間のデータの全体をネットワークを介して取得することは、現在のネットワークのバンド幅の狭さから現実的ではない。したがって、各々の端末が仮想空間データのコピーを持ち、それを参照することによってCG画像を生成する方式が採用されている。また、あるコンピュータ端末上で仮想空間に対する何らかの操作、例えば仮想物体の移動や回転が行われた場合には、その操作に関する情報が他の端末にネットワーク経由で伝送され、各端末の持つデータベースに反映される。この結果、各コンピュータ端末におけるデータベースの同一性が保たれる。
【0004】
一般的な仮想空間共有システムにおける上述のデータベースの同一性保持の手順の詳細は次のとおりである。すなわち、あるコンピュータ端末における仮想空間に対する操作が当該端末のローカルのデータベースに直ちに反映されるとともに、当該操作情報が他のコンピュータ端末に送信される。他の端末は、この操作情報を受信し、受信した操作情報に従ってデータを更新する。
【0005】
このような仮想空間共有システムの実現例として、非特許文献1に記載されたものが挙げられる。
【0006】
しかし、非特許文献1に代表される仮想空間共有システムでは、操作を行なった端末においてその操作内容が当該端末のデータベースに即座に反映され、他の端末はその操作情報を受信してからデータベースの更新が行なわれる。従って、操作を行った端末とそれ以外の端末とでデータベースを更新するタイミングが異なってしまう。特に、ネットワーク上のトラフィックの影響等で、操作情報の受信までに時間がかかると、端末間のデータベースの更新のタイミングのズレは顕著となる。このため、端末間で仮想空間の描画結果に違いが生ずる可能性があるという課題が指摘されている。また、データベースの操作および更新の手順は上記の如き手順に固定されており、データ更新のタイミングを選択あるいは調整することができないという課題も指摘されていた。
【0007】
これに対し、複数のプロセスで共有されるデータベースに関して、操作を実行するタイミングをほぼ同一とするシステムが提案されている。このシステムでは、端末とは別に共有データベースの同一性を維持するためのサーバを設け、各端末は共有データベースの変更に関する操作指令を発行し、それに対応するイベントをサーバに対して送信する。一方、サーバは端末から送信されたイベントを受信し、サーバに接続されている複数の端末に対して当該イベントを送信する。各端末はサーバから受信したイベントの操作情報に基づき、当該端末が保持するデータベースを更新する。すなわち、各端末はサーバから送信されるイベントの受信をトリガとして保持しているデータベースを更新するため、操作を実行するタイミングを揃えることができるものである。
【0008】
【非特許文献1】
Distributed Open Inventor(出展:G.Heshina et.al. : ”Distributed Open Inventor : A Practical Approach to Distributed 3D Graphics”, in Proc. of the ACM Symposium on Virtual Reality Software and Technology (VRST’99), pp.74−81, 1999)
【0009】
【発明が解決しようとする課題】
しかしながら、上述したシステムでは、操作を実行するタイミングはほぼ同一となるが、端末がデータベースの変更に関する操作指令を発行してから、当該操作指令に対応するイベントが他の各端末に波及し、各端末上で操作が実行されるまでにはタイムラグが発生する。特に、2つ以上の操作が連続している場合、サーバから先の操作(第1の操作)に関するイベントを受信する前の段階で、後の操作(第2の操作)の指令を発行しようとすることが起こり得る。この場合、第1の操作による操作結果はまだデータベースに反映されていないため、第2の操作が予期せぬ結果となる可能性がある。これを回避するためには、第2の操作の指令の発行を遅延させねばならない。
【0010】
しかし、操作指令発行から操作実行までに要する時間はシステムの動作環境により大きく異なる。このため、第2の操作の指令の発行を遅延させるための遅延時間を定めることは容易ではなく、操作指令を発行するタイミングに制約を受ける場合があった。そのため、第1の操作の指令を発行した後に、第1の操作が確実に実行されたことを保証するための機構が求められていた。
【0011】
本発明は上記の課題に鑑みてなされたものであり、複数のプロセスで共有される共有データに対して行われる操作について、先に発行された操作指令が実行された上で後の操作指令が発行されることを保証する機構を提供し、操作指令発行のタイミングに関する制約を除去することを目的とする。
また、複数の端末によって操作指令が発行される場合においても、容易に操作実行順序を保証することを目的とする。
【0012】
【課題を解決するための手段】
上記の目的を達成するための本発明による情報処理方法は、
情報伝達媒体を介して通信可能な複数のプロセスによって共有される共有データを該複数のプロセスの各々が保持して利用するシステムにおいて、各プロセスが保持する共有データの同一性を維持するための情報処理方法であって、
前記共有データに対する操作要求が発生した場合に、該操作要求を表す操作イベントを前記情報伝達媒体上に発行する第1発行工程と、
所定のユーザ操作に応じて発行禁止イベントを発行する第2発行工程と、
前記第1発行工程によって発行された操作イベントに応答する応答操作イベントを外部より受信し、前記共有データへの操作を実行する操作実行工程と、
前記第2発行工程による発行禁止イベントの発行後、該発行禁止イベントに対応したイベントを受信するまで、前記第1及び第2発行工程によるイベントの発行を禁止する禁止工程とを備える。
【0013】
また、上記の目的を達成するための本発明による情報処理装置は以下の構成を備える。すなわち、
情報伝達媒体を介して通信可能な複数のプロセスによって共有される共有データを該複数のプロセスの各々が保持して利用するシステムにおいて、各プロセスが保持する共有データの同一性を維持するための情報処理装置であって、
前記共有データに対する操作要求が発生した場合に、該操作要求を表す操作イベントを前記情報伝達媒体上に発行する第1発行手段と、
所定のユーザ操作に応じて発行禁止イベントを発行する第2発行手段と、
前記第1発行手段によって発行された操作イベントに応答する応答操作イベントを外部より受信し、前記共有データへの操作を実行する操作実行手段と、
前記第2発行手段による発行禁止イベントの発行後、該発行禁止イベントに対応したイベントを受信するまで、前記第1及び第2発行手段によるイベントの発行を禁止する禁止手段とを備える。
【0014】
【発明の実施の形態】
以下、添付の図面を参照して本発明の好適な実施形態を説明する。
【0015】
〔第1実施形態〕
第1実施形態では、本願発明による情報処理方法を、仮想空間の構造と属性を記述するシーンデータベースを複数の端末で共有する仮想空間共有システムに応用した実現形態について説明する。
【0016】
本実施形態の仮想空間共有システムの全体的な構成を図1に示す。システムには1つのサーバプロセス101(以下、「サーバ」と略す)と、複数のクライアントプロセス103(以下、「クライアント」と略す)があり、情報伝達媒体としてのネットワーク102を介してデータを交換する。それぞれのクライアントは共通の仮想空間の構造と属性を記述するシーンデータベースを保持する。なお、本実施形態では、ネットワーク102はイーサネット(登録商標)上に構築したLANである。なお、情報伝達媒体は無線でも有線でもかまわない。
【0017】
ここで、以下の説明で用いる「データベース操作」という用語について説明しておく。データベースの「操作」とは、共有データベースを持つ任意のプロセスにおけるデータベースの内容を書き換える処理のことを差す。データベース操作は「操作指令」と「操作実行」の2段階に分かれる。操作指令はデータベースの更新要求であり、実際の書き換えは行われない。データベースに対する実際の書き換えは、操作実行の段階で行われる。以下の説明では特に断らない限り、単に「操作」と記述すれば「データベース操作」のことを指すものとする。操作対象がデータベース以外の場合は、「ユーザによる対話デバイスの操作」などのように操作対象を明示するものとする。
【0018】
なお、操作指令はユーザが発生させることもあれば、プロセスが動作の過程で発生することもある。前者の例としては、ユーザがマウスなどの対話デバイスを操作して、仮想オブジェクトを移動させた際に操作指令が発生されることが挙げられる。一方、後者の例としては、シューティングゲーム・システムにおいて、ゲームプログラムが敵キャラクタをアルゴリズム的に移動・回転させた際に操作指令が発生されること等が挙げられる。
【0019】
図2はデータベースを更新するための基本的な情報の流れを示すものである。図2で、A, B, C, D(201〜204)はクライアント、X(205)はサーバである。いま、クライアントA(201)がシーンデータベースの操作指令を行ったとする。操作指令の内容はネットワーク経由でサーバに送信される(図2で(1)の矢印の過程)。サーバは、この操作指令を受けてクライアントA(201)から送信されたデータを、すべてのクライアントに配信する(図2で(2)の矢印の過程)。このような過程を経ることによって、非操作者のクライアントB(202)、C(203)、D(204)も操作の内容を知ることができる。
【0020】
次に、クライアントまたはサーバプロセスが動作する端末の構成を図3に示す。図3において、301はCPUであり、端末全体の動作を制御する。302はメモリであり、CPU301の動作に用いるプログラムやデータを格納する。303はバスであり、各構成モジュール間のデータ転送を司る。304はバス303と各種装置とのインタフェースである。また、305はネットワークと接続するための通信部、306はCPU301に読み込むプログラムやデータを格納する外部記憶装置、307および308はプログラムを起動したり、プログラムの動作を指定するための入力装置を構成するキーボードおよびマウス、309はプロセスの動作結果を表示するための表示部である。
【0021】
本実施形態のシステムは、データベースの更新タイミングに関して下記の3つのモードを持つ。以下、これらのモードを総称して「更新モード」と呼ぶ。
(1) ウェイトモード(待機モード)
(2) イミディエートモード(即時モード)
(3) ディレイモード(遅延モード)
以下、各モードの処理について詳しく説明する。
【0022】
「ウェイトモード」は、ある操作指令に対する操作実行が、サーバからのイベントの配信を待って行われるモードである。図4は、ウェイトモードにおける時間の進行に沿った処理手順を模式的に示したものである。図4で、「操作者」は操作指令を行ったクライアント、「非操作者」は操作者以外のクライアントを指す。処理の進行は以下の説明の通りである。
【0023】
まず、手順T401で操作者クライアントがデータベースの操作指令を発する。この時点では、操作者クライアントのデータベースは更新されない。次に手順T402にて、T401の操作内容を示すイベントが生成され、T403でサーバに送信される。サーバは手順T404でイベントを受信し、T405で当該サーバとの接続が確立しているすべてのクライアントに向けてイベントを送信する(接続の確立について図11のステップS1102で後述する)。サーバより発行されたイベントを操作者クライアントが手順T406で受信し、その内容を分析して(T407)、データベースを書き換える(T408)。イベントの受信からの手順は、非操作者クライアントでも同様である(手順T409〜T411)。図4に示した通り、ウェイトモードでは、操作指令(T401)から操作実行(T408)までタイムラグがある。しかし、ネットワーク上の情報転送の条件が同様であれば、操作者・非操作者クライアントともほぼ同時刻にデータベースが更新され、仮想空間の画像がクライアント間で同期することが期待できる。
【0024】
「イミディエートモード」は、操作者の指令が直ちにデータベースに反映され、これに対して非操作者のデータベースは遅れて更新されるものである。図5は、イミディエートモードにおける時間の進行に沿った処理手順を模式的に示したものである。処理の進行は以下の説明の通りである。
【0025】
まず、手順T501で操作者クライアントがデータベースの操作指令を発する。次に、手順T502で操作指令の内容に従ってデータベースが更新される。この後、操作内容を示すイベントが生成され(T503)、サーバに送信される(T504)。イベント送信後、操作者クライアントでは手順T501の操作指令および実行が行われたことを示す情報を操作キューとして保持しておく(T505、「操作キュー」については後述する)。
【0026】
サーバは手順T506でイベントを受信し、T507ですべてのクライアントに向けて当該イベントを送信する。操作者クライアントは手順T508でサーバからイベントを受信すると、操作キューを参照する(T509)。ここで、手順T505で記録された情報により、すでに当該操作が実行済みであることが認識されるので、操作実行処理は行わず,手順T505で記録された情報を削除する(T514)。
【0027】
一方、非操作者クライアントでは手順T510で受信したイベントが未実行であることを操作キューを参照することにより認識し(T511)、イベントの内容に基づいて操作を実行する(T512, T513)。
【0028】
上記のような手順でデータベースを更新すると、操作者クライアントにおいては仮想空間に対する操作の結果がCG画像に反映されるまでの時間遅れがウェイトモードに比べて少なくなる。したがって、イミディエートモードは主に、ユーザが対話デバイスを用いて仮想物体を操作する場合に適している。なぜなら、一般的にユーザの対話的操作とその結果の提示の間に時間的ずれが生ずると、操作がより困難になる、ユーザに不快感を与えるなどの不具合が生じるからである。
【0029】
「ディレイモード」は、ウェイトモードのように操作指令を直ちに実行しないものの、操作実行の期限を設けて、その期限が過ぎた場合にはサーバからのイベント返信を待たずに当該操作を実行するというものである。図6は、ディレイモードにおいて、操作実行期限に到達する前に、サーバからのイベントが到着した場合の時間の進行に沿った処理手順を模式的に示したものである。処理の進行は以下の説明の通りである。
【0030】
まず、手順T601で操作者クライアントがデータベースの操作指令を発する。この時点では、データベースは更新されない。次に手順T602にて、T601の操作の内容を示すイベントが生成され、T603でサーバに送信される。イベント送信後、操作者クライアントでは手順T601の操作指令が行われたことを示す情報を操作キューに保持し(T604、「操作キュー」については後述する)、さらにタイマー処理を起動する(T605)。タイマー処理はタイムアウトを待って操作実行を行なうものであり、詳細は図19により後述する。
【0031】
一方、サーバは手順T606でイベントを受信し、T607ですべてのクライアントに向けてイベントを送信する。操作者クライアントは手順T608でイベントを受信し、操作キューを参照する(T609)。ここで、操作が未実行であることが認識されるので、当該操作キューに操作が実行済みであることを記録し(T610)、イベントの内容を分析し(T611)、データベースを書き換える(T612)。さらに,T604で記録された情報を削除する(T617)。また、非操作者クライアントでは手順T613で受信したイベントが未実行であることを認識し(T614)、イベントの内容に基づいて操作を実行する(T615, T616)。
【0032】
一方、図7はディレイモードにおいて、サーバからのイベントが到着する前に操作実行期限(タイムアウト)に至った場合の時間の進行に沿った処理手順を模式的に示したものである。処理の進行は以下の説明の通りである。
【0033】
まず、手順T701で操作者クライアントがデータベースの操作指令を発する。この時点では、データベースは更新されない。次に手順T702にて、T701の操作の内容を示すイベントが生成され、T703でサーバに送信される。イベント送信後、操作者クライアントでは手順T701の操作指令が行われたことを示す情報を操作キューに保持し(T704、「操作キュー」については後述する)、さらにタイマー処理を起動する(T705)。なお、タイマー処理はタイムアウトを待って操作実行を行なうものであり、詳細は図19により後述する。一方、サーバは手順T706でイベントを受信し、T709ですべてのクライアントに向けてイベントを送信する。
【0034】
タイマー処理では、サーバから対応するイベントを受信するまでの間にタイムアウト時刻に至ると、それをタイマー処理が検知し、手順T707で操作を実行して、操作キューに当該操作が実行済みであることを記憶する(T708)。したがって、操作者クライアントは、後に手順T710でイベントを受信するものの、操作キューを参照することにより当該操作が実行済みであることを認識し(T711)、操作実行は行われない。非操作者クライアントでは手順T713で受信したイベントが未実行であることを認識し(T714)、イベントの内容に基づいて操作を実行する(T715, T716)。
【0035】
上記のような手順でデータベースを更新すると、イベント配信のタイムラグが大きければ操作実行が極力遅れないように動作し、タイムラグが小さければクライアント間の同期を図るように動作する。このような動作の切り換えは自動的に行われ、タイムアウト時間を適宜設定することにより、どちらの動作を優勢にするか調整することができる。
【0036】
本実施形態では、上述のウェイトモード及びディレイモードに関して、操作実行と操作指令発行の順番を保証するために、更に消化イベントモード、同期イベントモードに対応した処理を実行する。これらについては、後述する。
【0037】
図8の(a)は、クライアントからサーバに対して、或いはサーバからクライアントに対して発行されるイベントの内容を示したものである。イベントのデータは複数のフィールドから構成される。クライアントID801は、各クライアントを一意に識別するための番号で、クライアントがサーバとネットワーク接続を確立する際にサーバより割り当てられたものである(図11のステップS1102により後述する)。操作ID802は操作を一意に識別するための番号で、各クライアントに操作指令を行った時点で割り当てられる。このクライアントID801および操作ID802の組を用いることにより、システム内部で起こったすべての操作指令を一意に特定することが可能である。
【0038】
更新モードID803は、各更新モードに対して一意に決定された識別番号で、このイベントに対応する操作指令の更新モードにより決定する。更新モードはデータベースの各エントリに設定、登録されている(図21により後述する)ので、これを参照して更新モードが設定される。なお、更新モードID803には上述したウェイトモード、ディレイモード、イミディエイトモードのいずれかが設定されることになる。
【0039】
タイムアウト時刻804は、上述のディレイモードにおいて使用されるものであり、イベントの発生時刻にディレイ時間を加算した時刻が記述される。エントリID805は、データベースの各エントリを一意に識別するための番号で、データをファイルからロードした際に割り当てられる。操作内容806は、操作指令の具体的内容であり、例えばCGオブジェクトのX座標をある値に設定する操作であれば、X座標属性を識別する番号とX座標の設定値の組で表される。
【0040】
また、図8の(b)は、同期イベント及び消化イベントのデータ構成を示す。このイベントには、クライアントID811と、イベントの種類(消化か同期か)を表すイベント種別812が含まれる。
【0041】
次に、操作キューについて説明する。操作キューは、イベントの受信または実行処理を待機している操作指令のリストである。ある時点で待機状態にある操作指令がm個あるとすると、操作キューは図9のように操作指令に関するm個の情報(キューアイテム)を指令の発生順に並べたものとなる。
【0042】
1つのキューアイテムの内容は図10(a)のように、3つのデータフィールドから構成される。操作ID1001は、操作を一意に識別するための番号で、対応するイベントの操作IDフィールドと同じ値である。操作ID1001は、クライアントにおいて操作指令を行った時点で割り当てられる。タイムアウト時刻1002は、ディレイモードにおける操作実行期限であり、クライアントにおいて操作指令を行った時点で、現在時刻に所定のタイムアウト時間を加算して求められる。実行済みフラグ1003は、イミディエートモードあるいはディレイモードにおいて、この操作IDを持つ操作が実行済みであるかどうかを示す。実行済みフラグは、操作指令を行った時点ではOFFに設定され、操作が実行された時点でONに変更される。
【0043】
なお、図10の(a)ではフィールド数3の操作キューアイテムを示したが、実行済みフラグとタイムアウト時刻を兼用することも可能である。この場合、タイムアウト時刻が特殊な値(例えばマイナス1)である場合に実行済みであると定義すればよい。この場合の操作キューアイテムのデータ構成は図10の(b)のようになる。
【0044】
次に、イベントの消化、イベントの同期について説明する。ユーザは所望のタイミングで端末から消化イベント、同期イベントを発行させることができる。
【0045】
まず、イベントの消化について説明する。ウェイトモードやディレイモードの場合、操作者クライアントが操作指令を発行してから操作実行までにはタイムラグが生じる。例えば、第1、第2の連続する2つの操作があり、第1の操作結果がある条件を満たしたときのみ第2の操作を行うものとする。第1の操作指令を発行した後、第1の操作が未実行である状態で第2の操作指令が発行されると、その時点では第1の操作結果がデータベースに反映されていないため、第1の操作結果を正しく参照できず、第2の操作が正しく行われない可能性がある。そのため、第1の操作指令が実行された後、第1の操作指令が実行されるまで待機し、その後で第2の操作指令を発行しなければならない。すなわち、第2の操作指令の前に、それ以前に発行されていて未実行であるイベントをすべて実行済みの状態にしておく必要がある。以下、現時点までに発行された全てのイベントを実行済みの状態にすることを「イベントを消化する」と記述する。
【0046】
以下、ウェイトモードにおける消化イベントの処理について説明する。図22はイベント消化の手順について示している。図22では、2つのクライアントが1つのサーバに接続している。まず、手順T2501でクライアント1はデータベースの操作指令を発し、操作内容を示す操作イベントがサーバに送信される。この時点では、クライアント1のデータベースには、手順T2501の操作結果は反映されていない。手順T2502でサーバは操作イベント1を受信し、クライアント1およびクライアント2に対して操作イベント1を送信する。
【0047】
一方、クライアント1では、操作指令1の操作実行結果に影響を受ける操作指令2の入力に先立って消化イベントの発行をユーザが指示する。この操作は、操作指令1の操作実行後に操作指令2を発行させることを確実にするためのものである。この指示により、手順T2503で「消化イベント」が生成され、サーバに送信されるとともに、操作指令の発行が停止される(操作指令発行停止となる)。
【0048】
手順T2504でサーバは消化イベントを受信し、クライアント1およびクライアント2に対して消化イベントを送信する。このときサーバは消化イベントを通常の操作イベントと同様に扱う。即ち、受け取った消化イベントを送信元を含む、接続の確立している全てのクライアントに対して送信する。
【0049】
さて、手順T2505でクライアント1において操作指令2を発行しようとしても、既に手順T2503において操作指令発行を停止しているため、操作指令2はこの時点で発行されない。このとき、図示しない操作指令発行キューに操作指令2を追加する(「操作指令発行キュー」については後述する)。
【0050】
クライアント1は、サーバより操作イベント1を受信すると直ちに当該操作を実行する。そして、手順T2506でクライアント1はサーバより送信された消化イベントを受信すると、消化イベントのデータ中のクライアントID801(図8)を参照する。その結果、受信した消化イベントがクライアント1によって送信されていた場合には、操作指令発行停止を解除する。操作指令発行停止の解除時には、操作指令発行キューを参照し、操作指令発行キューに登録されている操作指令を順次発行する(手順T2507)。図22の場合は、T2505で指示された操作指令2が発行され、操作イベント2がサーバに送信される。手順T2508では、クライアント2が消化イベントを受信するが、この消化イベントはクライアント2によって送信されたものではないため、そのまま破棄される。
【0051】
以上のように、ある操作指令を発行した後、同一クライアントより消化イベントを発行(サーバに送信)すると、消化イベント送信後は、発行した消化イベントをサーバから受信するまでの間、操作指令の発行を停止する。このようにすることで、先の操作指令を確実に実行済みの状態にした上で、次の操作指令を発行することが可能となる。
【0052】
なお、更新モードがイミディエートモードである場合には、操作指令は発行されてすぐに実行されるため、上記イベント消化手順を行う必要はない。
【0053】
また、更新モードがディレイモードのときには、手順T2503で操作指令発行を停止した後、サーバから消化イベントを受信する前にタイムアウト時刻に至った場合には、その時点で操作指令発行停止を解除し、操作指令発行キューを参照して登録されているイベントを発行する。なお、この時点で操作実行がされていない場合は、ディレイモードについて上述したように当該操作が即座に実行される。
【0054】
次に、イベントの同期について説明する。イベントの同期を行なうことによって、接続された全クライアントで操作順序が保証される。操作者クライアントの操作指令の発行から非操作者クライアントの操作実行までにはタイムラグが生じる。例えば、第1、第2の連続する2つの操作があり、第1の操作指令はクライアント1が、第2の操作指令はクライアント2が発行し、第1の操作結果がある条件を満たしたときのみ第2の操作を行うものとする。今、クライアント1が第1の操作指令を発行した後、クライアント2上で第1の操作が未実行である状態で第2の操作指令が発行されたとする。この場合、その時点で第1の操作がクライアント2のデータベースに反映されていないため、クライアント2上で第1の操作結果を正しく参照できず、第2の操作が正しく行われない可能性がある。その結果、クライアント間でデータベースの内容が異なってしまい、整合が取れなくなる可能性が生ずる。
【0055】
クライアント2上で第2の操作指令が発行された時点で、クライアント1では第1の操作が実行済みで、クライアント2では未実行であったとすると、クライアント1では第2の操作が正しく実行されるが、クライアント2では第2の操作が正しく実行されない。そのため、クライアント2は、すべてのクライアント上で第1の操作実行が行われるまで待機し、その後で第2の操作指令を発行しなければならない。すなわち、第2の操作指令の前に、それ以前に全クライアントで発行されていて未実行であるイベントをすべて消化し、その後に発行されるイベントを全クライアント間で同期させるようにする必要がある。本実施形態では同期イベントの発行及び管理によりこれを実現する。
【0056】
図23はイベント同期の手順について示している。図23では、2つのクライアントが1つのサーバに接続され、クライアント1が操作1を行い、クライアント2は操作1の実行結果に影響を受ける操作2を行う。クライアント2が行う操作2はクライアント1が行う操作1に影響を受ける操作であることに関して、ユーザはあらかじめ知っているものとする。図23では、クライアント1とクライアント2のイベント発行を同期させる様子が示されている。
【0057】
まず、手順T2601でクライアント1はデータベースの操作指令を発行し、操作内容を示すイベントがサーバに送信される。この時点では、クライアント1のデータベースには、手順T2601の操作結果は反映されておらず、その後、サーバ1から操作イベント1を受信した時点で操作が実行されることになる。
【0058】
手順T2602ではサーバは操作イベント1を受信し、クライアント1およびクライアント2に対して操作イベント1を送信する。ここで、操作指令1には、当該操作結果に影響を受ける操作指令2が付随するため、クライアント1のユーザは同期イベントを発行させる操作を行なう。この操作により、手順T2603では、「同期イベント1」が生成されサーバに送信される。そして、クライアント1における操作指令の発行を停止する。この操作指令の発行停止は、クライアント数の同期イベントをサーバから受信したときに解除される。
【0059】
手順T2604でサーバはクライアント1が送信した同期イベント1を受信し、クライアント1およびクライアント2に対して同期イベント1を送信する。このときサーバは同期イベントを通常の操作イベントと同様に扱う。クライアント2では操作イベントを受信するとこれを実行する。
【0060】
一方、クライアント2のユーザは、操作指令1の操作実行結果に影響を受ける操作指令2を発行しようとしており、システムの同期を取るために同期イベントを発行する操作を行なう。図23の手順T2605では、この操作によって同期イベント2が生成され、これがサーバに送信される。同期イベントの発行とともに、クライアント2における操作指令の発行が停止される。これにより、前クライアントで操作指令1が実行済みとなってから操作指令2が発行されることを保証する。
【0061】
クライアント1においても、サーバより送信された操作イベント1を受信するとこれに対応する操作が実行される。また、手順T2606で同期イベント1を受信するが、この時点でこれまでに受信した同期イベントはクライアント1が送信したもの1つだけであるので、操作指令の発行停止は継続される。
【0062】
クライアント2においても手順T2607で同期イベント1を受信するが、この時点でこれまでに受信した同期イベントはやはり1つだけであるので、操作指令の発行停止は継続される。したがって、手順T2608で、クライアント2において操作指令2を発行しようとしても、手順T2605で操作指令発行を停止しているため、操作指令2はこの時点で発行されない。このとき、クライアント2において図示しない操作指令発行キューに操作指令2を追加する。
【0063】
手順T2609でサーバはクライアント2が発行した同期イベント2を受信し、クライアント1およびクライアント2に対して同期イベント2を送信する。手順2610でクライアント1はサーバより送信された同期イベント2を受信する。この時点で、これまでにクライアント1およびクライアント2が送信した計2つの同期イベントを受信しており、これはサーバに接続されているクライアント数に等しいので、操作指令の発行停止は解除される。操作指令発行停止の解除時には、操作指令発行キューを参照し、操作指令発行キューに登録されている操作指令があればこれを処理(発行)する。
【0064】
同様に、手順T2611でクライアント2はサーバより送信された同期イベントを2を受信する。クライアント2において、2つの同期イベントが受信されたので、手順T2610と同様に操作指令の発行停止は解除される。そして、手順T2612において、クライアント2は操作指令発行キューを参照し、キューに登録されている操作指令を発行する。この場合は操作指令2が発行され、操作イベント2がサーバに送信されることになる。
【0065】
以上のように、同期イベントモードでは、全クライアントが各々同期イベントを発行し、各クライアントは各クライアントが発行した同期イベントを、クライアント数分だけ(サーバを介して)受信する。各クライアントでは、すべての同期イベントの受信が完了するまでの間、操作指令の発行を停止する。このようにすることで、同期イベントの受信が完了した時点では、これまでに全クライアントで発行された全操作指令が確実に消化される。
【0066】
なお、同期イベントはユーザによる操作指示で発行され、各クライアントはサーバから受信される同期イベントの数を常時カウントする。そしてそのカウント値が所定数(ここではサーバと接続を確立しているクライアント数)となった場合には、操作指令の発行停止を解除するとともに、カウント値をリセットして、再び同期イベントのカウントを開始する。
【0067】
但し、更新モードがディレイモードのときには、全クライアントからの同期イベントの受信が完了することなくタイムアウト時刻に至った場合には、その時点で操作指令発行停止を解除する。
【0068】
また、必ずしもサーバに接続している全クライアント間で同期を取る必要はなく、同期させるクライアント群を任意に設定できるようにしてもよい。例えば、同期イベントのデータを構成する際に、操作内容806(図8)に同期対象となるクライアント群のクライアント識別番号を設定する。各クライアントが同期イベントを受信する際に、操作内容806に設定されているクライアント識別番号と同期イベントのクライアントID811(図8の(b))に記述されている番号とを比較し、操作内容806に設定されている全てのクライアント識別番号のクライアントから同期イベントを受信した時点で、操作指令の発行停止を解除する。このようにすることで、任意のクライアント間でイベント発行を同期させることが可能である。
【0069】
次に、操作指令発行キューについて説明する。操作指令発行キューはイベントの発行を待機している操作指令のリストであり、図9に示した操作キューと同様の構成を有する。すなわち、ある時点で待機状態にある操作指令がm個あるとすると、操作指令発行キューは図9のように操作指令に関するm個の情報(キューアイテム)を指令の発行順に並べたものとなる。操作キューと操作指令発行キューとは、前者がイベントの受信または実行処理を待機している操作指令のリストであるのに対して、後者はイベントの発行を待機している操作指令のリストであるという差異こそあるが、双方とも操作指令を格納するリストであるため、操作指令発行キューは操作キューと同様の手段および構成で実現することが可能である。
【0070】
次に、クライアント、サーバのそれぞれについて、上述した処理の流れを詳しく説明する。
【0071】
図11は、クライアントの処理の全体的な流れである。クライアントが起動されると、ステップS1101にて仮想空間を記述するファイルを外部記憶装置306(図3)より読み込み、メモリ302(図3)上にシーングラフデータベースを構築する。クライアント間でのデータの同一性を維持するため、ここでロードするファイルはクライアント間で同じ内容を持つとする。次に、サーバとのネットワーク接続を確立する(ステップS1102)。このとき、サーバから各クライアントを識別するためのクライアントIDが付与される。なお、クライアントとサーバ間のデータ交換は、TCP/IPプロトコルを用いた1対1のソケット通信にて行う。したがって、サーバは少なくともクライアントの数だけのソケット通信路を持つことになる。
【0072】
続いて、ステップS1103でプロセスを分岐し、操作指令を処理するための操作処理(ステップS1104)およびサーバから受信するイベントを処理するための受信イベント処理(ステップS1106)を起動する。なお、図11には図示していないが、シーングラフデータベースを参照して、仮想空間のCG画像を生成するプロセスも起動する。この処理は、公知のCG画像生成方法と同様であるのでその詳細な説明は省略する。また、操作処理および受信イベント処理については、後に詳しく説明する。操作処理および受信イベント処理はそれぞれステップS1105およびステップS1107でプロセスの終了する指示があったかどうか判定され、終了指示がなければステップS1104およびステップS1106に戻って操作指令および受信イベントを継続して処理する。一方、終了指示があればステップS1108でプロセスを統合し、サーバとのネットワーク接続を切断(ステップS1109)した上で、データベースの内容を外部記憶装置(図3の306)にファイルとしてセーブ(ステップS1110)して、すべての処理を終了する。
【0073】
ここで、ステップS1104の操作処理について図12A,Bを参照して詳しく説明する。初めに、ステップS1201にて操作指令の内容を入力する。本実施形態では、操作指令の入力はユーザからの操作指示が操作指令発行停止中以外になされた場合には、当該操作指令に対する処理が直ちに実行されるが、操作指令発行停止中に操作指令がなされた場合は、一旦操作指令発行キューに登録され、操作指令発行停止が解除された後にその処理が実行されることになる。
【0074】
図12Bは図12Aの上記ステップS1201に相当する処理を詳細に説明するフローチャートである。操作指令発行停止中に操作指示がなされた場合は、当該操作が操作指令発行キューに登録される(ステップS1220、S1221、S1222)。一方、操作指令発行停止中でない間に、操作指示がなされた場合は、当該操作指示が消化イベント或いは同期イベントの発行指示か否かを判定する。消化/同期イベントのいずれでもなければ、ステップS1202(図12A)へ進む。操作指示が消化/同期イベントのいずれかであれば、ステップS1226に進み、対応するイベント(図8(b)に示すような消化イベントもしくは同期イベント)を発行するとともに、操作指令発行停止状態に移行する。
【0075】
ステップS1223で操作指示がなされていなかった場合は、ステップS1224に進み、操作指令発行キューに未処理の操作指示があるか否かを判定する。未処理の操作指示があればステップS1225へ進み、上記と同様の処理を行なう。ステップS1224で操作指令発行キューが無ければステップS1220へ戻り上記処理を繰り返す。
【0076】
図12Aに戻り、ステップS1202およびステップS1203で、データベースのエントリを参照して更新モードを判定する。更新モードに応じて、ステップS1206のウェイトモード操作処理、ステップS1205のイミディエートモード操作処理、ステップS1204のディレイモード操作処理、のいずれかのステップを経た後、処理を終了する。
【0077】
以下、更新モードごとの操作処理(ステップS1204、S1206)について、図13〜図15を参照して詳述する。
【0078】
図13に、ウェイトモード操作処理の流れを示す。ウェイトモードの操作処理では、まず、ステップS1301で当該操作指令に対応した操作イベントを生成し、ステップS1302でその操作イベントを発行する。
【0079】
イミディエートモード操作処理の流れは図14に示す通りである。まず、ステップS1401にて、ステップS1201で入力した操作指令を実行する。具体的には、データベースの指定エントリの設定値を変更する。次に、ウェイトモードと同様にイベントを生成し(ステップS1402)、これをサーバに向けて発信(ステップS1403)する。最後のステップS1404で、操作IDをステップS1201で決定した操作ID番号に、実行済みフラグをONに、それぞれ設定した操作キューアイテムを操作キューに追加する。このとき、タイムアウト時刻は処理に用いないので、任意に設定してよい(例えば0)。
【0080】
次に、ディレイモード操作処理について図15を用いて説明する。まずウェイトモードと同様にイベントを生成し(ステップS1501)、これをサーバに向けて発信(ステップS1502)する。次に、操作ID1001をステップS1201で決定した操作ID番号に、タイムアウト時刻1002を現在時刻に所定のタイムアウト時間を加えた値に、実行済みフラグをOFFに、それぞれ設定した操作キューアイテム(図9)を操作キューに追加する(ステップS1503)。最後に、操作ID、操作内容、タイムアウト時刻のデータを渡してタイマープロセスを起動する(ステップS1504)。タイマープロセスについては、後に詳述する。
【0081】
続いて、ステップS1106(図11)の受信イベント処理について詳しく説明する。図16Aは、受信イベント処理の流れを示した図である。受信イベントは、不図示のイベント通信部がサーバより受信し、受信イベントバッファに入力される。
【0082】
ステップS1601では、受信イベントバッファを検索する。続くステップS1602で、受信イベントバッファにイベントが入力されているかどうか判定し、受信イベントがあればステップS1603に進む。一方、受信イベントが存在しないと判定されれば、処理を終了する。
【0083】
受信イベントがある場合、そのイベントデータを解析し、操作指令の内容を抽出する(ステップS1603)。次にステップS1611において、当該イベントが消化イベントもしくは同期イベントであるかどうかを判定する。消化イベントもしくは同期イベントであった場合は、ステップS1612に進み、対応する処理を行なう。一方、消化イベントでも同期イベントでもない場合は、ステップS1604およびステップS1605でイベントの更新モードID803を参照して、操作指令の更新モードを判定する。そして、判定した更新モードに応じてステップS1608(ウェイトモードの場合)、ステップS1606(イミディエートモードの場合)、ステップS1607(ディレイモードの場合)のいずれかのステップを経た後、処理を終了する。
【0084】
次に、ステップS1612の、消化/同期イベント処理について説明する。図16Bは消化/同期イベント処理を説明するフローチャートである。ステップS1621において、当該イベントが自分自身の発行した消化イベントであるか否かを判定する。これは、図8(b)に示すクライアントID811とイベント種別812を参照することにより判定できる。自分自身の発行した消化イベントであった場合は、ステップS1622へ進み、操作指令発行停止を解除する。
【0085】
一方、自分の発行した消化イベントでない場合は、ステップS1623において、当該イベントが同期イベントであるかを判定する。同期イベントであった場合は、ステップS1624で同期イベントをカウントし、そのカウント値が所定数に達したか否かを判定する(ステップS1625)。所定数に達していた場合はステップS1627へ進み、同期イベントのカウントをクリアし、操作指令発行停止を解除する(ステップS1628)。同期イベントのカウント値が所定数でない場合はそのまま本処理を終了する。
【0086】
次に、各更新モードによるイベント処理について説明する。なお、ステップS1608では、ウェイトモードであるので、当該操作イベントに対応する操作処理が直ちに実行される。
【0087】
ステップS1606のイミディエートモードイベント処理について図17を参照して説明する。
【0088】
イミディエートモードイベント処理の流れを図17に示す。まず、ステップS1701にて操作キューを検索し、ステップS1702で操作キューに受信イベントに対応する操作キューアイテムが存在するかどうか判定する。具体的には、受信イベントのクライアントIDと本処理が動作しているクライアントのIDが一致し、かつ受信イベントの操作IDと操作キューアイテムの操作IDが一致すれば、その操作キューアイテムの操作指令と受信イベントの操作指令は対応していると判定する。イミディエートモードでは、対応するキューアイテムが存在する場合、その操作が当該クライアントで生成された時点で実行済みである。したがって、ここでは操作を実行せずに、ステップS1703で当該操作キューエントリを削除し、処理を終了する。一方、ステップS1702で対応するキューアイテムがないと判断された場合、その操作は当該クライアント以外のクライアントで生成されたものなので、まだ実行されていない。したがって、ステップS1704で当該操作を実行し、処理を終了する。
【0089】
ステップS1607のディレイモードイベント処理の流れは図18A,Bに示す通りである。
【0090】
まず、ステップS1801にて操作キューを検索し、ステップS1802で受信イベントに対応する操作キューアイテムが操作キューに存在するかどうか判定する。ステップS1802の処理の詳細は、ステップS1702と同様である。ここで対応する操作キューアイテムが存在しない場合は、他のクライアントから発行された操作イベントであることがわかる。この場合、その操作は当該クライアント以外のクライアントで生成されたものなのでまだ実行されていない。そこで、ステップS1804へ進み、当該操作を実行する。なお、ステップS1804の処理については図18Bにより後述する。
【0091】
一方、図18AのステップS1802において操作キューに対応する操作キューアイテムが存在する場合は、自身から発行した操作イベントである。この場合、処理はステップS1803へ進み、操作キューアイテムの実行済みフラグをチェックする。実行済みフラグがONである場合は、タイムアウト時刻が過ぎているので、タイマープロセス(後述)によって当該操作イベントは実行済みである。したがって、ここでは操作を実行せず、ステップS1805にて当該操作キューエントリを削除する。
【0092】
図18Bは他のクライアントから発行された指令モードの操作イベントを実行する差異の処理を説明するフローチャートである。まず、ステップS1820において、当該操作イベントを実行する。そして、ステップS1821において、現在自分自身が操作指令発行停止中であるかどうかを判定する。操作指令発行停止中でなければそのまま本処理を終了する。
【0093】
操作指令発行停止中の場合は、ステップS1822へ進み、タイムアウトとなったかを判定する。ここで、タイムアウトの判定は、当該操作イベントに含まれるタイムアウト時刻804を参照することで行なえる。タイムアウトになっていなければステップS1821へ戻る。タイムアウトになる前に同期イベントのカウント値が所定数に達した場合にはステップS1821からそのまま本処理が終了する。一方、同期イベントのカウント値が所定数に達する前にタイムアウトになった場合は、ステップS1822からステップS1823へ進み、操作指令発行停止が解除されることになる。
【0094】
一方、ステップS1803にて、実行済みフラグがOFFと判定された場合は、未だタイムアウト時刻に到達していないため、操作は実行されていない。そこで、ステップS1806で当該操作を直ちに実行し、ステップS1805で操作キューより当該アイテムを削除する。
【0095】
次に、図15のステップS1504で起動したタイマープロセスについて図19を用いて詳しく説明する。これは、ディレイモードにおいてタイムアウト時刻に到達した場合に対処するための処理である。
【0096】
まず、ステップS1901で操作キューを検索し、ステップS1902でタイマープロセス起動時に指定された操作に対応する操作キューアイテムが存在するかどうか判定する。具体的には、本プロセス起動時の引数である操作IDと操作キューアイテムの操作IDが一致すれば、その操作キューアイテムの操作指令と引数で指定された操作指令は対応していると判定する。対応するキューアイテムが存在する場合、その操作指令に対応する受信イベントが未処理、すなわち実行されていないことを意味する。この場合は、タイムアウト時刻に到達しているかどうか確認する処理に進む。すなわち、ステップS1903で現在時刻を参照し、タイムアウト時刻との前後関係を判定する(ステップS1904)。もし、タイムアウト時刻を過ぎていれば、ステップS1905で操作を実行し、対応する操作キューアイテムの実行済みフラグをONに設定する。また、操作指令発行停止を解除する。
【0097】
一方、タイムアウト時刻に達していない場合は、ステップS1901に戻る。また、ステップS1902にて、対応する操作キューアイテムが存在しないと判定された場合は、その操作指令に対応する受信イベントが処理済み、すなわち当該操作は実行済みであることを意味する。この場合は、操作の実行や操作キューの変更は必要ないため、そのまま処理を終了する。
【0098】
以上、クライアント側プロセスの流れを説明した。続いて、サーバ側プロセスの流れを図20を用いて詳しく説明する。
【0099】
最初にステップS2001で、クライアントからの接続要求を受け付け、通信を確立する。このとき、通信を確立した各クライアントにクライアントIDを通知する。次に、受信イベントバッファを検索し(ステップS2002)、受信イベントが存在するかどうか判定する(ステップS2003)。受信イベントがあれば、ステップS2004に進み、なければステップS2005に進む。ステップS2004では、接続している各クライアントに当該イベント(操作イベント、消化イベント、同期イベント)を送信する。ステップS2005では、ユーザからの指令などによりサーバ処理を終了するかどうかを判定し、終了する場合はステップS2006に進み、終了しない場合はステップS2002に戻る。ステップS2006では、接続している各クライアントに処理を終了することを通知し、次にクライアントとの接続を終了して(ステップS2007)から処理を終了する。
【0100】
次に、本実施形態でクライアントが読み込むデータベース記述ファイルの構成について説明する。
【0101】
図21はエントリ数がNのデータのファイルフォーマットを模式的に示したものである。各エントリの属性は、スタートデリミタおよびエンドデリミタで囲まれたフィールドに記述される。図24で、1番目、2番目、N番目のエントリのスタートデリミタはそれぞれ2401、2406、2409で示されている。一方、それぞれのエンドデリミタは2405、2408、2411である。エントリの属性は、2402〜2404のように、各属性を識別するための識別子および属性値の組で記述される。更新モード(消化/同期イベントモードを含む)およびタイムアウト時間は、上記のフォーマットのファイルでエントリごとに規定されている。ただし、該当エントリの更新モードがディレイモードでない場合は、タイムアウト時間は記述しなくてもよい。また、いずれの更新モードにおいても両属性を必ずしも記述する必要はなく、もし記述がなければ、メモリ(図3の302)上にシーングラフデータベースを構築する時点(ステップS1101)で、予めシステムによって決められたデフォルト値に設定される。
【0102】
なお、上述のデータベース記述ファイルでは、選択する更新モードを記述している。これに対して、選択不可能な更新モードを1つまたは複数設定することもできる。
【0103】
また、上記の説明では、サーバ・クライアント間のデータ通信を1対1のTCP/IPソケットにて行うとしているが、ブロードキャストあるいはマルチキャストによりイベントを交換してもよいし、通信プロトコルはTCP/IPに限らない。
【0104】
また、通信媒体としてはイーサネット(登録商標)を利用しているが、USBやFirewireなど他の情報伝達媒体でも構わない。更に、ネットワークの形態もLANだけでなく、WAN経由の接続でもよいし、LANとWANを併用しても構わない。
【0105】
また、サーバの数は、1つの共有データベースシステムにつき1つに限定する必要はなく、複数のサーバが存在してもよい。この場合、各サーバに処理を割り当てる形態は任意である。例えば、クライアントごとに異なるサーバを用いてもよいし、あるいはデータベースのエントリごとにサーバを設けてもよい。
【0106】
更に、端末に対するプロセスの割当は1端末1プロセスに限定されるものではなく、1つの端末上で複数のプロセスを動作させることができる。その場合、プロセスの種別の組み合わせは任意であり、クライアントのみ、サーバのみ、クライアントおよびサーバの、いずれの組み合わせでもシステムは動作する。なお、同じ端末上のプロセスは、ネットワークに替えて、共有メモリを経由してデータを交換してもよい。
【0107】
また、イベントはサーバが仲介して各端末に配信されるが、データ操作を行った端末が直接に他の端末にイベントを送信するようにしてもよい。
【0108】
また、上記の説明では、3次元仮想空間データを共有するとしているが、データベースの内容はこれに限らず任意であることはいうまでもない。また、データベース全体を共有する場合のみならず、その一部のみを共有する場合にも上記実施形態で説明した方法が適用可能であることはいうまでもない。
【0109】
以上のように本実施形態によれば、情報伝達媒体を介して通信可能に接続された複数のプロセス(クライアントプロセス)によって共有される共有データ(データベース)を該複数のプロセスの各々が保持して利用するシステムにおいて、各プロセスが保持する共有データの同一性を維持するための情報処理方法が開示される。特に、共有データに対する操作要求が発生した場合には、該操作要求を表す要求情報(イベント)が情報伝達媒体上に出力され、この要求情報に対する応答情報(イベント)を情報伝達媒体より受信し、受信した応答情報に従って共有データに対する操作を実行する。このようなウェイトモードによれば、共有データに対する操作が情報伝達媒体を介して受信されるイベントに従って実行されるので、共有データの更新タイミングを高精度に一致させることができる。
【0110】
また、ディレイモードでは、タイマー処理により、応答情報を受信する前に操作要求の発生から所定時間が経過した場合には、該応答情報の受信を待たずに当該操作要求に基づく共有データの操作が実行される。このため、操作が発生したプロセスにおける応答性と複数プロセス間の同期タイミングの一致の両立を図ることができる。
【0111】
また、本実施形態によれば、操作要求に応じて操作キューにキューアイテムを登録し、操作実行工程によって共有データに対する操作が実行された場合に対応するキューアイテムを処理済とするキュー制御を行い、操作キューにおいて応答情報が表す操作要求に対応するアイテムが処理済となっていない場合に、応答情報に対応する操作を共有データに対して実行する。上述のようなディレイモードにおいて、操作実行が重複することを簡易な構成で防止できる。
【0112】
また、本実施形態によれば、受信工程によって応答情報が受信されるのを待って共有データの操作を実行する第1モード(ウェイトモード)と、操作要求の発生からの所定時間の経過と、応答情報の受信の何れかの早い方のタイミングで共有データの操作を実行する第2モード(ディレイモード)を含む複数の変更モードのいずれかで動作することが可能である。
【0113】
そして、共有データは複数のアイテムで構成され(図21)、複数のアイテムの各々は採用すべき変更モードを指定する指定情報を含む。変更モードはこの指定情報に従って選択され、共有データへの操作が実行されることになる。すなわち、複数のアイテム毎に変更モードが切り換えられることになり、この構成によれば、アイテム毎に適切な変更モードを設定できる。
【0114】
また、本実施形態によれば、同一クライアントが二つ以上の連続した操作指令を発行する場合において、先の操作指令を発行した後、後に発行する操作指令が先の操作指令の実行結果を参照するような状況下でも、すべての操作を適切に実行し、データベースに反映させることが可能である。
【0115】
また、本実施形態によれば、複数のクライアント間で連続した操作指令を発行する場合において、あるクライアント上で先の操作指令を発行した後、先の操作指令を発行したクライアントとは別のクライアント上で、後に発行する操作指令が先の操作指令の実行結果を参照するような状況下でも、すべてのクライアント上ですべての操作を適切に実行し、すべてのクライアントのデータベースに適切に反映させることが可能である。
【0116】
また、サーバプロセスにおいては、情報伝達媒体を介して接続された複数のプロセスによって共有される共有データを該複数のプロセスの各々が保持して利用するシステムにおいて、各プロセスが保持する共有データの同一性を維持するために、複数のクライアントプロセスとの接続を確立し、これら複数のクライアントプロセスより共有データの変更に関るイベントを受信する。そして、受信したイベントを、上記複数のクライアントプロセスに対して発行する。
【0117】
なお、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。
【0118】
この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0119】
プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。
【0120】
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0121】
さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0122】
【発明の効果】
以上説明したように、本発明によれば、複数のプロセスで共有される共有データに対して行われる操作について、先に発行された操作指令が実行された上で後の操作指令が発行されることを保証する機構を提供し、操作指令発行のタイミングに関する制約を除去することが可能となる。
【図面の簡単な説明】
【図1】第1実施形態におけるデータベース共有システム全体の構成を示すブロック図である。
【図2】第1実施形態によるプロセス間の基本的な情報伝達方法を示す図である。
【図3】第1実施形態による端末装置のハードウエア構成を示すブロック図である。
【図4】ウェイトモードにおけるデータベースの更新手順を示す図である。
【図5】イミディエートモードにおけるデータベースの更新手順を示す図である。
【図6】ディレイモード(非タイムアウト時)におけるデータベースの更新手順を示す図である。
【図7】ディレイモード(タイムアウト時)におけるデータベースの更新手順を示す図である。
【図8】イベントデータのデータ構成例を示す図である。
【図9】操作キューのデータ構成例を示す図である。
【図10】操作キューアイテムのデータ構成例を示す図である。
【図11】第1実施形態によるクライアントプロセスのフローチャートである。
【図12A】クライアントプロセスにおける操作処理を示すフローチャートである。
【図12B】図12Aの操作入力処理を説明するフローチャートである。
【図13】図12Aのウェイトモード操作処理を説明するフローチャートである。
【図14】図12Aのイミディエートモード操作処理を説明するフローチャートである。
【図15】図12Aのディレイモード操作処理を説明するフローチャートである。
【図16A】図11のクライアントプロセスにおける受信イベント処理を示すフローチャートである。
【図16B】図16Aの消化/同期イベント処理を示すフローチャートである。
【図17】図16Aのイミディエートモード受信イベント処理のフローチャートである。
【図18A】図16Aのディレイモード受信イベント処理のフローチャートである。
【図18B】図18AのステップS1804における操作実行処理のフローチャートである。
【図19】タイマープロセスを説明するフローチャートである。
【図20】実施形態によるサーバプロセスを説明するフローチャートである。
【図21】データベースの記述ファイルフォーマットを示す図である。
【図22】イベントの消化手順を説明する図である。
【図23】イベントの同期手順を説明する図である。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technique for sharing data between a plurality of processes. In particular, the present invention relates to a technique suitable for sharing a database holding data describing a three-dimensional virtual space among a plurality of processes via a network.
[0002]
[Prior art]
A technology for sharing a three-dimensional virtual space between different computer terminals is essential for realizing a teleconferencing system, a network-based competitive game, a cooperative design system, and the like.
[0003]
In such a system that shares a three-dimensional virtual space, a large amount of data is referred to at short time intervals in order to draw a moving image in the virtual space by computer graphics. At this time, it is not realistic to acquire the entire data of the virtual space held in one device (for example, a server) via a network due to the narrow bandwidth of the current network. Therefore, a method is adopted in which each terminal has a copy of the virtual space data and generates a CG image by referring to the copy. Also, when a certain operation on a virtual space is performed on a certain computer terminal, for example, movement or rotation of a virtual object, information on the operation is transmitted to another terminal via a network and reflected in a database of each terminal. Is done. As a result, the identity of the database at each computer terminal is maintained.
[0004]
The details of the procedure for maintaining the above-mentioned database identity in a general virtual space sharing system are as follows. That is, an operation on a virtual space in a certain computer terminal is immediately reflected in a local database of the terminal, and the operation information is transmitted to another computer terminal. Other terminals receive the operation information and update data according to the received operation information.
[0005]
An example of realizing such a virtual space sharing system is described in Non-Patent Document 1.
[0006]
However, in a virtual space sharing system represented by Non-Patent Document 1, at the terminal that has performed an operation, the content of the operation is immediately reflected in the database of the terminal, and other terminals receive the operation information, and then receive the operation information. An update is performed. Therefore, the timing at which the database is updated differs between the operated terminal and the other terminals. In particular, if it takes time until the operation information is received due to the influence of traffic on the network or the like, the difference in the timing of updating the database between the terminals becomes remarkable. For this reason, a problem has been pointed out that there is a possibility that a difference occurs in the rendering result of the virtual space between the terminals. In addition, the procedure for operating and updating the database is fixed to the above procedure, and it has been pointed out that it is not possible to select or adjust the data update timing.
[0007]
On the other hand, a system has been proposed in which the timing of executing an operation is substantially the same for a database shared by a plurality of processes. In this system, a server for maintaining the identity of the shared database is provided separately from the terminal, and each terminal issues an operation command for changing the shared database and transmits an event corresponding to the command to the server. On the other hand, the server receives the event transmitted from the terminal, and transmits the event to a plurality of terminals connected to the server. Each terminal updates the database held by the terminal based on the operation information of the event received from the server. That is, since each terminal updates the database held by receiving the event transmitted from the server as a trigger, the timings at which the operations are executed can be made uniform.
[0008]
[Non-patent document 1]
Distributed Open Inventor (exhibitors: G.Heshina et.al.:. "Distributed Open Inventor: A Practical Approach to Distributed 3D Graphics", in Proc of the ACM Symposium on Virtual Reality Software and Technology (VRST'99), pp.74 −81, 1999)
[0009]
[Problems to be solved by the invention]
However, in the above-described system, the timing of executing the operation is almost the same, but after the terminal issues an operation command related to the change of the database, an event corresponding to the operation command spreads to other terminals, and A time lag occurs before the operation is performed on the terminal. In particular, when two or more operations are continuous, an attempt is made to issue a command for a subsequent operation (second operation) at a stage before receiving an event related to the previous operation (first operation) from the server. It can happen. In this case, since the operation result of the first operation has not been reflected in the database yet, the second operation may have an unexpected result. To avoid this, the issuing of the command for the second operation must be delayed.
[0010]
However, the time required from issuance of an operation command to execution of the operation greatly differs depending on the operating environment of the system. Therefore, it is not easy to determine a delay time for delaying the issuance of the command for the second operation, and there is a case where the timing for issuing the operation command is restricted. Therefore, there has been a demand for a mechanism for guaranteeing that the first operation has been executed reliably after issuing the first operation command.
[0011]
The present invention has been made in view of the above problems, and regarding an operation performed on shared data shared by a plurality of processes, an operation instruction issued earlier is executed, and then a subsequent operation instruction is executed. An object of the present invention is to provide a mechanism for guaranteeing that an operation command is issued, and to remove restrictions on the timing of issuing an operation command.
It is another object of the present invention to easily guarantee the operation execution order even when an operation command is issued by a plurality of terminals.
[0012]
[Means for Solving the Problems]
An information processing method according to the present invention for achieving the above object,
In a system in which each of a plurality of processes holds and uses shared data shared by a plurality of processes communicable via an information transmission medium, information for maintaining the identity of the shared data held by each process Processing method,
A first issuing step of, when an operation request for the shared data is issued, issuing an operation event representing the operation request on the information transmission medium;
A second issuing step of issuing an issue prohibition event in response to a predetermined user operation;
An operation execution step of receiving a response operation event in response to the operation event issued by the first issuance step from outside, and executing an operation on the shared data;
After the issuance of the issuance prohibition event in the second issuance step, a prohibition step of prohibiting the issuance of the event in the first and second issuance steps until an event corresponding to the issuance prohibition event is received.
[0013]
An information processing apparatus according to the present invention for achieving the above object has the following configuration. That is,
In a system in which each of a plurality of processes holds and uses shared data shared by a plurality of processes communicable via an information transmission medium, information for maintaining the identity of the shared data held by each process A processing device,
A first issuing unit that issues an operation event indicating the operation request on the information transmission medium when an operation request for the shared data occurs;
Second issuing means for issuing an issue prohibition event in response to a predetermined user operation;
Operation execution means for receiving, from the outside, a response operation event in response to the operation event issued by the first issuing means, and executing an operation on the shared data;
After the issuance prohibition event is issued by the second issuance unit, the prohibition unit prohibits the issuance of the event by the first and second issuance units until an event corresponding to the issuance prohibition event is received.
[0014]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.
[0015]
[First Embodiment]
In the first embodiment, an embodiment will be described in which the information processing method according to the present invention is applied to a virtual space sharing system in which a scene database describing the structure and attributes of a virtual space is shared by a plurality of terminals.
[0016]
FIG. 1 shows the overall configuration of the virtual space sharing system according to the present embodiment. The system has one server process 101 (hereinafter abbreviated as “server”) and a plurality of client processes 103 (hereinafter abbreviated as “client”), and exchanges data via a network 102 as an information transmission medium. . Each client has a scene database that describes the structure and attributes of a common virtual space. In the present embodiment, the network 102 is a LAN constructed on Ethernet (registered trademark). The information transmission medium may be wireless or wired.
[0017]
Here, the term “database operation” used in the following description will be described. “Operation” of a database refers to a process of rewriting the contents of a database in an arbitrary process having a shared database. The database operation is divided into two stages, "operation command" and "operation execution". The operation command is a request for updating the database, and the actual rewriting is not performed. The actual rewriting of the database is performed at the stage of executing the operation. In the following description, unless otherwise specified, simply describing “operation” indicates “database operation”. If the operation target is other than the database, the operation target is specified, such as “user operation of interactive device”.
[0018]
The operation command may be generated by the user, or may be generated during the operation of the process. As an example of the former, an operation command is generated when a user operates a dialogue device such as a mouse to move a virtual object. On the other hand, as an example of the latter, in a shooting game system, an operation command is generated when a game program algorithmically moves and rotates an enemy character.
[0019]
FIG. 2 shows a basic information flow for updating the database. In FIG. 2, A, B, C, and D (201 to 204) are clients, and X (205) is a server. Now, it is assumed that the client A (201) has issued an operation command for the scene database. The content of the operation command is transmitted to the server via the network (the process indicated by the arrow (1) in FIG. 2). The server receives the operation command and distributes the data transmitted from the client A (201) to all the clients (the process indicated by the arrow (2) in FIG. 2). Through such a process, the clients B (202), C (203), and D (204) of the non-operators can also know the contents of the operation.
[0020]
Next, FIG. 3 shows a configuration of a terminal on which a client or server process operates. In FIG. 3, reference numeral 301 denotes a CPU, which controls the operation of the entire terminal. A memory 302 stores programs and data used for the operation of the CPU 301. Reference numeral 303 denotes a bus, which controls data transfer between the constituent modules. Reference numeral 304 denotes an interface between the bus 303 and various devices. Reference numeral 305 denotes a communication unit for connecting to a network; 306, an external storage device for storing programs and data to be read into the CPU 301; and 307 and 308, input devices for activating the programs and designating the operations of the programs. A keyboard and mouse 309 are a display unit for displaying operation results of the process.
[0021]
The system of this embodiment has the following three modes with respect to the database update timing. Hereinafter, these modes are collectively referred to as “update mode”.
(1) Wait mode (standby mode)
(2) Immediate mode (immediate mode)
(3) Delay mode (delay mode)
Hereinafter, the processing in each mode will be described in detail.
[0022]
The “wait mode” is a mode in which an operation in response to a certain operation command is performed after an event is delivered from the server. FIG. 4 schematically shows a processing procedure along the progress of time in the wait mode. In FIG. 4, “operator” indicates a client that has issued an operation command, and “non-operator” indicates a client other than the operator. The progress of the process is as described below.
[0023]
First, in step T401, the operator client issues a database operation command. At this point, the operator client database is not updated. Next, in step T402, an event indicating the operation content of T401 is generated, and transmitted to the server in T403. The server receives the event in step T404, and transmits the event to all clients that have established a connection with the server in T405 (connection establishment will be described later in step S1102 of FIG. 11). The operator client receives the event issued from the server in step T406, analyzes the content (T407), and rewrites the database (T408). The procedure from the reception of the event is the same for the non-operator client (procedures T409 to T411). As shown in FIG. 4, in the wait mode, there is a time lag from the operation command (T401) to the operation execution (T408). However, if the conditions of the information transfer on the network are the same, it is expected that the database is updated at substantially the same time for both the operator and the non-operator clients, and that the images in the virtual space are synchronized between the clients.
[0024]
In the "immediate mode", a command from the operator is immediately reflected in the database, while the database of the non-operator is updated with a delay. FIG. 5 schematically shows a processing procedure along time progress in the immediate mode. The progress of the process is as described below.
[0025]
First, in step T501, the operator client issues a database operation command. Next, in step T502, the database is updated according to the contents of the operation command. Thereafter, an event indicating the operation content is generated (T503) and transmitted to the server (T504). After transmitting the event, the operator client holds, as an operation queue, information indicating that the operation command and execution of the procedure T501 have been performed (T505, “operation queue” will be described later).
[0026]
The server receives the event in procedure T506, and transmits the event to all clients in T507. Upon receiving the event from the server in step T508, the operator client refers to the operation queue (T509). Here, since the information recorded in step T505 recognizes that the operation has already been executed, the operation execution processing is not performed, and the information recorded in step T505 is deleted (T514).
[0027]
On the other hand, the non-operator client recognizes that the event received in step T510 is not executed by referring to the operation queue (T511), and executes an operation based on the content of the event (T512, T513).
[0028]
When the database is updated according to the above procedure, the time delay until the result of the operation on the virtual space is reflected on the CG image in the operator client is smaller than in the wait mode. Therefore, the immediate mode is suitable mainly when the user operates the virtual object using the interactive device. This is because in general, if a time lag occurs between the interactive operation of the user and the presentation of the result, problems such as more difficult operation and discomfort to the user occur.
[0029]
In the “delay mode”, an operation command is not immediately executed as in the wait mode, but an operation execution time limit is provided, and when the time limit has passed, the operation is executed without waiting for an event response from the server. Things. FIG. 6 schematically shows a processing procedure along the progress of time when an event arrives from the server before the operation execution deadline is reached in the delay mode. The progress of the process is as described below.
[0030]
First, in step T601, the operator client issues a database operation command. At this point, the database is not updated. Next, in step T602, an event indicating the content of the operation of T601 is generated, and transmitted to the server in T603. After the event transmission, the operator client holds information indicating that the operation command of the procedure T601 has been performed in the operation queue (T604, “operation queue” will be described later), and starts timer processing (T605). The timer process executes the operation after waiting for a timeout, and the details will be described later with reference to FIG.
[0031]
On the other hand, the server receives the event in step T606, and transmits the event to all clients in T607. The operator client receives the event in step T608, and refers to the operation queue (T609). Here, since it is recognized that the operation has not been executed, the fact that the operation has been executed is recorded in the operation queue (T610), the contents of the event are analyzed (T611), and the database is rewritten (T612). . Further, the information recorded in T604 is deleted (T617). Further, the non-operator client recognizes that the event received in step T613 has not been executed (T614), and executes an operation based on the content of the event (T615, T616).
[0032]
On the other hand, FIG. 7 schematically shows a processing procedure along the progress of time when an operation execution time limit (timeout) is reached before an event from the server arrives in the delay mode. The progress of the process is as described below.
[0033]
First, in step T701, the operator client issues a database operation command. At this point, the database is not updated. Next, in step T702, an event indicating the content of the operation of T701 is generated, and transmitted to the server in T703. After transmitting the event, the operator client holds information indicating that the operation command of the procedure T701 has been performed in the operation queue (T704, “operation queue” will be described later), and starts timer processing (T705). Note that the timer process performs an operation execution after a timeout, and details will be described later with reference to FIG. On the other hand, the server receives the event in step T706, and transmits the event to all clients in T709.
[0034]
In the timer processing, when a time-out time arrives before a corresponding event is received from the server, the timer processing detects the time-out, and executes the operation in step T707, and the operation is executed in the operation queue. Is stored (T708). Therefore, the operator client later receives the event in step T710, but recognizes that the operation has been executed by referring to the operation queue (T711), and does not execute the operation. The non-operator client recognizes that the event received in step T713 has not been executed (T714), and executes an operation based on the content of the event (T715, T716).
[0035]
When the database is updated according to the above procedure, the operation is performed so that the operation execution is not delayed as much as possible if the time lag of the event distribution is large, and the operation is performed so as to synchronize the clients if the time lag is small. Such switching of the operation is automatically performed, and it is possible to adjust which operation is dominant by appropriately setting the timeout time.
[0036]
In the present embodiment, with respect to the above-described wait mode and delay mode, processing corresponding to the digestion event mode and the synchronous event mode is further executed in order to guarantee the order of operation execution and operation command issuance. These will be described later.
[0037]
FIG. 8A shows the contents of an event issued from the client to the server or from the server to the client. The event data is composed of a plurality of fields. The client ID 801 is a number for uniquely identifying each client, and is assigned by the server when the client establishes a network connection with the server (described later in step S1102 in FIG. 11). The operation ID 802 is a number for uniquely identifying an operation, and is assigned when an operation command is issued to each client. By using the set of the client ID 801 and the operation ID 802, it is possible to uniquely specify all operation commands that have occurred in the system.
[0038]
The update mode ID 803 is an identification number uniquely determined for each update mode, and is determined according to the update mode of the operation command corresponding to this event. The update mode is set and registered in each entry of the database (described later with reference to FIG. 21), and the update mode is set with reference to this. Any one of the wait mode, delay mode, and immediate mode described above is set as the update mode ID 803.
[0039]
The timeout time 804 is used in the above-described delay mode, and describes a time obtained by adding a delay time to an event occurrence time. The entry ID 805 is a number for uniquely identifying each entry of the database, and is assigned when data is loaded from a file. The operation content 806 is a specific content of the operation command. For example, if the operation is to set the X coordinate of the CG object to a certain value, the operation content 806 is represented by a set of a number for identifying the X coordinate attribute and an X coordinate set value. .
[0040]
FIG. 8B shows the data structure of the synchronization event and the digestion event. This event includes a client ID 811 and an event type 812 indicating the type of event (digestion or synchronization).
[0041]
Next, the operation queue will be described. The operation queue is a list of operation commands waiting for an event reception or execution process. Assuming that there are m operation commands in a standby state at a certain point in time, the operation queue has m pieces of information (queue items) related to the operation commands arranged in the order of generation of the commands as shown in FIG.
[0042]
The content of one queue item is composed of three data fields as shown in FIG. The operation ID 1001 is a number for uniquely identifying an operation, and has the same value as the operation ID field of the corresponding event. The operation ID 1001 is assigned when an operation command is issued in the client. The timeout time 1002 is an operation execution time limit in the delay mode, and is obtained by adding a predetermined timeout time to the current time when an operation command is issued in the client. The executed flag 1003 indicates whether the operation having this operation ID has been executed in the immediate mode or the delay mode. The executed flag is set to OFF when the operation command is issued, and is changed to ON when the operation is executed.
[0043]
In FIG. 10A, an operation queue item having three fields is shown, but it is also possible to use both the executed flag and the timeout time. In this case, when the timeout time is a special value (for example, minus one), it may be defined as being already executed. The data configuration of the operation queue item in this case is as shown in FIG.
[0044]
Next, event digestion and event synchronization will be described. The user can cause the terminal to issue digestion events and synchronization events at desired timing.
[0045]
First, the event digestion will be described. In the case of the wait mode or the delay mode, a time lag occurs between the time when the operator client issues an operation command and the time when the operation is executed. For example, it is assumed that there are first and second consecutive two operations, and the second operation is performed only when the first operation result satisfies a certain condition. After the first operation command is issued, if the second operation command is issued in a state where the first operation has not been executed, the first operation result is not reflected in the database at that time. There is a possibility that the result of the first operation cannot be correctly referred to and the second operation cannot be performed correctly. Therefore, after the first operation command is executed, it is necessary to wait until the first operation command is executed, and then issue the second operation command. That is, before the second operation command, it is necessary to keep all the events that have been issued before that and have not been executed yet in the executed state. Hereinafter, setting all events issued up to the present time to the executed state is referred to as “digesting events”.
[0046]
Hereinafter, processing of the digestion event in the wait mode will be described. FIG. 22 shows the procedure of event digestion. In FIG. 22, two clients are connected to one server. First, in step T2501, the client 1 issues a database operation command, and an operation event indicating the operation content is transmitted to the server. At this point, the operation result of the procedure T2501 is not reflected in the database of the client 1. In step T2502, the server receives the operation event 1, and transmits the operation event 1 to the client 1 and the client 2.
[0047]
On the other hand, in the client 1, the user instructs the issuance of the digestion event prior to the input of the operation command 2 affected by the operation execution result of the operation command 1. This operation is for ensuring that the operation command 2 is issued after the operation of the operation command 1 is performed. In response to this instruction, a “digestion event” is generated in step T2503, transmitted to the server, and the issuance of the operation command is stopped (the operation command issuance is stopped).
[0048]
In step T2504, the server receives the digestion event and transmits the digestion event to the client 1 and the client 2. At this time, the server treats the digestion event in the same manner as a normal operation event. That is, the received digestion event is transmitted to all the clients that have established a connection, including the transmission source.
[0049]
By the way, even if the client 1 attempts to issue the operation command 2 in the procedure T2505, the operation command 2 is not issued at this time because the operation command issuance has already been stopped in the procedure T2503. At this time, the operation command 2 is added to an operation command issuance queue (not shown) (the “operation command issuance queue” will be described later).
[0050]
The client 1 executes the operation immediately upon receiving the operation event 1 from the server. Upon receiving the digestion event transmitted from the server in step T2506, the client 1 refers to the client ID 801 (FIG. 8) in the digestion event data. As a result, when the received digestion event has been transmitted by the client 1, the suspension of the operation command issuance is released. When the suspension of the operation command issuance is canceled, the operation commands registered in the operation command issuance queue are sequentially issued with reference to the operation command issuance queue (step T2507). In the case of FIG. 22, the operation command 2 instructed in T2505 is issued, and the operation event 2 is transmitted to the server. In the procedure T2508, the client 2 receives the digestion event. However, since this digestion event is not transmitted by the client 2, it is discarded as it is.
[0051]
As described above, if a digestion event is issued (sent to the server) from the same client after issuing an operation command, after the digestion event is transmitted, the operation command is issued until the issued digestion event is received from the server. To stop. By doing so, it is possible to issue the next operation command after ensuring that the previous operation command has been executed.
[0052]
When the update mode is the immediate mode, the operation command is issued immediately after being issued, so that the event digestion procedure need not be performed.
[0053]
Further, when the update mode is the delay mode, after the operation command issuance is stopped in step T2503, if the timeout time is reached before the digestion event is received from the server, the operation command issuance suspension is released at that time, The registered event is issued by referring to the operation command issuance queue. If the operation has not been performed at this time, the operation is immediately performed as described above for the delay mode.
[0054]
Next, event synchronization will be described. By synchronizing events, the order of operation is guaranteed for all connected clients. There is a time lag from the issuance of the operation command of the operator client to the execution of the operation of the non-operator client. For example, when there are two first and second consecutive operations, the first operation command is issued by the client 1, the second operation command is issued by the client 2, and the first operation result satisfies a certain condition. Only the second operation is performed. Now, suppose that after the client 1 issues the first operation command, the second operation command is issued on the client 2 in a state where the first operation has not been executed. In this case, since the first operation is not reflected in the database of the client 2 at that time, the first operation result cannot be correctly referred to on the client 2 and the second operation may not be performed correctly. . As a result, the contents of the database differ between the clients, and there is a possibility that matching cannot be achieved.
[0055]
Assuming that the first operation has been executed in the client 1 and not executed in the client 2 at the time when the second operation command is issued on the client 2, the second operation is correctly executed in the client 1. However, the second operation is not executed correctly on the client 2. Therefore, the client 2 must wait until the first operation is performed on all the clients, and then issue the second operation command. That is, before the second operation command, it is necessary to digest all the events that have been issued by all the clients and have not been executed before that, and synchronize the events issued after that among all the clients. . In the present embodiment, this is realized by issuing and managing a synchronization event.
[0056]
FIG. 23 shows the procedure of event synchronization. In FIG. 23, two clients are connected to one server, client 1 performs operation 1, and client 2 performs operation 2 that is affected by the execution result of operation 1. It is assumed that the user knows in advance that the operation 2 performed by the client 2 is an operation affected by the operation 1 performed by the client 1. FIG. 23 shows a state in which the event issuance of the client 1 and the client 2 is synchronized.
[0057]
First, in step T2601, the client 1 issues a database operation command, and an event indicating the operation content is transmitted to the server. At this point, the operation result of the procedure T2601 is not reflected in the database of the client 1, and the operation is executed when the operation event 1 is received from the server 1 thereafter.
[0058]
In step T2602, the server receives the operation event 1, and transmits the operation event 1 to the client 1 and the client 2. Here, since the operation command 1 is accompanied by the operation command 2 affected by the operation result, the user of the client 1 performs an operation for issuing a synchronization event. By this operation, in a procedure T2603, "synchronous event 1" is generated and transmitted to the server. Then, the issuance of the operation command in the client 1 is stopped. The suspension of the issuance of the operation command is released when a synchronization event of the number of clients is received from the server.
[0059]
In step T2604, the server receives the synchronization event 1 transmitted by the client 1, and transmits the synchronization event 1 to the client 1 and the client 2. At this time, the server treats the synchronization event as a normal operation event. When the client 2 receives the operation event, it executes this.
[0060]
On the other hand, the user of the client 2 intends to issue the operation command 2 that is affected by the operation execution result of the operation command 1, and performs an operation of issuing a synchronization event to synchronize the system. In a procedure T2605 in FIG. 23, the synchronization event 2 is generated by this operation and transmitted to the server. The issuance of the operation command in the client 2 is stopped along with the issuance of the synchronization event. This ensures that the operation command 2 is issued after the operation command 1 has been executed by the previous client.
[0061]
When the client 1 receives the operation event 1 transmitted from the server, the corresponding operation is executed. In step T2606, the synchronization event 1 is received. At this point, since only one synchronization event has been transmitted by the client 1, transmission of the operation command is stopped.
[0062]
The client 2 also receives the synchronization event 1 in the procedure T2607. At this point, since only one synchronization event has been received so far, the suspension of issuing the operation command is continued. Therefore, even if the client 2 attempts to issue the operation command 2 in the procedure T2608, the operation command 2 is not issued at this time because the operation command issuance is stopped in the procedure T2605. At this time, the operation command 2 is added to an operation command issuance queue (not shown) in the client 2.
[0063]
In step T2609, the server receives the synchronization event 2 issued by the client 2, and transmits the synchronization event 2 to the client 1 and the client 2. In step 2610, the client 1 receives the synchronization event 2 transmitted from the server. At this point, a total of two synchronization events transmitted by the client 1 and the client 2 have been received, which is equal to the number of clients connected to the server, so that the suspension of issuing the operation command is released. When the suspension of the operation command issuance is canceled, the operation command issuance queue is referred to, and if there is an operation command registered in the operation command issuance queue, this is processed (issued).
[0064]
Similarly, in step T2611, the client 2 receives the synchronization event 2 transmitted from the server. Since two synchronization events have been received in the client 2, the suspension of issuing the operation command is released in the same manner as in the procedure T2610. Then, in step T2612, the client 2 refers to the operation command issuing queue and issues the operation command registered in the queue. In this case, the operation command 2 is issued, and the operation event 2 is transmitted to the server.
[0065]
As described above, in the synchronous event mode, all clients issue synchronous events, and each client receives synchronous events issued by each client for the number of clients (via the server). Each client stops issuing operation commands until reception of all synchronization events is completed. By doing so, when the reception of the synchronization event is completed, all the operation commands issued by all the clients so far are reliably consumed.
[0066]
Note that the synchronization event is issued by a user's operation instruction, and each client constantly counts the number of synchronization events received from the server. When the count value reaches a predetermined number (here, the number of clients that have established a connection with the server), the suspension of the issuance of the operation command is released, the count value is reset, and the count of the synchronization event is counted again. To start.
[0067]
However, when the update mode is the delay mode, if the time-out time has come without completing the reception of the synchronization event from all the clients, the suspension of the operation command issuance is released at that time.
[0068]
Further, it is not always necessary to synchronize all clients connected to the server, and a group of clients to be synchronized may be arbitrarily set. For example, when composing the data of the synchronization event, the client identification number of the client group to be synchronized is set in the operation content 806 (FIG. 8). When each client receives the synchronization event, the client ID number set in the operation content 806 is compared with the number described in the client ID 811 (FIG. 8B) of the synchronization event, and the operation content 806 is received. When the synchronization event has been received from the client with all the client identification numbers set in, the suspension of issuing the operation command is released. By doing so, it is possible to synchronize event issuance between arbitrary clients.
[0069]
Next, the operation command issuance queue will be described. The operation command issuance queue is a list of operation commands waiting to issue an event, and has the same configuration as the operation queue shown in FIG. That is, assuming that there are m operation commands in a standby state at a certain time, the operation command issuance queue has m pieces of information (queue items) related to the operation commands arranged in the order of command issuance as shown in FIG. The operation queue and the operation command issuance queue are a list of operation commands in which the former is waiting for the reception or execution of an event, while the latter is a list of operation commands in which the event is waiting to be issued. Although there is such a difference, since both are lists for storing operation commands, the operation command issuance queue can be realized with the same means and configuration as the operation queue.
[0070]
Next, the flow of the above-described processing for each of the client and the server will be described in detail.
[0071]
FIG. 11 shows the overall flow of the client process. When the client is started, a file describing the virtual space is read from the external storage device 306 (FIG. 3) in step S1101, and a scene graph database is constructed on the memory 302 (FIG. 3). It is assumed that the file to be loaded has the same contents between the clients in order to maintain the data consistency between the clients. Next, a network connection with the server is established (step S1102). At this time, a client ID for identifying each client is assigned from the server. The data exchange between the client and the server is performed by one-to-one socket communication using the TCP / IP protocol. Therefore, the server has at least as many socket communication paths as the number of clients.
[0072]
Subsequently, the process branches in step S1103, and an operation process for processing an operation command (step S1104) and a reception event process for processing an event received from the server (step S1106) are started. Although not shown in FIG. 11, a process of generating a CG image of the virtual space with reference to the scene graph database is also started. This process is the same as a known CG image generation method, and a detailed description thereof will be omitted. The operation process and the reception event process will be described later in detail. In the operation processing and the reception event processing, it is determined in step S1105 and step S1107 whether there is an instruction to end the process. If there is no instruction to end, the process returns to step S1104 and step S1106 to continuously process the operation instruction and the reception event. On the other hand, if there is a termination instruction, the processes are integrated in step S1108, the network connection with the server is disconnected (step S1109), and the contents of the database are saved as a file in the external storage device (306 in FIG. 3) (step S1110). ) And end all the processing.
[0073]
Here, the operation processing of step S1104 will be described in detail with reference to FIGS. 12A and 12B. First, the contents of the operation command are input in step S1201. In the present embodiment, when an operation instruction is input from a user other than when the operation instruction is not being issued, the process corresponding to the operation instruction is immediately executed. If the processing is performed, the processing is temporarily registered in the operation command issuance queue, and the process is executed after the suspension of the operation command issuance is released.
[0074]
FIG. 12B is a flowchart illustrating in detail a process corresponding to step S1201 in FIG. 12A. When an operation instruction is given while the operation instruction issuance is stopped, the operation is registered in the operation instruction issuance queue (steps S1220, S1221, and S1222). On the other hand, when the operation instruction is issued while the operation instruction is not being suspended, it is determined whether the operation instruction is an instruction to issue a digestion event or a synchronization event. If none of the digestion / synchronization events, the process proceeds to step S1202 (FIG. 12A). If the operation instruction is any of the digestion / synchronization events, the process advances to step S1226 to issue the corresponding event (digestion event or synchronization event as shown in FIG. 8B) and shift to the operation command issue suspension state. I do.
[0075]
If an operation instruction has not been issued in step S1223, the process advances to step S1224 to determine whether there is an unprocessed operation instruction in the operation instruction issuance queue. If there is an unprocessed operation instruction, the process advances to step S1225 to perform the same processing as described above. If there is no operation command issuance queue in step S1224, the process returns to step S1220 to repeat the above processing.
[0076]
Returning to FIG. 12A, in steps S1202 and S1203, the update mode is determined with reference to the database entry. In accordance with the update mode, the process ends after performing any one of the wait mode operation process in step S1206, the immediate mode operation process in step S1205, and the delay mode operation process in step S1204.
[0077]
Hereinafter, the operation processing (steps S1204, S1206) for each update mode will be described in detail with reference to FIGS.
[0078]
FIG. 13 shows the flow of the wait mode operation process. In the wait mode operation process, first, an operation event corresponding to the operation command is generated in step S1301, and the operation event is issued in step S1302.
[0079]
The flow of the immediate mode operation processing is as shown in FIG. First, in step S1401, the operation command input in step S1201 is executed. Specifically, the setting value of the designated entry of the database is changed. Next, similarly to the wait mode, an event is generated (step S1402), and the event is transmitted to the server (step S1403). In the last step S1404, the operation ID is set to the operation ID number determined in step S1201, the executed flag is set to ON, and the set operation queue items are added to the operation queue. At this time, since the timeout time is not used for the processing, it may be set arbitrarily (for example, 0).
[0080]
Next, the delay mode operation processing will be described with reference to FIG. First, an event is generated as in the wait mode (step S1501), and transmitted to the server (step S1502). Next, the operation queue item is set by setting the operation ID 1001 to the operation ID number determined in step S1201, the timeout time 1002 to a value obtained by adding a predetermined timeout period to the current time, and setting the executed flag to OFF (FIG. 9). Is added to the operation queue (step S1503). Finally, the timer process is started by passing data of the operation ID, the operation content, and the time-out time (step S1504). The timer process will be described later in detail.
[0081]
Subsequently, the reception event processing in step S1106 (FIG. 11) will be described in detail. FIG. 16A is a diagram showing the flow of the reception event process. The reception event is received by the event communication unit (not shown) from the server, and is input to the reception event buffer.
[0082]
In step S1601, a reception event buffer is searched. In a succeeding step S1602, it is determined whether or not an event has been input to the reception event buffer, and if there is a reception event, the process proceeds to step S1603. On the other hand, if it is determined that there is no reception event, the process ends.
[0083]
If there is a received event, the event data is analyzed and the contents of the operation command are extracted (step S1603). Next, in step S1611, it is determined whether the event is a digestion event or a synchronization event. If the event is a digestion event or a synchronization event, the process advances to step S1612 to perform a corresponding process. On the other hand, if the event is neither the digestion event nor the synchronization event, the update mode of the operation command is determined with reference to the event update mode ID 803 in steps S1604 and S1605. Then, according to the determined update mode, the processing ends after passing through any one of steps S1608 (in the case of the wait mode), step S1606 (in the case of the immediate mode), and step S1607 (in the case of the delay mode).
[0084]
Next, the digestion / synchronization event processing in step S1612 will be described. FIG. 16B is a flowchart illustrating the digestion / synchronization event processing. In step S1621, it is determined whether the event is a digestion event issued by itself. This can be determined by referring to the client ID 811 and the event type 812 shown in FIG. If it is the digestion event issued by itself, the flow advances to step S1622 to cancel the suspension of the operation command issuance.
[0085]
On the other hand, if it is not the digestion event issued by itself, it is determined in step S1623 whether the event is a synchronous event. If it is a synchronous event, the synchronous event is counted in step S1624, and it is determined whether or not the count value has reached a predetermined number (step S1625). If the number has reached the predetermined number, the flow advances to step S1627 to clear the count of the synchronization event and cancel the suspension of operation command issuance (step S1628). If the count value of the synchronization event is not the predetermined number, the process ends.
[0086]
Next, event processing in each update mode will be described. In step S1608, since the mode is the wait mode, the operation process corresponding to the operation event is immediately executed.
[0087]
The immediate mode event processing in step S1606 will be described with reference to FIG.
[0088]
FIG. 17 shows the flow of the immediate mode event process. First, an operation queue is searched in step S1701, and it is determined in step S1702 whether an operation queue item corresponding to the received event exists in the operation queue. Specifically, if the client ID of the received event matches the ID of the client on which the process is operating, and the operation ID of the received event matches the operation ID of the operation queue item, the operation command of the operation queue item is issued. And the operation command of the reception event are determined to correspond. In the immediate mode, if a corresponding queue item exists, it has been executed when the operation was generated by the client. Therefore, the operation is not executed here, the operation queue entry is deleted in step S1703, and the process ends. On the other hand, if it is determined in step S1702 that there is no corresponding queue item, the operation has not been executed yet because the operation was generated by a client other than the client. Therefore, the operation is executed in step S1704, and the process ends.
[0089]
The flow of the delay mode event process in step S1607 is as shown in FIGS. 18A and 18B.
[0090]
First, an operation queue is searched in step S1801, and it is determined in step S1802 whether an operation queue item corresponding to the received event exists in the operation queue. Details of the processing in step S1802 are the same as those in step S1702. Here, when the corresponding operation queue item does not exist, it is understood that the operation event is issued from another client. In this case, the operation has not been executed yet because it was generated by a client other than the client. Therefore, the process proceeds to step S1804, and the operation is executed. The processing in step S1804 will be described later with reference to FIG. 18B.
[0091]
On the other hand, if an operation queue item corresponding to the operation queue exists in step S1802 in FIG. 18A, it is an operation event issued by itself. In this case, the process proceeds to step S1803, and the executed flag of the operation queue item is checked. If the executed flag is ON, the timeout event has passed, and the operation event has been executed by the timer process (described later). Therefore, the operation is not performed here, and the operation queue entry is deleted in step S1805.
[0092]
FIG. 18B is a flowchart for explaining a difference process of executing a command mode operation event issued from another client. First, in step S1820, the operation event is executed. Then, in a step S1821, it is determined whether or not the user himself / herself is currently stopping issuing the operation command. If the issuance of the operation command is not stopped, the process ends.
[0093]
If the operation command is not being issued, the process advances to step S1822 to determine whether a timeout has occurred. Here, the determination of the timeout can be made by referring to the timeout time 804 included in the operation event. If not, the process returns to step S1821. If the count value of the synchronization event has reached the predetermined number before the timeout occurs, the process ends from step S1821 as it is. On the other hand, if the timeout occurs before the count value of the synchronization event reaches the predetermined number, the process proceeds from step S1822 to step S1823, and the suspension of the operation command issuance is released.
[0094]
On the other hand, if it is determined in step S1803 that the executed flag is OFF, the operation has not been executed since the timeout time has not yet been reached. Therefore, the operation is immediately executed in step S1806, and the item is deleted from the operation queue in step S1805.
[0095]
Next, the timer process started in step S1504 of FIG. 15 will be described in detail with reference to FIG. This is a process for coping with a case where the timeout time has been reached in the delay mode.
[0096]
First, an operation queue is searched in step S1901, and it is determined in step S1902 whether an operation queue item corresponding to the operation specified when the timer process was started exists. Specifically, if the operation ID, which is an argument at the time of starting this process, matches the operation ID of the operation queue item, it is determined that the operation command of the operation queue item and the operation command specified by the argument correspond to each other. . When the corresponding queue item exists, it means that the reception event corresponding to the operation command has not been processed, that is, has not been executed. In this case, the process proceeds to a process for checking whether or not the timeout time has been reached. That is, the current time is referred to in step S1903, and the order of the current time is determined (step S1904). If the time-out time has passed, the operation is executed in step S1905, and the executed flag of the corresponding operation queue item is set to ON. Further, the suspension of the operation command issuance is released.
[0097]
On the other hand, if the time has not reached the timeout time, the process returns to step S1901. If it is determined in step S1902 that the corresponding operation queue item does not exist, it means that the reception event corresponding to the operation command has been processed, that is, the operation has been executed. In this case, since there is no need to execute an operation or change the operation queue, the process ends.
[0098]
The flow of the client-side process has been described above. Subsequently, the flow of the server-side process will be described in detail with reference to FIG.
[0099]
First, in step S2001, a connection request from a client is received and communication is established. At this time, a client ID is notified to each client that has established communication. Next, the reception event buffer is searched (step S2002), and it is determined whether a reception event exists (step S2003). If there is a reception event, the process proceeds to step S2004; otherwise, the process proceeds to step S2005. In step S2004, the event (operation event, digestion event, synchronization event) is transmitted to each connected client. In step S2005, it is determined whether or not to end the server process in response to a command from the user or the like. If the server process is to be ended, the process proceeds to step S2006; otherwise, the process returns to step S2002. In step S2006, each connected client is notified of the end of the processing, and then the connection with the client is ended (step S2007), and the processing ends.
[0100]
Next, the configuration of the database description file read by the client in the present embodiment will be described.
[0101]
FIG. 21 schematically shows a file format of data having N entries. The attribute of each entry is described in a field surrounded by a start delimiter and an end delimiter. In FIG. 24, the start delimiters of the first, second, and Nth entries are indicated by 2401, 2406, and 2409, respectively. On the other hand, the respective end delimiters are 2405, 2408, and 2411. The attribute of the entry is described as a set of an identifier for identifying each attribute and an attribute value, such as 2402 to 2404. The update mode (including the digestion / synchronization event mode) and the timeout period are specified for each entry in a file in the above format. However, when the update mode of the entry is not the delay mode, the timeout time need not be described. In both update modes, it is not always necessary to describe both attributes. If there is no description, the system determines in advance when a scene graph database is constructed on the memory (302 in FIG. 3) (step S1101). Is set to the specified default value.
[0102]
In the database description file described above, the update mode to be selected is described. On the other hand, one or more update modes that cannot be selected can be set.
[0103]
In the above description, the data communication between the server and the client is performed using a one-to-one TCP / IP socket. However, events may be exchanged by broadcast or multicast, and the communication protocol is TCP / IP. Not exclusively.
[0104]
In addition, although Ethernet (registered trademark) is used as a communication medium, another information transmission medium such as USB or Firewire may be used. Further, the form of the network is not limited to the LAN, but may be a connection via a WAN or a combination of the LAN and the WAN.
[0105]
The number of servers does not need to be limited to one for one shared database system, and a plurality of servers may exist. In this case, the mode of assigning the process to each server is arbitrary. For example, a different server may be used for each client, or a server may be provided for each entry in the database.
[0106]
Furthermore, the assignment of processes to terminals is not limited to one process per terminal, and a plurality of processes can be operated on one terminal. In that case, the combination of the process types is arbitrary, and the system operates with any combination of only the client, only the server, and the client and the server. The processes on the same terminal may exchange data via a shared memory instead of the network.
[0107]
Further, the event is distributed to each terminal through the server, but the terminal that has performed the data operation may directly transmit the event to another terminal.
[0108]
Further, in the above description, the three-dimensional virtual space data is shared, but it goes without saying that the contents of the database are not limited to this and are arbitrary. Further, it goes without saying that the method described in the above embodiment can be applied not only when the entire database is shared but also when only a part of the database is shared.
[0109]
As described above, according to the present embodiment, each of the plurality of processes holds shared data (database) shared by a plurality of processes (client processes) communicably connected via the information transmission medium. An information processing method for maintaining the identity of shared data held by each process in a system to be used is disclosed. In particular, when an operation request for the shared data occurs, request information (event) representing the operation request is output on the information transmission medium, and response information (event) to the request information is received from the information transmission medium. Perform an operation on the shared data according to the received response information. According to such a wait mode, the operation on the shared data is performed according to the event received via the information transmission medium, so that the update timing of the shared data can be matched with high accuracy.
[0110]
In the delay mode, if a predetermined time has elapsed from the generation of the operation request before receiving the response information, the operation of the shared data based on the operation request without waiting for the reception of the response information is performed by the timer processing. Be executed. For this reason, it is possible to achieve both responsiveness in the process in which the operation has occurred and matching of the synchronization timing between the plurality of processes.
[0111]
Further, according to the present embodiment, a queue item is registered in an operation queue in response to an operation request, and queue control is performed to set a corresponding queue item to a processed state when an operation on shared data is performed in an operation execution step. When the item corresponding to the operation request represented by the response information has not been processed in the operation queue, the operation corresponding to the response information is executed on the shared data. In the delay mode as described above, duplication of operation execution can be prevented with a simple configuration.
[0112]
Further, according to the present embodiment, the first mode (wait mode) in which the operation of the shared data is executed after waiting for the response information to be received in the receiving step, the elapse of a predetermined time from the generation of the operation request, It is possible to operate in any of a plurality of change modes including a second mode (delay mode) in which the operation of the shared data is performed at the earlier timing of receiving the response information.
[0113]
The shared data is composed of a plurality of items (FIG. 21), and each of the plurality of items includes designation information for designating a change mode to be adopted. The change mode is selected according to the specified information, and the operation on the shared data is executed. That is, the change mode is switched for each of a plurality of items. According to this configuration, an appropriate change mode can be set for each item.
[0114]
According to the present embodiment, when the same client issues two or more consecutive operation commands, after issuing the previous operation command, the operation command issued later refers to the execution result of the previous operation command. Even in such a situation, it is possible to appropriately execute all operations and reflect the operations in the database.
[0115]
Further, according to the present embodiment, when issuing a continuous operation command among a plurality of clients, after issuing the previous operation command on a certain client, a client different from the client that issued the previous operation command is issued. Even if the operation command issued later refers to the execution result of the previous operation command, all operations should be executed properly on all clients and properly reflected in the database of all clients Is possible.
[0116]
Further, in a server process, in a system in which each of the plurality of processes holds and uses shared data shared by a plurality of processes connected via the information transmission medium, the same shared data held by each process is used. In order to maintain the reliability, a connection with a plurality of client processes is established, and an event related to a change of shared data is received from the plurality of client processes. Then, the received event is issued to the plurality of client processes.
[0117]
It is to be noted that an object of the present invention is to provide a storage medium storing a program code of software for realizing the functions of the above-described embodiments to a system or an apparatus, and a computer (or CPU or MPU) of the system or apparatus to store the storage medium. It is needless to say that the present invention is also achieved by reading and executing the program code stored in
[0118]
In this case, the program code itself read from the storage medium realizes the function of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.
[0119]
As a storage medium for supplying the program code, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, and the like can be used.
[0120]
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also an OS (Operating System) running on the computer based on the instruction of the program code. It goes without saying that a part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing.
[0121]
Further, after the program code read from the storage medium is written into a memory provided on a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that a CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.
[0122]
【The invention's effect】
As described above, according to the present invention, for an operation performed on shared data shared by a plurality of processes, a previously issued operation command is executed, and then a subsequent operation command is issued. This provides a mechanism for ensuring that the operation command is issued, and removes restrictions on the timing of issuing operation commands.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an entire database sharing system according to a first embodiment.
FIG. 2 is a diagram showing a basic method of transmitting information between processes according to the first embodiment.
FIG. 3 is a block diagram illustrating a hardware configuration of the terminal device according to the first embodiment.
FIG. 4 is a diagram showing a database update procedure in a wait mode.
FIG. 5 is a diagram showing a procedure for updating a database in an immediate mode.
FIG. 6 is a diagram illustrating a database update procedure in a delay mode (when no timeout occurs).
FIG. 7 is a diagram showing a procedure for updating a database in a delay mode (at the time of timeout).
FIG. 8 is a diagram illustrating a data configuration example of event data.
FIG. 9 is a diagram illustrating an example of a data configuration of an operation queue.
FIG. 10 is a diagram illustrating a data configuration example of an operation queue item.
FIG. 11 is a flowchart of a client process according to the first embodiment.
FIG. 12A is a flowchart showing operation processing in a client process.
FIG. 12B is a flowchart illustrating the operation input processing of FIG. 12A.
FIG. 13 is a flowchart illustrating a wait mode operation process of FIG. 12A.
FIG. 14 is a flowchart illustrating an immediate mode operation process of FIG. 12A.
FIG. 15 is a flowchart illustrating a delay mode operation process of FIG. 12A.
FIG. 16A is a flowchart showing a reception event process in the client process of FIG. 11;
FIG. 16B is a flowchart showing the digestion / synchronization event processing of FIG. 16A.
FIG. 17 is a flowchart of an immediate mode reception event process of FIG. 16A.
FIG. 18A is a flowchart of a delay mode reception event process of FIG. 16A.
FIG. 18B is a flowchart of an operation execution process in step S1804 of FIG. 18A.
FIG. 19 is a flowchart illustrating a timer process.
FIG. 20 is a flowchart illustrating a server process according to the embodiment.
FIG. 21 is a diagram showing a description file format of a database.
FIG. 22 is a diagram illustrating a procedure for digesting an event.
FIG. 23 is a diagram for explaining an event synchronization procedure.

Claims (10)

情報伝達媒体を介して通信可能な複数のプロセスによって共有される共有データを該複数のプロセスの各々が保持して利用するシステムにおいて、各プロセスが保持する共有データの同一性を維持するための情報処理方法であって、
前記共有データに対する操作要求が発生した場合に、該操作要求を表す操作イベントを前記情報伝達媒体上に発行する第1発行工程と、
所定のユーザ操作に応じて発行禁止イベントを発行する第2発行工程と、
前記第1発行工程によって発行された操作イベントに応答する応答操作イベントを外部より受信し、前記共有データへの操作を実行する操作実行工程と、
前記第2発行工程による発行禁止イベントの発行後、該発行禁止イベントに対応したイベントを受信するまで、前記第1及び第2発行工程によるイベントの発行を禁止する禁止工程とを備えることを特徴とする情報処理方法。
In a system in which each of a plurality of processes holds and uses shared data shared by a plurality of processes communicable via an information transmission medium, information for maintaining the identity of the shared data held by each process Processing method,
A first issuing step of, when an operation request for the shared data is issued, issuing an operation event representing the operation request on the information transmission medium;
A second issuing step of issuing an issue prohibition event in response to a predetermined user operation;
An operation execution step of receiving a response operation event in response to the operation event issued by the first issuance step from outside, and executing an operation on the shared data;
And a prohibition step of prohibiting the issuance of the event by the first and second issuance steps after the issuance of the issuance prohibition event in the second issuance step and until an event corresponding to the issuance prohibition event is received. Information processing method.
前記第2発行工程は、操作禁止イベントとして消化イベントを発行し、
前記禁止工程は、前記消化イベントの発行から該消化イベントに応答するイベントを受信するまでの間、前記第1及び第2発行工程によるイベントの発行を禁止することを特徴とする請求項1に記載の情報処理方法。
The second issuance step issues a digestion event as an operation prohibition event,
The method according to claim 1, wherein the prohibition step prohibits the issuance of the event by the first and second issuance steps from issuance of the digestion event to reception of an event responsive to the digestion event. Information processing method.
前記第2発行工程は、操作禁止イベントとして同期イベントを発行し、
前記禁止工程は、自身の発行した同期イベントと他のクライアントより発行された同期イベントに対応するイベントの受信状態に基づいてイベントの発行禁止を解除することを特徴とする請求項1に記載の情報処理方法。
The second issuing step issues a synchronization event as an operation prohibition event,
2. The information according to claim 1, wherein the prohibition step releases the prohibition of the issuance of the event based on a reception state of the synchronization event issued by the client itself and an event corresponding to the synchronization event issued by another client. Processing method.
前記禁止工程は、受信された同期イベントの数が所定数に達した場合にイベントの発行禁止を解除することを特徴とする請求項3に記載の情報処理方法。4. The information processing method according to claim 3, wherein the prohibition step releases the event prohibition when the number of received synchronous events reaches a predetermined number. 前記同期イベントの数を設定する設定工程を更に備えることを特徴とする請求項4に記載の情報処理方法。The information processing method according to claim 4, further comprising a setting step of setting the number of the synchronization events. 前記操作イベントは制限時間を有し、前記操作実行工程は、該操作イベントが未実行のまま前記制限時間を経過した場合には該操作イベントに対応する操作を実行し、前記禁止工程はこれに応じて禁止状態を解除することを特徴とする請求項1乃至5のいずれかに記載の情報処理方法。The operation event has a time limit, and the operation execution step executes an operation corresponding to the operation event when the operation event has not been executed and the time limit has elapsed. The information processing method according to claim 1, wherein the prohibition state is released in response to the request. 前記禁止工程によって操作イベントの発行が禁止されている間に操作要求が発生した場合、該操作要求をキューに保持する保持工程と、
前記第1及び第2発行工程は、前記禁止工程による禁止が解除された場合に、前記キューに保持されている操作要求に対応した操作イベントもしくは操作禁止イベントを前記情報伝送媒体に発行することを特徴とする請求項1乃至6のいずれかに記載の情報処理方法。
When an operation request occurs while the issuance of the operation event is prohibited by the prohibition step, a holding step of holding the operation request in a queue;
The first and second issuance steps include issuing an operation event or an operation inhibition event corresponding to the operation request held in the queue to the information transmission medium when the inhibition by the inhibition step is released. The information processing method according to claim 1, wherein:
情報伝達媒体を介して通信可能な複数のプロセスによって共有される共有データを該複数のプロセスの各々が保持して利用するシステムにおいて、各プロセスが保持する共有データの同一性を維持するための情報処理装置であって、
前記共有データに対する操作要求が発生した場合に、該操作要求を表す操作イベントを前記情報伝達媒体上に発行する第1発行手段と、
所定のユーザ操作に応じて発行禁止イベントを発行する第2発行手段と、
前記第1発行手段によって発行された操作イベントに応答する応答操作イベントを外部より受信し、前記共有データへの操作を実行する操作実行手段と、
前記第2発行手段による発行禁止イベントの発行後、該発行禁止イベントに対応したイベントを受信するまで、前記第1及び第2発行手段によるイベントの発行を禁止する禁止手段とを備えることを特徴とする情報処理装置。
In a system in which each of a plurality of processes holds and uses shared data shared by a plurality of processes communicable via an information transmission medium, information for maintaining the identity of the shared data held by each process A processing device,
A first issuing unit that issues an operation event indicating the operation request on the information transmission medium when an operation request for the shared data occurs;
Second issuing means for issuing an issue prohibition event in response to a predetermined user operation;
Operation execution means for receiving, from the outside, a response operation event in response to the operation event issued by the first issuing means, and executing an operation on the shared data;
Prohibiting means for prohibiting issuance of an event by the first and second issuance means after issuance of an issuance prohibition event by the second issuance means until an event corresponding to the issuance prohibition event is received. Information processing device.
請求項1乃至7のいずれかに記載の情報処理方法をコンピュータに実行させるための制御プログラム。A control program for causing a computer to execute the information processing method according to claim 1. 請求項1乃至7のいずれかに記載の情報処理方法をコンピュータに実行させるための制御プログラムを格納した記憶媒体。A storage medium storing a control program for causing a computer to execute the information processing method according to claim 1.
JP2003053901A 2003-02-28 2003-02-28 Information processing method and device Withdrawn JP2004265063A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2003053901A JP2004265063A (en) 2003-02-28 2003-02-28 Information processing method and device
PCT/JP2004/002218 WO2004077298A1 (en) 2003-02-28 2004-02-25 Information processing method and apparatus
US10/546,168 US7516204B2 (en) 2003-02-28 2004-02-25 Information processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003053901A JP2004265063A (en) 2003-02-28 2003-02-28 Information processing method and device

Publications (1)

Publication Number Publication Date
JP2004265063A true JP2004265063A (en) 2004-09-24

Family

ID=33118383

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003053901A Withdrawn JP2004265063A (en) 2003-02-28 2003-02-28 Information processing method and device

Country Status (1)

Country Link
JP (1) JP2004265063A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006202228A (en) * 2005-01-24 2006-08-03 Nec Corp Web content synchronization system, terminal thereof, and web content synchronization method
WO2010005073A1 (en) * 2008-07-11 2010-01-14 シャープ株式会社 Communication terminal, control method, and control program
JP2010176336A (en) * 2009-01-28 2010-08-12 Internatl Business Mach Corp <Ibm> Client program, terminal, method, server system, and server program
US9350790B2 (en) 2010-02-04 2016-05-24 International Business Machines Corporation Utilization of target browsers
US9678814B2 (en) 2011-10-04 2017-06-13 International Business Machines Corporation Implementing a java method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006202228A (en) * 2005-01-24 2006-08-03 Nec Corp Web content synchronization system, terminal thereof, and web content synchronization method
JP4622539B2 (en) * 2005-01-24 2011-02-02 日本電気株式会社 WEB content synchronization system and terminal
WO2010005073A1 (en) * 2008-07-11 2010-01-14 シャープ株式会社 Communication terminal, control method, and control program
JP2010021851A (en) * 2008-07-11 2010-01-28 Sharp Corp Communication terminal, control method, and control program
JP2010176336A (en) * 2009-01-28 2010-08-12 Internatl Business Mach Corp <Ibm> Client program, terminal, method, server system, and server program
US9350790B2 (en) 2010-02-04 2016-05-24 International Business Machines Corporation Utilization of target browsers
US9678814B2 (en) 2011-10-04 2017-06-13 International Business Machines Corporation Implementing a java method
US9973563B2 (en) 2011-10-04 2018-05-15 International Business Machines Corporation Implementing a java method

Similar Documents

Publication Publication Date Title
CN109739929B (en) Data synchronization method, device and system
US9569169B2 (en) Using a plurality of buffers to provide audio for synchronized playback to multiple audio devices having separate device clocks
JP3779263B2 (en) Conflict resolution for collaborative work systems
US10007734B2 (en) Real time document presentation data synchronization through generic service
EP2378718B1 (en) Method, node and system for controlling version in distributed system
US20040139157A1 (en) System and method for distributed multimodal collaboration using a tuple-space
KR101746284B1 (en) Method and system for extending function of message in communication session
JP2002517814A (en) System and method for coupling local and remote windows into one desktop environment
CN111147943B (en) Multimedia light linkage playing method and device, computer equipment and storage medium
JP5596793B2 (en) Computer system
CN109919691A (en) A kind of system of data processing, method and device
JP4227399B2 (en) Information processing method and apparatus
US20220121352A1 (en) Access control for online presentations
JP2004265063A (en) Information processing method and device
CN110089120B (en) System and method for synchronized playback of media items on multiple remote devices
US10091288B2 (en) Ordered execution of tasks
US7636916B2 (en) Self-optimizing workload distribution among virtual storage controllers
US10776392B2 (en) Apparatus and method to establish a connection between apparatuses while synchronization of connection information thereof is suspended
WO2004077298A1 (en) Information processing method and apparatus
US20060167954A1 (en) Information processing method, information processing apparatus, method of controlling server apparatus, and server apparatus
JP4144864B2 (en) Information processing method and apparatus
Zhou et al. An analysis of update ordering in distributed replication systems
CN111970268B (en) Method and device for showing spectator and fighting data and computer readable storage medium
CN108564406A (en) A kind of method and apparatus of excitation push
CN108289226B (en) Method, server and system for showing digital movie video data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060221

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20080110