JP2004199349A - Communication system and method, information management device and method, information processor and method and program - Google Patents
Communication system and method, information management device and method, information processor and method and program Download PDFInfo
- Publication number
- JP2004199349A JP2004199349A JP2002366519A JP2002366519A JP2004199349A JP 2004199349 A JP2004199349 A JP 2004199349A JP 2002366519 A JP2002366519 A JP 2002366519A JP 2002366519 A JP2002366519 A JP 2002366519A JP 2004199349 A JP2004199349 A JP 2004199349A
- Authority
- JP
- Japan
- Prior art keywords
- node
- message
- information processing
- communication group
- group
- 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.)
- Granted
Links
Images
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、通信システムおよび方法、情報管理装置および方法、情報処理装置および方法、並びにプログラムに関し、ネットワークの動的な変化に、より好適に対応できるようにする通信システムおよび方法、情報管理装置および方法、情報処理装置および方法、並びにプログラムに関する。
【0002】
【従来の技術】
近年、IEEE(Institute of Electrical and Electronics Engineers)802.11bに準拠した無線LAN(Local Area Network)やBluetooth(登録商標)に代表される各種の無線通信技術に対応した機器が急速に普及しつつある。
【0003】
また、そのような無線通信により実現されるネットワークにおいて、固定のサーバが設けられていない場合であっても、集合した複数の端末のうちの1台がサーバとなり、他の端末との間でサーバ・クライアントモデルのアプリケーションを実行する技術が各種提案されている。
【0004】
この場合、サーバから提供されるサービスをクライアントが利用し続けるためには、例えば、サーバ機能を提供していた端末が、他の端末に対して何の予告もなくネットワークから離脱した場合に対応するための技術が必要となる。
【0005】
そこで、そのような技術として、例えば、下記特許文献1には、全てのクライアントにおいて、サーバ候補である端末の情報が記述されたリストを管理し、サーバ機能を提供していた端末がネットワークから離脱した場合であっても、他のクライアントがサーバ機能を引き継ぐことができる技術が開示されている。
【0006】
【特許文献1】
特開2000−215177号公報
【0007】
【発明が解決しようとする課題】
しかしながら、例えば、特許文献1に開示されている技術によっては、複数の端末が同時に通信不可能な状態になった場合(サーバが通信不可能な状態になると同時に、サーバを引き継ぐ端末も通信不可能な状態になった場合)に、サーバの引き継ぎをスムーズに行うことが困難であるという課題があった。
【0008】
この課題は、ネットワークのユビキタス化が進み、容易に、かつ、任意のタイミングで、様々な機器と通信を行うことができるようになるにつれ、さらに顕著なものになるおそれがある。例えば、そのような環境においては、それぞれの端末のユーザは、自分自身の端末が通信可能な状態か、不可能な状態かを意識することなく、移動しながら好みの場所で通信を行おうとすることが予想され、その結果、複数の端末が同時に通信不可能になるなど、ネットワークの構成が頻繁に変化することになる。
【0009】
本発明はこのような状況に鑑みてなされたものであり、ネットワークの動的な変化に、より好適に対応できるようにするものである。
【0010】
【課題を解決するための手段】
本発明の通信システムの情報管理装置は、通信グループに参加する情報処理装置のリストを含む第1のメッセージを、所定の周期で情報処理装置に対して送信する第1の送信手段と、通信グループの管理を終了するとき、通信グループに参加する情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信手段と、第2の送信手段により第2のメッセージが送信されることに応じて、情報処理装置から送信されてくる、通信グループにおける情報処理装置の優先順位を含む第3のメッセージを受信する第1の受信手段と、第1の受信手段により受信された第3のメッセージに含まれる優先順位に基づいて、通信グループを新たに管理する情報管理装置となる情報処理装置を選択する選択手段とを備え、第1の送信手段は、選択手段により選択された情報処理装置により、新たに管理される通信グループに参加する情報処理装置のリストを含む第1のメッセージを送信することを特徴とする。
【0011】
また、本発明の通信システムの情報処理装置は、第1のメッセージを受信する第2の受信手段と、情報管理装置から、第2のメッセージが送信されてきたとき、第3のメッセージを送信する第3の送信手段と、第3の送信手段により送信された第3のメッセージに含まれる優先順位に基づいて、自分自身が、通信グループを新たに管理する情報管理装置として現在の情報管理装置により選択されたことが第1のメッセージのリストにより表されているとき、通信グループを管理する管理手段とを備えることを特徴とする。
【0012】
本発明の通信システムの通信方法は、通信グループに参加する情報処理装置のリストを含む第1のメッセージを、所定の周期で情報処理装置に対して送信する第1の送信ステップと、通信グループの管理を終了するとき、通信グループに参加する情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信ステップと、第2の送信ステップの処理により第2のメッセージが送信されることに応じて、情報処理装置から送信されてくる、通信グループにおける情報処理装置の優先順位を含む第3のメッセージを受信する第1の受信ステップと、第1の受信ステップの処理により受信された第3のメッセージに含まれる優先順位に基づいて、通信グループを新たに管理する情報管理装置となる情報処理装置を選択する選択ステップとを含み、選択ステップの処理により選択された情報処理装置により、新たに管理される通信グループに参加する情報処理装置のリストを含む第1のメッセージが、第1の送信ステップの処理により送信されることを特徴とする。
【0013】
また、本発明の通信システムの通信方法は、第1のメッセージを受信する第2の受信ステップと、情報管理装置から、第2のメッセージが送信されてきたとき、第3のメッセージを送信する第3の送信ステップと、第3の送信ステップの処理により送信された第3のメッセージに含まれる優先順位に基づいて、自分自身が、通信グループを新たに管理する情報管理装置として現在の情報管理装置により選択されたことが第1のメッセージのリストにより表されているとき、通信グループを管理する管理ステップとを含むことを特徴とする。
【0014】
本発明の情報管理装置は、通信グループに参加する情報処理装置のリストを含む第1のメッセージを、所定の周期で情報処理装置に対して送信する第1の送信手段と、通信グループの管理を終了するとき、通信グループに参加する情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信手段と、第2の送信手段により第2のメッセージが送信されることに応じて、情報処理装置から送信されてくる、通信グループにおける情報処理装置の優先順位を含む第3のメッセージを受信する受信手段と、受信手段により受信された第3のメッセージに含まれる優先順位に基づいて、通信グループを新たに管理する情報管理装置となる情報処理装置を選択する選択手段とを備え、第1の送信手段が、選択手段により選択された情報処理装置により、新たに管理される通信グループに参加する情報処理装置のリストを含む第1のメッセージを送信することを特徴とする。
【0015】
受信手段は、通信グループに参加する全ての情報処理装置から送信されてくる第3のメッセージを受信し、選択手段は、第3のメッセージに含まれる優先順位に基づいて、通信グループに参加する全ての情報処理装置の中から、通信グループを新たに管理する情報管理装置となる情報処理装置を選択するようにすることができる。
【0016】
優先順位は、情報処理装置において生成された所定の乱数に基づいて決定されるようにすることができる。
【0017】
また、優先順位は、情報処理装置の属性に応じて、所定の範囲の順位が決定されるようにすることができる。
【0018】
本発明の情報管理装置の情報管理方法は、通信グループに参加する情報処理装置のリストを含む第1のメッセージを、所定の周期で情報処理装置に対して送信する第1の送信ステップと、通信グループの管理を終了するとき、通信グループに参加する情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信ステップと、第2の送信ステップの処理により第2のメッセージが送信されることに応じて、情報処理装置から送信されてくる、通信グループにおける情報処理装置の優先順位を含む第3のメッセージを受信する受信ステップと、受信ステップの処理により受信された第3のメッセージに含まれる優先順位に基づいて、通信グループを新たに管理する情報管理装置となる情報処理装置を選択する選択ステップとを含み、選択ステップの処理により選択された情報処理装置により、新たに管理される通信グループに参加する情報処理装置のリストを含む第1のメッセージが、第1の送信ステップの処理により送信されることを特徴とする。
【0019】
本発明の第1のプログラムは、通信グループに参加する情報処理装置のリストを含む第1のメッセージを、所定の周期で情報処理装置に対して送信する第1の送信ステップと、通信グループの管理を終了するとき、通信グループに参加する情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信ステップと、第2の送信ステップの処理により第2のメッセージが送信されることに応じて、情報処理装置から送信されてくる、通信グループにおける情報処理装置の優先順位を含む第3のメッセージを受信する受信ステップと、受信ステップの処理により受信された第3のメッセージに含まれる優先順位に基づいて、通信グループを新たに管理する情報管理装置となる情報処理装置を選択する選択ステップとを含み、選択ステップの処理により選択された情報処理装置により、新たに管理される通信グループに参加する情報処理装置のリストを含む第1のメッセージが、第1の送信ステップの処理により送信されることを特徴とする。
【0020】
本発明の第1の情報処理装置は、情報管理装置により所定の周期で送信される、通信グループに参加する情報処理装置のリストを含む第1のメッセージを受信する受信手段と、情報管理装置から、通信グループの管理を終了することを通知する第2のメッセージが送信されてきたとき、通信グループにおける自分自身の優先順位を含む第3のメッセージを送信する送信手段と、送信手段により送信された第3のメッセージに含まれる優先順位に基づいて、自分自身が、通信グループを新たに管理する情報管理装置として現在の情報管理装置により選択されたことが第1のメッセージのリストにより表されているとき、通信グループを管理する管理手段とを備えることを特徴とする。
【0021】
所定の乱数を生成する生成手段をさらに備えるようにすることができる。このとき、優先順位は、生成手段により生成された乱数に基づいて決定される。
【0022】
優先順位は、情報処理装置の属性に応じて、所定の範囲の順位が決定されるようにすることができる。
【0023】
本発明の第1の情報処理装置の情報処理方法は、情報管理装置により所定の周期で送信される、通信グループに参加する情報処理装置のリストを含む第1のメッセージを受信する受信ステップと、情報管理装置から、通信グループの管理を終了することを通知する第2のメッセージが送信されてきたとき、通信グループにおける自分自身の優先順位を含む第3のメッセージを送信する送信ステップと、送信ステップの処理により送信された第3のメッセージに含まれる優先順位に基づいて、自分自身が、通信グループを新たに管理する情報管理装置として現在の情報管理装置により選択されたことが第1のメッセージのリストにより表されているとき、通信グループを管理する管理ステップとを含むことを特徴とする。
【0024】
本発明の第2のプログラムは、情報管理装置により所定の周期で送信される、通信グループに参加する情報処理装置のリストを含む第1のメッセージを受信する受信ステップと、情報管理装置から、通信グループの管理を終了することを通知する第2のメッセージが送信されてきたとき、通信グループにおける自分自身の優先順位を含む第3のメッセージを送信する送信ステップと、送信ステップの処理により送信された第3のメッセージに含まれる優先順位に基づいて、自分自身が、通信グループを新たに管理する情報管理装置として現在の情報管理装置により選択されたことが第1のメッセージのリストにより表されているとき、通信グループを管理する管理ステップとを含むことを特徴とする。
【0025】
本発明の第2の情報処理装置は、情報管理装置により通信グループの管理が終了されたことを検出する検出手段と、検出手段により、情報管理装置が通信グループの管理を終了したことが検出されたとき、通信グループにおける自分自身の第1の優先順位を含むメッセージを、通信グループに参加する他の情報処理装置に送信する送信手段と、他の情報処理装置から送信されてくる、他の情報処理装置の、通信グループにおける第2の優先順位が含まれる他のメッセージを受信する受信手段と、第1の優先順位が、受信手段により受信された他のメッセージに含まれる第2の優先順位よりも高いとき、通信グループを新たに管理する管理手段とを備えることを特徴とする。
【0026】
本発明の第2の情報処理装置の情報処理方法は、情報管理装置により通信グループの管理が終了されたことを検出する検出ステップと、検出ステップの処理により、情報管理装置が通信グループの管理を終了したことが検出されたとき、通信グループにおける自分自身の第1の優先順位を含むメッセージを、通信グループに参加する他の情報処理装置に送信する送信ステップと、他の情報処理装置から送信されてくる、他の情報処理装置の、通信グループにおける第2の優先順位が含まれる他のメッセージを受信する受信ステップと、第1の優先順位が、受信ステップの処理により受信された他のメッセージに含まれる第2の優先順位よりも高いとき、通信グループを新たに管理する管理ステップとを含むことを特徴とする。
【0027】
本発明の第3のプログラムは、情報管理装置により通信グループの管理が終了されたことを検出する検出ステップと、検出ステップの処理により、情報管理装置が通信グループの管理を終了したことが検出されたとき、通信グループにおける自分自身の第1の優先順位を含むメッセージを、通信グループに参加する他の情報処理装置に送信する送信ステップと、他の情報処理装置から送信されてくる、他の情報処理装置の、通信グループにおける第2の優先順位が含まれる他のメッセージを受信する受信ステップと、第1の優先順位が、受信ステップの処理により受信された他のメッセージに含まれる第2の優先順位よりも高いとき、通信グループを新たに管理する管理ステップとを含むことを特徴とする。
【0028】
本発明の通信システムおよび方法においては、通信グループに参加する情報処理装置のリストを含む第1のメッセージが、所定の周期で情報処理装置に対して送信され、通信グループの管理を終了するとき、通信グループに参加する情報処理装置に対して、その旨を通知する第2のメッセージが送信される。また、第2のメッセージが送信されることに応じて、情報処理装置から送信されてくる、通信グループにおける情報処理装置の優先順位を含む第3のメッセージが受信され、受信された第3のメッセージに含まれる優先順位に基づいて、通信グループを新たに管理する情報管理装置となる情報処理装置が選択される。そして、選択された情報処理装置により、新たに管理される通信グループに参加する情報処理装置のリストを含む第1のメッセージが送信される。
【0029】
また、本発明の通信システムおよび方法においては、第1のメッセージが受信され、情報管理装置から、第2のメッセージが送信されてきたとき、第3のメッセージが送信される。第3のメッセージに含まれる優先順位に基づいて、自分自身が、通信グループを新たに管理する情報管理装置として現在の情報管理装置により選択されたことが第1のメッセージのリストにより表されているとき、通信グループが管理される。
【0030】
本発明の第1の情報処理装置および方法、並びにプログラムにおいては、情報管理装置により所定の周期で送信される、通信グループに参加する情報処理装置のリストを含む第1のメッセージが受信され、情報管理装置から、通信グループの管理を終了することを通知する第2のメッセージが送信されてきたとき、通信グループにおける自分自身の優先順位を含む第3のメッセージが送信される。また、送信された第3のメッセージに含まれる優先順位に基づいて、自分自身が、通信グループを新たに管理する情報管理装置として現在の情報管理装置により選択されたことが第1のメッセージのリストにより表されているとき、通信グループが管理される。
【0031】
本発明の第2の情報処理装置および方法、並びにプログラムにおいては、情報管理装置により通信グループの管理が終了されたことが検出され、情報管理装置が通信グループの管理を終了したことが検出されたとき、通信グループにおける自分自身の第1の優先順位を含むメッセージが、通信グループに参加する他の情報処理装置に送信される。また、他の情報処理装置から送信されてくる、他の情報処理装置の、通信グループにおける第2の優先順位が含まれる他のメッセージが受信され、第1の優先順位が、他のメッセージに含まれる第2の優先順位よりも高いとき、通信グループが新たに管理される。
【0032】
【発明の実施の形態】
図1は、本発明を適用した通信システムの構成例を示す図である。
【0033】
ネットワーク4は、IEEE(Institute of Electrical and Electronics Engineers)802.11bに準拠した無線LAN(Local Area Network)やBluetooth(登録商標)のPAN(Personal Area Network)プロファイルなどにより実現される無線ネットワーク、或いは、有線のネットワークであり、このネットワーク4を介して、各種の機器の間で通信が行われる。
【0034】
図1の例においては、ネットワーク4には、パーソナルコンピュータやPDA(Personal Digital Assistants)などよりなるノード1乃至ノード3が接続されている。
【0035】
ノード1乃至ノード3のそれぞれは、例えば、ネットワーク4に接続された他のノードに対して所定のサービスを提供する「サーバ」と、サーバが提供するサービスを利用する「クライアント」の両方の機能を有する。以下、適宜、サーバの機能を実現する、後述する「正式サーバ」の状態を有するノード(情報管理装置)を単にサーバと称し、クライアントの機能を実現するノード(情報処理装置)を単にクライアントと称する。
【0036】
所定のサーバと、そのサーバにより提供されるサービスを利用するクライアントにより「グループ」が構成される。所定のノードがグループに所属し、サーバにより提供されるサービスが利用可能になったとき、そのノードは、「グループ」に参加した状態となる。
【0037】
図1の例においては、ノード1乃至ノード3によりグループが構成され、ノード1がサーバとして提供する所定のサービスを、クライアントとしてのノード2、およびノード3が利用している。
【0038】
なお、サーバは、サーバ機能と同時に、クライアントの機能を実現することも可能である。また、図1においては、ノード1乃至ノード3の3つのノードが図示されているが、これ以外にも、さらに多数のノードがネットワーク4に適宜接続される。
【0039】
図2は、図1のノード1の構成例を示すブロック図である。
【0040】
ノード1は、例えば、演算処理部11と通信部12から構成される。
【0041】
演算処理部11は、例えば、パーソナルコンピュータのCPU(Central Processing Unit)などにより構成され、通信部12は、IEEE802.11a,802.11bに準拠した無線通信機能を備えるLANインタフェースボードなどにより構成される。
【0042】
通信部12は、ネットワーク4に接続され、演算処理部11の制御に基づいて、それぞれのノードとの間でIPマルチキャストの通信を行う。通信部12により取得された、他のノードから送信されてきたデータは、演算処理部11に出力される。
【0043】
なお、図2は、ノード1を実現するための最小限の構成について図示したものであり、ノード1は、例えば、図3に示されるように、マウスやキーボードなどよりなる入力部、および、ディスプレイやスピーカなどよりなる出力部などを含む、ユーザインタフェース部13を備えるようにすることもできる。
【0044】
図4は、図2のノード1の機能構成例を示すブロック図である。図4の各機能部は、図2の演算処理部11により所定のプログラムが実行されて実現される。
【0045】
通信機能部21は、図2の通信部12を制御し、ネットワーク4上に存在する他のノードと通信する機能を有する。通信機能部21により、グループ管理機能部22、サーバ機能部23、クライアント機能部24に対して通信機能が提供される。
【0046】
具体的には、通信機能部21は、グループ管理機能部22、サーバ機能部23、クライアント機能部24に対して、「ノードID」と称される識別子により指定されたノードに任意のメッセージを送信する機能、および、所定のノードから送信されてきたメッセージを受信する機能を提供する。
【0047】
通信機能部21からは、例えば、他のノードに対して所定のメッセージがマルチキャスト送信される。ここで、マルチキャスト送信とは、同一のサービスに参加している、または、参加しようとしているコンピュータ(ノード)全てに、同一のメッセージを送信することをいう。
【0048】
グループ管理機能部22は、同一のネットワーク(例えば、ネットワーク4)に接続された、他のノードと各種のメッセージを交換することにより、グループを形成し、維持する機能を有する。グループ管理機能部22は、例えば、メッセージ管理部22A、状態管理部22B、および、リスト管理部22Cを有している。
【0049】
グループ管理機能部22のメッセージ管理部22Aは、メッセージの生成、および、メッセージの送受信を管理する。
【0050】
グループ管理機能部22の状態管理部22Bは、ノード1が参加しているグループにおける自分自身の状態を管理する。グループ管理機能部22により管理される状態には、例えば、「初期状態」、「サーバ候補A」、「サーバ候補B」、「正式サーバ」、「未参加」、「参加」、「離脱」の7つの状態があり、そのときの状況に応じて、状態の遷移が行われる。
【0051】
例えば、グループ管理機能部22の状態管理部22Bは、「サーバ機能」を提供するノードがネットワーク4上に存在しない場合、自分自身の状態を「正式サーバ」に遷移させ、ネットワーク4に接続されている他のノードに「サーバ機能」を提供する。
【0052】
グループ管理機能部22のリスト管理部22Cは、グループに参加している「ノード」をリストで管理する。このリストの先頭に示されるノードが「サーバ」であり、それ以外のノードがクライアントである。
【0053】
リストは、全てのノードにより管理され、サーバにより常にアップデートされる。すなわち、最新のリストが、サーバからクライアントに対して所定の周期で配布され、それぞれのクライアントが有するリストが更新される。
【0054】
サーバ機能部23は、通信機能部21と協働し、1つ、または複数のクライアントと通信を行い、サーバ・クライアント型の所定のサービスを提供する機能を有する。サーバ機能部23は、例えば、コンピュータソフトウェアにより実現される。
【0055】
サーバ機能部23は、例えば、演算処理部11によりサービスの利用が開始されたときに起動し、クライアントからのメッセージと内部状態に基づいて、所定の演算を行い、演算結果を内部状態に反映させるとともに、結果の全部または一部を、クライアントに返すなどの処理を行う。
【0056】
例えば、クライアント機能部24は、通信機能部21と協働し、所定のノードにより実現されるサーバと通信を行い、サーバにより提供されるサーバ・クライアント型のサービスを受ける機能、および、サーバからのサービスを受け、適宜、ユーザインタフェースを介して、ユーザからの操作を受け付けたり、ユーザに所定の情報を提示するなどの機能を有する。
【0057】
なお、ノード2、およびノード3は、ノード1と同様の構成を有している。図2乃至図4に示されるノード1の構成は、必要に応じて、ノード2、およびノード3の構成としても引用される。
【0058】
図5は、グループ管理機能部22の状態管理部22Bにより管理される状態遷移の例を示す図である。
【0059】
初期状態(State1)は、グループに参加しようとするノードの状態を表す。初期状態のノードは、既に存在するグループのサーバから送信されるグループ告知メッセージを所定期間内に受信することができなかった場合、自分自身の状態をサーバ候補A(State2)に遷移させる。
【0060】
後述するように、グループに存在するサーバからは、グループ告知メッセージが所定周期でマルチキャスト送信されている。従って、所定の時間経過したにも関わらず、グループ告知メッセージが送信されてこない場合、それは、参加しようとしているグループに、サーバが存在しない可能性があることを表している。
【0061】
サーバ候補A(State2)は、サーバが存在しない可能性があるときに遷移される状態である。サーバ候補Aのノードは、自分自身のサーバ候補としての順位を含むサーバ候補告知メッセージを他のノードに送信する。
【0062】
サーバ候補Aのノードは、サーバ候補告知メッセージを送信してから所定の時間経過した場合、或いは、自分自身が、他のサーバ候補(サーバ候補Aまたはサーバ候補B)のノードよりも高い優先順位が設定されているノードであると判断した場合、その状態を、正式サーバ(State4)に遷移させる。
【0063】
一方、他のサーバ候補のノードから送信されてくるサーバ候補告知メッセージにより、自分自身よりも高い優先順位を有するノードが他に存在すると判定した場合、または、サーバから送信されるグループ告知メッセージを受信した場合、サーバ候補Aのノードは、その状態を未参加(State3)に遷移させる。
【0064】
初期状態(State1)のノードは、初期状態となってから所定の時間内にグループ告知メッセージを受信した場合、或いは、サーバ候補Aまたはサーバ候補Bのノードから送信されるサーバ候補告知メッセージを受信した場合、その状態を未参加(State3)に遷移させる。
【0065】
未参加(State3)は、未だグループに参加していない状態を表す。未参加のノードは、グループ内に存在するサーバに対してノード参加要求メッセージを送信し、それに応じて、サーバからノード参加承認メッセージが返信されてきた場合、または、サーバにより送信されるグループ告知メッセージに格納されるノードリストに、自分自身のノードが存在する場合、その状態を参加(State5)に遷移させる。
【0066】
参加(State5)は、クライアントとしてグループに参加している状態を表す。参加のノードは、最後にグループ告知メッセージを受信してから所定の時間以上、サーバからグループ告知メッセージが送信されてきていないと判定した場合、または、サーバがグループから離脱したと判定した場合、その状態をサーバ候補B(State6)に遷移させる。
【0067】
サーバ候補B(State6)は、参加状態のクライアントが必要に応じて遷移する状態である。サーバ候補Bのノードは、サーバから送信されるグループ告知メッセージを受信した場合、または、自分自身より、サーバ候補としての優先順位が高いノードが存在することを表すサーバ候補告知メッセージを受信した場合、その状態を参加(State5)に遷移させる。
【0068】
また、サーバ候補Bのノードは、サーバ候補告知メッセージを送信してから所定の時間経過した場合、或いは、グループ内に存在するサーバから送信されてきた、自分自身宛のサーバ移動通知メッセージを受信した場合、その状態を正式サーバ(State4)に遷移させる。
【0069】
正式サーバ(State4)は、サーバとしてグループを管理するノードが遷移する状態である。正式サーバのノードは、後述するサーバ離脱のシーケンスによりグループから離脱した場合、および、参加(State5)のノードが、ノード離脱のシーケンスによりグループから離脱した場合、その状態を、離脱(State7)に遷移させる。
【0070】
離脱(State7)は、グループから離脱した状態を表す。離脱状態のノードは、その後、自分自身の状態を、適宜、未参加(State3)などの状態に遷移される。
【0071】
以上のようにして、それぞれのノードの状態が遷移される。なお、上述した各メッセージの詳細については後述する。
【0072】
図6および図7は、ノードリストの例を示す図である。
【0073】
上述したように、グループに参加する各ノード(クライアント)は、サーバから送信されるグループ告知メッセージに基づいて、最新の、かつ、同一のノードリストを管理する。そして、例えば、グループのサーバが離脱した場合、ノードリストにより表される各ノードの優先順位に基づいて、次にサーバとして機能するノードが決定される。
【0074】
図6は、優先順位を数値により表したものである。この例においては、最も低い数値が割り当てられているノードが、優先順位が最も高いノードであることを表している。
【0075】
図6の例においては、数値「0」が割り当てられているノードAが、最も優先順位が高いノードであり、サーバである。また、図6の例においては、数値「1」が割り当てられているノードD、数値「2」が割り当てられているノードC、数値「3」が割り当てられているノードB、数値「4」が割り当てられているノードEの順に、優先順位が設定されている。
【0076】
図6に示されるノードリストが、ノードA乃至ノードEのノードIDを有する各ノードにより管理される。
【0077】
図7は、メモリのアドレスに応じて、優先順位が決定されるノードリストの例を示す図である。
【0078】
図7の例においては、メモリの領域31に記述されているノードAが、最も優先順位が高いノードであり、サーバである。また、図7の例においては、領域32にIDが記述されているノードD、領域33にIDが記述されているノードC、領域34にIDが記述されているノードB、領域35にIDが記述されているノードEの順に優先順位が設定されている。
【0079】
各ノードにおいては、例えば、図8乃至図10に示されるような階層構造によりノードリストが管理される。
【0080】
図8は、ノードAにより管理されるグループ管理テーブル41の例を示す図である。
【0081】
グループ管理テーブル41により、ノードAが把握しているグループの数、および、個別グループ管理テーブルの参照先が管理される。個別グループ管理テーブルには、それぞれのグループに関する情報が記述される。
【0082】
図8のグループ管理テーブル41には、ノードAが把握しているグループの数が3つであることが記述されている。また、グループAの個別グループ管理テーブル(グループA管理テーブル)の参照先(参照1)、グループBの個別グループ管理テーブル(グループB管理テーブル)の参照先(参照2)、および、グループCの個別グループ管理テーブル(グループC管理テーブル)の参照先(参照3)が記述されている。
【0083】
図9は、グループAの個別グループ管理テーブル51の例を示す図である。
【0084】
個別グループ管理テーブル51は、図8のグループ管理テーブル41に参照先として記述されている「参照1」に基づいて取得される。
【0085】
個別グループ管理テーブル51には、このテーブルにより情報が管理されるグループのグループID、グループAにおける、ノードA(自ノード)の状態、および、グループAに属するノードのノードリストの参照先が記述されている。
【0086】
図9の例においては、グループIDは「グループA」であり、ノードAの状態は「3」であり、ノードリスト管理テーブル(ノードリストとノードの数を表すテーブル)の参照先は「参照1」である。
【0087】
ノードの状態は、数値により表される。例えば、「初期状態」は「0」で表され、「サーバ候補A」は「1」で表され、「未参加」は「2」で表される。また、「正式サーバ」は「3」で表され、「参加」は「4」で表され、「サーバ候補B」は「5」で表され、「離脱」は「6」で表される。すなわち、この場合、図9の個別グループ管理テーブル51を有するノードAの状態は正式サーバである。
【0088】
図10は、グループAに属するノードのノードリスト61の例を示す図である。
【0089】
ノードリスト61は、図9の個別グループ管理テーブル51により参照先として管理される「参照1」に基づいて取得される。
【0090】
図10の例においては、グループAに属するノードの数は「4」である。また、ノードID「1」により表される「ノードA」が優先順位1位のノードとされ、サーバである。さらに、ノードID「2」により表される「ノードB」が優先順位2位のノードであり、ノードID「3」により表される「ノードC」が優先順位3位のノードであり、ノードID「4」により表される「ノードD」が優先順位4位のノードである。
【0091】
以上のような階層構造を有するテーブル情報、およびノードリストが各ノードにおいて管理される。
【0092】
図11は、各ノード間で送受信されるメッセージのフォーマットの例を示す図である。
【0093】
領域71には、メッセージの送信先を表すIDが記述される。領域71には、例えば、送信先が特定のノードである場合、そのノードの固有のノードIDが記述され、送信先がサーバである場合、送信先がサーバであることを表す、予め規定された所定のIDが記述される。また、送信先が同一のグループに属する全てのノードである場合、そのことを表す、予め規定された所定のIDが記述される。
【0094】
上述したように、メッセージは、ネットワーク4上にマルチキャスト送信される。
【0095】
ネットワーク4にマルチキャスト送信されたメッセージを受信したノードの通信機能部21は、自分自身のノードのノードIDと、領域71に記述されるIDを比較し、送信されてきたメッセージが自分自身に対して送信されてきたものであるのか否かを判断する。例えば、通信機能部21は、領域71に記述されるノードIDと、自分自身のノードIDが一致する場合、自分自身がサーバであり、領域71に、メッセージの送信先がサーバであることを表す所定のIDが記述されている場合、または、領域71に、メッセージの送信先が全てのノードであることを表す所定のIDが記述されている場合、受信したメッセージをグループ管理機能部24に出力する。
【0096】
領域72には、メッセージの送信元を表すIDが記述される。領域72には、例えば、メッセージを送信するノードのノードID、または、メッセージの送信元がサーバであることを表す予め規定されたIDなどが記述される。
【0097】
領域73には、送信されるメッセージの種別(コマンド)が記述され、領域74には、ノードリストなどを含む、所定の送信データが記述される。
【0098】
図12は、図11の領域73に記述されるコマンドと、コードの対応例を示す図である。
【0099】
送信されるメッセージがグループ告知メッセージである場合、例えば、その領域73には「0x00」が記述され、サーバ候補告知メッセージである場合、「0x01」が記述され、サーバ離脱要求メッセージである場合、「0x02」が記述され、サーバ移動通知メッセージである場合、「0x03」が記述される。
【0100】
また、送信されるメッセージがノード参加要求メッセージである場合、その領域73には「0x04」が記述され、ノード参加承認メッセージである場合、「0x05」が記述され、ノード離脱要求メッセージである場合、「0x06」が記述され、ノード離脱承認メッセージである場合、「0x07」が記述される。
【0101】
さらに、送信されるメッセージがノード参加拒否メッセージである場合、その領域73には「0x08」が記述され、サーバからクライアントに対するデータ送信メッセージである場合、「0x09」が記述され、クライアントからサーバに対するデータ送信メッセージである場合、「0x0A」が記述される。
【0102】
なお、メッセージのフォーマットは、図11に示されるものに限られない。
【0103】
次に、図1の通信システムの動作について説明する。
【0104】
始めに、図13のシーケンスを参照して、正式サーバであるノード1から、クライアントであるノード2、およびノード3に対してグループ告知メッセージが送信される処理について説明する。
【0105】
なお、以下においては、ノード1乃至ノード3を、それぞれノードA乃至ノードCとも称する。
【0106】
ステップS1において、ノードA(ノード1)のグループ管理機能部22のメッセージ管理部22Aは、通信機能部21を制御し、ノードB、およびノードCに対して、グループ告知メッセージをマルチキャスト送信する。上述したように、グループ告知メッセージには、同一のグループに属するノードのリストが含まれる。
【0107】
図14は、ステップS1において送信されるグループ告知メッセージの例を示す図である。図11と対応する部分には同一の符号が付されている。
【0108】
領域71には、送信先が、グループに属する全てのノードであることを表す「ALL」(メッセージの送信先が全てのノードであることを表す所定のID)が記述され、領域72には、メッセージの送信元のノードを表す「ノードA」(メッセージの送信元がノードAであることを表す所定のID)が記述され、領域73には、このメッセージがグループ告知メッセージであることを表すコマンド(例えば、「0x00」)が記述されている。
【0109】
領域74には、送信データとして、記述されるノードリストが「グループG」に属するノードに関するものであることを表す情報と、ノードリストが記述されている。図14の例においては、「グループG」に属するノードの数は「3」であり、「ノードA」、「ノードB」、「ノードC」の順序に、優先順位が設定されていることが記述されている。
【0110】
図13の説明に戻り、このような各種の情報を含むグループ告知メッセージが、サーバであるノードAから送信される。
【0111】
ノードAから送信されたグループ告知メッセージは、ステップS11においてノードBにより受信され、ステップS21においてノードCにより受信される。
【0112】
グループ告知メッセージは、所定の周期でサーバから送信される。すなわち、ステップS1の処理が行われてから所定時間経過後のステップS2、および、ステップS2の処理が行われてから所定時間経過後のステップS3において、それぞれ、ノードAから、ノードB、およびノードCに対してグループ告知メッセージが送信される。
【0113】
ノードBは、ノードAから送信されてきたグループ告知メッセージをステップS12およびS13において受信し、ノードCは、ステップS22およびS23において受信する。
【0114】
グループ告知メッセージを受信したノードB、およびノードC(クライアント)は、必要に応じて、受信したメッセージに含まれるノードリストに基づいて、自分自身が管理するノードリストを更新する。
【0115】
以上の処理がノードA乃至ノードCにより繰り返し実行される。
【0116】
このように、最新のグループ構成を表すノードリストが、所定の周期でサーバにより配布されるため、それぞれのクライアントは、常に最新のノードリストを有することになる。
【0117】
次に、図15のフローチャートを参照して、グループ告知メッセージを送信するノードAの処理について説明する。図15に示される処理は、基本的には、図13を参照して説明したノードAの処理と同様である。
【0118】
ステップS31において、ノードAのグループ管理機能部22のメッセージ管理部22Aは、直前にグループ告知メッセージを送信してから、所定の時間が経過したか否かを判定し、所定の時間が経過したと判定するまで待機する。
【0119】
メッセージ管理部22Aは、ステップS31において、所定の時間が経過したと判定した場合、ステップS32に進み、通信機能部21を制御し、現在のノードリストを含むグループ告知メッセージを送信する。送信されるノードリストは、リスト管理部22Cにより管理されているものである。
【0120】
その後、ステップS31に戻り、以上の処理が繰り返し実行される。
【0121】
次に、図16のフローチャートを参照して、図15の処理に対応してノードBにより実行される処理について説明する。すなわち、図16に示される処理は、基本的には、図13を参照して説明したノードBの処理と同様である。
【0122】
ステップS41において、ノードBのクライアント機能部24のメッセージ管理部22Aは、通信機能部21を制御し、サーバであるノードAから所定周期で送信されてくるグループ告知メッセージを受信する。受信されたメッセージに含まれるノードリストはリスト管理部22Cに出力される。
【0123】
ステップS42において、リスト管理部22Cは、自分自身が管理しているノードリストと、グループ告知メッセージにより送信されてきたノードリストを比較し、管理するノードリストの更新が必要であるか否かを判定する。
【0124】
リスト管理部22Cは、ステップS42において、ノードリストの更新が必要でないと判定した場合、ステップS41に戻り、以上の処理を繰り返し実行する。
【0125】
一方、ステップS42において、グループ告知メッセージにより送信されてきたノードリストにより、自分自身が管理するノードリストを更新する必要があると判定した場合、ステップS43に進み、リスト管理部22Cは、ノードリストを更新する。
【0126】
例えば、クライアント機能部24は、ノードリストに付されているタイムスタンプを参照し、自分自身が管理しているノードリストよりも、送信されてきたノードリストの方が新しいと判定した場合、ノードリストの更新を行う。
【0127】
以上の処理により、最新のノードリストがクライアントにより管理される。なお、以上の処理は、クライアントであるノードCにおいても実行される。
【0128】
次に、図17のフローチャートを参照して、ネットワーク4に接続し、グループにおける動作を開始するノードC(初期状態のノード)の処理について説明する。
【0129】
ノードCのグループ管理機能部22の状態管理部22Bは、ネットワーク4に接続されたとき、ノードCの状態を初期状態(図5のState1)とする。また、状態管理部22Bは、ネットワーク4上においてマルチキャスト送信されるメッセージを所定の期間だけ受信し、ステップS51において、受信されたメッセージの中にグループ告知メッセージがあるか否かを判定する。
【0130】
上述したように、グループに存在するサーバから、グループ告知メッセージが所定の周期でマルチキャスト送信される。従って、所定期間内にノードCがグループ告知メッセージを受信した場合、それは、ネットワーク4上に、グループを管理するサーバが既に存在することを表し、反対に、受信できない場合、ネットワーク4上にサーバが存在しない可能性があることを表している。
【0131】
ステップS51において、状態管理部22Bは、グループ告知メッセージが所定期間内に送信されてきたと判定した場合、自らを「サーバでない」と認識し、ステップS52に進み、グループ参加処理を実行する。
【0132】
このとき、ノードCの状態は、未参加(図5のState3)の状態である。ステップS52で実行されるグループ参加処理については、図18のシーケンス等を参照して後述する。
【0133】
ステップS52の処理により、クライアントしてノードCが正式にグループに参加できた場合、ステップS53において、ノードCは、クライアントとして、グループ告知メッセージの受信処理を行う。すなわち、ノードCにより、図16を参照して説明した処理が実行される。その後、グループ開始処理が終了される。
【0134】
一方、ステップS51において、所定期間内にグループ告知メッセージが送信されてきていないと判定した場合、状態管理部22Bは、ステップS54に進み、自分自身の状態をサーバ候補A(図5のState2)とし、サーバ調停処理を実行する。ステップS54で実行されるサーバ調停処理については、図26のシーケンス等を参照して後述する。
【0135】
ステップS55において、状態管理部22Bは、サーバ調停処理の結果、自分自身が正式サーバになれたか否かを判定する。
【0136】
サーバ調停処理において、ノードCに設定されているサーバ候補としての優先順位が最も高い場合、ノードCがサーバとして決定され、ノードCよりも優先順位が高いサーバ候補が存在する場合、他のノード(ノードC以外のノード)がサーバとして決定される。
【0137】
状態管理部22Bは、ステップS55において、正式サーバになれなかったと判定した場合、ステップS52に進み、グループ参加処理を実行し、反対に、正式サーバになれたと判定した場合、ステップS56に進み、正式サーバとして、グループ管理処理、すなわち、グループ告知メッセージの送信処理を開始する。
【0138】
ステップS56においては、正式サーバであるノードCにより、図15を参照して説明したグループ告知メッセージの送信処理が実行される。
【0139】
次に、図18のシーケンスを参照して、図17のステップS52において実行されるグループ参加処理について説明する。
【0140】
ステップS91において、ノードCのメッセージ管理部22Aは、状態管理部22Bからのトリガ(例えば、未参加の状態であることの通知)に応じて、通信機能部21を制御し、ノード参加要求メッセージをサーバに対して送信(マルチキャスト送信)する。
【0141】
このメッセージには、送信先を指定する情報として、サーバ(ノードA)に送信することを表すIDが記述される。従って、マルチキャスト送信により、ノード参加要求メッセージがノードBに対しても送信されるが、メッセージの領域71に記述されるIDに基づいて、ノードBの通信機能部21により破棄される。
【0142】
ノードCにより送信されたノード参加要求メッセージは、ステップS71において、正式サーバであるノードAにより受信される。
【0143】
ステップS72において、ノードAのメッセージ管理部22Aは、ノード参加承認メッセージをノードCに対して返信し、ステップS73に進み、ノードリストを更新する。すなわち、ノードCに関する情報(優先順位等)がリスト管理部22Cによりノードリストに追加される。
【0144】
ノードAから送信されたノード参加承認メッセージは、ステップS92において、ノードCにより受信される。なお、ノード参加承認メッセージには、送信先としてノードCが指定されているため、マルチキャスト送信されたノード参加承認メッセージはノードBには取得されない。
【0145】
ステップS74において、ノードAのメッセージ管理部22Aは、更新したノードリストを含むグループ告知メッセージをマルチキャスト送信する。送信されたグループ告知メッセージは、ステップS81においてノードBにより受信され、ステップS93においてノードCにより受信される。
【0146】
これにより、ノードCが、ノードAにより管理されるグループにクライアントとして参加した状態となる。
【0147】
図19乃至図23は、メッセージの例を示す図である。
【0148】
図19は、図18の処理によりノードCがグループに参加する前に、ノードAからノードBに対して送信されるグループ告知メッセージの例を示す図である。
【0149】
すなわち、領域71には、送信先として「ALL」が記述され、領域72には、送信元として「ノードA」が記述され、領域73には、このメッセージがグループ告知メッセージであることを表すコマンド(例えば、「0x00」(図12))が記述される。また、領域74には、ノードAが管理するグループのグループ名「グループG」と、そのグループに属するノードの数「2」、および、「ノードA」、「ノードB」の順に、優先順位が設定されているノードリストが記述される。
【0150】
すなわち、図19に示されるグループ告知メッセージのノードリストには、ノードCの情報がまだ含まれていない。
【0151】
図20は、図18のステップS91において、ノードCからノードAに対して送信されるノード参加要求メッセージの例を示す図である。
【0152】
図に示されるように、メッセージの送信先として「ノードA」が領域71に記述され、メッセージの送信元として「ノードC」が領域72に記述される。また、領域73には、このメッセージがノード参加要求メッセージであることを表すコマンド(例えば、「0x04」(図12))が記述され、領域74には、送信データとして、ノードCが参加を希望するグループ名「グループG」と、自分自身の名前が記述される。
【0153】
図21は、図18のステップS72において、ノードAからノードCに対して送信されるノード参加承認メッセージの例を示す図である。
【0154】
図に示されるように、メッセージの送信先として「ノードC」が領域71に記述され、メッセージの送信元として「ノードA」が領域72に記述される。また、領域73には、このメッセージがノード参加承認メッセージであることを表すコマンド(例えば、「0x05」(図12))が記述され、領域74には、送信データとして、グループ名「グループG」と、ノードCの名前が記述される。
【0155】
図22は、図18のステップS74において、ノードAから、ノードB、およびノードCに対して送信されるグループ告知メッセージの例を示す図である。
【0156】
図に示されるように、メッセージの送信先として「ALL」が領域71に記述され、メッセージの送信元として「ノードA」が領域72に記述される。また、領域73には、このメッセージがグループ告知メッセージであることを表すコマンドが記述され、領域74には、ノードAが管理するグループのグループ名「グループG」と、そのグループに属するノードの数「3」、および、「ノードA」、「ノードB」、「ノードC」の順に、優先順位が設定されているノードリストが記述される。
【0157】
すなわち、ノードCがグループに参加した後に送信される図22のグループ告知メッセージには、図19のグループ告知メッセージと比較して、ノードCに関する情報がノードリストに追加されている。
【0158】
図23は、ノードCの参加が拒否された場合に、ノードAからノードCに送信されるノード参加拒否メッセージの例を示す図である。
【0159】
図に示されるように、メッセージの送信先として「ノードC」が領域71に記述され、メッセージの送信元として「ノードA」が領域72に記述される。また、領域73には、このメッセージがノード参加拒否メッセージであることを表すコマンド(例えば、「0x08」(図12))が記述され、領域74には、送信データとして、ノードCが参加を希望していたグループ名「グループG」と、ノードCの名前が記述される。
【0160】
以上のようなメッセージが、図18を参照して説明した処理、および、その前後において送受信される。
【0161】
次に、図24のフローチャートを参照して、グループへの参加を要求するノードCの処理について説明する。
【0162】
図24に示される処理は、基本的には、図18を参照して説明したノードCの処理と同様である。
【0163】
すなわち、ステップS101において、ノードCのグループ管理機能部22のメッセージ管理部22Aは、通信機能部21を制御し、ノード参加要求メッセージをノードAに対して送信する。例えば、図20のメッセージがメッセージ管理部22Aにより生成され、送信される。
【0164】
ノードCにより送信されたノード参加要求メッセージは、ノードAにより受信され、ノードCの参加を承認するか否かが判定される(図25のステップS113)。ノードCのグループへの参加が承認された場合、ノードAからノードCに対して、ノード参加承認メッセージが送信される(図25のステップS116)。
【0165】
ステップS102において、ノードCのメッセージ管理部22Aは、ノードAからノード参加承認メッセージが送信されてきたか否かを判定し、例えば、参加拒否メッセージが送信されてきた場合、ノード参加承認メッセージが送信されてこないと判定し、ステップS103に進み、エラー処理を実行する。
【0166】
例えば、ノードAにより管理されるノードの数やノードの属性(機器の種類)などに制限があり、ノードCが参加できない場合、ノードAからノードCに対してノード参加拒否メッセージが送信される。
【0167】
ステップS103において、グループ管理機能部22は、エラー処理として、グループに参加できなかったことをユーザに提示したり、或いは、再度、グループ参加要求メッセージを送信するなどの処理を実行する。その後、処理は終了される。
【0168】
このとき、ノードCの状態は、未参加(図5のState3)のままである。
【0169】
一方、ステップS102において、ノードAから、ノード参加承認メッセージが送信されてきたと判定した場合、メッセージ管理部22Aは、ステップS104に進み、それを受信する。
【0170】
ノードCは、ステップS105において、受信されるグループ告知メッセージに含まれるノードリストを取得し、クライアントとして、ノードAが管理するグループに参加する。すなわち、メッセージ管理部22Aからの指示に応じて、状態管理部22Bにより、ノードCの状態が未参加から参加(図5のState5)に遷移されるとともに、リスト管理部22Cにより、ノードリストが管理される。
【0171】
次に、図25のフローチャートを参照して、図24の処理に対応してノードAにより実行される処理について説明する。
【0172】
図25に示される処理は、基本的には、図18を参照して説明したノードAの処理と同様である。
【0173】
ステップS111において、ノードAのメッセージ管理部22Aは、ノード参加要求メッセージがノードCから送信されてきたか否かを判定し、送信されてきたと判定するまで待機する。
【0174】
メッセージ管理部22Aは、ステップS111において、ノード参加要求メッセージが送信されてきたと判定した場合、ステップS112に進み、それを受信する。ノードCから送信されてくるノード参加要求メッセージには、メッセージの送信先として、ノードA(サーバ)が記述されている。
【0175】
ステップS113において、メッセージ管理部22Aは、ノードCの参加を承認するか否かを判定し、承認しないと判定した場合、ステップS114に進み、図23に示されるノード参加拒否メッセージをノードCに対して送信する。
【0176】
メッセージ管理部22Aは、ステップS113において、グループへの参加を承認すると判定した場合、ステップS115に進み、リスト管理部22Cを制御し、グループ内でのノードCの優先順位をノードリストに追加し、更新する。
【0177】
ステップS116において、メッセージ管理部22Aは、例えば、図21に示されるノード参加承認メッセージをノードCに対して送信する。
【0178】
その後、図15を参照して説明したグループ告知メッセージの送信処理がノードAにより実行され、ステップS115で更新されたノードリストがノードB、およびノードCに配布される。
【0179】
以上の処理が繰り返し実行され、複数のノードが参加するグループが形成される。
【0180】
以上においては、参加が承認されたノードCに対して、ノード参加承認メッセージが送信されるとしたが、ノード参加承認メッセージを送信することに代えて、ノードCに関する情報が追加されたノードリストを含むグループ告知メッセージが送信されるようにしてもよい。ノードCに関する情報が追加されたノードリストを含むグループ告知メッセージを受信し、その内容を確認することによっても、ノードCは、自分自身がグループへの参加が承認されたことを把握することができる。
【0181】
次に、図26のシーケンスを参照して、図17のステップS54において実行される調停処理について説明する。
【0182】
この調停処理は、サーバ候補(サーバ候補AまたはB)のノードの中から、1つのサーバを決定する処理である。図26においては、ノードA乃至ノードCがそれぞれサーバ候補Aの状態である場合について説明する。
【0183】
ノードAのメッセージ管理部22Aは、状態管理部22Bからサーバ候補Aに遷移したことが通知されることに応じて、ステップS121において、自分自身がサーバ候補であることを他のノードに通知するサーバ候補告知メッセージをマルチキャスト送信する。
【0184】
図27は、ノードAによりマルチキャスト送信されるサーバ候補告知メッセージの例を示す図である。
【0185】
図に示されるように、メッセージの送信先として「ALL」が領域71に記述され、メッセージの送信元として「ノードA」が領域72に記述される。また、領域73には、このメッセージがサーバ候補告知メッセージであることを表すコマンド(例えば、「0x01」(図12))が記述され、領域74には、送信データとして、形成するグループのグループ名「グループG」と、優先順位「10」が記述される。
【0186】
優先順位は、例えば、リスト管理部22Cが有する擬似乱数生成機能により生成された、0乃至255の値のうちの所定の値に基づいて設定される。例えば、より小さい値が設定されているノードが、正式サーバになる優先順位の、より高いノードとされる。
【0187】
このような優先順位を含むサーバ候補告知メッセージが、サーバ候補のノードにより送受信され、それぞれのノードにおいて行われる比較の結果、最も優先順位が高い(乱数に基づいて設定されている数値が低い)ノードがサーバとして決定される。
【0188】
図26の説明に戻り、ノードAから送信されたサーバ候補告知メッセージは、ステップS131においてノードBにより受信され、ステップS141においてノードCにより受信される。
【0189】
ステップS132において、ノードBのメッセージ管理部22Aは、自分自身がサーバ候補であることを他のノードに通知するサーバ候補告知メッセージをマルチキャスト送信する。
【0190】
図28は、ノードBによりマルチキャスト送信されるサーバ候補告知メッセージの例を示す図である。
【0191】
図28に示されるサーバ候補告知メッセージは、メッセージの送信元として「ノードB」が領域72に記述されている点、および、優先順位が「71」として設定されている点を除いて、図27に示されるものと同様であり、重複する説明は省略する。
【0192】
ノードBから送信されたサーバ候補告知メッセージは、ステップS122においてノードAにより受信され、ステップS142においてノードCにより受信される。
【0193】
ステップS143において、ノードCのメッセージ管理部22Aは、自分自身がサーバ候補であることを他のノードに通知するサーバ候補告知メッセージをマルチキャスト送信する。
【0194】
図29は、ノードCによりマルチキャスト送信されるサーバ候補告知メッセージの例を示す図である。
【0195】
図29に示されるサーバ候補告知メッセージは、メッセージの送信元として「ノードC」が領域72に記述されている点、および、優先順位が「112」として設定されている点を除いて、図27または図28に示されるものと同様である。
【0196】
ノードCから送信されたサーバ候補告知メッセージは、ステップS123においてノードAにより受信され、ステップS133においてノードBにより受信される。
【0197】
以上のように、サーバ候補であるノード同士の間でサーバ候補告知メッセージが送受信され、それぞれのノードに設定されている優先順位が取得される。
【0198】
ノードAは、ステップS124において、ノードB、およびノードCから送信されてきたサーバ候補告知メッセージに基づいてサーバ調停を行い、ノードBは、ステップS134において、ノードA、およびノードCから送信されてきたサーバ候補告知メッセージに基づいてサーバ調停を行う。また、ノードCは、ステップS144において、ノードA、およびノードBから送信されてきたサーバ候補告知メッセージに基づいてサーバの調停を行う。
【0199】
具体的には、それぞれのノードにおいて、自分自身に対して設定されている優先順位と、サーバ候補告知メッセージにより取得された、他のノードに設定されている優先順位の比較が行われ、優先順位が最も高いノードが正式サーバとして決定される。
【0200】
従って、図27乃至図29に示されるサーバ候補告知メッセージがノードA乃至ノードCの間で送受信された場合、優先順位が最も高い(設定されている数値が最も低い)ノードAが、正式サーバとして選択される。
【0201】
なお、同一の優先順位を持つノードが存在した場合、例えば、ノードIDのアスキーコードが、より小さいノードが優先順位の高いノードとされる。
【0202】
正式サーバとして決定されたノードAのグループ管理機能部22のリスト管理部22Cは、ステップS125において、ノードAの情報のみが記述されたノードリストを作成する。グループ管理機能部22のメッセージ管理部22Aは、ステップS126において、リスト管理部22Cにより作成されたノードリストを含むグループ告知メッセージをノードB、およびノードCに対して送信する。
【0203】
このとき、正式サーバとして決定されなかったノードB、およびノードCは、サーバ候補A(図5のState2)から、未参加(State3)を経て、クライアントとして参加(State5)している状態となる。
【0204】
ノードAから送信されたグループ告知メッセージは、ステップS135においてノードBにより受信され、ステップS145において、ノードCにより受信される。
【0205】
図30は、正式サーバとして新たに決定されたノードAにより送信され、ノードB、およびノードCにより受信されるグループ告知メッセージの例を示す図である。
【0206】
図30の例においては、メッセージの送信先として「ALL」が領域71に記述され、メッセージの送信元として「ノードA」が領域72に記述される。また、領域73には、このメッセージがグループ告知メッセージであることを表すコマンド(例えば、「0x00」(図12))が記述され、領域74には、送信データとして、グループ名「グループG」と、ノードAに関する情報のみが記述されたノードリストが記述される。
【0207】
以上のようにして、グループ上にサーバが存在しない場合であっても、1つのサーバのみを選択することが可能である。
【0208】
また、サーバが存在しない場合に、全てのノードがサーバ候補となり、サーバ候補告知メッセージが送受信されるようにしたため、仮に、サーバ以外にも複数のノードが同時にグループから離脱した場合であっても、効率的に、サーバとして動作するノードを決定することが可能となる。すなわち、複数のノードが同時にグループから離脱した場合であっても、グループにノードが残っている限り、その中から、サーバとして動作するノードが選択されることになる。
【0209】
なお、以上においては、サーバの調停は、乱数に基づいて設定される優先順位に基づいて行われるとしたが、当然、それ以外の情報に基づいて行われるようにしてもよい。例えば、それぞれのノードのハードウエア構成が比較され、スペックの最も高いノードがサーバとして選択されるようにしてもよいし、単に、最も先にサーバ候補告知メッセージをマルチキャスト送信したノードがサーバとして選択されるようにしてもよい。
【0210】
次に、図31のフローチャートを参照して、サーバ調停を行うノードA(サーバ候補A)の処理について説明する。
【0211】
図31に示される処理は、基本的には、図26を参照して説明したノードAの処理と同様である。
【0212】
ステップS151において、ノードAのグループ管理機能部22のメッセージ管理部22Aは、自分自身がサーバ候補であることを他のノードに通知するサーバ候補告知メッセージをマルチキャスト送信し、ステップS152に進み、他のノードから、サーバ候補告知メッセージが送信されてきたか否かを判定する。
【0213】
ステップS152において、他のノードから、サーバ候補告知メッセージが送信されてきたと判定した場合、メッセージ管理部22Aは、ステップS153に進み、それを受信する。
【0214】
ステップS152において、サーバ候補告知メッセージが送信されてきていないと判定された場合、ステップS153の処理はスキップされる。
【0215】
ステップS154において、メッセージ管理部22Aは、他のノードのものと比較して、自分自身に設定されている優先順位が最も高いか否かを判定し、高くない、すなわち、サーバ候補告知メッセージを送信してきたノードの中に、ノードAよりも優先順位の高いノードが存在すると判定した場合、ステップS155に進み、クライアントとしてグループに参加する。
【0216】
すなわち、このとき、状態管理部22Bにより、ノードAの状態が「未参加」の状態を経て「参加」に遷移される。
【0217】
一方、ステップS154において、メッセージ管理部22Aは、他のノードのものと比較して、自分自身に設定されている優先順位が最も高いと判定した場合、ステップS156に進み、サーバ候補告知メッセージを送信してから所定時間が経過したか否かを判定する。
【0218】
ステップS156において、所定時間が経過していないと判定した場合、メッセージ管理部22Aは、ステップS152に戻り、同様の処理を繰り返し実行する。これにより、それぞれのノード間において、サーバ候補告知メッセージを送受信する時間が確保される。
【0219】
このとき、他のノードに設定されている優先順位よりも、ノードAに設定されている優先順位の方が高い場合、サーバ候補Aの状態が状態管理部22Bにより維持される。
【0220】
ステップS156において、状態管理部22Bは、サーバ候補告知メッセージを送信してから所定時間が経過したと判定した場合、ステップS157に進み、ノードAの状態を、正式サーバに遷移させる。
【0221】
正式サーバになったノードAのメッセージ管理部22Aは、ステップS158において、図30に示されるグループ告知メッセージをマルチキャスト送信し、処理を終了する。
【0222】
以上の処理が、サーバ候補Aの状態を有するノードB、およびノードCのそれぞれにおいて実行され、1つのサーバが決定される。
【0223】
次に、図32のシーケンスを参照して、グループからクライアントが離脱する場合の処理について説明する。
【0224】
図32においては、ノードAが正式サーバであり、クライアントであるノードCが離脱する処理について説明する。なお、図32においては、ノードBもクライアントである。
【0225】
ステップS191において、ノードCのグループ管理機能部22のメッセージ管理部22Aは、通信機能部21を制御し、ノード離脱要求メッセージをノードAに対して送信する。
【0226】
このメッセージには、送信先として、サーバ(ノードA)に送信することを表す所定のIDが記述される。従って、ノード離脱要求メッセージは、メッセージの領域71に記述されるIDに基づいて、ノードBには取得されない。
【0227】
ノードCにより送信されたノード離脱要求メッセージは、ステップS171において、ノードAにより受信される。
【0228】
ステップS172において、ノードAのメッセージ管理部22Aは、ノード離脱承認メッセージをノードCに対して返信し、ノードAのリスト管理部22Cは、ステップS173において、ノードリストを更新する。すなわち、ノードAにより管理されるノードリストから、ノードCに関する情報が削除される。
【0229】
ノードAから送信されたノード離脱承認メッセージは、ステップS192において、ノードCにより受信される。なお、ノード離脱承認メッセージには、送信先としてノードCが指定されているため、マルチキャスト送信されたノード離脱承認メッセージは、ノードBには取得されない。
【0230】
ステップS174において、ノードAのメッセージ管理部22Aは、更新したノードリストを含むグループ告知メッセージを送信する。送信されたグループ告知メッセージは、ステップS181においてノードBにより受信され、ステップS193においてノードCにより受信される。
【0231】
これにより、ノードCが、ノードAにより管理されるグループから離脱した状態となる。
【0232】
図33乃至図36は、メッセージの例を示す図である。
【0233】
図33は、図32の処理によりノードCがグループから離脱する前に、ノードAから、ノードB、およびノードCに対して送信されるグループ告知メッセージの例を示す図である。
【0234】
すなわち、領域71には、送信先として「ALL」が記述され、領域72には、送信元として「ノードA」が記述され、領域73には、このメッセージがグループ告知メッセージであることを表すコマンド(例えば、「0x00」(図12))が記述される。また、領域74には、ノードAが管理するグループのグループ名「グループG」と、ノードA乃至ノードCに関する情報が含まれるノードリストが記述される。
【0235】
すなわち、図33に示されるグループ告知メッセージのノードリストには、ノードCに関する情報がまだ含まれている。
【0236】
図34は、図32のステップS191において、ノードCからノードAに対して送信されるノード離脱要求メッセージの例を示す図である。
【0237】
図に示されるように、メッセージの送信先として「ノードA」が領域71に記述され、メッセージの送信元として「ノードC」が領域72に記述される。また、領域73には、このメッセージがノード離脱要求メッセージであることを表すコマンド(例えば、「0x06」(図12))が記述され、領域74には、送信データとして、ノードCが離脱を希望するグループ名「グループG」と、自分自身の名前が記述される。
【0238】
図35は、図32のステップS172において、ノードAからノードCに対して送信されるノード離脱承認メッセージの例を示す図である。
【0239】
図に示されるように、メッセージの送信先として「ノードC」が領域71に記述され、メッセージの送信元として「ノードA」が領域72に記述される。また、領域73には、このメッセージがノード離脱承認メッセージであることを表すコマンド(例えば、「0x07」(図12))が記述され、領域74には、送信データとして、グループ名「グループG」と、ノードCの名前が記述される。
【0240】
図36は、図32のステップS174において、ノードAからノードB、およびノードCに対して送信されるグループ告知メッセージの例を示す図である。
【0241】
図に示されるように、メッセージの送信先として「ALL」が領域71に記述され、メッセージの送信元として「ノードA」が領域72に記述される。また、領域73には、このメッセージがグループ告知メッセージであることを表すコマンドが記述され、領域74には、ノードAが管理するグループのグループ名「グループG」と、そのグループに属するノードの数「2」、および、「ノードA」、「ノードB」の順に、優先順位が設定されているノードリストが記述される。
【0242】
すなわち、ノードCがグループから離脱した後に送信される図36のグループ告知メッセージには、図33のメッセージと比較して、ノードCに関する情報がノードリストから削除されている。
【0243】
以上のようなメッセージが、図32を参照して説明した処理、および、その前後において送受信される。
【0244】
次に、図37のフローチャートを参照して、グループからの離脱を要求するノードCの処理について説明する。
【0245】
ステップS201において、ノードCのメッセージ管理部22Aは、グループから離脱することが状態管理部22Bから通知されてくることに応じて、通信機能部21を制御し、ノード離脱要求メッセージをノードAに対して送信する。これにより、例えば、送信先としてノードAが指定される図34のメッセージがメッセージ管理部22Aにより生成され、送信される。
【0246】
ノードCにより送信されたノード離脱要求メッセージは、ノードAにより受信され、ノードCの離脱を承認するか否かが判定される(図38のステップS213)。ノードCのグループからの離脱が承認された場合、ノードAからノードCに対して、ノード離脱承認メッセージが送信される(図38のステップS215)。
【0247】
ステップS202において、ノードCのメッセージ管理部22Aは、ノードAからノード離脱承認メッセージが送信されてきたか否かを判定し、ノード離脱承認メッセージが送信されてきていないと判定した場合、ステップS203に進み、エラー処理を実行する。
【0248】
例えば、通信のエラーなどにより、ノード離脱承認メッセージが送信されてこない場合、そのことをユーザに提示するなどのエラー処理が実行される。その後、処理は終了される。このとき、ノードCの状態は、参加(図5のState5)のままである。
【0249】
一方、ステップS202において、ノードAから、ノード離脱承認メッセージが送信されてきたと判定した場合、メッセージ管理部22Aは、ステップS204に進み、それを受信する。
【0250】
メッセージ管理部22Aは、ステップS205において、ノードAから送信されてくるグループ告知メッセージを受信し、リスト管理部22Cに、管理するノードリストを更新させる。ノードAから送信されてくるグループ告知メッセージは、例えば、図36に示されるような、ノードCに関する情報が含まれていないメッセージであり、これにより、グループから離脱した状態(図5のState7)となる。
【0251】
次に、図38のフローチャートを参照して、図37の処理に対応してノードAにより実行される処理について説明する。図38に示される処理は、基本的には、図32を参照して説明したノードAの処理と同様である。
【0252】
ステップS211において、ノードAのグループ管理機能部22のメッセージ管理部22Aは、ノード離脱要求メッセージがノードCから送信されてきたか否かを判定し、送信されてきたと判定するまで待機する。
【0253】
メッセージ管理部22Aは、ステップS211において、ノード離脱要求メッセージが送信されてきたと判定した場合、ステップS212に進み、それを受信する。
【0254】
ステップS213において、メッセージ管理部22Aは、ノードCの離脱を承認するか否かを判定し、承認しないと判定した場合、ステップS214に進み、所定のエラー処理を実行した後、処理を終了する。なお、クライアントにより、グループからの離脱が要求された場合、それが必ず承認されるようにしてもよい。
【0255】
メッセージ管理部22Aは、ステップS213において、グループからの離脱を承認すると判定した場合、ステップS215に進み、図35に示されるノード離脱承認メッセージをノードCに対して送信する。
【0256】
ステップS216において、リスト管理部22Cは、グループ内でのノードCの優先順位等をノードリストから削除し、更新する。
【0257】
ステップS216で更新されたノードリストを含むグループ告知メッセージは、ステップS227において、ノードAから、ノードB、およびノードCに対して送信される。
【0258】
なお、離脱が承認されたノードCに対して、ノード離脱承認メッセージが送信されるとしたが、ノード離脱承認メッセージに代えて、ノードCの情報が削除されたノードリストを含むグループ告知メッセージが送信されるようにしてもよい。ノードCの情報が削除されたノードリストを含むグループ告知メッセージの内容によっても、ノードCは、グループからの離脱が承認されたことを確認することができる。
【0259】
以上においては、クライアントがグループから離脱する場合の処理について説明したが、次に、サーバが離脱する場合の処理について説明する。
【0260】
サーバの離脱には、サーバが離脱する旨を他のノードに通知し、明示的にグループから離脱する場合と、他のノードに離脱する旨を通知することなく、非明示的に離脱する場合とがある。
【0261】
始めに、図39のシーケンスを参照して、グループから明示的にサーバが離脱する場合の処理について説明する。図39においては、ノードAがグループから離脱するサーバであり、ノードB、およびノードCがクライアントである。
【0262】
例えば、グループ管理機能部22の状態管理部22Bから、ユーザがグループからの離脱を要求していることが通知されてきたとき、ステップS241において、ノードAのメッセージ管理部22Aは、通信機能部21を制御し、サーバ離脱要求メッセージをノードB、およびノードCに対して送信(マルチキャスト送信)する。
【0263】
送信されたサーバ離脱要求メッセージは、ステップS251においてノードBにより受信され、ステップS261においてノードCにより受信される。
【0264】
サーバ離脱要求メッセージを受信したノードB、およびノードCの状態管理部22Bは、それまでの参加状態(図5のState5)から、サーバ候補Bの状態(State6)に自らの状態を遷移させ、サーバ候補告知メッセージを送信する。
【0265】
すなわち、ステップS252において、ノードBのメッセージ管理部22Aは、ノードBがサーバ候補であることを他のノードに通知するサーバ候補告知メッセージを送信する。
【0266】
ノードBから送信されたサーバ候補告知メッセージは、ステップS242においてノードAにより受信され、ステップS262においてノードCにより受信される。
【0267】
同様に、ステップS263において、ノードCのメッセージ管理部22Aは、ノードCがサーバ候補であることを他のノードに通知するサーバ候補告知メッセージを送信する。
【0268】
ノードCから送信されたサーバ候補告知メッセージは、ステップS243においてノードAにより受信され、ステップS253においてノードBにより受信される。
【0269】
ノードB、およびノードCから送信されてきたサーバ候補告知メッセージは、ノードAのメッセージ管理部22Aにより受信され、リスト管理部22Cに出力される。リスト管理部22Cは、ステップS244において、メッセージに含まれるノードB、およびノードCの優先順位に基づいて、新たなサーバを選択する。
【0270】
上述したように、サーバ候補告知メッセージには、それを送信するノードに設定されている優先順位が含まれている。
【0271】
サーバとして新たに動作するノードとして、例えば、ノードBを選択したノードAは、ステップS245において、サーバ移動通知メッセージをノードB、およびノードCに対して送信する。このサーバ移動通知メッセージには、ノードBに対して、最も高い優先順位が設定されたノードリストが含まれている。
【0272】
ノードAから送信されたサーバ移動通知メッセージは、ステップS254においてノードBにより受信され、ステップS264においてノードCにより受信される。
【0273】
ノードAにより、新たな正式サーバとして選択されたノードBの状態管理部22Bは、その状態を、サーバ候補B(図5のState6)から正式サーバ(State4)に遷移させ、グループの管理を開始する。すなわち、ステップS255において、ノードBは、ノードA、およびノードCに対して、更新されたノードリストを含むグループ告知メッセージを送信する。
【0274】
送信されたグループ告知メッセージは、ステップS246において、ノードAにより受信され、ステップS265において、ノードCにより受信される。
【0275】
新たなサーバを選択したノードAの状態管理部22Bは、その後、自分自身の状態を正式サーバ(図5のState4)から離脱状態(State7)に遷移させ、グループから離脱する。
【0276】
なお、新たなサーバとして選択されなかったノードCの状態管理部22Bは、自分自身の状態を、サーバ候補B(図5のState6)から参加(State5)に遷移させ、クライアントとして、ノードBが新たに管理することになったグループに参加する。
【0277】
図40乃至図45は、メッセージの例を示す図である。
【0278】
図40は、図39の処理により、ノードAがグループから離脱する前に、ノードAから、ノードB、およびノードCに対して送信されるグループ告知メッセージの例を示す図である。
【0279】
領域74に記述されるノードリストには、正式サーバであるノードAが管理するグループに属するノードの数「3」、および、「ノードA」、「ノードB」、「ノードC」の順に設定されている優先順位が記述される。
【0280】
すなわち、図40に示されるグループ告知メッセージには、ノードAに関する情報がまだ含まれており、ノードAに対して最も高い優先順位が設定されている。
【0281】
図41は、図39のステップS241において、ノードAから、ノードB、およびノードCに対して送信されるサーバ離脱要求メッセージの例を示す図である。
【0282】
図に示されるように、メッセージの送信先として「ALL」が領域71に記述され、メッセージの送信元として「ノードA」が領域72に記述される。また、領域73には、このメッセージがサーバ離脱要求メッセージであることを表すコマンド(例えば、「0x02」(図12))が記述され、領域74には、送信データとして、ノードAが離脱を希望するグループ名「グループG」と、自分自身の名前が記述される。
【0283】
図42は、図39のステップS252において、ノードBから、ノードA、およびノードCに対して送信されるサーバ候補告知メッセージの例を示す図である。
【0284】
図に示されるように、メッセージの送信先として「ALL」が領域71に記述され、メッセージの送信元として「ノードB」が領域72に記述される。また、領域73には、このメッセージがサーバ候補告知メッセージであることを表すコマンド(例えば、「0x01」(図12))が記述され、領域74には、ノードBに設定されている優先順位「1」が記述される。
【0285】
図43は、図39のステップS263において、ノードCから、ノードA、およびノードBに対して送信されるグループ告知メッセージの例を示す図であり、図42のメッセージと基本的に同様である。
【0286】
なお、図43に示されるグループ告知メッセージには、メッセージの送信元として「ノードC」が領域72に記述され、領域74には、ノードCに設定されている優先順位「2」が記述される。
【0287】
例えば、図42および図43に示されるグループ告知メッセージを受信した場合、ノードAは、それぞれのメッセージに記述されている優先順位に基づいて、より優先順位の高いノードBを、新たなサーバとして選択する。
【0288】
図44は、図39のステップS245において、ノードAから、ノードB、およびノードCに対して送信されるサーバ移動通知メッセージの例を示す図である。
【0289】
図に示されるように、メッセージの送信先として「ALL」が領域71に記述され、メッセージの送信元として「ノードA」が領域72に記述される。また、領域73には、このメッセージがサーバ移動通知メッセージであることを表すコマンド(例えば、「0x03」(図12))が記述され、領域74には、グループ名と、新たにサーバとして選択されたノードを表す「ノードB」が記述される。
【0290】
図45は、図39のステップS255において、ノードBから、ノードA、およびノードCに対して送信されるグループ告知メッセージの例を示す図である。
【0291】
図に示されるように、メッセージの送信先として「ALL」が領域71に記述され、メッセージの送信元として「ノードB」が領域72に記述される。また、領域73には、このメッセージがグループ告知メッセージであることを表すコマンドが記述され、領域74には、ノードAが管理するグループのグループ名「グループG」と、そのグループに属するノードの数「2」、および、「ノードB」、「ノードC」の順に、優先順位が設定されているノードリストが記述される。
【0292】
すなわち、新たにサーバとして選択されたノードBから送信される図45のグループ告知メッセージには、図40のメッセージと比較して、ノードAに関する情報がノードリストから削除されているとともに、ノードBがサーバであることを表す情報が含まれている。
【0293】
以上のようなメッセージが、図39を参照して説明した処理、および、その前後において送受信される。
【0294】
次に、図46のフローチャートを参照して、グループから明示的に離脱するノードA(正式サーバ)の処理について説明する。図46に示される処理は、基本的には、図39を参照して説明したノードAの処理と同様である。
【0295】
ステップS281において、ノードAのメッセージ管理部22Aは、通信機能部21を制御し、例えば、図41に示されるサーバ離脱要求メッセージを、ノードB、およびノードCに対して送信(マルチキャスト送信)する。
【0296】
サーバから送信されたサーバ離脱要求メッセージは、ノードB、およびノードCにより受信され、サーバ候補Bに状態を遷移させたノードB、およびノードCから、サーバ候補告知メッセージが送信されてくる。
【0297】
ステップS282において、ノードAのメッセージ管理部22Aは、サーバ候補告知メッセージが送信されてきたか否かを判定し、送信されてきたと判定した場合、ステップS283に進み、それを受信する。
【0298】
ステップS282において、サーバ候補告知メッセージが送信されてきていないと判定された場合、ステップS283の処理はスキップされる。
【0299】
ステップS284において、メッセージ管理部22Aは、サーバ離脱要求メッセージを送信してから、所定時間経過したか否かを判定し、経過していないと判定した場合、ステップS282に戻り、それ以降の処理を繰り返し実行する。これにより、サーバ離脱要求メッセージを受信したノードB、およびノードCにより、サーバ候補告知メッセージが送信される時間が確保される。
【0300】
メッセージ管理部22Aは、ステップS284において、サーバ離脱要求メッセージを送信してから、所定時間が経過したと判定した場合、ステップS285に進む。メッセージ管理部22Aにより受信された、サーバ候補告知メッセージは、リスト管理部22Cに出力される。
【0301】
ステップS285において、リスト管理部22Cは、ノードB、およびノードCから送信されてきたサーバ候補告知メッセージに含まれる優先順位に基づいて、新たなサーバを選択する。なお、サーバ候補Bのノードがグループ内に存在しないため(グループ内にノードAしか存在しないため)、サーバ候補告知メッセージが送信されてきていない場合、処理は終了される。
【0302】
リスト管理部22Cは、サーバとして新たに動作するノードを選択したとき、それをメッセージ管理部22Aに通知する。
【0303】
ステップS286において、メッセージ管理部22Aは、リスト管理部22Cからの通知に基づいて生成したサーバ移動通知メッセージを、ノードB、およびノードCに対して送信する。このサーバ移動通知メッセージには、サーバとして新たに選択されたノードに対して、最も高い優先順位が設定されたノードリストが含まれている。
【0304】
その後、新たに正式サーバになったノードから、グループ告知メッセージが送信されてくるため、メッセージ管理部22Aは、ステップS287において、それを受信し、グループからの離脱処理を終了させる。
【0305】
これにより、ノードAは、それまで自ら管理していたグループから離脱した状態となる。
【0306】
次に、図47のフローチャートを参照して、図46の処理に対応して実行されるノードBの処理について説明する。
【0307】
ステップS301において、ノードBのメッセージ管理部22Aは、通信機能部21を制御し、グループからの離脱を要求するサーバ(ノードA)から送信されてきたサーバ離脱要求メッセージを受信する。
【0308】
状態管理部22Bは、ステップS302において、それまでクライアントとしてグループに参加していた状態(図5のState5)から、サーバ候補Bの状態(State6)にノードBの状態を遷移させる。
【0309】
ステップS303において、メッセージ管理部22Aは、サーバ候補告知メッセージを、ノードA、およびノードCに対して送信する。
【0310】
ノードBから送信されたサーバ候補告知メッセージは、ノードA、およびノードCにより受信される。ノードAにおいては、メッセージに含まれる優先順位に基づいて、ノードBがサーバとして新たに動作するか否かが選択され、それを通知するサーバ移動メッセージが送信される(図46のステップS285,S286)。
【0311】
ステップS304において、ノードBのメッセージ管理部22Aは、ノードAから送信されてきたサーバ移動メッセージを受信し、それを状態管理部22Bに出力する。
【0312】
ステップS305において、状態管理部22Bは、サーバ移動メッセージに含まれるノードリストに基づいて、ノードBが正式サーバとして選択されたか否かを判定する。サーバ移動メッセージに含まれるノードリストには、サーバとして選択されたノードに対して、最も高い優先順位が割り当てられている。
【0313】
従って、状態管理部22Bは、自分自身のノードに対して、最も高い優先順位が割り当てられていないため、サーバとして選択されていない(クライアントとして選択された)と判定した場合、ステップS306に進み、ノードBの状態を、サーバ候補B(図5のState6)から参加(State5)に遷移させ、クライアントとしてグループに参加する。
【0314】
一方、ステップS305において、正式サーバとして選択されたと判定した場合、ステップS307に進み、状態管理部22Bは、ノードBの状態を、サーバ候補B(図5のState6)から正式サーバ(State4)に遷移させ、グループの管理を開始する。
【0315】
すなわち、ステップS308において、メッセージ管理部22Aは、ノードA、およびノードCに対して、グループ告知メッセージを送信し、ノードAの離脱処理を終了させる。
【0316】
グループからサーバが離脱する場合であっても、以上の処理により、新たにサーバとして動作するノードを効率的に、かつ、確実に選択することができる。すなわち、ネットワーク構成の変化に、より好適に対応することができる。
【0317】
次に、図48のシーケンスを参照して、サーバが、非明示的にグループから離脱した場合の処理について説明する。
【0318】
非明示的なサーバの離脱は、例えば、サーバとして動作するノードが、他のノードとの通信可能範囲から出たときなどに発生する。
【0319】
なお、図48においては、サーバとして動作していたノードXが、非明示的にグループから離脱した場合の処理について説明する。また、ノードXによりそれまで管理されていたグループには、ノードA乃至ノードCがクライアントとして参加していたものとする。
【0320】
サーバ(ノードX)が非明示的にグループから離脱したことを検出したクライアント(ノードA乃至ノードC)により実行される処理は、図26の正式サーバの調停処理と同様の処理である。
【0321】
例えば、サーバから送信されてくるグループ告知メッセージが送信されてこなくなったため、サーバが離脱したと判断したノードA乃至ノードCは、その状態を、参加(図5のState5)からサーバ候補B(State6)に遷移させ、自分自身がサーバ候補であることを他のノードに通知するためのサーバ候補告知メッセージを送信する。
【0322】
すなわち、サーバ候補Bの状態を有するノードAから、ステップS321において送信されたサーバ候補告知メッセージは、ステップS341においてノードBにより受信され、ステップS361においてノードCにより受信される。
【0323】
また、サーバ候補Bの状態を有するノードBから、ステップS342において送信されたサーバ候補告知メッセージは、ステップS322においてノードAにより受信され、ステップS362においてノードCにより受信される。
【0324】
さらに、サーバ候補Bの状態を有するノードCから、ステップS363において送信されたサーバ候補告知メッセージは、ステップS323においてノードAにより受信され、ステップS343においてノードBにより受信される。
【0325】
送信されてきたサーバ候補告知メッセージを受信したノードA乃至ノードCは、ステップS324,S344,S364において、それぞれ、メッセージに含まれている優先順位に基づいて、サーバ調停を行い、最も高い優先順位が設定されているノードを、新たなサーバとして決定する。
【0326】
例えば、ノードAに対して最も高い優先順位が設定されている場合、ノードAは、その状態をサーバ候補B(図5のState6)から正式サーバ(State4)に遷移させ、ステップS325において、ノードAの情報のみが記述されたノードリストを含むサーバ移動通知メッセージを、ノードB、およびノードCに対して送信する。
【0327】
ノードAから送信されたサーバ移動通知メッセージは、ステップS345においてノードBにより受信され、ステップS365においてノードCにより受信される。
【0328】
その後、ノードAによりグループの管理が開始され、ステップS326において送信されたグループ告知メッセージが、ステップS346においてノードBにより受信され、ステップS366においてノードCにより受信される。ステップS326において送信されたグループ告知メッセージには、ノードA乃至ノードCの情報が記述されたノードリストが含まれている。
【0329】
以上のように、各クライアント間でサーバ候補告知メッセージが送受信され、優先順位に基づいて、新たなサーバが決定されることにより、サーバが非明示的にグループから離脱した場合であっても、サーバ・クライアント間のサービスの提供が継続されることになる。
【0330】
図49乃至図53は、メッセージの例を示す図である。
【0331】
図49は、図48の処理が実行される前に、ノードXから、ノードXが管理するグループに参加しているノードA乃至ノードCに対して送信されるグループ告知メッセージの例を示す図である。
【0332】
領域74に記述されるノードリストには、正式サーバであるノードXが管理するグループに属するノードの数「4」、および、「ノードX」、「ノードA」、「ノードB」、「ノードC」の順に設定されている優先順位が記述される。
【0333】
すなわち、図49に示されるグループ告知メッセージには、非明示的にグループから離脱するノードXに関する情報がまだ含まれている。
【0334】
図50は、図48のステップS321において、ノードAから、ノードB、およびノードCに対して送信されるサーバ候補告知メッセージの例を示す図である。図50に示されるサーバ候補告知メッセージは、図42、または図43に示されるサーバ候補告知メッセージと同様である。
【0335】
すなわち、領域72には、メッセージの送信元として「ノードA」が記述され、領域74には、サーバ候補Bの状態を有するノードAに設定されている優先順位「1」が記述される。
【0336】
図51は、図48のステップS342において、ノードBから、ノードA、およびノードCに対して送信されるサーバ候補告知メッセージの例を示す図である。
【0337】
領域72には、メッセージの送信元として「ノードB」が記述され、領域74には、サーバ候補Bの状態を有するノードBに設定されている優先順位「2」が記述される。
【0338】
図52は、図48のステップS363において、ノードCから、ノードA、およびノードBに対して送信されるサーバ候補告知メッセージの例を示す図である。
【0339】
領域72には、メッセージの送信元として「ノードC」が記述され、領域74には、サーバ候補Bの状態を有するノードCに設定されている優先順位「3」が記述される。
【0340】
従って、ノードA乃至ノードCにより、図50乃至図52のサーバ候補告知メッセージが送受信された場合、最も高い優先順位が設定されているノードAが、新たなサーバとして決定される。
【0341】
図53は、図48のステップS326において、ノードAから、ノードB、およびノードCに対して送信されるグループ告知メッセージの例を示す図であり、このメッセージは、例えば、図40のメッセージと同様のものである。
【0342】
すなわち、新たにサーバとして選択されたノードAに対して最も高い優先順位が割り当てられたノードリストを含むグループ告知メッセージが、ノードB、およびノードCに対して送信される。
【0343】
非明示的にサーバがグループから離脱した場合の各ノードの処理は、新たにサーバとして決定されたノードから、サーバ移動通知メッセージが送信される点を除いて、図31を参照して説明した処理と同様であるため、その説明は省略する。
【0344】
以上の各ノードの処理により、非明示的にサーバが離脱した場合であっても、効率的に、かつ、確実に、新たにサーバとして動作するノードを選択することが可能となる。
【0345】
図54は、図1のノードA(ノード1)の他の機能構成例を示すブロック図である。図4と同一の部分には、同一の符号が付されている。
【0346】
サーバ同期機能部81は、通信制御部21と協働し、サーバ機能部23に対して、サーバ機能部23が、「全てのクライアントへのメッセージの送信」、「特定のクライアントへのメッセージの送信」、「クライアントからのメッセージの受信」のそれぞれを行うためのインタフェースを提供する。また、サーバ同期機能部81は、クライアント機能部24に対して、クライアント機能部24が、「サーバへのメッセージの送信」、「サーバからのメッセージの受信」のそれぞれを行うためのインタフェースを提供する。
【0347】
なお、サーバ同期機能部81は、例えば、ノードAがクライアントとして動作しており、サーバがグループから離脱するなどしてサーバの交代が生じた場合であっても、クライアント機能部24にサーバの交代を意識させることなく、サーバとの間で通信(サーバ・クライアント間のアプリケーション層でのメッセージ交換)を行わせる機能を有する。
【0348】
図55のシーケンスを参照して、サーバから、クライアントに対してメッセージ(データ)が送信される場合の処理について説明する。
【0349】
図55においては、ノードAが正式サーバであり、ノードBがクライアントである。なお、図示は省略するが、ノードCにおいても、ノードBと同様の処理が行われる。
【0350】
正式サーバとして動作するノードAのサーバ機能部23が、サービスを受けるクライアントとして動作するノードBのクライアント機能部24に対して、所定のデータを送信するとき、ステップS411において、サーバ機能部23は、サーバ同期機能部81に対して、クライアントへのデータの送信を要求する。
【0351】
図56は、サーバ機能部23から、サーバ同期機能部81(通信機能部21)に対するデータの送信要求において用いられるAPI(Application Programming Interface)の例を示す図である。
【0352】
図56に示す「public void sendDataToClient(byte[] DATA)」インタフェースは、所定のバイト数からなるデータ(クライアントに対して送信するデータ)を引数として与える。
【0353】
この要求をステップS421において受信したサーバ同期機能部81は、ノードリストの情報に基づいて、ノードAが正式サーバであるのか否かを確認し、サーバである場合には、ステップS422に進み、要求されたデータをグループ上のクライアント機能部24に対してマルチキャスト送信する。
【0354】
図57は、ステップS422において送信されるデータの例を示す図である。
【0355】
サーバ同期機能部81により送信されるデータは、上述した各種のメッセージと同様のフォーマットを有しており、領域71には、送信先のノードを表す「ALL」が記述され、領域72には、送信元のノードを表す「ノードA」が記述される。また、領域73には、このデータが、全てのノードのクライアント機能部24に対して送信されるものであることを表す、予め設定された所定のID(クライアントID)が記述され、領域74には、グループ名「グループG」と、送信データが記述される。
【0356】
サーバ同期機能部81により送信されたデータは、ステップS401においてノードAのクライアント機能部24により受信され、ステップS431において、ノードBのサーバ同期機能部81により受信される。
【0357】
ノードBのサーバ同期機能部81は、ステップS432において、ノードAのサーバ同期機能部81から送信されてきたデータを、クライアント機能部24(ノードBのクライアント機能部24)に転送する。
【0358】
図58は、ノードBのサーバ同期機能部81(通信機能部21)から、クライアント機能部24に対するデータの転送において用いられるAPIの例を示す図である。
【0359】
図58に示す「public void receiveDataFromServer(byte[] DATA)」インタフェースは、所定のバイト数からなるデータ(サーバから送信されてきたデータ)を引数として与える。
【0360】
ノードAのクライアント機能部24は、ステップS441において、サーバ同期機能部81から転送されてきたデータを受信し、サーバから送信されてきたデータを取得する。その後、処理は終了される。
【0361】
以上のように、サーバノードのサーバ機能部23と、クライアントノードのクライアント機能部24の間で直接データが送受信されるのではなく、それぞれのサーバ同期機能部81を介して、データの送受信が行われる。
【0362】
次に、図59のシーケンスを参照して、クライアントから、サーバに対してメッセージ(データ)が送信される場合の処理について説明する。
【0363】
図59においては、ノードAがクライアントであり、ノードBが正式サーバである。なお、図示は省略するが、ノードCにおいても、ノードAと同様の処理が適宜行われる。
【0364】
クライアントとして動作するノードAのクライアント機能部24が、サービスを提供するサーバとして動作するノードBのサーバ機能部23に対して、所定のデータを送信するとき、ステップS451において、クライアント機能部24は、サーバ同期機能部81に対して、サーバへのデータの送信を要求する。
【0365】
図60は、クライアント機能部24から、サーバ同期機能部81(通信機能部21)に対するデータの送信要求において用いられるAPIの例を示す図である。
【0366】
図60に示す「public void sendDataToServer(byte[] DATA)」インタフェースは、所定のバイト数からなるデータ(サーバに対して送信するデータ)を引数として与える。
【0367】
この要求をステップS461において受信したサーバ同期機能部81は、所定のメッセージを送信するなどしてサーバが存在するか否か(調停が行われている最中か否か)を確認し、サーバが存在する場合には、ステップS462に進み、要求されたデータを、ノードBのサーバ同期機能部81に対して送信する。
【0368】
図61は、ステップS462において送信されるデータの例を示す図である。
【0369】
領域71には、送信先のノードを表す「ALL」が記述され、領域72には、送信元のノードを表す「ノードA」が記述される。領域73には、このデータが、サーバのサーバ機能部23に対して送信されるものであることを表す、予め設定された所定のID(サーバID)が記述され、領域74には、グループ名「グループG」と、送信データが記述される。
【0370】
なお、サーバに対するデータの送信が要求されときに、グループ内にサーバが存在しないと判断した場合、サーバ同期機能部81は、新たにサーバとして動作するノードが決定されるまで待機し、サーバとして動作するノードが調停により決定されたとき、データの送信を行う。
【0371】
これにより、サーバが存在しない状態を意識させることのないインタフェースが、サーバ同期機能部81からクライアント機能部24に対して提供されることになる。
【0372】
すなわち、仮に、クライアントノードのクライアント機能部24から、サーバノードのサーバ機能部23に対してデータが直接送信されるとした場合、グループ内にサーバが存在しないときには、クライアント機能部24は、新たなサーバが決定されるまで待機するなどのリカバリ処理を行わなければならないが、そのリカバリ処理が、サーバ同期機能部81により代理的に実行される。
【0373】
サーバ同期機能部81により送信されたデータは、ステップS471において、ノードBのサーバ同期機能部81により受信される。
【0374】
ノードBのサーバ同期機能部81は、ステップS472において、ノードAのサーバ同期機能部81から送信されてきたデータを、クライアント機能部24(ノードBのクライアント機能部24)に転送する。
【0375】
図62は、ノードBのサーバ同期機能部81(通信機能部21)から、クライアント機能部24に対するデータの転送において用いられるAPIの例を示す図である。
【0376】
図62に示す「public void receiveDataFromClient(int clientID, byte[] DATA)」インタフェースは、データを送信したクライアントを識別するclientID と、所定のバイト数からなるデータ(クライアントから送信されてきたデータ)を引数として与える。
【0377】
ノードBのクライアント機能部24は、ステップS481において、サーバ同期機能部81から転送されてきたデータを受信し、処理を終了させる。
【0378】
以上の処理により、クライアント機能部23からサーバ機能部24に対するデータの送信が行われる。
【0379】
なお、上述したようなインタフェースを提供するサーバ同期機能部81に、正式サーバでないクライアント上において、正式サーバと同じ状態を常時保持させておくようにすることもできる。
【0380】
この場合、例えば、サーバとして動作するノードAのサーバ同期機能部81は、サーバ機能部23の内部状態を読み出し、読み出した内部状態を表す情報(サーバのサーバ機能部23の情報)を、全てのノード(ノードB、およびノードC)のサーバ同期機能部81に対して送信する。
【0381】
サーバ機能部23の内部状態を表す情報の送信は、例えば、サーバ機能部23の内部状態が変更されたとき、または、所定の時間が経過したときなどの所定のタイミングで行われる。
【0382】
ノードB、およびノードCのサーバ同期機能部81は、送信されてきた情報に基づいて、ノードAのサーバ機能部23の内部状態を、自分自身のノードのサーバ機能部23の状態として設定することにより、クライアントであるノード上に、正式サーバと同一の機能を実現させる。
【0383】
以上の処理が、正式サーバとして動作するノードのサーバ同期機能部81、および、クライアントとして動作するノードのサーバ同期機能部81の双方において繰り返し実行されることにより、クライアントのノードにおいても、正式サーバと同じ状態を持つサーバが常時実現されることになる。
【0384】
なお、サーバ同期機能部81により送信されるサーバ機能部23の内部状態を表す情報は、例えば、既に送信されている情報との差分のみが送信されるようにしてもよい。これにより、その都度、サーバ機能部23の全ての内部状態を表す情報を送信する場合に較べて、通信量を減らすことが可能となる。
【0385】
また、通信量の削減をより可能とすべく、サーバの内部状態を表す情報を、ハッシュ関数に適用することで得られた結果のみが送信されるようにしてもよい。
【0386】
この場合、ハッシュ関数の算出結果を受信したノードは、受信した算出結果と、自分自身のノードの内部状態を表す情報を、予め用意されているハッシュ関数に適用することで得られた算出結果を比較し、それらの結果が一致しない場合にのみ、サーバのサーバ同期機能部81に対して、内部状態を表す情報の送信を要求する。すなわち、受信した算出結果と、自分自身のノードの内部状態を表す情報を、予め用意されているハッシュ関数に適用することで得られた算出結果が一致しない場合、サーバの内部状態と、クライアントの内部状態が異なることを表している。
【0387】
図63は、上述したグループ管理機能部22により実行される、グループ管理処理について説明するフローチャートである。
【0388】
例えば、初期状態(図5のState1)であるノードAのグループ管理機能部22は、ステップS501において、ユーザからの入力に基づいて、処理を終了することが指示されたか否かを判定する。
【0389】
グループ管理機能部22は、ユーザにより電源のオフが指示されたため、ステップS501において、処理を終了させると判定した場合、ステップS502に進み、全ての既知のグループに属している他のノードとの間で、離脱処理を実行する。
【0390】
例えば、後述する処理により、所定のグループにノードAがクライアントとして既に参加しているとき、ステップS502においては、他のノードとの間で、図32を参照して説明した離脱処理が実行される。また、ノードAがサーバとしてグループを管理している場合、他のノードとの間で、図39を参照して説明した離脱処理が実行される。その後、グループ管理機能部22による管理処理は終了される。
【0391】
ステップS501において、グループ管理機能部22は、処理を終了しないと判定した場合、ステップS503に進み、グループ告知メッセージやサーバ候補告知メッセージ等の、所定のメッセージが送信されてきたか否かを判定する。
【0392】
グループ管理機能部22は、ステップS503において、所定のメッセージが送信されてきていないと判定した場合、ステップS501に戻り、それ以降の処理を実行し、一方、所定のメッセージが送信されてきたと判定した場合、ステップS504に進む。
【0393】
ステップS504において、グループ管理機能部22は、送信されてきたメッセージは、既知のグループに属するノードから送信されてきたものであるか否かを判定し、既知のグループに属するノードから送信されてきたものであると判定した場合、ステップS505に進み、ノードAの状態に応じて、所定の処理を実行する。
【0394】
ステップS505においては、送信されてきたグループ告知メッセージを受信する処理、グループに参加する処理、または、サーバからの離脱要求に応じて行われる処理等の、上述した各種の処理が実行される。その後、処理はステップS501に戻り、以上の処理が繰り返し実行される。
【0395】
ステップS504において、送信されてきたメッセージが、既知のグループに属するノードから送信されてきたものでないと判定した場合、グループ管理機能部22は、ステップS506に進み、次に、送信されてきたメッセージが、グループ告知メッセージであるか否かを判定する。
【0396】
グループ管理機能部22は、ステップS506において、送信されてきたメッセージがグループ告知メッセージであると判定した場合、ステップS507に進む。
【0397】
ステップS507において、グループ管理機能部22は、グループ管理テーブル(図8)に、グループ告知メッセージを送信してきたサーバが管理するグループの情報を追加し、自分自身の状態を初期状態とする(初期状態を維持する)。
【0398】
ステップS507の処理が行われた後、および、ステップS506において、送信されてきたメッセージがグループ告知メッセージでないと判定された場合、ステップS501に戻り、それ以降の処理が繰り返し実行される。
【0399】
図64は、グループに参加しているノードAのグループ管理機能部22により所定の周期で実行される処理を説明するフローチャートである。
【0400】
ステップS511において、グループ管理機能部22は、グループに参加してから所定時間が経過したか否かを判定し、所定時間が経過したと判定するまで待機する。
【0401】
グループ管理機能部22は、ステップS511において、所定時間が経過したと判定した場合、ステップS512に進み、自ら管理している、図示せぬメモリ等に保持されているノードリストを取得する。
【0402】
ステップS513において、グループ管理機能部22は、所定の変数iに「0」を設定し、ステップS514に進み、変数iの値が、ノードリストに記述されているグループの数よりも小さいか否か(ステップS513の処理を経た場合、所定のグループの情報がノードリストに記述されているか否か)、すなわち、ノードリストに記述されている全てのグループについて、ステップS515以降の処理を行ったか否かを判定する。
【0403】
ステップS514において、変数iの値が、ノードリストに記述されているグループの数よりも大きいと判定した場合、グループ管理機能部22は、ステップS511に戻り、それ以降の処理を繰り返し実行する。
【0404】
一方、グループ管理機能部22は、ステップS514において、変数iの値が、ノードリストに記述されているグループの数よりも小さいと判定した場合、ステップS515に進み、変数iに対応するグループにおいて、ノードAの状態が正式サーバであるか否かを判定する。
【0405】
後述するように、所定のタイミングで変数iが1ずつインクリメントされるため、変数i=0に対応するグループにおけるノードAの状態、変数i=1に対応するグループにおけるノードAの状態、変数i=2に対応するグループにおけるノードAの状態、・・・といったように、それぞれのグループにおけるノードAの状態が順次判定される。
【0406】
グループ管理機能部22は、ノードAの状態が正式サーバであると判定した場合、ステップS516に進み、他のノードに対して、グループ告知メッセージを送信する。すなわち、図15を参照して説明した処理がステップS516において行われる。
【0407】
グループ管理機能部22は、ステップS516において、グループ告知メッセージを送信した後、ステップS517に進み、変数iを「1」だけインクリメントし、ステップS514に進み、それ以降の処理を繰り返し実行する。すなわち、ノードAが属するそれぞれのグループについて、ステップS515以降の処理が繰り返し実行される。
【0408】
なお、ノードAがサーバであり、変数iがグループの数よりも小さいか否かを判定し、小さいと判定した場合に、グループ告知メッセージを送信する処理(ステップS514乃至S517のループ処理)は、例えば、2秒周期で行われる。
【0409】
グループ管理機能部22は、ステップS515において、ノードAの状態が正式サーバでないと判定した場合、ステップS518に進み、そのとき設定されている変数iに対応するグループにおいて、最後にグループ告知メッセージを受信してから、例えば、10秒などの所定の時間が経過したか否かを判定する。
【0410】
グループ管理機能部22は、ステップS518において、所定の時間が経過していないと判定した場合、ステップS517に進み、それ以降の処理を繰り返し実行し、一方、最後にグループ告知メッセージを受信してから所定の時間が経過したと判定した場合、ステップS519に進む。
【0411】
ステップS519において、グループ管理機能部22は、変数iに対応するグループに、クライアントとして参加しているか否かを判定し、クライアントとして参加していると判定した場合、ステップS520に進み、ノードAの状態を、参加(図5のState5)からサーバ候補B(State6)に遷移させる。そのとき、図31を参照して説明した調停処理が行われる。
【0412】
グループ管理機能部22は、ステップS519において、クライアントとしてグループに参加していないと判定した場合、ステップS521に進み、グループ管理テーブルから、そのとき対象としている変数iに対応するグループの情報を削除する。
【0413】
ステップS520,S521の処理が行われた後、処理はステップS517に進み、それ以降の処理が繰り返し実行される。以上の処理が周期的にグループ管理機能部22により実行され、ノードAの状態が管理される。
【0414】
以上においては、各ノードにおいて利用される優先順位は、生成された乱数に基づいて設定されるとしたが、サーバ専用ノードに対してのみ割り当てられる順位の範囲、サーバ・クライアント兼用ノードに対してのみ割り当てられる順位の範囲、および、クライアント専用ノードに対してのみ割り当てられる順位の範囲などのように、ノードの属性に応じて、割り当てられる優先順位の範囲が予め設定されているようにしてもよい。
【0415】
この場合、例えば、サーバ専用ノードに対して0乃至63の優先順位が割り当てられ、サーバ・クライアント兼用ノードに対して64乃至128の優先順位が割り当てられる。また、それ以降の128乃至255の優先順位は、クライアント専用ノードに対して割り当てられる。
【0416】
このように、優先順位の範囲を予め設定しておくことにより、異なる属性を有するノードが混在する場合、より効率的に調停を行うことができ、1つのサーバを容易に決定することが可能となる。
【0417】
なお、優先順位の範囲は、0乃至255の範囲に限られるものではない。
【0418】
各ノードの優先順位は、乱数に基づいて設定されるだけでなく、それ以外の様々な方法により設定されるようにしてもよい。例えば、機器に予め組み込まれているようにしてもよいし、電源が投入される度に設定されるようにしてもよい。
【0419】
また、以上においては、各ノード間でメッセージを送受信するネットワーク4がIEEE802.11a,802.11bなどに準拠した無線LANなどである場合について説明したが、ネットワーク4を、例えば、ハードウェアが存在することなく、ソフトウェアのみで仮想的に形成されるネットワークや、通信機能同士をソフトウェアのインタフェースで直接結合して構成されるネットワークとすることも可能である。
【0420】
また、ノード1乃至ノード3(ノードA乃至ノードC)は、パーソナルコンピュータやPDAにより構成される場合について説明したが、これらのノードは、CPUと記憶装置のみからなる機器、或いは、1チップのLSI(Large Scale Integrated
Circuit)により構成することも可能である。
【0421】
さらに、以上においては、グループを管理するサーバは、必ず1つであるとしたが、グループを管理するサーバと、サービスを提供するサーバがそれぞれ用意されたり、サービスを提供するサーバが複数用意されるなど、複数のサーバが1つのネットワーク上に用意されるようにしてもよい。
【0422】
上述した一連の処理は、ハードウェアにより実行させることもできるが、ソフトウェアにより実行させることもできる。この場合、そのソフトウェアを実行させるノードは、例えば、図65に示されるようなパーソナルコンピュータにより構成される。図65に示される構成は、図2の構成を、より詳細に表したものに相当する。
【0423】
図65において、CPU91は、ROM(Read Only Memory)92に記憶されているプログラム、または、記憶部98からRAM(Random Access Memory)93にロードされたプログラムに従って各種の処理を実行する。RAM93にはまた、CPU91が各種の処理を実行する上において必要なデータなどが適宜記憶される。
【0424】
CPU91、ROM92、およびRAM93は、バス94を介して相互に接続されている。このバス94にはまた、入出力インタフェース95も接続されている。
【0425】
入出力インタフェース95には、キーボード、マウスなどよりなる入力部96、CRT(Cathode Ray Tube),LCD(Liquid Crystal Display)などよりなるディスプレイ、並びにスピーカなどよりなる出力部97、ハードディスクなどより構成される記憶部98、および、通信部99(通信部12)が接続されている。通信部99は、ネットワーク4を介しての通信処理を行う。
【0426】
入出力インタフェース95にはまた、必要に応じてドライブ100が接続され、磁気ディスク101、光ディスク102、光磁気ディスク103、或いは半導体メモリ104などが適宜装着され、それから読み出されたコンピュータプログラムが、必要に応じて記憶部108にインストールされる。
【0427】
一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば、汎用のパーソナルコンピュータなどに、ネットワークや記録媒体からインストールされる。
【0428】
この記録媒体は、図65に示されるように、装置本体とは別に、ユーザにプログラムを提供するために配布される、プログラムが記録されている磁気ディスク101(フレキシブルディスクを含む)、光ディスク102(CD-ROM(Compact Disk-Read Only Memory),DVD(Digital Versatile Disk)を含む)、光磁気ディスク103(MD(登録商標)(Mini-Disk)を含む)、もしくは半導体メモリ104などよりなるパッケージメディアにより構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに提供される、プログラムが記録されているROM92や、記憶部98に含まれるハードディスクなどで構成される。
【0429】
なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に従って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。
【0430】
また、本明細書において、システムとは、複数の装置により構成される装置全体を表わすものである。
【0431】
【発明の効果】
本発明によれば、情報管理装置により提供されるサービスを、情報処理装置が利用するシステムを実現することができる。
【0432】
また、本発明によれば、情報管理装置がグループから離脱した場合であっても、効率的に、かつ、確実に、その機能を引き継ぐ情報処理装置を選択することができる。
【図面の簡単な説明】
【図1】本発明を適用した通信システムの構成例を示す図である。
【図2】図1のノードの構成例を示すブロック図である。
【図3】図1のノードの他の構成例を示すブロック図である。
【図4】図1のノードの機能構成例を示すブロック図である。
【図5】状態遷移の例を示す図である。
【図6】ノードリストの例を示す図である。
【図7】ノードリストの他の例を示す図である。
【図8】グループ管理テーブルの例を示す図である。
【図9】個別グループ管理テーブルの例を示す図である。
【図10】ノードリストの例を示す図である。
【図11】メッセージのフォーマットの例を示す図である。
【図12】コマンドとコードの対応例を示す図である。
【図13】通信システムの処理を説明するシーケンスである。
【図14】図13の処理において送受信されるメッセージの例を示す図である。
【図15】図13のノードAの処理を説明するフローチャートである。
【図16】図15の処理に対応して実行される、ノードBの処理を説明するフローチャートである。
【図17】ノードCのグループ開始処理を説明するフローチャートである。
【図18】図17のステップS52において実行される処理を説明するシーケンスである。
【図19】図18の処理において送受信されるメッセージの例を示す図である。
【図20】図18の処理において送受信される他のメッセージの例を示す図である。
【図21】図18の処理において送受信されるさらに他のメッセージの例を示す図である。
【図22】図18の処理において送受信されるメッセージの例を示す図である。
【図23】図18の処理において送受信される他のメッセージの例を示す図である。
【図24】図18のノードCの処理を説明するフローチャートである。
【図25】図18のノードAの処理を説明するフローチャートである。
【図26】図17のステップS54において実行される処理を説明するシーケンスである。
【図27】図26の処理において送受信されるメッセージの例を示す図である。
【図28】図26の処理において送受信される他のメッセージの例を示す図である。
【図29】図26の処理において送受信されるさらに他のメッセージの例を示す図である。
【図30】図26の処理において送受信されるメッセージの例を示す図である。
【図31】図26のノードAの処理を説明するフローチャートである。
【図32】クライアントがグループから離脱する処理を説明するシーケンスである。
【図33】図32の処理において送受信されるメッセージの例を示す図である。
【図34】図32の処理において送受信される他のメッセージの例を示す図である。
【図35】図32の処理において送受信されるさらに他のメッセージの例を示す図である。
【図36】図32の処理において送受信されるメッセージの例を示す図である。
【図37】図32のノードCの処理を説明するフローチャートである。
【図38】図32のノードAの処理を説明するフローチャートである。
【図39】サーバがグループから離脱する処理を説明するシーケンスである。
【図40】図39の処理において送受信されるメッセージの例を示す図である。
【図41】図39の処理において送受信される他のメッセージの例を示す図である。
【図42】図39の処理において送受信されるさらに他のメッセージの例を示す図である。
【図43】図39の処理において送受信されるメッセージの例を示す図である。
【図44】図39の処理において送受信される他のメッセージの例を示す図である。
【図45】図39の処理において送受信されるさらに他のメッセージの例を示す図である。
【図46】図39のノードAの処理を説明するフローチャートである。
【図47】図39のノードBの処理を説明するフローチャートである。
【図48】サーバがグループから離脱する他の処理を説明するシーケンスである。
【図49】図48の処理において送受信されるメッセージの例を示す図である。
【図50】図48の処理において送受信される他のメッセージの例を示す図である。
【図51】図48の処理において送受信されるさらに他のメッセージの例を示す図である。
【図52】図48の処理において送受信されるメッセージの例を示す図である。
【図53】図48の処理において送受信される他のメッセージの例を示す図である。
【図54】ノードの他の機能構成例を示すブロック図である。
【図55】ノードAとノードB間で行われる処理を説明するシーケンスである。
【図56】図55の処理で用いられるAPIの例を示す図である。
【図57】図55の処理で送信されるデータの例を示す図である。
【図58】図55の処理で用いられるAPIの他の例を示す図である。
【図59】ノードAとノードB間で行われる他の処理を説明するシーケンスである。
【図60】図59の処理で用いられるAPIの例を示す図である。
【図61】図59の処理で送信されるデータの例を示す図である。
【図62】図59の処理で用いられるAPIの他の例を示す図である。
【図63】グループ管理機能部の処理を説明するフローチャートである。
【図64】グループ管理機能部の他の処理を説明するフローチャートである。
【図65】記録媒体の例を示す図である。
【符号の説明】
1乃至3 ノード, 4 ネットワーク, 11 演算処理部, 12 通信部, 21 通信機能部, 22 グループ管理機能部, 22A メッセージ管理部, 22B 状態管理部, 22C リスト管理部, 23 サーバ機能部, 24 クライアント機能部, 101 磁気ディスク, 102 光ディスク, 103 光磁気ディスク, 104 半導体メモリ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a communication system and method, an information management apparatus and method, an information processing apparatus and method, and a program, and more particularly, to a communication system and method, an information management apparatus, and a method that can more appropriately respond to dynamic changes in a network. The present invention relates to a method, an information processing apparatus and method, and a program.
[0002]
[Prior art]
In recent years, devices compatible with various wireless communication technologies typified by wireless LAN (Local Area Network) compliant with IEEE (Institute of Electrical and Electronics Engineers) 802.11b and Bluetooth (registered trademark) are rapidly spreading.
[0003]
Also, in a network realized by such wireless communication, even if a fixed server is not provided, one of a plurality of collected terminals becomes a server, and a server communicates with another terminal. -Various technologies for executing a client model application have been proposed.
[0004]
In this case, in order for the client to continue using the service provided by the server, for example, it is necessary to deal with a case where a terminal that has provided a server function leaves the network without any notice to other terminals. Technology is needed.
[0005]
Therefore, as such a technique, for example, in Japanese Patent Application Laid-Open No. H11-163, all clients manage a list in which information of terminals that are server candidates is described, and a terminal that has provided a server function leaves the network. A technique is disclosed in which, even when the above operation is performed, another client can take over the server function.
[0006]
[Patent Document 1]
JP-A-2000-215177
[0007]
[Problems to be solved by the invention]
However, for example, according to the technology disclosed in
[0008]
This problem may become more remarkable as networks become more ubiquitous and can communicate with various devices easily and at any timing. For example, in such an environment, the user of each terminal tries to communicate at a desired place while moving, without being aware of whether his / her own terminal can communicate or is not. As a result, the configuration of the network frequently changes, for example, a plurality of terminals cannot communicate at the same time.
[0009]
The present invention has been made in view of such a situation, and is intended to more suitably cope with a dynamic change of a network.
[0010]
[Means for Solving the Problems]
An information management device of a communication system according to the present invention includes: a first transmission unit configured to transmit a first message including a list of information processing devices participating in a communication group to the information processing device at a predetermined cycle; When ending the management, the second message is transmitted by the second transmitting means for transmitting a second message notifying the information processing apparatus to the information processing apparatus participating in the communication group, and the second message is transmitted by the second transmitting means. In response to this, the first receiving means for receiving the third message including the priority of the information processing apparatuses in the communication group, which is transmitted from the information processing apparatus, and the third message received by the first receiving means Selecting means for selecting an information processing apparatus to be an information management apparatus for newly managing a communication group based on the priority included in the third message, wherein the first transmitting means The information processing apparatus selected by the selection means, and transmits a first message including a list of information processing devices participating in the communication group to be newly managed.
[0011]
Further, the information processing device of the communication system according to the present invention transmits the third message when the second message is transmitted from the second receiving means for receiving the first message and the information management device. A third transmitting unit and, based on the priority included in the third message transmitted by the third transmitting unit, by itself as an information managing device for newly managing the communication group by the current information managing device. When the selection is indicated by the list of the first message, a management means for managing the communication group is provided.
[0012]
The communication method of the communication system according to the present invention includes: a first transmitting step of transmitting a first message including a list of information processing devices participating in a communication group to the information processing device at a predetermined cycle; When the management is completed, a second transmission step of transmitting a second message notifying the information processing apparatus to the information processing apparatus participating in the communication group, and the second message is processed by the second transmission step. A first receiving step of receiving a third message including a priority of the information processing device in the communication group transmitted from the information processing device in response to the transmission, and a process of the first receiving step A selection process for selecting an information processing apparatus to be an information management apparatus for newly managing a communication group based on the priority included in the received third message. And a first message including a list of information processing devices participating in the newly managed communication group is processed by the information processing device selected in the process of the selection step. It is transmitted.
[0013]
Also, the communication method of the communication system according to the present invention includes a second receiving step of receiving the first message, and a third step of transmitting the third message when the second message is transmitted from the information management device. 3 based on the priority included in the third message transmitted by the process of the third transmission step and the third message transmitted by the third information transmission step. And a management step of managing the communication group when the selection by the first message is indicated by the list of the first message.
[0014]
An information management apparatus according to the present invention includes: a first transmission unit configured to transmit a first message including a list of information processing apparatuses participating in a communication group to an information processing apparatus at a predetermined cycle; When ending, a second transmitting means for transmitting a second message notifying the information processing apparatus participating in the communication group, and a second message being transmitted by the second transmitting means. Receiving means for receiving a third message including the priority of the information processing device in the communication group, transmitted from the information processing device, and the priority included in the third message received by the receiving means Selecting means for selecting an information processing apparatus to be an information management apparatus for newly managing a communication group based on the first transmission means. The broadcasting processing apparatus, and transmits a first message including a list of information processing devices participating in the communication group to be newly managed.
[0015]
The receiving means receives the third messages transmitted from all the information processing apparatuses participating in the communication group, and the selecting means selects all of the information processing apparatuses participating in the communication group based on the priority included in the third message. Among the information processing apparatuses, an information processing apparatus serving as an information management apparatus for newly managing a communication group can be selected.
[0016]
The priority order can be determined based on a predetermined random number generated in the information processing device.
[0017]
Further, the priority order may be determined in a predetermined range according to the attribute of the information processing apparatus.
[0018]
An information management method of an information management device according to the present invention includes a first transmission step of transmitting a first message including a list of information processing devices participating in a communication group to an information processing device at a predetermined cycle; When ending the management of the group, a second transmission step of transmitting a second message notifying the information processing apparatus to the information processing apparatuses participating in the communication group, and a second transmission step of processing the second message. A receiving step of receiving the third message including the priority of the information processing device in the communication group transmitted from the information processing device in response to the transmission of the message; Selecting an information processing apparatus to be an information management apparatus for newly managing a communication group based on the priority included in the message of No. 3; A first message including a list of information processing devices participating in a communication group newly managed by the information processing device selected by the processing of the selection step is transmitted by the processing of the first transmission step It is characterized by.
[0019]
A first program according to the present invention includes: a first transmission step of transmitting a first message including a list of information processing apparatuses participating in a communication group to an information processing apparatus at a predetermined cycle; Is completed, a second message is transmitted to the information processing apparatuses participating in the communication group, and a second message is transmitted by the processing of the second message transmission step. Receiving the third message including the priority of the information processing device in the communication group, transmitted from the information processing device, and the third message received by the processing of the receiving step Selecting an information processing apparatus to be an information management apparatus for newly managing a communication group based on the priority included in A first message including a list of information processing apparatuses participating in a newly managed communication group is transmitted by the processing of the first transmission step by the information processing apparatus selected in the step processing. I do.
[0020]
The first information processing apparatus according to the present invention includes: a receiving unit that receives a first message including a list of information processing apparatuses that participate in a communication group, transmitted by the information management apparatus at a predetermined cycle; When the second message notifying that the management of the communication group is to be ended is transmitted, the transmitting means for transmitting the third message including the own priority in the communication group, and the transmitting means transmits the third message. The first message list indicates that the current information management device has selected itself as the information management device for newly managing the communication group based on the priority included in the third message. And a management means for managing the communication group.
[0021]
It is possible to further include a generation unit that generates a predetermined random number. At this time, the priority is determined based on the random number generated by the generation unit.
[0022]
The priorities can be determined in a predetermined range according to the attribute of the information processing apparatus.
[0023]
The information processing method of the first information processing apparatus according to the present invention includes a receiving step of receiving a first message including a list of information processing apparatuses participating in a communication group, which is transmitted at a predetermined cycle by the information management apparatus; A transmission step of transmitting a third message including its own priority in the communication group when a second message notifying the end of the management of the communication group is transmitted from the information management device; Of the first message, based on the priority included in the third message transmitted by the above-described process, that the current information management device has selected itself as the information management device for newly managing the communication group. And managing the communication group when represented by the list.
[0024]
A second program according to the present invention includes: a receiving step of receiving a first message including a list of information processing devices participating in a communication group, which is transmitted at a predetermined cycle by the information management device; When a second message notifying that the management of the group is to be ended is transmitted, a transmission step of transmitting a third message including its own priority in the communication group, and a transmission step of transmitting the third message. The first message list indicates that the current information management device has selected itself as the information management device for newly managing the communication group based on the priority included in the third message. And a management step of managing the communication group.
[0025]
In the second information processing apparatus of the present invention, detecting means for detecting that the management of the communication group has been terminated by the information management apparatus, and detecting that the information management apparatus has completed the management of the communication group by the detecting means Transmitting means for transmitting a message including its own first priority in the communication group to another information processing device participating in the communication group, and other information transmitted from the other information processing device. A receiving unit of the processing device for receiving another message including the second priority in the communication group, wherein the first priority is higher than the second priority included in the other message received by the receiving unit; And a management unit for newly managing the communication group when the communication group is high.
[0026]
In the information processing method of the second information processing apparatus according to the present invention, the information management apparatus manages the communication group by performing a detection step of detecting that the management of the communication group is terminated by the information management apparatus, and the processing of the detection step. A transmitting step of transmitting a message including the first priority of the communication group to the other information processing apparatus when the communication processing is completed, and transmitting the message from the other information processing apparatus to the other information processing apparatus participating in the communication group; The receiving step of receiving another message including the second priority in the communication group of the other information processing apparatus, and the first priority is assigned to another message received by the processing of the receiving step. And a management step of newly managing the communication group when the priority is higher than the included second priority.
[0027]
According to a third program of the present invention, the detection step of detecting that the management of the communication group has been terminated by the information management device and the processing of the detection step detect that the information management device has finished managing the communication group. Transmitting a message including its own first priority in the communication group to another information processing device participating in the communication group; and transmitting other information transmitted from the other information processing device. A receiving step of the processing device receiving another message including the second priority in the communication group; and a second priority including the first priority in the other message received by the processing of the receiving step. And a management step of newly managing the communication group when the order is higher than the rank.
[0028]
In the communication system and method of the present invention, when a first message including a list of information processing devices participating in a communication group is transmitted to the information processing device at a predetermined cycle, and when the management of the communication group ends, A second message notifying the fact is transmitted to the information processing devices participating in the communication group. Further, in response to the transmission of the second message, a third message including the priority of the information processing device in the communication group, which is transmitted from the information processing device, is received, and the received third message is received. Based on the priority included in the information processing device, an information processing device serving as an information management device for newly managing the communication group is selected. Then, the selected information processing device transmits a first message including a list of information processing devices participating in the newly managed communication group.
[0029]
Further, in the communication system and method of the present invention, when the first message is received and the second message is transmitted from the information management device, the third message is transmitted. The first message list indicates that the current information management device has selected itself as the information management device for newly managing the communication group based on the priority included in the third message. At this time, communication groups are managed.
[0030]
According to the first information processing apparatus, method, and program of the present invention, a first message including a list of information processing apparatuses participating in a communication group, which is transmitted at a predetermined cycle by an information management apparatus, is received. When the management device sends a second message notifying that the management of the communication group is to be ended, a third message including its own priority in the communication group is sent. Also, based on the priority included in the transmitted third message, the first message list indicates that the user himself / herself has been selected by the current information management device as the information management device for newly managing the communication group. When represented by, the communication group is managed.
[0031]
In the second information processing apparatus, method, and program according to the present invention, it is detected that the management of the communication group is terminated by the information management apparatus, and it is detected that the management of the communication group is terminated by the information management apparatus. At this time, a message including its own first priority in the communication group is transmitted to another information processing device participating in the communication group. Further, another message transmitted from another information processing device and including the second priority in the communication group of the other information processing device is received, and the first priority is included in the other message. When the communication group is higher than the second priority, the communication group is newly managed.
[0032]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a diagram showing a configuration example of a communication system to which the present invention is applied.
[0033]
The
[0034]
In the example of FIG. 1, the
[0035]
Each of the
[0036]
A “group” is formed by a predetermined server and clients that use services provided by the server. When a predetermined node belongs to a group and the service provided by the server becomes available, the node is in a state of participating in the “group”.
[0037]
In the example of FIG. 1, a group is configured by
[0038]
Note that the server can realize the function of the client simultaneously with the function of the server. Also, FIG. 1 shows three nodes,
[0039]
FIG. 2 is a block diagram showing a configuration example of the
[0040]
The
[0041]
The
[0042]
The
[0043]
FIG. 2 illustrates a minimum configuration for realizing the
[0044]
FIG. 4 is a block diagram illustrating a functional configuration example of the
[0045]
The
[0046]
Specifically, the
[0047]
For example, a predetermined message is multicast-transmitted from the
[0048]
The group
[0049]
The
[0050]
The
[0051]
For example, when the node providing the “server function” does not exist on the
[0052]
The list management unit 22C of the group
[0053]
The list is managed by all nodes and is constantly updated by the server. That is, the latest list is distributed from the server to the client at a predetermined cycle, and the list of each client is updated.
[0054]
The
[0055]
The
[0056]
For example, the
[0057]
Note that the
[0058]
FIG. 5 is a diagram illustrating an example of state transition managed by the
[0059]
The initial state (State1) indicates the state of a node that is going to join the group. If the node in the initial state cannot receive the group notification message transmitted from the server of the already existing group within a predetermined period, the node changes its own state to the server candidate A (State2).
[0060]
As will be described later, a group notification message is multicast-transmitted at a predetermined cycle from a server existing in the group. Therefore, if the group notification message is not transmitted even though the predetermined time has elapsed, it indicates that there is a possibility that the server does not exist in the group to be joined.
[0061]
The server candidate A (State 2) is a state that is transited when there is a possibility that the server does not exist. The node of the server candidate A transmits a server candidate notification message including the rank of the server candidate A to itself as another server candidate.
[0062]
The node of the server candidate A has a higher priority than a node of another server candidate (the server candidate A or the server candidate B) when a predetermined time has elapsed after transmitting the server candidate notification message. If it is determined that the node is a set node, the state is changed to the official server (State 4).
[0063]
On the other hand, if it is determined from the server candidate notification message transmitted from another server candidate node that there is another node having a higher priority than itself, or a group notification message transmitted from the server is received. In this case, the node of the server candidate A changes its state to non-participation (State 3).
[0064]
The node in the initial state (State 1) receives the group notification message within a predetermined time after the initial state, or receives the server candidate notification message transmitted from the server candidate A or the server candidate B node. In this case, the state is changed to non-participation (State 3).
[0065]
Non-participation (State 3) indicates a state in which the user has not yet joined the group. The unjoined node sends a node join request message to a server existing in the group, and in response to the node join approval message returned from the server, or a group announcement message sent by the server. If the own node exists in the node list stored in, the state is changed to participation (State5).
[0066]
Participation (State 5) indicates a state of participating in the group as a client. If the joining node determines that the group announcement message has not been transmitted from the server for a predetermined time or more since the last reception of the group announcement message, or that the server has determined that the server has left the group, The state is changed to server candidate B (State 6).
[0067]
The server candidate B (State 6) is a state in which the client in the participating state transitions as necessary. When the node of the server candidate B receives the group notification message transmitted from the server, or receives the server candidate notification message indicating that there is a node having a higher priority as a server candidate than itself, The state is transited to participation (State 5).
[0068]
Further, the node of the server candidate B receives a server movement notification message addressed to itself when a predetermined time has elapsed after transmitting the server candidate notification message or from a server existing in the group. In this case, the state is transited to the official server (State 4).
[0069]
The formal server (State 4) is a state in which the node that manages the group as a server transitions. When the node of the official server leaves the group in the server leaving sequence described below, and when the participating (State 5) node leaves the group in the node leaving sequence, the state changes to leaving (State 7). Let it.
[0070]
The withdrawal (State 7) indicates a state where the user has left the group. Thereafter, the node in the leaving state changes its own state to a state such as non-participation (State 3) as appropriate.
[0071]
As described above, the state of each node is changed. The details of each message described above will be described later.
[0072]
6 and 7 are diagrams illustrating examples of the node list.
[0073]
As described above, each node (client) participating in the group manages the latest and identical node list based on the group notification message transmitted from the server. Then, for example, when a server in the group leaves, a node that functions as a server next is determined based on the priority of each node represented by the node list.
[0074]
FIG. 6 shows the priority in numerical values. In this example, the node assigned the lowest numerical value is the node with the highest priority.
[0075]
In the example of FIG. 6, the node A to which the numerical value “0” is assigned is the node with the highest priority and is the server. In the example of FIG. 6, a node D to which a numerical value “1” is allocated, a node C to which a numerical value “2” is allocated, a node B to which a numerical value “3” is allocated, and a numerical value “4” Priorities are set in the order of the assigned nodes E.
[0076]
The node list shown in FIG. 6 is managed by each node having the node IDs of the nodes A to E.
[0077]
FIG. 7 is a diagram illustrating an example of a node list in which priorities are determined according to addresses in a memory.
[0078]
In the example of FIG. 7, the node A described in the memory area 31 is the node with the highest priority and is the server. Also, in the example of FIG. 7, the node D in which the ID is described in the area 32, the node C in which the ID is described in the
[0079]
In each node, for example, a node list is managed in a hierarchical structure as shown in FIGS.
[0080]
FIG. 8 is a diagram illustrating an example of the group management table 41 managed by the node A.
[0081]
The group management table 41 manages the number of groups recognized by the node A and the reference destination of the individual group management table. Information on each group is described in the individual group management table.
[0082]
The group management table 41 in FIG. 8 describes that the number of groups recognized by the node A is three. The reference destination (reference 1) of the individual group management table of group A (group A management table), the reference destination of the individual group management table of group B (group B management table) (reference 2), and the individual reference of group C The reference destination (reference 3) of the group management table (group C management table) is described.
[0083]
FIG. 9 is a diagram illustrating an example of the individual group management table 51 of the group A.
[0084]
The individual group management table 51 is obtained based on “
[0085]
The individual group management table 51 describes the group ID of the group whose information is managed by this table, the state of the node A (own node) in the group A, and the reference destination of the node list of the nodes belonging to the group A. ing.
[0086]
In the example of FIG. 9, the group ID is “group A”, the state of the node A is “3”, and the reference destination of the node list management table (the table indicating the node list and the number of nodes) is “
[0087]
The state of the node is represented by a numerical value. For example, “initial state” is represented by “0”, “server candidate A” is represented by “1”, and “not participated” is represented by “2”. Also, "official server" is represented by "3", "participation" is represented by "4", "server candidate B" is represented by "5", and "leave" is represented by "6". That is, in this case, the state of the node A having the individual group management table 51 in FIG. 9 is the official server.
[0088]
FIG. 10 is a diagram illustrating an example of the node list 61 of the nodes belonging to the group A.
[0089]
The node list 61 is obtained based on “
[0090]
In the example of FIG. 10, the number of nodes belonging to group A is “4”. Further, “node A” represented by the node ID “1” is the first-priority node and is a server. Further, “Node B” represented by the node ID “2” is the second highest priority node, “Node C” represented by the node ID “3” is the third highest priority node, and the node ID “Node D” represented by “4” is the fourth-highest priority node.
[0091]
The table information and the node list having the above hierarchical structure are managed in each node.
[0092]
FIG. 11 is a diagram illustrating an example of a format of a message transmitted and received between the nodes.
[0093]
In the
[0094]
As described above, the message is multicast transmitted over the
[0095]
The
[0096]
In the
[0097]
The
[0098]
FIG. 12 is a diagram showing an example of correspondence between commands described in the
[0099]
If the message to be transmitted is a group notification message, for example, “0x00” is described in its
[0100]
When the message to be transmitted is a node participation request message, “0x04” is described in the
[0101]
Further, if the message to be transmitted is a node participation rejection message, “0x08” is described in the
[0102]
Note that the format of the message is not limited to that shown in FIG.
[0103]
Next, the operation of the communication system of FIG. 1 will be described.
[0104]
First, a process of transmitting a group notification message from the
[0105]
In the following, the
[0106]
In step S1, the
[0107]
FIG. 14 is a diagram illustrating an example of the group notification message transmitted in step S1. Parts corresponding to those in FIG. 11 are denoted by the same reference numerals.
[0108]
In the
[0109]
In the
[0110]
Returning to the description of FIG. 13, a group notification message including such various kinds of information is transmitted from node A, which is a server.
[0111]
The group notification message transmitted from the node A is received by the node B in step S11, and is received by the node C in step S21.
[0112]
The group notification message is transmitted from the server at a predetermined cycle. That is, in step S2 after a lapse of a predetermined time after the processing in step S1 is performed, and in step S3 after a lapse of a predetermined time after the processing in step S2 is performed, the node A, the node B, and the node A group announcement message is sent to C.
[0113]
The node B receives the group notification message transmitted from the node A in steps S12 and S13, and the node C receives in steps S22 and S23.
[0114]
The node B and the node C (client) that have received the group notification message update the node list managed by themselves based on the node list included in the received message, as necessary.
[0115]
The above processing is repeatedly executed by the nodes A to C.
[0116]
As described above, since the node list indicating the latest group configuration is distributed by the server at a predetermined cycle, each client always has the latest node list.
[0117]
Next, with reference to a flowchart of FIG. 15, a process of the node A transmitting the group notification message will be described. The processing illustrated in FIG. 15 is basically the same as the processing of the node A described with reference to FIG.
[0118]
In step S31, the
[0119]
When determining that the predetermined time has elapsed in step S31, the
[0120]
Thereafter, the process returns to step S31, and the above processing is repeatedly executed.
[0121]
Next, a process executed by the node B corresponding to the process of FIG. 15 will be described with reference to a flowchart of FIG. That is, the processing illustrated in FIG. 16 is basically the same as the processing of the node B described with reference to FIG.
[0122]
In step S41, the
[0123]
In step S42, the list management unit 22C compares the node list managed by itself with the node list transmitted by the group notification message, and determines whether the managed node list needs to be updated. I do.
[0124]
If the list management unit 22C determines in step S42 that it is not necessary to update the node list, the process returns to step S41 and repeats the above processing.
[0125]
On the other hand, if it is determined in step S42 that the node list managed by itself needs to be updated based on the node list transmitted by the group notification message, the process proceeds to step S43, and the list management unit 22C updates the node list. Update.
[0126]
For example, the
[0127]
With the above processing, the latest node list is managed by the client. Note that the above processing is also executed in the node C which is a client.
[0128]
Next, the processing of the node C (node in the initial state) that connects to the
[0129]
When connected to the
[0130]
As described above, a group notification message is multicast-transmitted at a predetermined cycle from a server existing in the group. Therefore, if the node C receives the group announcement message within a predetermined time period, it indicates that the server that manages the group already exists on the
[0131]
In step S51, when determining that the group notification message has been transmitted within the predetermined period, the
[0132]
At this time, the state of the node C is a state of non-participation (
[0133]
If the node C can formally join the group as a client by the process of step S52, the node C performs a process of receiving a group notification message as a client in step S53. That is, the processing described with reference to FIG. 16 is executed by the node C. After that, the group start processing ends.
[0134]
On the other hand, if it is determined in step S51 that the group notification message has not been transmitted within the predetermined period, the
[0135]
In step S55, the
[0136]
In the server arbitration process, when the priority as the server candidate set to the node C is the highest, the node C is determined as the server, and when there is a server candidate with a higher priority than the node C, the other node ( Nodes other than node C) are determined as servers.
[0137]
If the
[0138]
In step S56, the transmission process of the group notification message described with reference to FIG. 15 is executed by the node C that is the official server.
[0139]
Next, the group participation process executed in step S52 in FIG. 17 will be described with reference to the sequence in FIG.
[0140]
In step S91, the
[0141]
In this message, an ID indicating transmission to the server (node A) is described as information for specifying the transmission destination. Therefore, the node participation request message is also transmitted to the node B by the multicast transmission, but is discarded by the
[0142]
The node participation request message transmitted by the node C is received by the node A, which is the official server, in step S71.
[0143]
In step S72, the
[0144]
The node participation approval message transmitted from the node A is received by the node C in step S92. Since the node C is specified as the transmission destination in the node participation approval message, the node B does not acquire the node participation approval message transmitted by multicast.
[0145]
In step S74, the
[0146]
As a result, the node C enters the group managed by the node A as a client.
[0147]
FIG. 19 to FIG. 23 are diagrams illustrating examples of the message.
[0148]
FIG. 19 is a diagram illustrating an example of a group notification message transmitted from node A to node B before node C joins the group by the processing of FIG.
[0149]
That is, in the
[0150]
That is, the node list of the group notification message shown in FIG. 19 does not yet include information on the node C.
[0151]
FIG. 20 is a diagram showing an example of a node participation request message transmitted from node C to node A in step S91 of FIG.
[0152]
As shown in the figure, “node A” is described in
[0153]
FIG. 21 is a diagram showing an example of a node participation approval message transmitted from node A to node C in step S72 of FIG.
[0154]
As shown in the figure, “node C” is described in
[0155]
FIG. 22 is a diagram illustrating an example of a group notification message transmitted from node A to node B and node C in step S74 of FIG.
[0156]
As shown in the figure, “ALL” is described in
[0157]
That is, in the group notification message of FIG. 22 transmitted after the node C joins the group, information on the node C is added to the node list as compared with the group notification message of FIG.
[0158]
FIG. 23 is a diagram illustrating an example of a node participation rejection message transmitted from the node A to the node C when the participation of the node C is rejected.
[0159]
As shown in the figure, “node C” is described in
[0160]
The above messages are transmitted and received before and after the processing described with reference to FIG.
[0161]
Next, with reference to the flowchart of FIG. 24, the processing of the node C requesting participation in the group will be described.
[0162]
The processing illustrated in FIG. 24 is basically the same as the processing of the node C described with reference to FIG.
[0163]
That is, in step S101, the
[0164]
The node participation request message transmitted by the node C is received by the node A, and it is determined whether to approve the participation of the node C (step S113 in FIG. 25). When the participation of the node C in the group is approved, a node participation approval message is transmitted from the node A to the node C (step S116 in FIG. 25).
[0165]
In step S102, the
[0166]
For example, when the number of nodes managed by the node A and the attributes of the nodes (types of devices) are limited, and the node C cannot participate, the node A sends a node participation rejection message to the node C.
[0167]
In step S103, the group
[0168]
At this time, the state of the node C remains unjoined (
[0169]
On the other hand, when it is determined in step S102 that the node A has transmitted the node participation approval message, the
[0170]
The node C acquires the node list included in the received group announcement message in step S105, and joins the group managed by the node A as a client. That is, in response to an instruction from the
[0171]
Next, processing executed by the node A in correspondence with the processing in FIG. 24 will be described with reference to the flowchart in FIG.
[0172]
The processing illustrated in FIG. 25 is basically the same as the processing of the node A described with reference to FIG.
[0173]
In step S111, the
[0174]
If the
[0175]
In step S113, the
[0176]
If the
[0177]
In step S116, the
[0178]
Thereafter, the transmission processing of the group notification message described with reference to FIG. 15 is executed by the node A, and the updated node list is distributed to the nodes B and C in step S115.
[0179]
The above processing is repeatedly executed to form a group in which a plurality of nodes participate.
[0180]
In the above description, the node participation approval message is transmitted to the node C whose participation has been approved. However, instead of transmitting the node participation approval message, a node list to which information about the node C is added is displayed. A group notification message including the group notification message may be transmitted. By receiving the group notification message including the node list to which the information on the node C is added and confirming the content, the node C can also recognize that the participation of the node C itself has been approved. .
[0181]
Next, the arbitration process executed in step S54 of FIG. 17 will be described with reference to the sequence of FIG.
[0182]
This arbitration process is a process of determining one server from the nodes of the server candidates (server candidates A or B). In FIG. 26, the case where the nodes A to C are in the state of the server candidate A, respectively, will be described.
[0183]
In step S121, the
[0184]
FIG. 27 is a diagram illustrating an example of a server candidate notification message multicast-transmitted by the node A.
[0185]
As shown in the figure, “ALL” is described in
[0186]
The priority is set based on, for example, a predetermined value among values from 0 to 255 generated by a pseudo-random number generation function of the list management unit 22C. For example, a node for which a smaller value is set is a node having a higher priority in becoming a formal server.
[0187]
The server candidate notification message including such a priority is transmitted / received by the server candidate nodes, and as a result of the comparison performed at each node, the node with the highest priority (the numerical value set based on the random number is low) Is determined as a server.
[0188]
Returning to the description of FIG. 26, the server candidate notification message transmitted from node A is received by node B in step S131, and received by node C in step S141.
[0189]
In step S132, the
[0190]
FIG. 28 is a diagram illustrating an example of a server candidate notification message multicast-transmitted by the node B.
[0191]
The server candidate notification message shown in FIG. 28 is the same as that shown in FIG. 27 except that “Node B” is described in the
[0192]
The server candidate notification message transmitted from the node B is received by the node A in step S122, and is received by the node C in step S142.
[0193]
In step S143, the
[0194]
FIG. 29 is a diagram illustrating an example of a server candidate notification message multicast-transmitted by the node C.
[0195]
The server candidate notification message shown in FIG. 29 is the same as that shown in FIG. 27 except that “Node C” is described in the
[0196]
The server candidate notification message transmitted from the node C is received by the node A in step S123, and is received by the node B in step S133.
[0197]
As described above, the server candidate notification message is transmitted and received between the nodes that are the server candidates, and the priority set for each node is obtained.
[0198]
The node A performs server arbitration based on the server candidate notification messages transmitted from the nodes B and C in step S124, and the node B has been transmitted from the nodes A and C in step S134. Server arbitration is performed based on the server candidate notification message. In step S144, the node C arbitrates the servers based on the server candidate notification messages transmitted from the nodes A and B.
[0199]
Specifically, each node compares the priority set for itself with the priority set for the other nodes obtained by the server candidate notification message. Is determined as the official server.
[0200]
Therefore, when the server candidate notification messages shown in FIGS. 27 to 29 are transmitted and received between the nodes A to C, the node A having the highest priority (the lowest set numerical value) is set as the official server. Selected.
[0201]
When there is a node having the same priority, for example, a node having a smaller ASCII code of the node ID is determined as a node having a higher priority.
[0202]
In step S125, the list management unit 22C of the group
[0203]
At this time, the nodes B and C, which have not been determined as the official servers, are in a state of participating (State 5) as a client from the server candidate A (
[0204]
The group announcement message transmitted from node A is received by node B in step S135, and received by node C in step S145.
[0205]
FIG. 30 is a diagram illustrating an example of a group notification message transmitted by the node A newly determined as an official server and received by the nodes B and C.
[0206]
In the example of FIG. 30, “ALL” is described in
[0207]
As described above, even when no server exists in the group, it is possible to select only one server.
[0208]
Also, when there is no server, all nodes are server candidates, and server candidate notification messages are sent and received.If a plurality of nodes other than the server simultaneously leave the group, It is possible to efficiently determine a node that operates as a server. That is, even when a plurality of nodes leave the group at the same time, as long as the nodes remain in the group, the node operating as a server is selected from among them.
[0209]
In the above description, the arbitration of the server is performed based on the priority set based on the random number. However, the arbitration may be performed based on other information. For example, the hardware configuration of each node may be compared, and the node with the highest specification may be selected as the server, or simply the node that multicast-transmits the server candidate notification message first may be selected as the server. You may make it so.
[0210]
Next, the processing of the node A (server candidate A) that performs server arbitration will be described with reference to the flowchart of FIG.
[0211]
The processing illustrated in FIG. 31 is basically the same as the processing of the node A described with reference to FIG.
[0212]
In step S151, the
[0213]
If it is determined in step S152 that the server candidate notification message has been transmitted from another node, the
[0214]
If it is determined in step S152 that the server candidate notification message has not been transmitted, the process of step S153 is skipped.
[0215]
In step S154, the
[0216]
That is, at this time, the state of the node A is transited to “participation” through the state of “not participating” by the
[0219]
On the other hand, in step S154, if the
[0218]
If it is determined in step S156 that the predetermined time has not elapsed, the
[0219]
At this time, if the priority set for the node A is higher than the priority set for the other nodes, the state of the server candidate A is maintained by the
[0220]
In step S156, when the
[0221]
In step S158, the
[0222]
The above processing is executed in each of the nodes B and C having the status of the server candidate A, and one server is determined.
[0223]
Next, a process when a client leaves a group will be described with reference to the sequence of FIG.
[0224]
In FIG. 32, a process in which the node A is the official server and the node C as the client leaves will be described. In FIG. 32, the node B is also a client.
[0225]
In step S191, the
[0226]
In this message, a predetermined ID indicating transmission to the server (node A) is described as a transmission destination. Therefore, the node leaving request message is not acquired by the node B based on the ID described in the
[0227]
The node leaving request message transmitted by the node C is received by the node A in step S171.
[0228]
In step S172, the
[0229]
The node leaving approval message transmitted from the node A is received by the node C in step S192. Since the node leaving approval message specifies the node C as a transmission destination, the node leaving approval message transmitted by multicast is not acquired by the node B.
[0230]
In step S174, the
[0231]
As a result, the node C is separated from the group managed by the node A.
[0232]
FIG. 33 to FIG. 36 are diagrams illustrating examples of messages.
[0233]
FIG. 33 is a diagram showing an example of a group notification message transmitted from node A to node B and node C before node C leaves the group by the processing of FIG.
[0234]
That is, in the
[0235]
That is, the node list of the group notification message shown in FIG. 33 still includes information on the node C.
[0236]
FIG. 34 is a diagram illustrating an example of a node leaving request message transmitted from the node C to the node A in step S191 in FIG.
[0237]
As shown in the figure, “node A” is described in
[0238]
FIG. 35 is a diagram showing an example of a node leave approval message transmitted from node A to node C in step S172 of FIG.
[0239]
As shown in the figure, “node C” is described in
[0240]
FIG. 36 is a diagram showing an example of a group notification message transmitted from node A to node B and node C in step S174 of FIG.
[0241]
As shown in the figure, “ALL” is described in
[0242]
That is, in the group notification message of FIG. 36 transmitted after the node C leaves the group, information on the node C is deleted from the node list as compared with the message of FIG.
[0243]
The above messages are transmitted and received before and after the processing described with reference to FIG.
[0244]
Next, with reference to the flowchart of FIG. 37, the processing of the node C requesting to leave the group will be described.
[0245]
In step S201, the
[0246]
The node leaving request message transmitted by the node C is received by the node A, and it is determined whether to approve the leaving of the node C (step S213 in FIG. 38). If the leaving of the node C from the group is approved, a node leaving approval message is transmitted from the node A to the node C (step S215 in FIG. 38).
[0247]
In step S202, the
[0248]
For example, if a node leave approval message is not transmitted due to a communication error or the like, error processing such as presenting the fact to the user is executed. Thereafter, the processing is terminated. At this time, the state of the node C remains participating (
[0249]
On the other hand, if it is determined in step S202 that the node A has received the node leave approval message, the
[0250]
In step S205, the
[0251]
Next, processing executed by the node A in correspondence with the processing in FIG. 37 will be described with reference to the flowchart in FIG. The processing illustrated in FIG. 38 is basically the same as the processing of the node A described with reference to FIG.
[0252]
In step S211, the
[0253]
If the
[0254]
In step S213, the
[0255]
If the
[0256]
In step S216, the list management unit 22C deletes and updates the priority of the node C in the group from the node list.
[0257]
The group notification message including the node list updated in step S216 is transmitted from node A to node B and node C in step S227.
[0258]
Although the node leaving approval message is transmitted to the node C whose leaving has been approved, a group notification message including a node list from which information of the node C has been deleted is transmitted instead of the node leaving approval message. May be performed. The content of the group notification message including the node list from which the information of the node C has been deleted can also confirm that the node C has been approved to leave the group.
[0259]
In the above, the processing when the client leaves the group has been described. Next, the processing when the server leaves will be described.
[0260]
When leaving a server, the server is notified to other nodes that it is leaving and explicitly leaves the group, or it is implicitly leaving without notifying other nodes that it is leaving. There is.
[0261]
First, with reference to the sequence of FIG. 39, a process in a case where a server explicitly leaves a group will be described. In FIG. 39, node A is a server that leaves the group, and nodes B and C are clients.
[0262]
For example, when it is notified from the
[0263]
The transmitted server leaving request message is received by the node B in step S251, and is received by the node C in step S261.
[0264]
The
[0265]
That is, in step S252, the
[0266]
The server candidate notification message transmitted from the node B is received by the node A in step S242, and is received by the node C in step S262.
[0267]
Similarly, in step S263, the
[0268]
The server candidate notification message transmitted from the node C is received by the node A in step S243, and is received by the node B in step S253.
[0269]
The server candidate notification messages transmitted from the nodes B and C are received by the
[0270]
As described above, the server candidate notification message includes the priority set for the node transmitting the message.
[0271]
For example, the node A that has selected the node B as a node that newly operates as a server transmits a server movement notification message to the node B and the node C in step S245. This server movement notification message includes a node list in which the highest priority is set for the node B.
[0272]
The server movement notification message transmitted from node A is received by node B in step S254, and received by node C in step S264.
[0273]
The
[0274]
The transmitted group announcement message is received by the node A in step S246, and is received by the node C in step S265.
[0275]
After that, the
[0276]
The
[0277]
FIGS. 40 to 45 are diagrams showing examples of the message.
[0278]
FIG. 40 is a diagram illustrating an example of a group notification message transmitted from node A to node B and node C before node A leaves the group by the processing in FIG.
[0279]
In the node list described in the
[0280]
That is, the group notification message shown in FIG. 40 still includes information on the node A, and the highest priority is set for the node A.
[0281]
FIG. 41 is a diagram showing an example of a server leave request message transmitted from node A to node B and node C in step S241 in FIG.
[0282]
As shown in the figure, “ALL” is described in
[0283]
FIG. 42 is a diagram showing an example of a server candidate notification message transmitted from node B to nodes A and C in step S252 of FIG.
[0284]
As shown in the figure, “ALL” is described in an
[0285]
FIG. 43 is a diagram showing an example of a group notification message transmitted from node C to node A and node B in step S263 in FIG. 39, and is basically the same as the message in FIG.
[0286]
In the group notification message shown in FIG. 43, “node C” is described in
[0287]
For example, when receiving the group announcement message shown in FIGS. 42 and 43, the node A selects a higher priority node B as a new server based on the priority described in each message. I do.
[0288]
FIG. 44 is a diagram illustrating an example of a server movement notification message transmitted from node A to node B and node C in step S245 in FIG.
[0289]
As shown in the figure, “ALL” is described in
[0290]
FIG. 45 is a diagram illustrating an example of a group notification message transmitted from node B to nodes A and C in step S255 in FIG.
[0291]
As shown in the figure, “ALL” is described in an
[0292]
That is, in the group notification message of FIG. 45 transmitted from the node B newly selected as the server, the information on the node A is deleted from the node list as compared with the message of FIG. Contains information indicating that it is a server.
[0293]
The above message is transmitted and received before and after the processing described with reference to FIG.
[0294]
Next, the processing of the node A (official server) that explicitly leaves the group will be described with reference to the flowchart in FIG. The processing shown in FIG. 46 is basically the same as the processing of node A described with reference to FIG.
[0295]
In step S281, the
[0296]
The server leaving request message transmitted from the server is received by the node B and the node C, and the server candidate notification message is transmitted from the node B and the node C which have changed the state to the server candidate B.
[0297]
In step S282, the
[0298]
If it is determined in step S282 that the server candidate notification message has not been transmitted, the process of step S283 is skipped.
[0299]
In step S284, the
[0300]
If the
[0301]
In step S285, the list management unit 22C selects a new server based on the priority included in the server candidate notification messages transmitted from the nodes B and C. Since the node of the server candidate B does not exist in the group (only the node A exists in the group), if the server candidate notification message has not been transmitted, the processing is ended.
[0302]
When selecting a node that newly operates as a server, the list management unit 22C notifies the
[0303]
In step S286, the
[0304]
Thereafter, since the group notification message is transmitted from the node that has become the new official server, the
[0305]
As a result, the node A is in a state where it has left the group that has been managed by itself.
[0306]
Next, the processing of the node B executed in correspondence with the processing of FIG. 46 will be described with reference to the flowchart of FIG.
[0307]
In step S301, the
[0308]
In step S302, the
[0309]
In step S303, the
[0310]
The server candidate notification message transmitted from the node B is received by the nodes A and C. In the node A, whether or not the node B newly operates as a server is selected based on the priority included in the message, and a server movement message for notifying the selection is transmitted (steps S285 and S286 in FIG. 46). ).
[0311]
In step S304, the
[0312]
In step S305, the
[0313]
Therefore, when the
[0314]
On the other hand, if it is determined in step S305 that the node has been selected as the official server, the process proceeds to step S307, where the
[0315]
That is, in step S308, the
[0316]
Even in the case where a server leaves a group, a node that newly operates as a server can be efficiently and reliably selected by the above processing. That is, it is possible to more suitably cope with a change in the network configuration.
[0317]
Next, with reference to the sequence of FIG. 48, a process in a case where the server is implicitly left from the group will be described.
[0318]
The implicit departure of a server occurs, for example, when a node operating as a server comes out of a communicable range with another node.
[0319]
In FIG. 48, a description will be given of a process in a case where the node X operating as a server leaves the group implicitly. It is also assumed that nodes A to C have joined the group previously managed by the node X as clients.
[0320]
The processing executed by the clients (nodes A to C) that have detected that the server (node X) has left the group implicitly is the same processing as the arbitration processing of the official server in FIG.
[0321]
For example, the nodes A to C, which have determined that the server has left because the group notification message transmitted from the server is no longer transmitted, change the state from participation (State5 in FIG. 5) to server candidate B (State6). And transmits a server candidate notification message for notifying the other node that it is a server candidate.
[0322]
That is, the server candidate notification message transmitted from the node A having the status of the server candidate B in step S321 is received by the node B in step S341, and is received by the node C in step S361.
[0323]
Further, the server candidate notification message transmitted from the node B having the state of the server candidate B in step S342 is received by the node A in step S322, and is received by the node C in step S362.
[0324]
Further, the server candidate notification message transmitted from the node C having the status of the server candidate B in step S363 is received by the node A in step S323, and is received by the node B in step S343.
[0325]
In steps S324, S344, and S364, the nodes A to C that have received the transmitted server candidate notification message perform server arbitration based on the priority included in the message. The set node is determined as a new server.
[0326]
For example, when the highest priority is set for the node A, the node A changes its state from the server candidate B (
[0327]
The server movement notification message transmitted from node A is received by node B in step S345, and received by node C in step S365.
[0328]
Thereafter, the group management is started by the node A, and the group notification message transmitted in step S326 is received by the node B in step S346, and is received by the node C in step S366. The group notification message transmitted in step S326 includes a node list in which information of nodes A to C is described.
[0329]
As described above, the server candidate notification message is transmitted / received between each client, and a new server is determined based on the priority order. -Service provision between clients will be continued.
[0330]
FIG. 49 to FIG. 53 are diagrams illustrating examples of the message.
[0331]
FIG. 49 is a diagram illustrating an example of a group notification message transmitted from the node X to the nodes A to C participating in the group managed by the node X before the processing in FIG. 48 is executed. is there.
[0332]
The node list described in the
[0333]
That is, the group notification message shown in FIG. 49 still contains information on the node X that is leaving the group implicitly.
[0334]
FIG. 50 is a diagram showing an example of a server candidate notification message transmitted from node A to node B and node C in step S321 in FIG. The server candidate notification message shown in FIG. 50 is the same as the server candidate notification message shown in FIG. 42 or FIG.
[0335]
That is, in the
[0336]
FIG. 51 is a diagram illustrating an example of a server candidate notification message transmitted from the node B to the nodes A and C in step S342 in FIG.
[0337]
In the
[0338]
FIG. 52 is a diagram illustrating an example of a server candidate notification message transmitted from node C to node A and node B in step S363 in FIG.
[0339]
In the
[0340]
Therefore, when the server candidate notification messages in FIGS. 50 to 52 are transmitted / received by the nodes A to C, the node A having the highest priority is determined as a new server.
[0341]
FIG. 53 is a diagram showing an example of a group notification message transmitted from node A to node B and node C in step S326 in FIG. 48. This message is, for example, the same as the message in FIG. belongs to.
[0342]
That is, a group notification message including a node list assigned with the highest priority to the node A newly selected as a server is transmitted to the nodes B and C.
[0343]
The processing of each node when a server leaves a group implicitly is the processing described with reference to FIG. 31 except that a server movement notification message is transmitted from a node newly determined as a server. The description is omitted here.
[0344]
By the above-described processing of each node, even when the server is implicitly left, it is possible to efficiently and reliably select a new node that operates as a server.
[0345]
FIG. 54 is a block diagram showing another example of the functional configuration of the node A (node 1) in FIG. The same parts as those in FIG. 4 are denoted by the same reference numerals.
[0346]
The server
[0347]
Note that the server
[0348]
With reference to the sequence in FIG. 55, a process when a message (data) is transmitted from a server to a client will be described.
[0349]
In FIG. 55, node A is the official server, and node B is the client. Although not shown, the same processing as in the node B is performed in the node C.
[0350]
When the
[0351]
FIG. 56 is a diagram illustrating an example of an API (Application Programming Interface) used in a data transmission request from the
[0352]
The “public void sendDataToClient (byte [] DATA)” interface shown in FIG. 56 gives data having a predetermined number of bytes (data to be transmitted to the client) as an argument.
[0353]
Upon receiving this request in step S421, the server
[0354]
FIG. 57 is a diagram illustrating an example of data transmitted in step S422.
[0355]
The data transmitted by the server
[0356]
The data transmitted by the server
[0357]
In step S432, the server
[0358]
FIG. 58 is a diagram illustrating an example of an API used in transferring data from the server synchronization function unit 81 (communication function unit 21) of the node B to the
[0359]
The “public void receiveDataFromServer (byte [] DATA)” interface shown in FIG. 58 gives data having a predetermined number of bytes (data transmitted from the server) as an argument.
[0360]
In step S441, the
[0361]
As described above, data is not directly transmitted and received between the
[0362]
Next, a process when a message (data) is transmitted from a client to a server will be described with reference to the sequence in FIG.
[0363]
In FIG. 59, node A is a client, and node B is an official server. Although not shown, the same processing as that of the node A is appropriately performed in the node C.
[0364]
When the
[0365]
FIG. 60 is a diagram illustrating an example of an API used in a data transmission request from the
[0366]
The “public void sendDataToServer (byte [] DATA)” interface shown in FIG. 60 gives data having a predetermined number of bytes (data to be transmitted to the server) as an argument.
[0367]
Upon receiving this request in step S461, the server
[0368]
FIG. 61 is a diagram illustrating an example of data transmitted in step S462.
[0369]
In the
[0370]
If it is determined that there is no server in the group when data transmission to the server is requested, the server
[0371]
As a result, an interface that does not make the user aware of the absence of the server is provided from the server
[0372]
That is, if data is directly transmitted from the
[0373]
The data transmitted by the server
[0374]
In step S472, the server
[0375]
FIG. 62 is a diagram illustrating an example of an API used in transferring data from the server synchronization function unit 81 (communication function unit 21) of the node B to the
[0376]
The “public void receiveDataFromClient (int clientID, byte [] DATA)” interface shown in FIG. 62 receives a clientID for identifying the client that transmitted the data, and data consisting of a predetermined number of bytes (data transmitted from the client) as arguments. Give as.
[0377]
In step S481, the
[0378]
Through the above processing, data transmission from the
[0379]
It should be noted that the server
[0380]
In this case, for example, the server
[0381]
The transmission of the information indicating the internal state of the
[0382]
The server
[0383]
The above processing is repeatedly executed in both the server
[0384]
The information indicating the internal state of the
[0385]
Further, in order to further reduce the amount of communication, only the result obtained by applying the information indicating the internal state of the server to the hash function may be transmitted.
[0386]
In this case, the node that has received the calculation result of the hash function calculates the calculation result obtained by applying the received calculation result and the information indicating the internal state of its own node to the hash function prepared in advance. Only when the results do not match, the server
[0387]
FIG. 63 is a flowchart illustrating a group management process executed by the group
[0388]
For example, in step S501, the group
[0389]
If it is determined in step S501 that the process is to be terminated because the user has given an instruction to turn off the power, the group
[0390]
For example, when the node A has already participated in a predetermined group as a client by a process described later, in step S502, the withdrawal process described with reference to FIG. 32 is performed with another node. . When the node A manages the group as a server, the withdrawal process described with reference to FIG. 39 is performed with another node. After that, the management processing by the group
[0391]
If the group
[0392]
When it is determined in step S503 that the predetermined message has not been transmitted, the group
[0393]
In step S504, the group
[0394]
In step S505, various processes described above, such as a process of receiving the transmitted group notification message, a process of joining the group, and a process performed in response to a leaving request from the server, are performed. Thereafter, the processing returns to step S501, and the above processing is repeatedly executed.
[0395]
If it is determined in step S504 that the transmitted message is not transmitted from a node belonging to a known group, the group
[0396]
If the group
[0397]
In step S507, the group
[0398]
After the processing in step S507 is performed, and when it is determined in step S506 that the transmitted message is not a group notification message, the process returns to step S501, and the subsequent processing is repeatedly executed.
[0399]
FIG. 64 is a flowchart illustrating a process executed at a predetermined cycle by the group
[0400]
In step S511, the group
[0401]
When it is determined in step S511 that the predetermined time has elapsed, the group
[0402]
In step S513, the group
[0403]
If it is determined in step S514 that the value of the variable i is larger than the number of groups described in the node list, the group
[0404]
On the other hand, when the group
[0405]
As described later, since the variable i is incremented by one at a predetermined timing, the state of the node A in the group corresponding to the variable i = 0, the state of the node A in the group corresponding to the variable i = 1, and the variable i = The state of the node A in each group is sequentially determined, such as the state of the node A in the group corresponding to 2,.
[0406]
If the group
[0407]
After transmitting the group notification message in step S516, the group
[0408]
The node A is a server, and it is determined whether or not the variable i is smaller than the number of groups. When it is determined that the variable i is smaller, the process of transmitting the group notification message (the loop process of steps S514 to S517) includes: For example, it is performed in a 2-second cycle.
[0409]
If the group
[0410]
If the group
[0411]
In step S519, the group
[0412]
If the group
[0413]
After the processes of steps S520 and S521 are performed, the process proceeds to step S517, and the subsequent processes are repeatedly executed. The above processing is periodically executed by the group
[0414]
In the above description, the priority used in each node is set based on the generated random numbers. However, the priority range assigned only to the server dedicated node, only the server / client combined node The range of the priority to be assigned may be set in advance according to the attribute of the node, such as the range of the order assigned and the range of the order assigned only to the client-only node.
[0415]
In this case, for example, a priority of 0 to 63 is assigned to the server dedicated node, and a priority of 64 to 128 is assigned to the server / client node. Further, the subsequent 128 to 255 priorities are assigned to the client-only nodes.
[0416]
In this way, by setting the priority range in advance, when nodes having different attributes coexist, arbitration can be performed more efficiently, and one server can be easily determined. Become.
[0417]
Note that the range of the priority order is not limited to the range of 0 to 255.
[0418]
The priority of each node may be set not only based on a random number but also by various other methods. For example, it may be built in the device in advance, or may be set each time the power is turned on.
[0419]
In the above description, the case where the
[0420]
Also, the case has been described where the
Circuit).
[0421]
Furthermore, in the above description, there is always one server that manages a group. However, a server that manages a group and a server that provides a service are prepared respectively, or a plurality of servers that provide a service are prepared. For example, a plurality of servers may be prepared on one network.
[0422]
The series of processes described above can be executed by hardware, but can also be executed by software. In this case, the node that executes the software is configured by, for example, a personal computer as shown in FIG. The configuration shown in FIG. 65 corresponds to the configuration of FIG. 2 expressed in more detail.
[0423]
In FIG. 65, a
[0424]
The
[0425]
The input /
[0426]
A drive 100 is connected to the input /
[0427]
When a series of processing is executed by software, a program constituting the software may execute various functions by installing a computer built into dedicated hardware or installing various programs. It is installed in a possible, for example, a general-purpose personal computer from a network or a recording medium.
[0428]
As shown in FIG. 65, the recording medium is a magnetic disk 101 (including a flexible disk) on which the program is recorded and an optical disk 102 (including a flexible disk) which are distributed to provide the user with the program separately from the apparatus main body. Package media including CD-ROM (Compact Disk-Read Only Memory), DVD (Digital Versatile Disk), magneto-optical disk 103 (including MD (registered trademark) (Mini-Disk)),
[0429]
In this specification, a step of describing a program recorded on a recording medium is not limited to processing performed in chronological order according to the described order, but is not necessarily performed in chronological order. This includes the processing to be executed.
[0430]
Also, in this specification, a system represents the entire device including a plurality of devices.
[0431]
【The invention's effect】
According to the present invention, it is possible to realize a system in which an information processing device uses a service provided by an information management device.
[0432]
Further, according to the present invention, even when the information management device leaves the group, it is possible to efficiently and surely select an information processing device that takes over its function.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a configuration example of a communication system to which the present invention has been applied.
FIG. 2 is a block diagram illustrating a configuration example of a node in FIG. 1;
FIG. 3 is a block diagram illustrating another configuration example of the node in FIG. 1;
FIG. 4 is a block diagram illustrating an example of a functional configuration of a node in FIG. 1;
FIG. 5 is a diagram illustrating an example of a state transition.
FIG. 6 is a diagram illustrating an example of a node list.
FIG. 7 is a diagram illustrating another example of a node list.
FIG. 8 is a diagram illustrating an example of a group management table.
FIG. 9 is a diagram illustrating an example of an individual group management table.
FIG. 10 is a diagram illustrating an example of a node list.
FIG. 11 is a diagram illustrating an example of a message format.
FIG. 12 is a diagram showing an example of correspondence between commands and codes.
FIG. 13 is a sequence diagram illustrating processing of the communication system.
FIG. 14 is a diagram illustrating an example of a message transmitted and received in the processing of FIG. 13;
FIG. 15 is a flowchart illustrating processing of a node A in FIG. 13;
FIG. 16 is a flowchart illustrating processing of a node B, which is executed in correspondence with the processing of FIG. 15;
FIG. 17 is a flowchart illustrating a group start process of a node C;
FIG. 18 is a sequence illustrating a process executed in step S52 of FIG. 17;
FIG. 19 is a diagram illustrating an example of a message transmitted and received in the process of FIG. 18;
20 is a diagram illustrating an example of another message transmitted and received in the process of FIG.
FIG. 21 is a diagram showing an example of still another message transmitted and received in the processing of FIG. 18;
FIG. 22 is a diagram illustrating an example of a message transmitted and received in the processing of FIG. 18;
FIG. 23 is a diagram showing an example of another message transmitted and received in the processing of FIG. 18;
FIG. 24 is a flowchart illustrating processing of node C in FIG. 18;
FIG. 25 is a flowchart illustrating a process performed by a node A in FIG. 18;
FIG. 26 is a sequence diagram illustrating a process performed in step S54 of FIG. 17;
FIG. 27 is a diagram illustrating an example of a message transmitted and received in the process of FIG. 26;
FIG. 28 is a diagram illustrating an example of another message transmitted and received in the process of FIG. 26;
FIG. 29 is a diagram showing an example of still another message transmitted and received in the process of FIG. 26;
FIG. 30 is a diagram showing an example of a message transmitted and received in the processing of FIG. 26;
FIG. 31 is a flowchart illustrating processing of node A in FIG. 26;
FIG. 32 is a sequence illustrating a process in which a client leaves a group.
FIG. 33 is a diagram showing an example of a message transmitted and received in the processing of FIG. 32;
FIG. 34 is a diagram showing an example of another message transmitted and received in the processing of FIG. 32;
FIG. 35 is a diagram illustrating an example of still another message transmitted / received in the process of FIG. 32;
FIG. 36 is a diagram showing an example of a message transmitted and received in the processing of FIG. 32;
FIG. 37 is a flowchart illustrating processing of node C in FIG. 32;
FIG. 38 is a flowchart illustrating processing of node A in FIG. 32;
FIG. 39 is a sequence illustrating a process in which a server leaves a group.
40 is a diagram illustrating an example of a message transmitted and received in the processing of FIG. 39.
FIG. 41 is a diagram showing an example of another message transmitted and received in the processing of FIG. 39.
42 is a diagram showing an example of still another message transmitted and received in the processing of FIG. 39.
FIG. 43 is a diagram showing an example of a message transmitted and received in the processing of FIG. 39.
FIG. 44 is a diagram showing an example of another message transmitted and received in the processing of FIG. 39.
FIG. 45 is a diagram showing an example of still another message transmitted and received in the process of FIG. 39.
FIG. 46 is a flowchart illustrating processing of node A in FIG. 39;
FIG. 47 is a flowchart illustrating the processing of the node B in FIG. 39;
FIG. 48 is a sequence illustrating another process in which a server leaves a group.
FIG. 49 is a diagram showing an example of a message transmitted and received in the processing of FIG. 48.
50 is a diagram illustrating an example of another message transmitted and received in the process of FIG. 48.
FIG. 51 is a diagram showing an example of still another message transmitted and received in the process of FIG. 48.
FIG. 52 is a diagram showing an example of a message transmitted and received in the processing of FIG. 48.
FIG. 53 is a diagram showing an example of another message transmitted and received in the processing of FIG. 48.
FIG. 54 is a block diagram illustrating another example of a functional configuration of a node;
FIG. 55 is a sequence illustrating processing performed between node A and node B.
FIG. 56 is a diagram showing an example of an API used in the processing of FIG. 55;
FIG. 57 is a diagram showing an example of data transmitted in the processing of FIG. 55.
FIG. 58 is a diagram illustrating another example of the API used in the processing in FIG. 55;
FIG. 59 is a sequence illustrating another process performed between node A and node B.
FIG. 60 is a diagram illustrating an example of an API used in the processing in FIG. 59;
FIG. 61 is a diagram illustrating an example of data transmitted in the processing of FIG. 59;
FIG. 62 is a diagram showing another example of the API used in the processing in FIG. 59.
FIG. 63 is a flowchart illustrating processing of a group management function unit.
FIG. 64 is a flowchart illustrating another process of the group management function unit.
FIG. 65 is a diagram illustrating an example of a recording medium.
[Explanation of symbols]
1 to 3 nodes, 4 networks, 11 arithmetic processing units, 12 communication units, 21 communication function units, 22 group management function units, 22A message management units, 22B state management units, 22C list management units, 23 server function units, 24 clients Functional unit, 101 magnetic disk, 102 optical disk, 103 magneto-optical disk, 104 semiconductor memory
Claims (16)
前記情報管理装置は、
前記通信グループに参加する前記情報処理装置のリストを含む第1のメッセージを、所定の周期で前記情報処理装置に対して送信する第1の送信手段と、
前記通信グループの管理を終了するとき、前記通信グループに参加する前記情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信手段と、
前記第2の送信手段により前記第2のメッセージが送信されることに応じて、前記情報処理装置から送信されてくる、前記通信グループにおける前記情報処理装置の優先順位を含む第3のメッセージを受信する第1の受信手段と、
前記第1の受信手段により受信された前記第3のメッセージに含まれる前記優先順位に基づいて、前記通信グループを新たに管理する前記情報管理装置となる前記情報処理装置を選択する選択手段と
を備え、
前記第1の送信手段は、前記選択手段により選択された前記情報処理装置により、新たに管理される前記通信グループに参加する前記情報処理装置の前記リストを含む前記第1のメッセージを送信する
ことを特徴とし、
前記情報処理装置は、
前記第1のメッセージを受信する第2の受信手段と、
前記情報管理装置から、前記第2のメッセージが送信されてきたとき、前記第3のメッセージを送信する第3の送信手段と、
前記第3の送信手段により送信された前記第3のメッセージに含まれる前記優先順位に基づいて、自分自身が、前記通信グループを新たに管理する前記情報管理装置として現在の前記情報管理装置により選択されたことが前記第1のメッセージの前記リストにより表されているとき、前記通信グループを管理する管理手段と
を備えることを特徴とする通信システム。In a communication system comprising an information management device and an information processing device participating in a communication group managed by the information management device,
The information management device,
A first transmission unit that transmits a first message including a list of the information processing devices that participate in the communication group to the information processing device at a predetermined cycle;
When ending the management of the communication group, a second transmission unit that transmits a second message notifying the information processing device to the information processing apparatus that participates in the communication group,
In response to the second message being transmitted by the second transmission means, receiving a third message transmitted from the information processing device and including a priority of the information processing device in the communication group. First receiving means for performing
Selecting means for selecting the information processing apparatus to be the information management apparatus that newly manages the communication group based on the priority included in the third message received by the first receiving means. Prepare,
The first transmitting unit transmits the first message including the list of the information processing devices participating in the communication group newly managed by the information processing device selected by the selecting unit. Characterized by
The information processing device,
Second receiving means for receiving the first message;
A third transmission unit that transmits the third message when the second message is transmitted from the information management device;
Based on the priority included in the third message transmitted by the third transmitting means, the current information management apparatus selects itself as the information management apparatus for newly managing the communication group. And a management means for managing the communication group when the operation is performed by the list of the first message.
前記情報管理装置の通信方法は、
前記通信グループに参加する前記情報処理装置のリストを含む第1のメッセージを、所定の周期で前記情報処理装置に対して送信する第1の送信ステップと、
前記通信グループの管理を終了するとき、前記通信グループに参加する前記情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信ステップと、
前記第2の送信ステップの処理により前記第2のメッセージが送信されることに応じて、前記情報処理装置から送信されてくる、前記通信グループにおける前記情報処理装置の優先順位を含む第3のメッセージを受信する第1の受信ステップと、
前記第1の受信ステップの処理により受信された前記第3のメッセージに含まれる前記優先順位に基づいて、前記通信グループを新たに管理する前記情報管理装置となる前記情報処理装置を選択する選択ステップと
を含み、
前記選択ステップの処理により選択された前記情報処理装置により、新たに管理される前記通信グループに参加する前記情報処理装置の前記リストを含む前記第1のメッセージが、前記第1の送信ステップの処理により送信される
ことを特徴とし、
前記情報処理装置の通信方法は、
前記第1のメッセージを受信する第2の受信ステップと、
前記情報管理装置から、前記第2のメッセージが送信されてきたとき、前記第3のメッセージを送信する第3の送信ステップと、
前記第3の送信ステップの処理により送信された前記第3のメッセージに含まれる前記優先順位に基づいて、自分自身が、前記通信グループを新たに管理する前記情報管理装置として現在の前記情報管理装置により選択されたことが前記第1のメッセージの前記リストにより表されているとき、前記通信グループを管理する管理ステップと
を含むことを特徴とする通信方法。In a communication method of a communication system including an information management device and an information processing device participating in a communication group managed by the information management device,
The communication method of the information management device,
A first transmission step of transmitting a first message including a list of the information processing devices participating in the communication group to the information processing device at a predetermined cycle;
When ending the management of the communication group, a second transmission step of transmitting a second message notifying the information processing apparatus to the information processing apparatus participating in the communication group;
A third message including a priority of the information processing device in the communication group, which is transmitted from the information processing device in response to the transmission of the second message by the process of the second transmission step; A first receiving step of receiving
A selecting step of selecting the information processing apparatus to be the information management apparatus that newly manages the communication group based on the priority included in the third message received by the processing of the first receiving step And
The first message including the list of the information processing devices participating in the communication group newly managed by the information processing device selected in the process of the selection step is processed in the first transmission process. Characterized by being transmitted by
The communication method of the information processing apparatus includes:
A second receiving step of receiving the first message;
A third transmission step of transmitting the third message when the second message is transmitted from the information management device;
The information management apparatus itself as the information management apparatus that newly manages the communication group based on the priority included in the third message transmitted by the processing of the third transmission step. And a management step of managing the communication group when the selection made by the first message is represented by the list of the first message.
前記通信グループに参加する前記情報処理装置のリストを含む第1のメッセージを、所定の周期で前記情報処理装置に対して送信する第1の送信手段と、
前記通信グループの管理を終了するとき、前記通信グループに参加する前記情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信手段と、
前記第2の送信手段により前記第2のメッセージが送信されることに応じて、前記情報処理装置から送信されてくる、前記通信グループにおける前記情報処理装置の優先順位を含む第3のメッセージを受信する受信手段と、
前記受信手段により受信された前記第3のメッセージに含まれる前記優先順位に基づいて、前記通信グループを新たに管理する前記情報管理装置となる前記情報処理装置を選択する選択手段と
を備え、
前記第1の送信手段は、前記選択手段により選択された前記情報処理装置により、新たに管理される前記通信グループに参加する前記情報処理装置の前記リストを含む前記第1のメッセージを送信する
ことを特徴とする情報管理装置。In an information management device that manages a communication group in which the information processing device participates,
A first transmission unit that transmits a first message including a list of the information processing devices that participate in the communication group to the information processing device at a predetermined cycle;
When ending the management of the communication group, a second transmission unit that transmits a second message notifying the information processing device to the information processing apparatus that participates in the communication group,
Receiving a third message including the priority of the information processing device in the communication group, which is transmitted from the information processing device in response to the transmission of the second message by the second transmission means. Receiving means,
Selecting means for selecting the information processing apparatus serving as the information management apparatus for newly managing the communication group based on the priority included in the third message received by the receiving means,
The first transmission unit transmits the first message including the list of the information processing devices that participate in the communication group newly managed by the information processing device selected by the selection unit. An information management device characterized by the above-mentioned.
前記選択手段は、前記第3のメッセージに含まれる前記優先順位に基づいて、前記通信グループに参加する全ての前記情報処理装置の中から、前記通信グループを新たに管理する前記情報管理装置となる前記情報処理装置を選択する
ことを特徴とする請求項3に記載の情報管理装置。The receiving means receives the third message transmitted from all of the information processing devices participating in the communication group,
The selection unit is the information management device that newly manages the communication group from among all the information processing devices that participate in the communication group based on the priority included in the third message. The information management device according to claim 3, wherein the information processing device is selected.
ことを特徴とする請求項3に記載の情報管理装置。The information management device according to claim 3, wherein the priority is determined based on a predetermined random number generated in the information processing device.
ことを特徴とする請求項3に記載の情報管理装置。4. The information management apparatus according to claim 3, wherein the priority is determined in a predetermined range according to an attribute of the information processing apparatus.
前記通信グループに参加する前記情報処理装置のリストを含む第1のメッセージを、所定の周期で前記情報処理装置に対して送信する第1の送信ステップと、
前記通信グループの管理を終了するとき、前記通信グループに参加する前記情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信ステップと、
前記第2の送信ステップの処理により前記第2のメッセージが送信されることに応じて、前記情報処理装置から送信されてくる、前記通信グループにおける前記情報処理装置の優先順位を含む第3のメッセージを受信する受信ステップと、
前記受信ステップの処理により受信された前記第3のメッセージに含まれる前記優先順位に基づいて、前記通信グループを新たに管理する前記情報管理装置となる前記情報処理装置を選択する選択ステップと
を含み、
前記選択ステップの処理により選択された前記情報処理装置により、新たに管理される前記通信グループに参加する前記情報処理装置の前記リストを含む前記第1のメッセージが、前記第1の送信ステップの処理により送信される
ことを特徴とする情報管理方法。In an information management method of an information management device that manages a communication group in which an information processing device participates,
A first transmission step of transmitting a first message including a list of the information processing devices participating in the communication group to the information processing device at a predetermined cycle;
When ending the management of the communication group, a second transmission step of transmitting a second message notifying the information processing apparatus to the information processing apparatus participating in the communication group;
A third message including the priority of the information processing device in the communication group, transmitted from the information processing device in response to the transmission of the second message by the process of the second transmission step; Receiving step of receiving
Selecting the information processing apparatus to be the information management apparatus that newly manages the communication group based on the priority included in the third message received by the processing of the receiving step. ,
The first message including the list of the information processing devices that join the communication group newly managed by the information processing device selected by the process of the selection step is processed by the first transmission process. An information management method characterized by being transmitted by:
前記通信グループに参加する前記情報処理装置のリストを含む第1のメッセージを、所定の周期で前記情報処理装置に対して送信する第1の送信ステップと、
前記通信グループの管理を終了するとき、前記通信グループに参加する前記情報処理装置に対して、その旨を通知する第2のメッセージを送信する第2の送信ステップと、
前記第2の送信ステップの処理により前記第2のメッセージが送信されることに応じて、前記情報処理装置から送信されてくる、前記通信グループにおける前記情報処理装置の優先順位を含む第3のメッセージを受信する受信ステップと、
前記受信ステップの処理により受信された前記第3のメッセージに含まれる前記優先順位に基づいて、前記通信グループを新たに管理する情報管理装置となる前記情報処理装置を選択する選択ステップと
を含み、
前記選択ステップの処理により選択された前記情報処理装置により、新たに管理される前記通信グループに参加する前記情報処理装置の前記リストを含む前記第1のメッセージが、前記第1の送信ステップの処理により送信される
ことを特徴とするコンピュータが読み取り可能なプログラム。In a program for causing a computer to execute a process of managing a communication group in which an information processing device participates,
A first transmission step of transmitting a first message including a list of the information processing devices participating in the communication group to the information processing device at a predetermined cycle;
When ending the management of the communication group, a second transmission step of transmitting a second message notifying the information processing apparatus to the information processing apparatus participating in the communication group;
A third message including the priority of the information processing device in the communication group, transmitted from the information processing device in response to the transmission of the second message by the process of the second transmission step; Receiving step of receiving
A selecting step of selecting the information processing apparatus to be an information management apparatus that newly manages the communication group based on the priority included in the third message received by the processing of the receiving step,
The first message including the list of the information processing devices participating in the communication group newly managed by the information processing device selected in the process of the selection step is processed in the first transmission process. A computer-readable program transmitted by a computer.
前記情報管理装置により所定の周期で送信される、前記通信グループに参加する前記情報処理装置のリストを含む第1のメッセージを受信する受信手段と、
前記情報管理装置から、前記通信グループの管理を終了することを通知する第2のメッセージが送信されてきたとき、前記通信グループにおける自分自身の優先順位を含む第3のメッセージを送信する送信手段と、
前記送信手段により送信された前記第3のメッセージに含まれる前記優先順位に基づいて、自分自身が、前記通信グループを新たに管理する前記情報管理装置として、現在の前記情報管理装置により選択されたことが前記第1のメッセージの前記リストにより表されているとき、前記通信グループを管理する管理手段と
を備えることを特徴とする情報処理装置。In an information processing device participating in a communication group managed by the information management device,
A receiving unit that receives a first message including a list of the information processing devices that participate in the communication group, which is transmitted at a predetermined cycle by the information management device;
Transmitting means for transmitting a third message including its own priority in the communication group when a second message notifying that the management of the communication group is ended is transmitted from the information management device; ,
Based on the priority included in the third message transmitted by the transmitting means, the information processing apparatus itself has been selected by the current information management apparatus as the information management apparatus for newly managing the communication group. And a management unit for managing the communication group when the first message is represented by the list of the first message.
前記優先順位は、前記生成手段により生成された前記乱数に基づいて決定される
ことを特徴とする請求項9に記載の情報処理装置。Further comprising a generating means for generating a predetermined random number,
The information processing apparatus according to claim 9, wherein the priority order is determined based on the random number generated by the generation unit.
ことを特徴とする請求項9に記載の情報処理装置。The information processing apparatus according to claim 9, wherein the priority order is determined in a predetermined range according to an attribute of the information processing apparatus.
前記情報管理装置により所定の周期で送信される、前記通信グループに参加する前記情報処理装置のリストを含む第1のメッセージを受信する受信ステップと、
前記情報管理装置から、前記通信グループの管理を終了することを通知する第2のメッセージが送信されてきたとき、前記通信グループにおける自分自身の優先順位を含む第3のメッセージを送信する送信ステップと、
前記送信ステップの処理により送信された前記第3のメッセージに含まれる前記優先順位に基づいて、自分自身が、前記通信グループを新たに管理する前記情報管理装置として、現在の前記情報管理装置により選択されたことが前記第1のメッセージの前記リストにより表されているとき、前記通信グループを管理する管理ステップと
を含むことを特徴とする情報処理方法。In the information processing method of the information processing device participating in the communication group managed by the information management device,
A receiving step of receiving a first message including a list of the information processing apparatuses participating in the communication group, transmitted at a predetermined cycle by the information management apparatus;
A step of transmitting a third message including its own priority in the communication group when a second message notifying that the management of the communication group is to be transmitted is transmitted from the information management apparatus; ,
Based on the priority included in the third message transmitted by the processing of the transmitting step, the information processing apparatus selects itself as the information management apparatus that newly manages the communication group by the current information management apparatus. And a management step of managing the communication group when the action is indicated by the list of the first message.
前記情報管理装置により所定の周期で送信される、前記通信グループに参加する情報処理装置のリストを含む第1のメッセージを受信する受信ステップと、
前記情報管理装置から、前記通信グループの管理を終了することを通知する第2のメッセージが送信されてきたとき、前記通信グループにおける自分自身の優先順位を含む第3のメッセージを送信する送信ステップと、
前記送信ステップの処理により送信された前記第3のメッセージに含まれる前記優先順位に基づいて、自分自身が、前記通信グループを新たに管理する前記情報管理装置として、現在の前記情報管理装置により選択されたことが前記第1のメッセージの前記リストにより表されているとき、前記通信グループを管理する管理ステップと
を含むことを特徴とするコンピュータが読み取り可能なプログラム。In a program for causing a computer to execute a process of joining a communication group managed by an information management device,
A receiving step of receiving a first message including a list of information processing apparatuses participating in the communication group, which is transmitted at a predetermined cycle by the information management apparatus;
A step of transmitting a third message including its own priority in the communication group when a second message notifying that the management of the communication group is to be transmitted is transmitted from the information management apparatus; ,
Based on the priority included in the third message transmitted by the processing of the transmitting step, the information processing apparatus selects itself as the information management apparatus that newly manages the communication group by the current information management apparatus. And a management step of managing the communication group when the action is indicated by the list of the first message.
前記情報管理装置により前記通信グループの管理が終了されたことを検出する検出手段と、
前記検出手段により、前記情報管理装置が前記通信グループの管理を終了したことが検出されたとき、前記通信グループにおける自分自身の第1の優先順位を含むメッセージを、前記通信グループに参加する他の情報処理装置に送信する送信手段と、
前記他の情報処理装置から送信されてくる、前記他の情報処理装置の、前記通信グループにおける第2の優先順位が含まれる他のメッセージを受信する受信手段と、
前記第1の優先順位が、前記受信手段により受信された前記他のメッセージに含まれる前記第2の優先順位よりも高いとき、前記通信グループを新たに管理する管理手段と
を備えることを特徴とする情報処理装置。In an information processing device participating in a communication group managed by the information management device,
Detecting means for detecting that the management of the communication group has been terminated by the information management device;
When the detection means detects that the information management device has finished managing the communication group, a message including its own first priority in the communication group is transmitted to another communication group participating in the communication group. Transmitting means for transmitting to the information processing device;
A receiving unit that receives another message including the second priority in the communication group, which is transmitted from the other information processing device, of the other information processing device,
When the first priority is higher than the second priority included in the other message received by the reception unit, the communication unit further includes a management unit that newly manages the communication group. Information processing device.
前記情報管理装置により前記通信グループの管理が終了されたことを検出する検出ステップと、
前記検出ステップの処理により、前記情報管理装置が前記通信グループの管理を終了したことが検出されたとき、前記通信グループにおける自分自身の第1の優先順位を含むメッセージを、前記通信グループに参加する他の情報処理装置に送信する送信ステップと、
前記他の情報処理装置から送信されてくる、前記他の情報処理装置の、前記通信グループにおける第2の優先順位が含まれる他のメッセージを受信する受信ステップと、
前記第1の優先順位が、前記受信ステップの処理により受信された前記他のメッセージに含まれる前記第2の優先順位よりも高いとき、前記通信グループを新たに管理する管理ステップと
を含むことを特徴とする情報処理方法。In the information processing method of the information processing device participating in the communication group managed by the information management device,
A detection step of detecting that the management of the communication group has been terminated by the information management device;
When it is detected by the processing of the detecting step that the information management device has finished managing the communication group, a message including its own first priority in the communication group is joined to the communication group. A transmitting step of transmitting to another information processing device;
A receiving step of receiving, from the other information processing apparatus, another message including the second priority in the communication group of the other information processing apparatus;
When the first priority is higher than the second priority included in the other message received by the processing of the receiving step, a management step of newly managing the communication group. Characteristic information processing method.
前記情報管理装置により前記通信グループの管理が終了されたことを検出する検出ステップと、
前記検出ステップの処理により、前記情報管理装置が前記通信グループの管理を終了したことが検出されたとき、前記通信グループにおける自分自身の第1の優先順位を含むメッセージを、前記通信グループに参加する他の情報処理装置に送信する送信ステップと、
前記他の情報処理装置から送信されてくる、前記他の情報処理装置の、前記通信グループにおける第2の優先順位が含まれる他のメッセージを受信する受信ステップと、
前記第1の優先順位が、前記受信ステップの処理により受信された前記他のメッセージに含まれる前記第2の優先順位よりも高いとき、前記通信グループを新たに管理する管理ステップと
を含むことを特徴とするコンピュータが読み取り可能なプログラム。In a program for causing a computer to execute a process of joining a communication group managed by an information management device,
A detection step of detecting that the management of the communication group has been terminated by the information management device;
When it is detected by the processing of the detecting step that the information management device has finished managing the communication group, a message including its own first priority in the communication group is joined to the communication group. A transmitting step of transmitting to another information processing device;
A receiving step of receiving, from the other information processing apparatus, another message including the second priority in the communication group of the other information processing apparatus;
When the first priority is higher than the second priority included in the other message received by the processing of the receiving step, a management step of newly managing the communication group. Characteristic computer readable program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002366519A JP4284993B2 (en) | 2002-12-18 | 2002-12-18 | Communication system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002366519A JP4284993B2 (en) | 2002-12-18 | 2002-12-18 | Communication system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004199349A true JP2004199349A (en) | 2004-07-15 |
JP4284993B2 JP4284993B2 (en) | 2009-06-24 |
Family
ID=32763698
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002366519A Expired - Fee Related JP4284993B2 (en) | 2002-12-18 | 2002-12-18 | Communication system and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4284993B2 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006091135A (en) * | 2004-09-21 | 2006-04-06 | Fuji Xerox Co Ltd | Image forming apparatus |
JP2007074700A (en) * | 2005-08-09 | 2007-03-22 | Sony Corp | Wireless communications system, terminal, method for reporting status of terminal, and program |
US7761580B2 (en) | 2005-01-21 | 2010-07-20 | Research In Motion Limited | System and method for determining a designated connection between components of computing devices |
JP2016517060A (en) * | 2013-02-25 | 2016-06-09 | クアルコム,インコーポレイテッド | Collaborative intelligence and decision making in the IoT device group |
-
2002
- 2002-12-18 JP JP2002366519A patent/JP4284993B2/en not_active Expired - Fee Related
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006091135A (en) * | 2004-09-21 | 2006-04-06 | Fuji Xerox Co Ltd | Image forming apparatus |
US7761580B2 (en) | 2005-01-21 | 2010-07-20 | Research In Motion Limited | System and method for determining a designated connection between components of computing devices |
JP2007074700A (en) * | 2005-08-09 | 2007-03-22 | Sony Corp | Wireless communications system, terminal, method for reporting status of terminal, and program |
JP4561704B2 (en) * | 2005-08-09 | 2010-10-13 | ソニー株式会社 | WIRELESS COMMUNICATION SYSTEM, TERMINAL, ITS STATUS NOTIFICATION METHOD, AND PROGRAM |
US8065519B2 (en) | 2005-08-09 | 2011-11-22 | Sony Corporation | Wireless communication system, terminal, method for reporting status of terminal, and program |
US8583918B2 (en) | 2005-08-09 | 2013-11-12 | Sony Corporation | Wireless communication system, terminal, method for reporting status of terminal, and program |
JP2016517060A (en) * | 2013-02-25 | 2016-06-09 | クアルコム,インコーポレイテッド | Collaborative intelligence and decision making in the IoT device group |
Also Published As
Publication number | Publication date |
---|---|
JP4284993B2 (en) | 2009-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7097525B2 (en) | Internet of Things Resources Subscription Methods, Devices, and Systems | |
JP5638624B2 (en) | Efficient service advertising and discovery in peer-to-peer network environments | |
US8060588B2 (en) | Home network apparatus and system for cooperative work service and method thereof | |
KR101474840B1 (en) | System and method for controlling network device based on UPnP | |
JP4140384B2 (en) | Terminal apparatus and method, recording medium, and program | |
US20060224748A1 (en) | Service support framework for peer to peer applications | |
JP2003271531A (en) | Message server, message system, presence information management method and program | |
CN107409270B (en) | Method and apparatus for establishing a connection between devices | |
JP2004186883A (en) | Control system and method, information processing apparatus and method, information processing terminal and method, recording medium, and program | |
JP2020009474A (en) | System and method for operating artificial social network | |
CN101023691A (en) | System and method for providing UPnP announcements convergence | |
Osamy et al. | ADSDA: adaptive distributed service discovery algorithm for internet of things based mobile wireless sensor networks | |
JP7410145B2 (en) | System and method for neighbor node discovery in a network | |
CN106465049A (en) | Periodic management stabilization for Internet Of Things | |
JP4284993B2 (en) | Communication system and method | |
Zhang et al. | Decentralized checking of context inconsistency in pervasive computing environments | |
Rodriguez et al. | A framework for supporting autonomous agents in ubiquitous computing environments | |
Al-Karkhi | Task Recovery in Self-Organised Multi-Agent Systems for Distributed Domains | |
JP2005252596A (en) | P2p network construction method using physical reliability and connection state managing apparatus | |
JP3826735B2 (en) | Service providing method by distributed system and equipment constituting distributed system | |
JP2017167845A (en) | Communication device, communication system, communication method and program | |
Saucedo-Tejada et al. | F2FMI: A toolkit for facilitating face-to-face mobile interaction | |
JP6324304B2 (en) | Client apparatus, communication system, data processing method, and program | |
CN116684939B (en) | Message processing method, device, computer equipment and computer readable storage medium | |
KR101006476B1 (en) | Method and device for dynamic community computing and system thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050930 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080715 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080912 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081202 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090127 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20090303 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090316 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120403 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120403 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120403 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130403 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |