JP5884595B2 - Message communication method, message communication program, and computer - Google Patents
Message communication method, message communication program, and computer Download PDFInfo
- Publication number
- JP5884595B2 JP5884595B2 JP2012075661A JP2012075661A JP5884595B2 JP 5884595 B2 JP5884595 B2 JP 5884595B2 JP 2012075661 A JP2012075661 A JP 2012075661A JP 2012075661 A JP2012075661 A JP 2012075661A JP 5884595 B2 JP5884595 B2 JP 5884595B2
- Authority
- JP
- Japan
- Prior art keywords
- application
- message
- reception
- receiving
- node
- 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.)
- Active
Links
Images
Description
本発明は,コンピュータノード間において非同期にメッセージ通信を行うメッセージ通信方法,メッセージ通信プログラムおよびコンピュータノードに関するものである。 The present invention relates to a message communication method, a message communication program, and a computer node that perform message communication asynchronously between computer nodes.
複数のコンピュータノード間で非同期に通信を行う技術として,メッセージキューなどのキュー領域を利用したメッセージ通信の技術がある。 As a technology for performing asynchronous communication between a plurality of computer nodes, there is a message communication technology using a queue area such as a message queue.
この技術では,処理要求のメッセージを送信するアプリケーションプロセスが動作するコンピュータノードは,送信するメッセージをキュー領域に登録する。ここでは,便宜的に,処理要求のメッセージを送信するアプリケーションプロセスを送信アプリと呼び,送信アプリが動作するコンピュータノードを送信ノードと呼ぶ。メッセージの処理要求に応じた処理を実行するアプリケーションプロセスが動作するコンピュータノードは,キュー領域からメッセージを取り出し,メッセージの処理要求に応じた処理を実行する。ここでは,便宜的に,メッセージの処理要求に応じた処理を実行するアプリケーションプロセスを受信アプリと呼び,受信アプリが動作するコンピュータノードを受信ノードと呼ぶ。 In this technique, a computer node on which an application process that transmits a processing request message operates registers a message to be transmitted in a queue area. Here, for convenience, an application process that transmits a processing request message is referred to as a transmission application, and a computer node on which the transmission application operates is referred to as a transmission node. A computer node on which an application process that executes processing according to a message processing request operates extracts a message from the queue area and executes processing according to the message processing request. Here, for convenience, an application process that executes processing according to a message processing request is called a receiving application, and a computer node on which the receiving application operates is called a receiving node.
送信ノードは,受信ノードが処理を実行可能な状態であるか否かにかかわらず,処理要求のメッセージを発行してキュー領域に登録しておくことができる。受信ノードは,処理が実行可能な状態になってから,キュー領域からメッセージを取得し,処理を実行することができる。この技術によって,コンピュータノード間での非同期のメッセージ通信が可能となる。 The sending node can issue a processing request message and register it in the queue area, regardless of whether or not the receiving node is ready to execute processing. The receiving node can acquire a message from the queue area and execute the process after the process is ready to be executed. This technology enables asynchronous message communication between computer nodes.
なお,複数のプロセス間で授受されるメッセージを,単一のメッセージキューを介して伝播し,該メッセージキューへのメッセージの格納履歴をログに記録する技術が知られている。また,現用プロセスに対するメッセージのみをメッセージキューから取り出して送信し,待機プロセスに対してはメッセージを送信しないメッセージキューイングの技術が知られている。 A technique is known in which messages exchanged between a plurality of processes are propagated via a single message queue, and the storage history of messages stored in the message queue is recorded in a log. Further, a message queuing technique is known in which only a message for the current process is extracted from the message queue and transmitted, and no message is transmitted to the standby process.
従来,受信ノードの性能はシステム設計時に決定されており,受信ノードの性能に応じた受信アプリの実装が行われていた。この場合,受信ノードは,処理を実行する受信アプリが待機状態であれば,キュー領域からメッセージを取得して,円滑に処理を実行することができた。 Conventionally, the performance of a receiving node is determined at the time of system design, and a receiving application is implemented according to the performance of the receiving node. In this case, if the receiving application that executes the process is in a standby state, the receiving node can obtain the message from the queue area and execute the process smoothly.
近年,クラウドコンピューティングの発展もあって,多くのシステムに仮想化の技術が導入されている。仮想マシンシステムでは,物理マシン上で動作する各仮想マシンに割り当てるリソース量を,動的に変化させることが可能となる。 In recent years, with the development of cloud computing, virtualization technology has been introduced into many systems. In the virtual machine system, it is possible to dynamically change the amount of resources allocated to each virtual machine operating on the physical machine.
例えば,非同期のメッセージ通信を行うシステムにおいて,受信ノードが,リソースが動的に変化する仮想マシンで実現されているものとする。このとき,処理を実行する受信アプリが待機状態であっても,同じ物理マシン上で動作する他の仮想マシンの影響によって受信ノードのリソース量が動的に変化し,受信ノードがメッセージに応じた処理を円滑に実行するのに必要なリソース量を得られないというケースも発生する。この状況で受信ノードがメッセージを取得してしまうと,そのメッセージの処理が著しく遅延したり,そのメッセージの処理が不能となってしまうという問題が発生する。 For example, in a system that performs asynchronous message communication, it is assumed that the receiving node is realized by a virtual machine whose resources change dynamically. At this time, even if the receiving application that executes processing is in the standby state, the resource amount of the receiving node changes dynamically due to the influence of other virtual machines running on the same physical machine, and the receiving node responds to the message. There may also be cases where the amount of resources necessary to execute the processing smoothly cannot be obtained. If the receiving node acquires a message in this situation, the processing of the message is significantly delayed or the processing of the message becomes impossible.
非同期のメッセージ通信を行うシステムでは,メッセージを取得した受信ノードは,速やかに,かつ確実に処理を行うということが前提となっている。そのため,受信したメッセージの処理を速やかに実行できない受信ノードがあると,システム全体の運用が円滑に行われなくなる可能性がある。 In a system that performs asynchronous message communication, it is assumed that a receiving node that has acquired a message performs processing promptly and reliably. For this reason, if there is a receiving node that cannot quickly process the received message, the entire system may not be operated smoothly.
一側面では,本発明は,非同期のメッセージ通信が行われるシステムにおいて,メッセージの受信側のコンピュータノードのリソース量が変化する場合でも,円滑なシステムの運用が可能となる技術を提供することを目的とする。 In one aspect, an object of the present invention is to provide a technique that enables smooth system operation even in a system in which asynchronous message communication is performed, even when the resource amount of a computer node on the message receiving side changes. And
本発明の一態様として開示するメッセージ通信方法では,受け付けたメッセージの内容に応じた処理を実行する受信側アプリケーションプロセスが動作する仮想マシンであるコンピュータノードが,前記コンピュータノードの空きリソース量を,自仮想マシンのゲストOSまたは自仮想マシンを管理するホストOSから取得し,記憶部に記憶されたアプリケーションプロセスの管理情報から,処理の実行状態が待機状態である受信側アプリケーションプロセスについて,処理を実行する上で必要なリソース量を取得し,空きリソース量が必要なリソース量以上である場合に,待機状態である受信側アプリケーションプロセスに対するメッセージを取得すると判断し,待機状態である受信側アプリケーションプロセスに対するメッセージを,メッセージを記憶する記憶部から取得する処理を実行する。 In the message communication method disclosed as one aspect of the present invention , a computer node that is a virtual machine in which a receiving-side application process that executes processing according to the content of an accepted message operates automatically determines the free resource amount of the computer node. From the management information of the application process acquired from the guest OS of the virtual machine or the host OS that manages the virtual machine and stored in the storage unit, the processing is executed for the receiving application process whose execution status is standby. When the required resource amount is acquired and the free resource amount is equal to or greater than the required resource amount, it is determined that a message for the receiving application process that is in the standby state is acquired, and the message for the receiving application process that is in the standby state , Me It executes a process of acquiring from the storage unit for storing the message.
1態様では,非同期のメッセージ通信が行われるシステムにおいて,メッセージの受信側のコンピュータノードのリソース量が変化する場合でも,円滑なシステムの運用が可能となる。 In one aspect, in a system in which asynchronous message communication is performed, a smooth system operation is possible even when the resource amount of the computer node on the message receiving side changes.
以下,本実施の形態について,図を用いて説明する。 Hereinafter, the present embodiment will be described with reference to the drawings.
〔実施の形態1〕
図1は,本実施の形態1によるコンピュータノード間でメッセージ通信を行うシステムの構成例を示す図である。
[Embodiment 1]
FIG. 1 is a diagram illustrating a configuration example of a system that performs message communication between computer nodes according to the first embodiment.
図1に示すシステムにおいて,送信ノード100,受信ノード200は,コンピュータノードである。以下では,コンピュータノードを,単にノードとも呼ぶ。図1に示すシステムの例では,2つのノードのみが示されているが,システムにはさらに多数のノードが存在してもよい。図1に示す送信ノード100と受信ノード200との間では,キュー領域300を介した非同期のメッセージ通信が行われる。各ノードやキュー領域300は,例えばIP(Internet Protocol )ネットワークなどのネットワーク(図示省略)に接続されている。
In the system shown in FIG. 1, the
送信ノード100は,メッセージの送信側となるノードである。受信ノード200は,メッセージの受信側となるノードである。なお,本実施の形態に示す例において,送信ノード100と受信ノード200は,便宜的に表したものであり,常にメッセージを送信する送信ノード100と,常にメッセージを受信する受信ノード200が存在していることを表したものではない。すなわち,システムが有する各ノードは,メッセージの送信側となる場合には送信ノード100となり,メッセージの受信側となる場合には受信ノード200となる。
The sending
本実施の形態では,送信ノード100と受信ノード200は,それぞれ,物理的なコンピュータマシンで実現されてもよいし,仮想的なコンピュータマシンで実現されてもよい。以下では,物理的なコンピュータマシンを物理マシン,仮想的なコンピュータマシンを仮想マシンと呼ぶ。なお,本実施の形態の技術は,受信ノード200がリソース量が動的に変化する仮想マシンで実現される場合に,より高い効果が得られる。ただし,受信ノード200が物理マシンである場合でも,例えば障害の発生によりリソース量が減少してしまうというケースも考えられるので,限定的ではあるが,本実施の形態の技術による効果は得られる。
In the present embodiment, each of the
図1に示す例では,受信ノード200は,仮想マシンで実現されている。物理マシン10は,受信ノード200を含む仮想マシンを実現する物理的なコンピュータマシンである。図1に示す物理マシン10上では,受信ノード200以外にも,複数の仮想マシン30が動作している。受信ノード200を含む各仮想マシン30は,物理マシン10のリソースを利用して動作する。ホストOS(Operating System)/ハイパーバイザ20は,物理マシン10のリソース管理や,受信ノード200を含む各仮想マシン30の管理・制御を行う。ゲストOS201は,仮想マシンである受信ノード200のOSである。同様に,ゲストOS31は,仮想マシン30のOSである。
In the example illustrated in FIG. 1, the
図1に示す例では,ホストOS/ハイパーバイザ20によって,物理マシン10上で動作する受信ノード200を含む各仮想マシン30へのリソースの割り当てが,受信ノード200を含む各仮想マシン30の稼働状況に応じて動的に変更されるものとする。すなわち,受信ノード200が使用するリソースの量は,時間的に変動する。
In the example shown in FIG. 1, the resource allocation to each
なお,クラウドコンピューティングなどの技術では,1つの物理マシンを複数のテナントで利用するマルチテナント環境が導入される場合がある。マルチテナント環境では,例えば,図1に示す物理マシン10上で動作する受信ノード200と他の仮想マシン30とが,それぞれ異なるテナントが利用するマシンとなる場合がある。このような環境では,他のテナントの仮想マシン30との兼ね合いもあり,受信ノード200は,望む量のリソースを常時得られるわけではない。
In technology such as cloud computing, a multi-tenant environment in which one physical machine is used by a plurality of tenants may be introduced. In a multi-tenant environment, for example, the receiving
キュー領域300は,送信ノードと受信ノードとの間での非同期のメッセージ通信を実現するために,メッセージを一時的に記憶するメッセージ記憶部の一例である。本実施の形態の例では,キュー領域300は,原則としてFIFO(First In First Out)でメッセージを出し入れするメッセージキューであるものとする。メッセージごとに優先度を設定して,キュー領域300への登録順が遅いが優先度が高いメッセージがある場合に,そのメッセージを先にキュー領域300から取り出すように,システムを設計してもよい。なお,送信ノード100と受信ノード200との間での非同期のメッセージ通信を実現するためのメッセージ記憶部が,必ずしもキューである必要はない。
The
また,キュー領域300の設計において,宛先となるアプリケーションプロセスごとにメッセージを管理するキューを用意してもよいし,異なる複数のアプリケーションプロセスに対するメッセージを一元的に管理するキューを用意してもよい。本実施の形態の例におけるキュー領域300では,異なる複数のアプリケーションプロセスに対するメッセージが一元的に管理されているものとする。
In the design of the
本実施の形態のキュー領域300を実現する方法としては,様々な方法が考えられる。例えば,専用に用意されたノードで,キュー領域300を実現する方法が考えられる。また,システムが有する各ノードが共通にアクセス可能なストレージで,キュー領域300を実現することも可能である。
Various methods are conceivable as a method for realizing the
送信ノード100は,送信アプリ110,キューマネージャ120を備える。受信ノード200は,受信アプリ210,キューマネージャ220,受信制御部230,アプリ状況テーブル記憶部240を備える。
The
送信ノード100の送信アプリ110は,受信ノード200の受信アプリ210に対する処理要求のメッセージを送信する側のアプリケーションプロセスである。送信ノード100が送信するメッセージは,送信アプリ110により発行されるメッセージとなる。
The
これに対して,受信ノード200の受信アプリ210は,送信ノード100の送信アプリ110からのメッセージを受信する側のアプリケーションプロセスである。受信アプリ210は,受け付けたメッセージの内容に応じた処理を実行する。受信ノード200が受信するメッセージは,受信アプリ210が受け付けるメッセージとなる。
On the other hand, the reception application 210 of the
受信ノード200では,複数の受信アプリ210が動作可能である。図1に示す例では,受信ノード200で,3つの受信アプリ210a〜cが動作している。なお,受信ノード200では,動的に必要な受信アプリ210が新規に起動され,不要な受信アプリ210が削除されることにより,リソース活用の効率化が図られている。
In the receiving
なお,本実施の形態では,複数の受信ノード200での分散処理が行われているものとする。例えば,図1に示す受信ノード200で動作する受信アプリ210aと同じアプリケーションのプロセスが,図示省略された他の受信ノード200でも動作しており,処理を実行可能な受信ノード200がキュー領域300からメッセージを取得して,処理を実行するものとする。
In this embodiment, it is assumed that distributed processing is performed by a plurality of receiving
キューマネージャ120(または220)は,各ノードに実装される,キュー領域300に対するメッセージの送受信を制御する機構である。ノードが送信ノード100となる場合には,キューマネージャ120は,キュー領域300にメッセージを送信して登録するメッセージ登録部となる。ノードが受信ノード200となる場合には,キューマネージャ220は,キュー領域300からメッセージを取得して受信するメッセージ取得部となる。キューマネージャ120(または220)は,例えば,クラスライブラリとして実装される。
The queue manager 120 (or 220) is a mechanism that controls transmission / reception of messages to / from the
受信制御部230は,受信ノード200において,キュー領域300からメッセージを受信するタイミングを制御する。より具体的には,受信制御部230は,受信ノード200の空きリソース量を取得する。また,受信制御部230は,後述のアプリ状況テーブル記憶部240から,処理の実行状態が待機状態である受信アプリ210について,該受信アプリ210が1処理を実行する上で必要なリソース量を取得する。受信制御部230は,空きリソース量が必要なリソース量以上である場合に,該待機状態である受信アプリ210に対するメッセージを取得すると判断する。逆に,受信制御部230は,空きリソース量が必要なリソース量に満たない場合に,該待機状態である受信アプリ210に対するメッセージを取得しないと判断する。受信制御部230は,キューマネージャ220に,取得すると判断した受信アプリ210に対するメッセージの取得を依頼する。このとき,キューマネージャ220は,メッセージ取得部として動作し,受信制御部230から依頼された受信アプリ210に対するメッセージを,キュー領域300から取得する。
The
なお,受信制御部230は,受信ノード200の空きリソース量を,例えば,該受信ノード200のOSから取得する。図1に示すように,受信ノード200が仮想マシンである場合には,仮想マシンである該受信ノード200のゲストOS201,または仮想マシンである該受信ノード200を管理するホストOS/ハイパーバイザ20から取得する。受信制御部230が,受信ノード200の空きリソース量をゲストOS201から取得するのか,ホストOS/ハイパーバイザ20から取得するのかは,受信ノード200の環境に応じた任意の設計が可能である。
The
ゲストOS201は,物理マシン10のリソース状況を把握していないので,受信ノード200に割り当てられる空きリソース量を,必ずしも正確に判断できるわけではない。例えば,上述のクラウドコンピューティングにおけるマルチテナント環境などでは,他のテナントの仮想マシン30と競合するため,ゲストOS201が要求するだけのリソース量が得られない場合もある。
Since the
これに対して,物理マシン10のリソース管理を行うホストOS/ハイパーバイザ20は,物理マシン10のリソース状況を把握しているので,受信ノード200に割り当てられる空きリソース量を,正確に判断することができる。ホストOS/ハイパーバイザ20から受信ノード200の空きリソース量の情報を得ることができる場合には,受信制御部230は,正確な受信ノード200の空きリソース量を取得可能となる。
On the other hand, since the host OS /
しかし,上述のクラウドコンピューティングにおけるマルチテナント環境などでは,ホストOS/ハイパーバイザ20が,必ずしも自テナントのものとはならない。このような環境では,受信制御部230は,ホストOS/ハイパーバイザ20から,受信ノード200の空きリソース量の情報を得ることができない場合もある。このようなケースでも,受信制御部230は,ゲストOS201からは,受信ノード200の空きリソース量の情報を取得できる。
However, in the above-described multi-tenant environment in cloud computing, the host OS /
アプリ状況テーブル記憶部240は,受信ノード200で動作する受信アプリ210を管理するアプリ状況テーブルを記憶する記憶部である。アプリ状況テーブル記憶部240は,アプリケーションプロセスの管理情報を記憶する管理情報記憶部の一例である。
The application situation
図2は,本実施の形態1によるアプリ状況テーブルの例を示す図である。 FIG. 2 is a diagram illustrating an example of an application status table according to the first embodiment.
図2に示すアプリ状況テーブル245は,図1に示す受信ノード200のアプリ状況テーブル記憶部240に記憶されるアプリ状況テーブルの一例である。図2に示すアプリ状況テーブル245は,受信ノード200で動作する受信アプリ210のそれぞれに対応するレコードごとに,アプリID,必要リソース,アプリ状態の情報を持つ。
The application status table 245 illustrated in FIG. 2 is an example of the application status table stored in the application status
図2に示すアプリ状況テーブル245において,アプリIDは,該当レコードの受信アプリ210のアプリケーションを識別する識別情報である。図2に示すアプリ状況テーブル245において,例えば,“app#01”は,受信アプリ210aのアプリケーションの識別情報であり,“app#02”は,受信アプリ210bのアプリケーションの識別情報であり,“app#03”は,受信アプリ210cのアプリケーションの識別情報であるものとする。
In the application status table 245 illustrated in FIG. 2, the application ID is identification information that identifies the application of the reception application 210 of the corresponding record. In the application status table 245 shown in FIG. 2, for example, “
本実施の形態では,送信ノード100の送信アプリ110は,処理を依頼する相手先のアプリIDを指定して,メッセージを送る。受信ノード200では,処理を実行可能であると判断した受信アプリ210がある場合に,該当受信アプリ210に対応するメッセージをアプリIDで識別して,キュー領域300から取得する。例えば,複数の受信ノード200で分散処理が行われる場合,受信ノード200が異なっても,同じアプリケーションの受信アプリ210には,同じアプリIDが与えられるものとする。すなわち,送信ノード100から送信されてキュー領域300に格納されたメッセージは,該メッセージの宛先となるアプリIDの受信アプリ210が動作する受信ノード200であれば,どの受信ノード200が受信してもよい。
In the present embodiment, the
図2に示すアプリ状況テーブル245において,必要リソースは,該当レコードの受信アプリ210が1処理を行うのに必要なリソースの情報である。図2に示すアプリ状況テーブル245の例では,各受信アプリ210に必要なリソースの情報として,CPU(Central Processing Unit )コア数,メモリ量,ネットワーク帯域量,ハードディスク容量の情報が記録されている。 In the application status table 245 illustrated in FIG. 2, the necessary resource is information of a resource necessary for the receiving application 210 of the corresponding record to perform one process. In the example of the application status table 245 shown in FIG. 2, information on the number of CPU (Central Processing Unit) cores, the amount of memory, the amount of network bandwidth, and the capacity of the hard disk is recorded as information on resources necessary for each receiving application 210.
図2に示すアプリ状況テーブル245において,アプリ状態は,該当レコードの受信アプリ210による処理の実行状態を示す。図2に示すアプリ状況テーブル245の例において,アプリ状態の“待機”は,該当受信アプリ210が,処理要求のメッセージを待っている待機状態を示す。また,アプリ状態の“稼働”は,該当受信アプリ210が,処理要求のメッセージを受け付けて,該メッセージの内容に応じた処理を実行している稼働状態を示す。 In the application status table 245 illustrated in FIG. 2, the application state indicates the execution state of processing by the reception application 210 of the corresponding record. In the example of the application status table 245 illustrated in FIG. 2, “standby” in the application state indicates a standby state in which the corresponding reception application 210 is waiting for a processing request message. In addition, “operation” in the application state indicates an operation state in which the corresponding reception application 210 receives a processing request message and executes processing according to the content of the message.
本実施の形態1では,各受信アプリ210が,アプリ状況テーブル245に対して,自身の情報を記録・更新するものとする。例えば,受信アプリ210は,起動時に,アプリ状況テーブル245に自身の情報を記録するレコードを生成し,該レコードに自身のアプリIDと必要リソースとを登録する。このとき,受信アプリ210は,アプリ状況テーブル245において,自身のアプリ状態を“待機”に設定する。受け付けたメッセージの内容に応じた処理を実行する際には,受信アプリ210は,アプリ状況テーブル245において,自身のアプリ状態を“稼働”に更新する。受け付けたメッセージの内容に応じた処理を終了する際には,受信アプリ210は,アプリ状況テーブル245において,自身のアプリ状態を“待機”に更新する。 In the first embodiment, it is assumed that each receiving application 210 records / updates its own information in the application status table 245. For example, at the time of activation, the receiving application 210 generates a record for recording its own information in the application status table 245, and registers its own application ID and necessary resources in the record. At this time, the receiving application 210 sets its own application status to “standby” in the application status table 245. When executing the process according to the content of the received message, the receiving application 210 updates its application state to “active” in the application state table 245. When the process corresponding to the content of the received message is terminated, the receiving application 210 updates its own application state to “standby” in the application status table 245.
受信アプリ210が起動時にアプリ状況テーブル245に登録するアプリIDや必要リソースなどの情報は,例えば受信アプリ210のアプリケーションプログラムに組み込まれていてもよいし,アプリケーションプログラムとは別に用意されたプロパティ情報に設定されていてもよい。 Information such as an application ID and necessary resources registered in the application status table 245 when the reception application 210 is activated may be incorporated in, for example, an application program of the reception application 210, or may be property information prepared separately from the application program. It may be set.
図3は,本実施の形態によるプロパティ情報の例を示す図である。 FIG. 3 is a diagram illustrating an example of property information according to the present embodiment.
図3に示すプロパティ情報205は,受信アプリ210のアプリIDや必要リソースなどの情報が設定されたプロパティ情報の一例である。例えば,図3(A)は,図1に示す受信アプリ210aについてのプロパティ情報205aである。また,図3(B)は,図1に示す受信アプリ210bについてのプロパティ情報205bである。また,図3(C)は,図1に示す受信アプリ210cについてのプロパティ情報205cである。
The property information 205 illustrated in FIG. 3 is an example of property information in which information such as an application ID of the receiving application 210 and necessary resources is set. For example, FIG. 3A shows property information 205a for the receiving
図3に示すプロパティ情報205は,例えばそれぞれが1つのファイルとして,図1では図示省略された記憶部に記憶されている。本実施の形態1において,各受信アプリ210は,例えば,起動時に自身のプロパティ情報205のファイルにアクセスし,自身のアプリID,必要リソース等の情報を取得する。 The property information 205 shown in FIG. 3 is stored as a single file, for example, in a storage unit not shown in FIG. In the first embodiment, each receiving application 210 accesses a file of its own property information 205 at the time of activation, for example, and acquires information such as its own application ID and necessary resources.
図4は,本実施の形態によるノードを実現するコンピュータのハードウェア構成例を示す図である。 FIG. 4 is a diagram illustrating a hardware configuration example of a computer that implements a node according to the present embodiment.
図1に示す本実施の形態の送信ノード100や受信ノード200を実現する物理的なコンピュータ1は,例えば,CPU2,主記憶となるメモリ3,記憶装置4,通信装置5,媒体読取・書込装置6,入力装置7,出力装置8等を備える。記憶装置4は,例えばHDD(Hard Disk Drive )等の外部記憶装置や,補助記憶装置などである。媒体読取・書込装置6は,例えばCD−R(Compact Disc Recordable )ドライブやDVD−R(Digital Versatile Disc Recordable )ドライブなどである。入力装置7は,例えばキーボード・マウスなどである。出力装置8は,例えばディスプレイ等の表示装置などである。
A
図1に示す送信ノード100や受信ノード200およびそれらのノードが備える各機能部は,コンピュータ1が備えるCPU2,メモリ3等のハードウェアと,ソフトウェアプログラムとによって実現することが可能である。コンピュータ1が実行可能なプログラムは,記憶装置4に記憶され,その実行時にメモリ3に読み出され,CPU2により実行される。
The
コンピュータ1は,可搬型記録媒体から直接プログラムを読み取り,そのプログラムに従った処理を実行することもできる。また,コンピュータ1は,サーバコンピュータからプログラムが転送されるごとに,逐次,受け取ったプログラムに従った処理を実行することもできる。さらに,このプログラムは,コンピュータ1で読み取り可能な記録媒体に記録しておくことができる。
The
以下,図5〜図9に示すフローチャートを用いて,本実施の形態1の送信ノード100および受信ノード200によるメッセージ通信に関する処理の流れの例を説明する。
Hereinafter, an example of a flow of processing related to message communication performed by the
図5は,本実施の形態1における送信ノードの送信アプリによる処理のフローチャートである。 FIG. 5 is a flowchart of processing by the transmission application of the transmission node in the first embodiment.
送信ノード100において,送信アプリ110は,受信アプリ210に対して処理要求を行うメッセージに,メタ情報を付与する(ステップS10)。ここでメッセージに付与するメタ情報としては,宛先の受信アプリ210のアプリID,優先度,自送信アプリ110のIDなどの例が挙げられる。本実施の形態1の例では,メッセージに宛先のアプリIDを付与するものとする。例えば,図1に示す受信アプリ210aを宛先とする場合,送信アプリ110は,宛先のアプリIDとして“app#01”を付与する。送信アプリ110は,キューマネージャ120に対して,メッセージの送信を依頼する(ステップS11)。
In the
図6は,本実施の形態1における送信ノードのキューマネージャによる処理のフローチャートである。 FIG. 6 is a flowchart of processing by the queue manager of the transmission node in the first embodiment.
送信ノード100において,キューマネージャ120は,送信アプリ110からメタ情報が付与されたメッセージの送信依頼を受け付けると(ステップS20),送信アプリ110から受け付けたメタ情報が付与されたメッセージに,さらにタイムスタンプを付与する(ステップS21)。キューマネージャ120は,タイムスタンプとメタ情報とが付与されたメッセージを,キュー領域300に登録する(ステップS22)。本実施の形態1の例では,タイムスタンプと宛先のアプリIDとが付与されたメッセージが,キュー領域300に格納される。なお,キュー領域300へのメッセージの登録は,エンキューとも呼ばれる。
In the sending
図7は,本実施の形態1における受信ノードの受信アプリによる処理のフローチャートである。 FIG. 7 is a flowchart of processing by the receiving application of the receiving node in the first embodiment.
受信ノード200において,受信アプリ210は,起動の際に,アプリ状況テーブル245に,自身のレコードを追加する(ステップS30)。受信アプリ210は,アプリ状況テーブル245における自身のレコードに,自身のアプリIDと,自身が1処理を実行するのに必要なリソース量を登録する(ステップS31)。例えば,図1に示す受信アプリ210aが起動する際に,受信アプリ210aは,図3(A)に示すプロパティ情報205aのファイルから自身のアプリIDと必要リソースの情報を取得し,その情報をアプリ状況テーブル245における自身のレコードに記録する。受信アプリ210は,アプリ状況テーブル245における自身のレコードのアプリ状態を,待機状態を示す“待機”に設定する(ステップS32)。
In receiving
受信アプリ210は,送信アプリ110からのメッセージを受け付けると(ステップS33のYES),アプリ状況テーブル245における自身のレコードのアプリ状態を,稼働状態を示す“稼働”に更新する(ステップS34)。受信アプリ210は,受け付けたメッセージの内容に従って処理を実行する(ステップS35)。 When receiving the message from the transmission application 110 (YES in step S33), the reception application 210 updates the application state of its own record in the application status table 245 to “operation” indicating the operation state (step S34). The receiving application 210 executes processing according to the content of the received message (step S35).
受信アプリ210は,メッセージに応じた処理が終了すると,アプリ状況テーブル245における自身のレコードのアプリ状態を,待機状態を示す“待機”に更新する(ステップS34)。受信アプリ210は,ステップS33の処理に戻って,次のメッセージを待つ。 When the process corresponding to the message ends, the receiving application 210 updates the application status of its own record in the application status table 245 to “standby” indicating the standby status (step S34). The receiving application 210 returns to the process of step S33 and waits for the next message.
なお,図7のフローチャートには示されていないが,受信アプリ210は,受信ノード200から削除される際に,アプリ状況テーブル245における自身のレコードを削除する。
Although not shown in the flowchart of FIG. 7, the reception application 210 deletes its own record in the application status table 245 when it is deleted from the
図8は,本実施の形態1における受信ノードの受信制御部による処理のフローチャートである。 FIG. 8 is a flowchart of processing by the reception control unit of the reception node in the first embodiment.
受信ノード200において,受信制御部230は,定期的にアプリ状況テーブル245を参照し,アプリ状態が“待機”状態である受信アプリ210の存在をチェックする(ステップS40)。
In the
“待機”状態である受信アプリ210がある場合には(ステップS40のYES),受信制御部230は,“待機”状態である受信アプリ210を順に1つ選択する(ステップS41)。“待機”状態である受信アプリ210が複数存在する場合には,受信制御部230は,例えば優先度を用いた特定の優先制御や,ラウンドロビンを用いた制御などにより,順に処理対象の受信アプリ210を選択する。“待機”状態である受信アプリ210が1つしかない場合には,受信制御部230は,その受信アプリ210を選択する。
When there is a reception application 210 in the “standby” state (YES in step S40), the
受信制御部230は,アプリ状況テーブル245から,該当受信アプリ210の必要リソースの情報を取得する(ステップS42)。また,受信制御部230は,ゲストOS201またはホストOS/ハイパーバイザ20から,自受信ノード200の空きリソースの情報を取得する(ステップS43)。なお,受信ノード200の空きリソースの情報をゲストOS201から取得するか,ホストOS/ハイパーバイザ20から取得するかは,設計による。
The
受信制御部230は,該当受信アプリ210の必要リソース以上の受信ノード200の空きリソースがあるかを判定する(ステップS44)。必要リソース以上の空きリソースがなければ(ステップS44のNO),受信制御部230は,該当受信アプリ210に対するメッセージを取得しないと判断し,ステップS48の処理に進む。例えば,受信制御部230は,CPUコア数,メモリ量,ネットワーク帯域量,ハードディスク容量の各項目について比較を行う場合に,空きリソースの方が必要リソースよりも値が小さい項目が1つでもあれば,必要リソース以上の空きリソースがないと判定する。
The
必要リソース以上の空きリソースがあれば(ステップS44のYES),受信制御部230は,該当受信アプリ210に対するメッセージを取得すると判断する。例えば,受信制御部230は,CPUコア数,メモリ量,ネットワーク帯域量,ハードディスク容量の各項目について比較を行う場合に,すべての項目で空きリソースの方が必要リソースよりも値が大きければ,必要リソース以上の空きリソースがあると判定する。
If there is a free resource more than the necessary resource (YES in step S44), the
このとき,受信制御部230は,該当受信アプリ210のアプリIDを指定して,キューマネージャ220に,該当受信アプリ210に対するメッセージの受信を依頼する(ステップS45)。受信制御部230は,キューマネージャ220から該当受信アプリ210に対するメッセージを取得すると(ステップS46),取得したメッセージを該当受信アプリ210に渡す(ステップS47)。該当受信アプリ210では,受信制御部230から渡されたメッセージの内容に従った処理が実行される。
At this time, the
受信制御部230は,すべての“待機”状態の受信アプリ210について処理が終了したかを判定する(ステップS48)。まだすべての“待機”状態の受信アプリ210について処理が終了していなければ(ステップS48のNO),受信制御部230は,ステップS41の処理に戻って,次の“待機”状態の受信アプリ210の処理に移る。すべての“待機”状態の受信アプリ210について処理が終了していれば(ステップS48のYES),受信制御部230は,ステップS40の処理に戻って,次のアプリ状況テーブル245のチェックタイミングを待つ。
The
図9は,本実施の形態1における受信ノードのキューマネージャによる処理のフローチャートである。 FIG. 9 is a flowchart of processing by the queue manager of the receiving node in the first embodiment.
受信ノード200において,キューマネージャ220は,受信制御部230からメッセージの受信依頼を受け付けると(ステップS50),指定されたアプリIDを検索キーに,キュー領域300のメッセージを検索する(ステップS51)。例えば,キューマネージャ220は,キュー領域300からメッセージをFIFOで取り出せるように,付与されたタイムスタンプが古い順に,付与された宛先のアプリIDが検索キーのアプリIDと一致するメッセージを検索する。なお,メッセージに優先度の情報が付されている場合に,優先度が高いメッセージを優先的に検索するなどの設計は,任意である。指定されたアプリIDを宛先としたメッセージがキュー領域300になければ(ステップS52のNO),キューマネージャ220は,ステップS51の処理に戻り,次の検索のタイミングを待つ。
In the receiving
指定されたアプリIDを宛先としたメッセージがキュー領域300にあれば(ステップS52のYES),キューマネージャ220は,他の受信ノード200とメッセージの取り出し処理が輻輳しないように,対象のメッセージをレコードロックして(ステップS53),排他制御する。キューマネージャ220は,キュー領域300から,対象のメッセージを取り出す(ステップS54)。なお,キュー領域300からのメッセージの取り出しは,デキューとも呼ばれる。キューマネージャ220は,取り出したメッセージを,受信制御部230に応答する(ステップS55)。キューマネージャ220は,取り出したメッセージを,キュー領域300から削除する(ステップS56)。
If there is a message addressed to the specified application ID in the queue area 300 (YES in step S52), the
ここまで説明したように,本実施の形態1の受信ノード200における受信制御部230は,待機状態の受信アプリ210があっても,自受信ノード200のリソースに十分な空きがなければ,該当受信アプリ210に対するメッセージを取得しないように制御を行う。受信制御部230は,その時点で,待機状態の受信アプリ210が1処理を実行するのに必要な空きリソースがあると判断できる場合にのみ,メッセージを取得する制御を行う。
As described so far, the
すなわち,本実施の形態1による受信ノード200は,リソース量が動的に変化する場合でも,その時その時で,十分に処理実行可能なメッセージのみをキュー領域300から取得して処理を行う。そのため,受信ノード200において,待機状態の受信アプリ210があるゆえにキュー領域からメッセージを取得してしまい,リソース量が変化したためにリソース不足によって適切に処理が実行できなくなってしまう,といった状況を回避できる。
That is, even when the amount of resources changes dynamically, the receiving
これにより,例えば,リソース量が動的に変化する複数の受信ノード200によって分散処理が行われるようなシステムにおいて,その時点で真に処理実行可能な受信ノード200のみが,キュー領域300からメッセージを取得して処理を行うので,円滑なシステムの運用が可能となる。
As a result, for example, in a system in which distributed processing is performed by a plurality of receiving
〔実施の形態2〕
図10は,本実施の形態2によるコンピュータノード間でメッセージ通信を行うシステムの構成例を示す図である。
[Embodiment 2]
FIG. 10 is a diagram illustrating a configuration example of a system that performs message communication between computer nodes according to the second embodiment.
図10に示す本実施の形態2によるシステムの構成では,受信ノード200’の構成が,図1に示す受信ノード200の構成に,アプリ稼働管理部250が加えられたものとなっている。その他の構成については,図1に示す実施の形態1によるシステムの構成と同様である。以下では,本実施の形態2について,上述の実施の形態1と異なる部分を中心に説明を行い,上述の実施の形態1と同様の部分については説明を省略する。
In the system configuration according to the second embodiment shown in FIG. 10, the configuration of the reception node 200 'is the same as the configuration of the
上述の実施の形態1では,各受信アプリ210が,自身のプロパティ情報や自身の処理の実行状態を,アプリ状況テーブル記憶部240のアプリ状況テーブル245に記録していた。本実施の形態2では,アプリ稼働管理部250が,各受信アプリ210のプロパティ情報や処理の実行状態を,アプリ状況テーブル記憶部240のアプリ状況テーブル245に記録する。
In the first embodiment described above, each receiving application 210 records its property information and the execution state of its own process in the application status table 245 of the application status
なお,本実施の形態2では,受信ノード200’で動作する各受信アプリ210は,自身のプロパティ情報や自身の処理の実行状態をアプリ状況テーブル245に記録する処理を行わない。
In the second embodiment, each receiving application 210 operating on the receiving
図11は,本実施の形態2における受信ノードの受信アプリによる処理のフローチャートである。 FIG. 11 is a flowchart of processing by the receiving application of the receiving node in the second embodiment.
受信ノード200’において,受信アプリ210は,起動後,送信アプリ110からのメッセージの受け付けを待つ(ステップS60)。受信アプリ210は,送信アプリ110からのメッセージを受け付けると(ステップS60のYES),受信アプリ210は,受け付けたメッセージの内容に従って処理を実行する(ステップS61)。受信アプリ210は,メッセージに応じた処理が終了すると,ステップS60の処理に戻って,次のメッセージの受け付けを待つ。
In the
このように,本実施の形態2の受信ノード200’で動作する各受信アプリ210は,本実施の形態によるメッセージ通信の技術の導入に関係なく,既存の受信アプリと同様の処理を行う。
As described above, each reception application 210 operating in the
受信ノード200’が備えるアプリ稼働管理部250は,受信ノード200’で動作する各受信アプリ210の動作を監視する機能部である。受信ノード200’の起動時において,アプリ稼働管理部250は,各受信アプリ210より先に起動される。
The application
図12は,本実施の形態2における受信ノードのアプリ稼働管理部による処理のフローチャートである。 FIG. 12 is a flowchart of processing by the application operation management unit of the receiving node in the second embodiment.
受信ノード200’において,アプリ稼働管理部250は,受信アプリ210の起動を検知すると(ステップS70のYES),アプリ状況テーブル245に,該受信アプリ210の情報を記録するレコードを生成する(ステップS71)。アプリ稼働管理部250は,例えば図3に示すプロパティ情報205のファイルから,起動された受信アプリ210のアプリIDと必要リソースとを読み出す(ステップS72)。アプリ稼働管理部250は,読み出したアプリIDと必要リソースとを,アプリ状況テーブル245の該当レコードに登録する(ステップS73)。アプリ稼働管理部250は,アプリ状況テーブル245において,起動された受信アプリ210のアプリ状態を“待機”に設定する(ステップS74)。
In the
アプリ稼働管理部250は,受信アプリ210の削除を検知すると(ステップS75のYES),アプリ状況テーブル245から,削除された受信アプリ210のレコードを削除する(ステップS76)。
When detecting the deletion of the reception application 210 (YES in step S75), the application
アプリ稼働管理部250は,受信アプリ210がメッセージを受け付けたことを検知すると(ステップS77のYES),アプリ状況テーブル245において,該当受信アプリ210のアプリ状態を“稼働”に更新する(ステップS78)。
When the application
アプリ稼働管理部250は,受信アプリ210がメッセージに応じた処理を終了したことを検知すると(ステップS79のYES),アプリ状況テーブル245において,該当受信アプリ210のアプリ状態を“待機”に更新する(ステップS80)。
When the application
ここまで説明したように,本実施の形態2の受信ノード200’におけるアプリ稼働管理部250は,受信ノード200’で動作する各受信アプリ210の処理の実行状態を,まとめて管理する。これにより,本実施の形態によるメッセージ通信の技術の導入にあたって,既存の受信アプリのプログラムを書き換えずに使用可能となる。
As described so far, the application
〔実施の形態3〕
図13は,本実施の形態3によるコンピュータノード間でメッセージ通信を行うシステムの構成例を示す図である。
[Embodiment 3]
FIG. 13 is a diagram illustrating a configuration example of a system that performs message communication between computer nodes according to the third embodiment.
図13に示す本実施の形態3によるシステムの構成では,受信ノード200”の構成が,図1に示す受信ノード200の構成から,アプリ状況テーブル記憶部240が削除されたものとなっている。代わりに,アプリ状況テーブル記憶部400が,受信ノード200”の外部に設けられている。その他の構成については,図1に示す実施の形態1によるシステムの構成と同様である。以下では,本実施の形態3について,上述の実施の形態1と異なる部分を中心に説明を行い,上述の実施の形態1と同様の部分については説明を省略する。
In the configuration of the system according to the third embodiment shown in FIG. 13, the configuration of the receiving
アプリ状況テーブル記憶部400は,複数の受信ノード200”で動作する受信アプリ210を一括で管理するアプリ状況テーブルを記憶する記憶部である。本実施の形態3のアプリ状況テーブル記憶部400を実現する方法としては,キュー領域300と同様に,様々な方法が考えられる。例えば,システムが備えるいずれかのノードで,アプリ状況テーブル記憶部400を実現する方法が考えられる。また,システムが有する各ノードが共通にアクセス可能なストレージで,アプリ状況テーブル記憶部400を実現することも可能である。
The application situation
アプリ状況テーブル記憶部400に記憶されるアプリ状況テーブルの構成としては,例えば,図2に示すアプリ状況テーブル245に,受信ノード200”を識別するノードIDを加えたものとなる。アプリ状況テーブル記憶部400では,例えば,受信ノード200”ごとに,アプリ状況テーブルが管理される。
As a configuration of the application status table stored in the application status
受信ノード200”において,受信アプリ210は,自身のプロパティ情報や処理の実行状態をアプリ状況テーブルに記録する際に,自受信ノード200”のノードIDでアプリ状況テーブル記憶部400にアクセスし,情報の記録・更新を行う。また,受信制御部230は,自受信ノード200”の受信アプリ210の情報を取得する際に,自受信ノード200”のノードIDでアプリ状況テーブル記憶部400にアクセスし,情報の取得を行う。
In the receiving
なお,アプリ状況テーブルの情報を受信ノード200”内部と,外部のアプリ状況テーブル記憶部400とに分けて管理する実施も可能である。例えば,アプリ状況テーブルの情報のうち,各受信アプリ210の必要リソースの情報を受信ノード200”内部で管理し,各受信アプリ210の処理の実行状態のみを外部のアプリ状況テーブル記憶部400で管理するようにしてもよい。
Note that the application status table information may be managed separately in the receiving
本実施の形態3において,送信ノード100の送信アプリ110は,アプリ状況テーブル記憶部400のアプリ状況テーブルを参照し,システム内に待機状態の受信アプリ210が存在するかを確認する。送信アプリ110は,システム内に待機状態の受信アプリ210が存在する場合に,キューマネージャ120にメッセージの送信を依頼する。
In the third embodiment, the
図14は,本実施の形態3における送信ノードの送信アプリによる処理のフローチャートである。 FIG. 14 is a flowchart of processing by the transmission application of the transmission node in the third embodiment.
送信ノード100において,送信アプリ110は,受信アプリ210に対して処理要求のメッセージを送る際に,該当受信アプリ210のアプリIDでアプリ状況テーブル記憶部400のアプリ状況テーブルを参照する(ステップS90)。
In the
送信アプリ110は,システム内のいずれかの受信ノード200”に,該当受信アプリ210が存在するかを判定する(ステップS91)。システム内のいずれの受信ノード200”にも該当受信アプリ210が存在しない場合には(ステップS91のNO),送信アプリ110は,ステップS90の処理に戻って,次のタイミングを待つ。例えば,アプリ状況テーブル記憶部400のアプリ状況テーブルに,該当受信アプリ210のアプリIDのレコードがない場合には,該当受信アプリ210は存在しないと判定される。受信ノード200”において,受信アプリ210が動的に起動・削除される環境では,目的とする受信アプリ210がシステム内のいずれの受信ノード200”にも存在しないことがあり得る。
The transmitting
システム内のいずれかの受信ノード200”に該当受信アプリ210が存在する場合には(ステップS91のYES),送信アプリ110は,待機状態の該当受信アプリ210が存在するかを判定する(ステップS92)。待機状態の該当受信アプリ210が存在しない場合には(ステップS91のNO),送信アプリ110は,ステップS90の処理に戻って,次のタイミングを待つ。
If the corresponding reception application 210 exists in any
待機状態の該当受信アプリ210が存在する場合には(ステップS92のYES),送信アプリ110は,受信アプリ210に対して処理要求を行うメッセージに,メタ情報を付与する(ステップS93)。送信アプリ110は,キューマネージャ120に対して,メッセージの送信を依頼する(ステップS94)。
If there is a corresponding reception application 210 in the standby state (YES in step S92), the
ここまで説明したように,本実施の形態3の送信ノード100における送信アプリ110は,アプリ状況テーブル記憶部400のアプリ状況テーブルで,目的とする待機状態の受信アプリ210があるかを確認する。送信アプリ110は,目的とする待機状態の受信アプリ210がある場合にのみ,キューマネージャ120にメッセージの送信を依頼する。
As described so far, the
すなわち,送信ノード100は,受信ノード200”がすぐには受信できないメッセージを,キュー領域300に送信しないようになる。これにより,すぐに処理されないメッセージがキュー領域300に滞留することでキュー領域300が枯渇することを防止できる。
That is, the
〔実施例〕
図15は,本実施例によるメッセージ通信を行うシステムを示す図である。
〔Example〕
FIG. 15 is a diagram illustrating a system for performing message communication according to the present embodiment.
図15に示すシステムにおいて,送信ノード500は,例えば図1に示す送信ノード100に相当する。受信ノード600,受信ノード700は,例えば図1に示す受信ノード200に相当する。受信ノード600,受信ノード700は,動的にリソース量が変化する仮想マシンであるものとする。キュー領域800は,例えば図1に示すキュー領域300に相当する。
In the system shown in FIG. 15, the
受信ノード600で動作する受信アプリ610aと,受信ノード700で動作する受信アプリ710aは,それぞれが異なる受信ノードで動作する,同じアプリケーション(アプリID:“app#a”)のプロセスであるものとする。また,受信ノード600で動作する受信アプリ610bと,受信ノード700で動作する受信アプリ710bは,それぞれが異なる受信ノードで動作する,同じアプリケーション(アプリID:“app#b”)のプロセスであるものとする。
The
ここで,送信ノード500は,メッセージMa1 ,メッセージMa2 ,メッセージMbの順でメッセージを発行する。メッセージMa1 とメッセージMa2 の宛先のアプリIDは,“app#a”であり,メッセージMbの宛先のアプリIDは,“app#b”であるものとする。図15に示すように,キュー領域800には,メッセージMa1 ,メッセージMa2 ,メッセージMbの順でメッセージが格納される。
Here, the
この時点で,受信ノード600の受信アプリ610a,610b,および受信ノード700の受信アプリ710a,710bは,すべて待機状態であるものとする。このタイミングで,受信ノード600は,定期的な受信チェックを行い,受信アプリ610aが待機状態であることを確認し,また受信アプリ610aが処理を実行するのに十分な空きリソース量があることを確認する。受信ノード600は,受信アプリ610aのアプリID“app#a”でキュー領域800を検索し,メッセージMa1 を取得する。受信アプリ610aは,メッセージMa1 の内容に応じた処理の実行を開始する。
At this time, it is assumed that the
次のタイミングで,受信ノード700は,定期的な受信チェックを行い,受信アプリ710aが待機状態であることを確認し,また受信アプリ710aが処理を実行するのに十分な空きリソース量があることを確認する。受信ノード700は,受信アプリ710aのアプリID“app#a”でキュー領域800を検索し,メッセージMa2 を取得する。受信アプリ710aは,メッセージMa2 の内容に応じた処理の実行を開始する。
At the next timing, the receiving
次のタイミングで,受信ノード600は,定期的な受信チェックを行い,受信アプリ610bが待機状態であることを確認する。ここで,ノードのリソース量が時間変化しないという前提であれば,通常,ノードのリソース量に応じたアプリケーションプロセスの実装が行われるので,アプリケーションプロセスの待機状態が確認できれば,メッセージを受信しても問題はない。従来であれば,この時点で,キュー領域800から,受信アプリ610bに対応するメッセージMbが取得されていた。
At the next timing, the receiving
しかし,受信ノード600は割り当てられるリソース量が時間変化するので,ある時点で空きリソース量が十分であることが確認されて受信アプリ610bが起動されたとしても,別の時点では受信アプリ610bが処理を実行するのに十分な空きリソース量がないというケースが発生し得る。このタイミングでは,受信ノード600に割り当てされるリソース量が減っていて,受信アプリ610bが処理を実行するのに十分な空きリソース量がないものとする。このとき,受信ノード600は,受信アプリ610bに対するメッセージの受信を行わないと判断する。すなわち,受信ノード600は,キュー領域800にあるアプリID“app#b”のメッセージMbの取り出しを行わない。
However, since the amount of resources allocated to the receiving
次のタイミングで,受信ノード700は,定期的な受信チェックを行い,受信アプリ710bが待機状態であることを確認する。また,受信ノード700は,この時点での自身の空きリソース量が,受信アプリ710bが処理を実行するのに十分な量であることを確認する。受信ノード700は,受信アプリ710bのアプリID“app#b”でキュー領域800を検索し,メッセージMbを取得する。受信アプリ710bは,メッセージMbの内容に応じた処理の実行を開始する。
At the next timing, the
本実施例に示すように,ある時点において,十分なリソースがある受信ノード700が存在するのに,リソース量が足りない受信ノード600がメッセージMbを取得して処理が滞ってしまうといった問題の発生を防ぐことが可能となる。このように,上述の本実施の形態によるメッセージ通信の技術を用いれば,受信ノード600,700に割り当てられるリソース量が時間変動していても,その時点で処理を実行可能な受信ノード600,700のみがメッセージを取得するので,円滑なシステムの運用が可能となる。
As shown in the present embodiment, there is a problem that at a certain point in time, there is a receiving
以上,本実施の形態について説明したが,本発明はその主旨の範囲において種々の変形が可能であることは当然である。 Although the present embodiment has been described above, the present invention can naturally be modified in various ways within the scope of the gist thereof.
10 物理マシン
20 ホストOS/ハイパーバイザ
30 仮想マシン
31 ゲストOS
100 送信ノード
110 送信アプリ
120 キューマネージャ
200 受信ノード
201 ゲストOS
210 受信アプリ
220 キューマネージャ
230 受信制御部
240 アプリ状況テーブル記憶部
250 アプリ稼働管理部
300 キュー領域
400 アプリ状況テーブル記憶部
10
100
210
Claims (6)
前記コンピュータノードの空きリソース量を,自仮想マシンのゲストOSまたは自仮想マシンを管理するホストOSから取得し,
記憶部に記憶されたアプリケーションプロセスの管理情報から,処理の実行状態が待機状態である受信側アプリケーションプロセスについて,処理を実行する上で必要なリソース量を取得し,
前記空きリソース量が前記必要なリソース量以上である場合に,前記待機状態である受信側アプリケーションプロセスに対するメッセージを取得すると判断し,
前記待機状態である受信側アプリケーションプロセスに対するメッセージを,前記メッセージを記憶する記憶部から取得する処理を実行する
ことを特徴とするメッセージ通信方法。 A computer node that is a virtual machine on which the receiving application process that executes processing according to the content of the received message is running
The amount of free resources of the computer node is acquired from the guest OS of the own virtual machine or the host OS that manages the own virtual machine ,
From the application process management information stored in the storage unit, obtain the amount of resources required to execute processing for the receiving application process whose processing execution status is standby,
If the free resource amount is greater than or equal to the required resource amount, determine to obtain a message for the receiving application process in the standby state;
A message communication method comprising: executing a process of acquiring a message for the receiving application process in the standby state from a storage unit that stores the message.
前記コンピュータノードで動作する受信側アプリケーションプロセスが,自身の処理の実行状態を,前記管理情報に記録する処理を実行する
ことを特徴とする請求項1に記載のメッセージ通信方法。 The computer node further includes:
Receiving application processes running said computer node, the execution state of its own processing, message communication method according to claim 1, characterized in that performing the process of recording the management information.
前記コンピュータノードで動作する受信側アプリケーションプロセスの稼働を監視する機能部が,前記コンピュータノードで動作する受信側アプリケーションプロセスの処理の実行状態を,前記管理情報に記録する処理を実行する
ことを特徴とする請求項1に記載のメッセージ通信方法。 The computer node further includes:
A function unit that monitors the operation of a reception-side application process that operates on the computer node executes a process of recording an execution state of processing of a reception-side application process that operates on the computer node in the management information; The message communication method according to claim 1 .
前記管理情報を参照し,処理の実行状態が待機状態である受信側アプリケーションプロセスが存在する場合に,該待機状態である受信側アプリケーションプロセスに対するメッセージを,前記メッセージを記憶する記憶部に登録する
ことを特徴とする請求項1から請求項3までのいずれか一項に記載のメッセージ通信方法。 A computer node on which a sending application process that sends a message requesting processing to the receiving application process operates,
Refer to the management information, and when there is a receiving application process whose processing execution state is in a standby state, register a message for the receiving application process in the standby state in a storage unit that stores the message The message communication method according to any one of claims 1 to 3, wherein:
前記コンピュータノードの空きリソース量を,自仮想マシンのゲストOSまたは自仮想マシンを管理するコンピュータのホストOSから取得し,
記憶部に記憶されたアプリケーションプロセスの管理情報から,処理の実行状態が待機状態である受信側アプリケーションプロセスについて,処理を実行する上で必要なリソース量を取得し,
前記空きリソース量が前記必要なリソース量以上である場合に,前記待機状態である受信側アプリケーションプロセスに対するメッセージを取得すると判断し,
前記待機状態である受信側アプリケーションプロセスに対するメッセージを,前記メッセージを記憶する記憶部から取得する
処理を実行させるためのメッセージ通信プログラム。 On the computer node that is the virtual machine on which the receiving-side application process that executes processing according to the content of the received message runs,
The amount of free resources of the computer node is acquired from the guest OS of the own virtual machine or the host OS of the computer that manages the own virtual machine ,
From the application process management information stored in the storage unit, obtain the amount of resources required to execute processing for the receiving application process whose processing execution status is standby,
If the free resource amount is greater than or equal to the required resource amount, determine to obtain a message for the receiving application process in the standby state;
A message communication program for executing processing for acquiring a message for the receiving-side application process in the standby state from a storage unit that stores the message.
アプリケーションプロセスの管理情報を記憶する管理情報記憶部と,
前記コンピュータノードの空きリソース量を,前記コンピュータノードのゲストOSまたは前記コンピュータノードを管理する自コンピュータのホストOSから取得し,前記管理情報から,処理の実行状態が待機状態である受信側アプリケーションプロセスについて,処理を実行する上で必要なリソース量を取得し,取得した空きリソース量が取得した必要なリソース量以上である場合に,該待機状態である受信側アプリケーションプロセスに対するメッセージを取得すると判断する受信制御部と,
前記受信制御部がメッセージを取得すると判断した場合に,前記待機状態である受信側アプリケーションプロセスに対するメッセージを,メッセージ記憶部から取得するメッセージ取得部とを備える
ことを特徴とするコンピュータ。 A computer that starts a computer node , which is a virtual machine on which a receiving-side application process that executes processing according to the content of a received message runs,
A management information storage unit for storing application process management information;
A reception-side application process in which the free resource amount of the computer node is acquired from the guest OS of the computer node or the host OS of the local computer that manages the computer node, and the execution state of the process is a standby state from the management information Receives the amount of resources required to execute the process, and determines that a message for the receiving application process in the standby state is to be acquired when the acquired free resource amount is greater than or equal to the acquired required resource amount A control unit;
When the reception control unit determines to retrieve messages, computer, characterized in that it comprises a message for the receiving application process which is the standby state, a message acquisition unit that acquires from the message memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012075661A JP5884595B2 (en) | 2012-03-29 | 2012-03-29 | Message communication method, message communication program, and computer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012075661A JP5884595B2 (en) | 2012-03-29 | 2012-03-29 | Message communication method, message communication program, and computer |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013206233A JP2013206233A (en) | 2013-10-07 |
JP5884595B2 true JP5884595B2 (en) | 2016-03-15 |
Family
ID=49525223
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012075661A Active JP5884595B2 (en) | 2012-03-29 | 2012-03-29 | Message communication method, message communication program, and computer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5884595B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111666148A (en) * | 2014-04-30 | 2020-09-15 | 华为技术有限公司 | Computer, control apparatus, and data processing method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4189379B2 (en) * | 2004-12-27 | 2008-12-03 | 株式会社日立製作所 | Application operation control method and system |
JP2011243089A (en) * | 2010-05-20 | 2011-12-01 | Hitachi Ltd | Flow control method for calculator, flow controller, and flow control program |
-
2012
- 2012-03-29 JP JP2012075661A patent/JP5884595B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013206233A (en) | 2013-10-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9971823B2 (en) | Dynamic replica failure detection and healing | |
US20210359924A1 (en) | Monitoring a stale data queue for deletion events | |
US10521116B2 (en) | System and method for managing object store | |
EP2284725A1 (en) | Client, brokerage server and method for providing cloud storage | |
US10419528B2 (en) | Dynamically instantiating and terminating data queues | |
US20100251255A1 (en) | Server device, computer system, recording medium and virtual computer moving method | |
US9940020B2 (en) | Memory management method, apparatus, and system | |
JP6246923B2 (en) | Management server, computer system and method | |
US9836358B2 (en) | Ephemeral remote data store for dual-queue systems | |
US9940269B2 (en) | Conditionally releasing locks in response to requests | |
KR101175505B1 (en) | System for providing user data storage enviroment using network based file system in n-screen | |
US10776173B1 (en) | Local placement of resource instances in a distributed system | |
US7412665B2 (en) | Menu management in an OLE document environment | |
JP5962493B2 (en) | Program, information processing apparatus, and object transmission method | |
JP5884595B2 (en) | Message communication method, message communication program, and computer | |
WO2018176397A1 (en) | Lock allocation method, device and computing apparatus | |
US20110321043A1 (en) | System, Method and Program Product for Native Interface Optimization of Read-Only Arrays | |
JP6205013B1 (en) | Application usage system | |
US11475022B2 (en) | System and method for constructing a compound object in a distributed object storage system | |
JP3884239B2 (en) | Server computer | |
US9875123B2 (en) | Host reservation system | |
JP7480842B2 (en) | Virtual resource management device, virtual resource management method, and program | |
US11392433B1 (en) | Generation of asynchronous application programming interface specifications for messaging topics | |
US10261723B1 (en) | POSIX compliant flash servers | |
JP5288272B2 (en) | I / O node control method and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150106 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150724 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150825 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151019 |
|
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: 20160112 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160125 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5884595 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |