JP2011191942A - Processing method and apparatus - Google Patents
Processing method and apparatus Download PDFInfo
- Publication number
- JP2011191942A JP2011191942A JP2010056542A JP2010056542A JP2011191942A JP 2011191942 A JP2011191942 A JP 2011191942A JP 2010056542 A JP2010056542 A JP 2010056542A JP 2010056542 A JP2010056542 A JP 2010056542A JP 2011191942 A JP2011191942 A JP 2011191942A
- Authority
- JP
- Japan
- Prior art keywords
- processing
- memory
- result
- stored
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、要求された処理を実行する処理方法及び装置に関する。 The present invention relates to a processing method and apparatus for executing requested processing.
近年、ネットワークを介して複数の装置同士がデータのやり取りを行うWebサービス技術を用いたPCや機器の連携が一般的に行われている。サービスは、クライアントからのサービスの実行を要求するリクエストメッセージを受信し、サービスロジックを実行して、実行結果を含んだレスポンスメッセージをクライアントに送信する。 In recent years, cooperation between PCs and devices using Web service technology in which a plurality of devices exchange data with each other via a network is generally performed. The service receives a request message for requesting execution of the service from the client, executes the service logic, and transmits a response message including the execution result to the client.
サービスがリクエストメッセージを受信した後に、ネットワーク障害やタイムアウト、及び、クライアントからのキャンセルにより、コネクションが切断された場合、サービス側では、サービスロジックの実行処理を途中で止められない。通常、サービスロジックの実行が終了し、レスポンスメッセージを書き出そうとして、コネクションの切断に気づき、処理を終了する。そのため、せっかく作成したレスポンスメッセージが無駄になってしまう。 After the service receives the request message, if the connection is disconnected due to a network failure, timeout, or cancellation from the client, the service side cannot stop the service logic execution process. Normally, the execution of the service logic is completed, the response message is written out, the disconnection is noticed, and the process is terminated. Therefore, the created response message is wasted.
そこで、ウェブサービス要求を受信したことに応答して、ウェブサービスコントローラが制御し、サービスロジックを実行せずにキャッシュしたものを使用できるようにした先行技術がある(例えば、特許文献1参照)。 Therefore, in response to receiving a web service request, there is a prior art in which a web service controller controls and uses a cached data without executing service logic (see, for example, Patent Document 1).
この先行技術の場合、どのような場合でもキャッシュを使用するが、全ての情報をキャッシュするには、そのために十分なメモリを確保する必要がある。 In this prior art, a cache is used in any case, but in order to cache all the information, it is necessary to secure a sufficient memory.
本発明は、要求された処理を実行した結果を効率よく利用する処理方法及び装置を提供することを目的とする。 An object of the present invention is to provide a processing method and apparatus that efficiently uses a result of executing a requested process.
本発明は、プロセッサを有する処理装置により実行される処理方法において、
他の装置からの処理要求を受信し、
要求された処理を前記プロセッサが実行し、
要求された処理の実行まで処理の要求元との接続が維持されている場合、処理を実行した結果を処理の要求元に送信し、
要求された処理の実行中に処理の要求元との接続が切断された場合、処理の実行を中断するか否かを判定し、
処理を中断しないと判定した場合、処理を実行した結果をメモリに格納し、
処理要求が受信されたときに要求された処理を実行した結果が前記メモリに格納されている場合、前記メモリに格納されていた処理結果を、処理の要求元に送信することを特徴とする。
The present invention relates to a processing method executed by a processing device having a processor.
Receive processing requests from other devices,
The processor performs the requested processing;
If the connection with the process requester is maintained until the requested process is executed, the process execution result is sent to the process requester,
If the connection with the request source of the process is disconnected during the execution of the requested process, determine whether to interrupt the process execution,
When it is determined that the process is not interrupted, the result of the process is stored in the memory,
When a result of executing a requested process when a process request is received is stored in the memory, the process result stored in the memory is transmitted to a process request source.
本発明によれば、要求された処理を実行した結果を効率よく利用する処理方法及び装置を提供することができる。 ADVANTAGE OF THE INVENTION According to this invention, the processing method and apparatus which utilize efficiently the result which performed the requested | required process can be provided.
以下、図面を参照しながら発明を実施するための形態について詳細に説明する。 Hereinafter, embodiments for carrying out the invention will be described in detail with reference to the drawings.
まず、本実施形態における通信装置のハードウェア構成の一例を、図1を用いて説明する。尚、本実施形態では、通信装置として、他の装置(要求元)からの、サービス要求(処理要求)に応じて、サービス(処理)を実行し、実行結果(応答)を他の装置へ返送するサービス装置を例に説明する。 First, an example of the hardware configuration of the communication apparatus according to the present embodiment will be described with reference to FIG. In this embodiment, as a communication device, a service (processing) is executed in response to a service request (processing request) from another device (request source), and an execution result (response) is returned to the other device. The service device will be described as an example.
図1において、他の装置101は、ネットワーク113を介してサービス装置(通信装置)102とメッセージを授受する、サービスを利用する側の装置(コンピュータ)である。サービス装置102は、CPU(プロセッサ)103、メモリ104、HD(ハードディスク)装置105、表示ボード106、周辺コントローラ107、ネットワークI/F108を備える。CPU103は、プログラム(手順)に従ってサービス装置102の各処理部の処理を実行する。プログラムはHD装置105に、あるいはメモリ104内のROMに格納されており、CPU103がプログラムを実行時にメモリ104内のRAMに読み込まれる。メモリ104はプログラムや制御データを格納するROMとCPU103の作業領域としてのRAMを含み、更にXMLの要素やオブジェクトも格納される。また、プログラムはコンピュータを通信装置として機能させるためのものである。
In FIG. 1, another
HD装置105はハードディスクへのアクセスを制御するインタフェースを含み、各種データを記憶する。表示ボード106はディスプレイ装置109を接続するためのインタフェースを含み、サービス装置102の状態や処理結果をディスプレイ装置109に表示させる。周辺コントローラ107はマウス110やキーボード111を接続するためのインタフェースを含み、サービス装置102への指示や各種入力を制御する。ネットワークI/F108はネットワーク113との間で通信するためのインタフェースを含み、他の装置101との通信を制御する。
The
システムバス112は上述の各部を接続する。ネットワーク113は他の装置101とサービス装置102がメッセージを通信できればどのような形態でもよく、例えばインターネット、WAN、LANなどである。また、通信プロトコルも特定のプロトコルに限るものではない。
The
次に、サービス装置102のソフトウェア構成の一例を、図2を用いて説明する。他の装置101からサービスの実行を要求するメッセージとしてリクエストメッセージ201が送信されると、メッセージ受信部202がそのリクエストメッセージ201を受信する。ここで、他の装置101とサービス装置102とのコネクションが切断されていないか否かはコネクション切断検知部203が検知する。メッセージ受信部202は、図1のネットワークI/F108を介してリクエストメッセージ201を受信する。
Next, an example of the software configuration of the
コネクションが切断されていなければ、メッセージ解析部204がそのリクエストメッセージ201を解析し、何のサービスの呼び出しかを判断する。また、メッセージ解析部204はリクエストメッセージ201に、メッセージを識別するための情報として識別子(ID)が含まれているか否かも判断する。
If the connection is not disconnected, the
次に、メッセージ解析部204で呼び出すサービスが特定されると、サービスロジック制御部205がサービスロジック206の呼び出しを行う。また、コネクション切断検知部203が切断を検知した場合は、リクエストメッセージ201に識別子が付与されていない場合、サービスロジック206の処理を中断させる。サービスロジック206は、サービスロジック制御部205によってサービスの実行及び実行の中断が行われる。
Next, when the service to be called is specified by the
サービスロジック制御部205によるサービスの実行が終了すると、メッセージ作成部207がサービスロジック206の実行結果に基づいて他の装置101に返信するレスポンスメッセージ209を作成する。そして、メッセージ送信部208が他の装置101にサービスの実行結果を表すメッセージとして、レスポンスメッセージ209を送信する。また、レスポンスメッセージ209は、サービスの実行に失敗した場合、失敗した情報を表すメッセージとなる。メッセージ送信部208は、図1のネットワークI/F108を介してレスポンスメッセージ209を送信する。
When the service
他の装置101とのコネクションの切断により、メッセージを送信できなかった場合、未送信メッセージ管理部210がデータベース211に未送信のレスポンスメッセージを保持する。これは、他の装置101からのリクエストメッセージ201に識別子が付与されていた場合に行われ、識別子とレスポンスメッセージ209を紐付けて保持する。また、未送信メッセージ管理部210は再び、同じ識別子を持つリクエストメッセージ201が他の装置101から送信された場合、既に紐付けされたレスポンスメッセージをメッセージ送信部208に渡す。データベース211は、未送信メッセージ管理部210が情報を格納する格納先であり、HD装置105に含まれる。
If the message cannot be transmitted due to the disconnection with the
次に、本実施形態におけるサービス装置の特徴的な処理を、図3乃至図8を用いて説明する。まず、識別子が付与されていないリクエストメッセージをやり取りする具体例を図3に示す。リクエストメッセージ301は、他の装置101がgetDataオペレーションを呼び出す際に送信される具体例である。リクエストメッセージ301には、識別子が付与されていない。サービス装置102では、このリクエストメッセージ301を受信し、具体的なサービスロジック302を実行する。そのサービスロジック302を実行した結果として、具体的なレスポンスメッセージ303が作成される。しかし、このサービスロジック302の処理を実行中にコネクションが切断された場合、リクエストメッセージ301に識別子が付与されていないため、サービスロジック302の実行を中断する。従って、この場合、レスポンスメッセージ303は作成されない。
Next, characteristic processing of the service device according to the present embodiment will be described with reference to FIGS. First, a specific example of exchanging request messages without an identifier is shown in FIG. The
次に、識別子(ID)が付与されたリクエストメッセージをやり取りする具体例を図4に示す。リクエストメッセージ401は、他の装置101がgetDataオペレーションを呼び出す際に送信される具体例である。リクエストメッセージ401には、識別子「100020」が付与されている。この識別子は初めてのアクセスであるため、データベース211には、紐付けされたレスポンスメッセージ303は存在しない。そのため、サービス装置102は、サービスロジック302の実行を行い、レスポンスメッセージ303の作成を行う。このサービスロジック302の実行結果として、具体的なレスポンスメッセージ303が作成される。ここで、サービスロジック302の処理を実行中にコネクションが切断された場合、このリクエストメッセージ401には識別子が付与されているため、サービスロジック302の実行を最後まで行う。そして、レスポンスメッセージ303を作成し、識別子「100020」と紐付けしてデータベース211に保持しておく。
Next, FIG. 4 shows a specific example of exchanging request messages with identifiers (ID). The
なお、図5に示すように、再度、リクエストメッセージ401が他の装置101から送信されると、識別子「100020」に紐付けされたレスポンスメッセージ303がデータベース211に存在するため、サービスロジック302を実行せずに、そのメッセージを送信する。そして、識別子「100020」と紐付けされたレスポンスメッセージ303の情報をデータベース211から削除する。
As shown in FIG. 5, when the
また、サービスロジック302の処理を実行中にコネクションが切断されなかった場合は、サービスロジック302を実行して作成したレスポンスメッセージ303を他の装置101にそのまま送信する。
If the connection is not disconnected during the processing of the
ここで、他の装置101から識別子のみが送信された場合に、装置間で送受信されるメッセージを図5に示す。識別子の情報だけをもつリクエストメッセージ501が送信される。サービス装置102では、送信された識別子「100020」に紐付けされたレスポンスメッセージがデータベース211に格納されているか否かを判断する。判断した結果、紐付けされたレスポンスメッセージ303が存在すれば、図4で説明したようにそのメッセージを送信し、格納されているメッセージの情報をデータベース211から削除する。しかし、紐付けされたレスポンスメッセージ303が存在しなかった場合、識別子のみで実行するサービスが不明なため、フォルトのメッセージを具体的なレスポンスメッセージ502として作成する。このサービス実行に失敗したことを表すレスポンスメッセージ502が他の装置101に送信される。
Here, FIG. 5 shows a message transmitted / received between devices when only an identifier is transmitted from another
上述したサービス装置102におけるデータベース211が保持する情報の一例を図6に示す。図4に示すリクエストメッセージ401のサービスを実行処理中にコネクションが切断された場合、識別子「100020」がレスポンスメッセージと共に格納される(601)。この例では、識別子「100120」もレスポンスメッセージと共に格納されている(602)。また、この例では、他に、保存期間が記述してある。601では残り60分となっており、602では残り120分となっている。これは、サービス装置102のデータベース211において、データを保存しておく期間を設けた例である。
An example of information held in the
他の装置101がサービスの実行要求を行った場合に、コネクションが切断される可能性は、二つある。一つは、ネットワーク障害やタイムアウトなどによる、他の装置101が意図していない切断である。この場合、他の装置101がリトライを行う可能性が高い。しかし、他の装置101が何らかの理由により、意図的に切断を行う場合もある。この場合、後で実行する可能性もあるが、実行を行わない場合もある。そのため、二度とリトライが発生しないようなメッセージが存在してしまう。二度とアクセスされないメッセージをいつまでもデータベースに保管しておくのは、よくないので、ある一定の保存期間を設けるのが望ましい。
There are two possibilities of disconnecting the connection when another
この保存期間は、本実施形態では、サービス装置102の作成者が自由に設定する。また、他の実施形態では、この保存時間は、他の装置101からのリクエストメッセージに情報として付与する。この保存期間を過ぎた(所定時間後の)データは削除するが、削除された後にその識別子でリクエストメッセージを送信してきた場合、図4に示すように、サービスのメッセージを含んでいれば、サービスロジックの実行が行われるので問題ない。但し、図5に示すように、識別子のみのリクエストメッセージの場合は、フォルトレスポンスメッセージが返る。
In this embodiment, the storage period is freely set by the creator of the
次に、本実施形態におけるサービス装置102の処理を、図7に示すフローチャートを用いて説明する。図7のフローチャートは、CPU103がプログラムを実行することにより実現される。このプログラムはHD装置105に、あるいはメモリ104内のROMに格納されており、CPU103がプログラムを実行時にメモリ104内のRAMに読み込まれる。
Next, the processing of the
メッセージ受信部202が他の装置101から送られてきたリクエストメッセージ201を受信する(S701)。このリクエストメッセージ201は、サービス装置102と他の装置101の間に形成されたコネクションを介して受信される。次に、コネクション切断検知部203が、コネクションが切断されていないかを常に監視する(S702)。切断を検知した場合には、すぐにメッセージ受信部202に知らせる。通知された情報は、その他の全ての処理部に伝えられる。
The
次に、メッセージ解析部204がリクエストメッセージ201に識別子が付与されているか否かを判定する(S703)。判定した結果、リクエストメッセージ201に識別子が付与されていなければ(S703でNO)、呼び出すサービスを特定し(S704)、処理がサービスロジック制御部205へ移る。サービスロジック制御部205では、メッセージ解析部204が特定したサービスに基づいてサービスロジック206を実行する(S705)。リクエストメッセージ201が上述したgetDataオペレーションを呼び出すリクエストメッセージ301の場合は、図3のサービスロジック302が実行される。
Next, the
ここで、サービスロジック206の実行中に、コネクション切断検知部203がコネクションの切断を検知しなければ(S706でNO)、メッセージ作成部207がサービスロジックの結果を含むレスポンスメッセージ209を作成する(S707)。次に、メッセージ送信部208が、作成されたレスポンスメッセージ209を他の装置101に送信し(S708)、この処理を終了する。
If the connection
一方、コネクション切断検知部203がコネクションの切断を検知すると(S706でYES)、サービスロジック制御部205はサービスロジック206の実行を中断し(S709)、この処理を終了する。このサービスロジックの中断方法については、いくつか方法が考えられる。例えば、スレッドを別にしてサービスロジックの実行を行っておき、中断を検知すると、スレッドを止める。或いは、サービスロジックにキャンセルメソッドを用意しておき、そのメソッドを呼び出すなどである。尚、中断方法は、どのように実装されていても構わない。なお、S707のレスポンスメッセージ209の作成中、又は、S708のレスポンスメッセージ209の送信中に、コネクションが切断された場合も、処理を中断して、終了する。
On the other hand, when the connection
また、メッセージ解析部204が、上述のリクエストメッセージ401のように、識別子が付与されているリクエストメッセージであると判定すると(S703でYES)、処理が未送信メッセージ管理部210へ移る。未送信メッセージ管理部210では、識別子「100020」に対応するレスポンスメッセージがデータベース211に存在するか否かを判定する(S710)。判定した結果、識別子「100020」が付与されたリクエストメッセージを初めて受信したのであれば、データベース211には存在しない(S710でNO)。そこで、メッセージ解析部204がそのメッセージを解析し、何のサービスの呼び出しかを特定する(S711)。尚、リクエストメッセージ401の場合、サービス呼び出しの情報が含まれているので、何の呼び出しかを特定することが可能である(S711でYES)。リクエストメッセージ401は、getDataオペレーションを呼び出すリクエストメッセージである。
If the
次に、サービスロジック制御部205が、メッセージ解析部204が特定したサービスに基づいてサービスロジック206を実行する(S712)。この場合、上述したサービスロジック302が実行される。次に、メッセージ作成部207がサービスロジック206の結果を含むレスポンスメッセージ209を作成する(S713)。次に、コネクション切断検知部203がコネクションの切断を検知していなければ(S714でNO)、メッセージ送信部208は、作成されたレスポンスメッセージ209を他の装置101に送信し(S715)、この処理を終了する。
Next, the service
一方、コネクション切断検知部203が、サービスロジックの実行中にコネクションの切断を検知していた場合(S714でYES)、未送信メッセージ管理部210に処理が移る。未送信メッセージ管理部210がデータベース211に識別子「100020」と作成したレスポンスメッセージ303を紐付けて601のように保存し(S716)、この処理を終了する。なお、S715のレスポンスメッセージ209の送信中にコネクションが切断された場合も、S716に移る。
On the other hand, if the connection
また、上述したS710で、未送信メッセージ管理部210が、データベース211に識別子「100020」に対応するレスポンスメッセージが存在すると判定した場合(S710でYES)、コネクション切断検知部203がコネクションの切断を検知していれば(S717でYES)、この処理を終了する。コネクション切断検知部203がコネクションの切断を検知していなければ(S717でNO)、処理がメッセージ送信部208へ移る。ここで、メッセージ送信部208は、その対応するレスポンスメッセージを他の装置101に送信する(S718)。そして、データベース211から送信が終了したレスポンスメッセージに対応する情報(601)を削除し(S719)、この処理を終了する。なお、S718でのレスポンスメッセージの送信中にコネクションが切断された場合、処理を終了する。レスポンスメッセージの送信が完了しない場合、情報(601)は削除しない。
If the unsent
また、上述したS711で、メッセージ解析部204がリクエストメッセージ201を解析し、何の呼び出しかを特定できない場合(S711でNO)は、処理がメッセージ作成部207へ移る。具体的には、データベース211の保存期間が切れてデータが削除されていた場合、そもそも識別子がでたらめだった場合、識別子に対応するレスポンスメッセージが存在しない場合、リクエストメッセージ401に含まれるサービス呼び出しの情報が誤っている場合などが特定できない場合である。これらの場合、メッセージ作成部207では、フォルト情報を含むレスポンスメッセージを作成する(S720)。具体的には、図5に示すレスポンスメッセージ502が作成される。
In S711 described above, if the
次に、コネクション切断検知部203がコネクションの切断を検知していなければ(S721でNO)、メッセージ送信部208が、作成されたレスポンスメッセージ502を他の装置101に送信し(S715)、この処理を終了する。しかし、コネクション切断検知部203がコネクションの切断を検知していれば(S721でYES)、そのまま、この処理を終了する。また、作成したフォルトのメッセージはデータベース211に保存しない。S715のレスポンスメッセージの送信中にコネクションが切断された場合も、レスポンスメッセージを保存せずに、処理を終了する。
Next, if the connection
ここで、サービス装置102の未送信メッセージ管理部210がデータベース211の保存期間を過ぎたデータを削除する処理を、図8に示すフローチャートを用いて説明する。例えば、データベース211の保存期間が残り0分になっていた場合、そのデータは、データベース211から削除される。削除するタイミングとして、この例では、他の装置101からリクエストメッセージ201を受信した場合とする。また、この処理は、他の装置101からリクエストメッセージ201を受信した場合に、削除するデータがあるか否かを確認するので、S701とS702の処理の間で行われる。
Here, a process in which the unsent
まず、メッセージ受信部202がリクエストメッセージ201を受信し(S701)、未送信メッセージ管理部210がデータベース211に保存期間が過ぎたデータが存在するか否かを調べる(S801)。ここで、保存期間を過ぎたデータが存在しない場合(S801でNO)は、そのまま、処理がコネクション切断検知部203へ移る。一方、保存期間が残り0分になっていた場合など、保存期間を過ぎたデータが存在すれば(S801でYES)、そのデータを削除する(S802)。そして、処理がコネクション切断検知部203へ移る。
First, the
尚、データを削除するタイミングは、これだけに限らず、他の場合でも良い。例えば、メッセージ送信部208がレスポンスメッセージ209を送信(S708、S715、S718)した後、削除しても良い。また、受信又は送信などの処理のタイミングではなく、データベース211を常に監視し、保存期間が過ぎたデータを即座に検知して削除するようにしても良い。
Note that the timing of deleting data is not limited to this, and may be other cases. For example, the
以上のように、サービス装置102におけるこの処理を利用して、サービスを利用する他の装置101が効率的にデータを取得することも可能となる。例えば、他の装置101は識別子を付与したリクエストメッセージ401をサービス装置102に送信する。サービス装置102で実行されるサービスロジック302が、非常に重い処理であることがわかっていれば、他の装置101は意図的にコネクションを切断する。そして、しばらく経ってから、再び、リクエストメッセージ401をサービス装置102に送信する。これにより、サービス装置102では、既にサービスロジック302の実行が終了しており、レスポンスメッセージ303がデータベース211に保存されている。従って、他の装置101に対して、すぐにレスポンスメッセージが送信される。
As described above, by using this processing in the
このようにする処理ことにより、他の装置101は、サービス装置102からのレスポンスメッセージを取得するために、ずっとコネクションを維持しておく必要がない。サービス装置102が処理を行っている間に、他の処理をすることも可能である。また、コネクションを長くキープしてタイムアウトが発生しても、それまでに実行した処理が無駄になってしまうという問題も解消される。
By performing the processing in this way, the
本実施形態によれば、サービスにおいて、サービスロジックの実行を必要最低限に抑えることができ、メモリが少ない組込み機器での負荷を軽減することが可能となる。 According to the present embodiment, in the service, the execution of the service logic can be suppressed to the minimum necessary, and the load on the embedded device with a small amount of memory can be reduced.
<実施形態2>
次に、本発明の第2の実施形態について説明する。第1の実施形態においては、コネクションの切断を検知した場合、リクエストメッセージに識別子が付与されていなければ、サービスロジックの処理を中断させ、識別子が付与されていればそのまま処理を続行させる方法を説明した。本実施形態においては、第1の実施形態において、リクエストメッセージに識別子が付与されている場合にも、データベースの状態に応じて、サービスロジックの処理を中断する方法を説明する。図9及び図10を参照して、処理の概要を説明する。尚、図9は、図2で示した図を一部変更したものであり、図2と同一の符号を一部用いている。図2で示した処理と同一の部分は、本実施形態では説明を省略する。
<Embodiment 2>
Next, a second embodiment of the present invention will be described. In the first embodiment, when disconnection is detected, if an identifier is not assigned to the request message, a service logic process is interrupted, and if an identifier is assigned, the process is continued as it is. did. In the present embodiment, a method for interrupting service logic processing according to the state of the database even when an identifier is assigned to the request message in the first embodiment will be described. An overview of the process will be described with reference to FIGS. 9 is a partial modification of the diagram shown in FIG. 2, and the same reference numerals as those in FIG. 2 are used in part. Description of the same parts as those shown in FIG. 2 is omitted in this embodiment.
図9は、サービス装置102のソフトウェア構成の一例を示している。DB状態確認部901は、データベース211の保存領域の使用状況を確認することができる。具体的には、事前にデータベース211の保存領域を使用できるサイズの上限値を設定しておき、使用しているサイズが、設定されている上限値を超えていないかどうかを確認する。未送信メッセージ管理部210は、リクエストメッセージ201に識別子が付与されていて、且つ、コネクション切断検知部203で切断を感知した場合、DB状態確認部901に、データベース211の使用状況の確認指示を出す。既に、使用状況が、設定されている上限値を超えている場合は、未送信メッセージ管理部210は、サービスロジック制御部205に対して中断指示を出す。サービスロジック制御部205は、サービスロジック206の処理を中断させる。
FIG. 9 shows an example of the software configuration of the
以上の処理を行うことで、リクエストメッセージ201に識別子が付与されている場合にも、データベース211の状態に応じて、サービスロジックの処理を中断させることができる。
By performing the above processing, even when an identifier is assigned to the
次に、第1の実施形態と同様に、図10に示すフローチャートを用いて、サービス装置102の処理について説明する。図10において、図7と共通の処理には、共通の番号を付し、説明は省略する。
Next, similarly to the first embodiment, the processing of the
S703で判定した結果がYESだった場合から説明する。未送信メッセージ管理部210では、識別子に対応するレスポンスメッセージがデータベース211に存在するか否かを判定する(S710)。判定した結果、付与されている識別子に対応するレスポンスメッセージが存在しなければ(S710でNO)、メッセージ解析部204が、そのメッセージを解析し、何のサービスの呼び出しかを特定する(S711)。特定できた場合(S711でYES)は、サービスロジック制御部205が、メッセージ解析部204が特定したサービスに基づいてサービスロジック206を実行する(S712)。
Description will be made from the case where the result determined in S703 is YES. The unsent
サービスロジック206を実行中に、未送信メッセージ管理部210は、コネクションの切断通知を受け取ると(S1007でYES)、DB状態確認部901にデータベース211の使用状況の確認指示を出す。DB状態確認部901は、データベース211の使用領域が、既に事前に設定されている上限値を超えているか否かを判定する(S1008)。上限値を既に超えていると判定すると(S1008でYES)、未送信メッセージ管理部210は、サービスロジック制御部205に対して、サービスロジックを中断するように要求する。サービスロジック制御部205は、実行中のサービスロジック206を中断し(S1009)、処理を終了する。
When the unsent
DB状態確認部901で、上限値を超えていないと判定すると(S1008でNO)、メッセージ作成部207で、サービスロジックの結果を含むレスポンスメッセージ209を作成する(S1010)。そして、未送信メッセージ管理部210は、データベース211にリクエストメッセージ201に付与された識別子と作成したレスポンスメッセージを紐付けて保存し(S1011)、処理を終了する。
If the DB
一方、サービスロジック206が実行中に、コネクションの切断が発生しなければ(S1007でNO)、メッセージ作成部207で、サービスロジックの結果を含むレスポンスメッセージ209を作成する(S1012)。次に、メッセージ送信部208が、作成されたレスポンスメッセージ209を他の装置101に送信し(S1013)、処理を終了する。なお、S1012のレスポンスメッセージ209の作成中、又は、S1013のレスポンスメッセージ209の送信中にコネクションが切断された場合は、S1008に進む。
On the other hand, if connection disconnection does not occur during execution of the service logic 206 (NO in S1007), the
一方、メッセージ解析部204で、リクエストメッセージに識別子が付与されていないと判定すると(S703でNO)、図7のS704へ進む。以降の処理は、図7のS704以降の処理(S708又はS709まで)と共通であるので、説明を省略する。
On the other hand, if the
一方、未送信メッセージ管理部210で、付与されている識別子に対応するレスポンスメッセージが存在していると判定すると(S710でYES)、図7のS717へ進む。以降の処理は、図7のS717以降の処理(S719まで)と共通であるので、説明を省略する。
On the other hand, when the unsent
一方、メッセージ解析部204で、何のサービスの呼び出しかを特定できなければ(S711でNO)、図7のS720に進む。以降の処理は、図7のS720以降の処理(S715まで)と共通であるので、説明を省略する。
On the other hand, if the
以上の方法で、リクエストメッセージに識別子が付与されている場合にも、データベースの状態に応じて、サービスロジックの中断を制御することが可能となる。その為、サービス装置に対して、次々に識別子が付与されたリクエストメッセージが大量に送られても、データベースの状態に応じてサービスロジックを正常に中断させられるので、サービス装置側の負荷を軽減することが可能となる。また、データベースに大量のレスポンスサービスや、サイズの大きいレスポンスサービスが格納され、データベースの領域を使い切る前に、サービスロジックの処理を中断できるので、サービス装置で処理が不正に停止することを防ぐことも可能となる。 With the above method, even when the identifier is given to the request message, it is possible to control the interruption of the service logic according to the state of the database. Therefore, even if a large number of request messages assigned identifiers are sent to the service device one after another, the service logic can be normally interrupted according to the state of the database, thus reducing the load on the service device side. It becomes possible. In addition, a large number of response services or large response services are stored in the database, and service logic processing can be interrupted before the database area is used up. It becomes possible.
次に、第1及び第2の実施形態で説明した識別子の形式について図11を用いて説明する。図11(A)において、サービス装置1101は、他の装置A1102だけでなく、他の装置B1103からもリクエストメッセージが送信されてくる。すなわち、複数の他の装置からリクエストメッセージが送信されてくる可能性がある。識別子は、他の装置がそれぞれ個々に生成し、リクエストメッセージに付与するものであり、単純な数値の羅列などでは、サービス装置側で識別子が重複する可能性がある。重複した場合は、サービス装置側で、識別子と紐付けて管理するレスポンスメッセージを正常にデータベースに保存できない。その為、本実施形態においては、識別子の重複の可能性を低減させる例について説明する。
Next, the format of the identifier described in the first and second embodiments will be described with reference to FIG. In FIG. 11A, the
図11(A)では、リクエストメッセージの送信側となる他の装置のIPアドレスと、送信時の日付及び時間(時間情報)の組み合わせで識別子を付与する例を記載している。他の装置A1102のIPアドレスは、123.123.123.1であり、リクエストメッセージの送信時刻が2010年01月01日23時59分01秒だった場合、リクエストメッセージ1104に示すように、識別子は「1231231231-20100101-235901」となる。同様に他の装置B1103のIPアドレスは、123.123.123.2であり、リクエストメッセージの送信時刻が、2010年01月02日23時59分02秒だった場合、リクエストメッセージ1105に示すように、識別子は「1231231232-20100102-235902」となる。
FIG. 11A shows an example in which an identifier is given by a combination of an IP address of another device that is a request message transmission side and a date and time (time information) at the time of transmission. The IP address of the
また、他の識別子の形式について、図11(B)を用いて説明する。図11(B)は、図11(A)と同様の構成であり、サービス装置1201に対して、他の装置A1202と、他の装置B1203からリクエストメッセージが送信される場合を示しており、識別子はUUID(Universally Unique Identifier)の形式で付与する例を記載している。他の装置A1202は、UUID形式の識別子を生成し、リクエストメッセージ1204に示すように、「12345678-9abc-def0-1234-56789abcd012」を付与する。同様に他の装置B1203は、UUID形式の識別子を生成し、リクエストメッセージ1205に示すように、「12345678-9abc-def0-1234-56789abcd123」を付与する。UUIDは、一意に特定可能な識別子を作成するための仕様であり、ネットワークシステムの環境において統制を取らなくても、重複や偶然の一致がほぼ起こりえないと言われている。その為、識別子として用いることで、サービス装置1201側で、識別子と紐付けて、レスポンスメッセージをデータベースに保存する処理の最中に、重複が起きる可能性を低減することが可能となる。
Further, another identifier format will be described with reference to FIG. FIG. 11B has the same configuration as FIG. 11A, and shows a case where a request message is transmitted from another
以上のような形式の識別子を用いることで、複数の他の装置からアクセスがあっても処理可能となる。 By using an identifier in the above format, processing can be performed even when there are accesses from a plurality of other devices.
[他の実施形態]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Embodiments]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
Claims (19)
他の装置からの処理要求を受信し、
要求された処理を前記プロセッサが実行し、
要求された処理の実行まで処理の要求元との接続が維持されている場合、処理を実行した結果を処理の要求元に送信し、
要求された処理の実行中に処理の要求元との接続が切断された場合、処理の実行を中断するか否かを判定し、
処理を中断しないと判定した場合、処理を実行した結果をメモリに格納し、
前記処理の要求が受信されたときに要求された処理を実行した結果が前記メモリに格納されている場合、前記メモリに格納されていた処理結果を、処理の要求元に送信することを特徴とする処理方法。 In a processing method executed by a processing device having a processor,
Receive processing requests from other devices,
The processor performs the requested processing;
If the connection with the process requester is maintained until the requested process is executed, the process execution result is sent to the process requester,
If the connection with the request source of the process is disconnected during the execution of the requested process, determine whether to interrupt the process execution,
When it is determined that the process is not interrupted, the result of the process is stored in the memory,
When a result of executing a requested process when the process request is received is stored in the memory, the process result stored in the memory is transmitted to a process request source. Processing method.
他の装置からの処理要求を受信し、
要求された処理を前記プロセッサが実行し、
要求された処理の実行まで処理の要求元との接続が維持されている場合、処理を実行した結果を処理の要求元に送信し、
要求された処理の終了の前に処理の要求元との接続が切断された場合、処理を実行した結果を、処理要求に識別子として付与されたIPアドレスと時間情報との組み合わせ又はUUIDに対応させてメモリに格納し、
処理要求が受信されたときに要求された処理を実行した結果が前記メモリに格納されている場合、前記メモリに格納されていた処理結果を、処理の要求元に送信することを特徴とする処理方法。 In a processing method executed by a processing device having a processor,
Receive processing requests from other devices,
The processor performs the requested processing;
If the connection with the process requester is maintained until the requested process is executed, the process execution result is sent to the process requester,
If the connection with the request source of the process is disconnected before the end of the requested process, the result of the process is made to correspond to the combination of the IP address and time information given as an identifier to the process request or the UUID. Stored in memory
When a result of executing a requested process when a process request is received is stored in the memory, the process result stored in the memory is transmitted to a process request source. Method.
通信手段と、
前記通信手段により受信された処理要求により要求された処理を実行し、処理の終了まで処理の要求元との接続が維持されている場合、処理を実行した結果を前記通信手段により処理の要求元に送信し、要求された処理の実行中に処理の要求元との接続が切断された場合、処理の実行を中断するか否かを判定し、処理を中断しないと判定した場合、処理を実行した結果をメモリに格納する処理手段とを有し、
前記処理手段は、前記通信手段により受信された処理要求により要求された処理を実行した結果がメモリに格納されている場合、前記メモリに格納されていた処理結果を前記通信手段により処理の要求元に送信することを特徴とする処理装置。 In the processing device,
Communication means;
When the process requested by the process request received by the communication means is executed and the connection with the process request source is maintained until the end of the process, the result of executing the process is sent to the process request source by the communication means. If the connection with the request source of the process is disconnected during execution of the requested process, it is determined whether or not to interrupt the process execution, and if it is determined not to interrupt the process, the process is executed. And a processing means for storing the result obtained in the memory,
The processing means, when the result of executing the processing requested by the processing request received by the communication means is stored in the memory, the processing result stored in the memory is processed by the communication means The processing apparatus characterized by transmitting to.
通信手段と、
前記通信手段により受信された処理要求により要求された処理を実行し、処理の終了の前に処理の要求元との接続が切断された場合、処理を実行した結果を、処理要求に識別子として付与されたIPアドレスと時間情報との組み合わせ又はUUIDに対応させてメモリに格納し、処理の終了まで処理の要求元との接続が維持されている場合、処理を実行した結果を前記通信手段により処理の要求元に送信する処理手段とを有し、
前記処理手段は、前記通信手段により受信された処理要求により要求された処理を実行した結果が前記メモリに格納されている場合、前記メモリに格納されていた処理結果を前記通信手段により処理の要求元に送信することを特徴とする処理装置。 In the processing device,
Communication means;
When the process requested by the process request received by the communication means is executed and the connection with the process request source is disconnected before the process ends, the result of the process is given as an identifier to the process request. If the connection with the request source of the process is maintained until the end of the process, the result of executing the process is processed by the communication means. Processing means for transmitting to the request source of
When the result of executing the processing requested by the processing request received by the communication means is stored in the memory, the processing means requests the processing result stored in the memory by the communication means. A processing apparatus characterized by transmitting to the original.
他の装置からの処理要求を受信し、
要求された処理を実行し、
要求された処理の実行まで処理の要求元との接続が維持されている場合、処理を実行した結果を処理の要求元に送信し、
要求された処理の実行中に処理の要求元との接続が切断された場合、処理の実行を中断するか否かを判定し、
処理の実行を中断しないと判定した場合、処理を実行した結果をメモリに格納し、
処理要求が受信されたときに要求された処理を実行した結果が前記メモリに格納されている場合、前記メモリに格納されていた処理結果を、処理の要求元に送信する、
各手順を実行させるためのプログラム。 On the computer,
Receive processing requests from other devices,
Perform the requested process,
If the connection with the process requester is maintained until the requested process is executed, the process execution result is sent to the process requester,
If the connection with the request source of the process is disconnected during the execution of the requested process, determine whether to interrupt the process execution,
If it is determined that the execution of the process is not interrupted, the result of executing the process is stored in the memory,
When the result of executing the requested process when the process request is received is stored in the memory, the process result stored in the memory is transmitted to the process request source.
A program to execute each procedure.
他の装置からの処理要求を受信し、
要求された処理を実行し、
要求された処理の実行まで処理の要求元との接続が維持されている場合、処理を実行した結果を処理の要求元に送信し、
要求された処理の終了の前に処理の要求元との接続が切断された場合、処理を実行した結果を、処理要求に識別子として付与されたIPアドレスと時間情報との組み合わせ又はUUIDに対応させてメモリに格納し、
処理要求が受信されたときに要求された処理を実行した結果が前記メモリに格納されている場合、前記メモリに格納されていた処理結果を、処理の要求元に送信する、
各手順を実行させるためのプログラム。 On the computer,
Receive processing requests from other devices,
Perform the requested process,
If the connection with the process requester is maintained until the requested process is executed, the process execution result is sent to the process requester,
If the connection with the request source of the process is disconnected before the end of the requested process, the result of executing the process is made to correspond to the combination of the IP address and time information given as an identifier to the process request or the UUID. Stored in memory
When the result of executing the requested process when the process request is received is stored in the memory, the process result stored in the memory is transmitted to the process request source.
A program to execute each procedure.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010056542A JP5529596B2 (en) | 2010-03-12 | 2010-03-12 | Processing method, processing device, communication device, and program |
US12/767,232 US9258391B2 (en) | 2009-05-29 | 2010-04-26 | Processing method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010056542A JP5529596B2 (en) | 2010-03-12 | 2010-03-12 | Processing method, processing device, communication device, and program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2011191942A true JP2011191942A (en) | 2011-09-29 |
JP2011191942A5 JP2011191942A5 (en) | 2013-04-25 |
JP5529596B2 JP5529596B2 (en) | 2014-06-25 |
Family
ID=44796796
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010056542A Expired - Fee Related JP5529596B2 (en) | 2009-05-29 | 2010-03-12 | Processing method, processing device, communication device, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5529596B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015049745A (en) * | 2013-09-02 | 2015-03-16 | 株式会社オービックビジネスコンサルタント | Server device, information processing method, and program |
WO2015170365A1 (en) * | 2014-05-08 | 2015-11-12 | 三菱電機株式会社 | Server device and computer system |
WO2016075818A1 (en) * | 2014-11-14 | 2016-05-19 | 三菱電機株式会社 | Server device, client device and server device program |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05324526A (en) * | 1992-05-18 | 1993-12-07 | Hitachi Ltd | Remote computing system |
WO1998010575A1 (en) * | 1996-09-03 | 1998-03-12 | Toyota Jidosha Kabushiki Kaisha | Information communication method, information communication equipment at information communication center, information communication terminal equipment, and medium containing information communication program recorded thereon |
JP2001318888A (en) * | 2000-05-11 | 2001-11-16 | Hitachi Ltd | Calculation system |
JP2003122653A (en) * | 2001-10-09 | 2003-04-25 | Fujitsu Ltd | Processing method related with time-out of server in client/server system and time-out processing selecting method and server computer and program therefor |
JP2004265049A (en) * | 2003-02-28 | 2004-09-24 | Canon Inc | Data processing system, data processor, data processing method and program |
JP2009076090A (en) * | 2008-10-27 | 2009-04-09 | Seiko Epson Corp | Information processing system, host system, and program for executing information processing method by computer |
JP2009271705A (en) * | 2008-05-07 | 2009-11-19 | Rakuten Inc | Information providing system, information providing device, information providing method, and information providing program |
-
2010
- 2010-03-12 JP JP2010056542A patent/JP5529596B2/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05324526A (en) * | 1992-05-18 | 1993-12-07 | Hitachi Ltd | Remote computing system |
WO1998010575A1 (en) * | 1996-09-03 | 1998-03-12 | Toyota Jidosha Kabushiki Kaisha | Information communication method, information communication equipment at information communication center, information communication terminal equipment, and medium containing information communication program recorded thereon |
JP2001318888A (en) * | 2000-05-11 | 2001-11-16 | Hitachi Ltd | Calculation system |
JP2003122653A (en) * | 2001-10-09 | 2003-04-25 | Fujitsu Ltd | Processing method related with time-out of server in client/server system and time-out processing selecting method and server computer and program therefor |
JP2004265049A (en) * | 2003-02-28 | 2004-09-24 | Canon Inc | Data processing system, data processor, data processing method and program |
JP2009271705A (en) * | 2008-05-07 | 2009-11-19 | Rakuten Inc | Information providing system, information providing device, information providing method, and information providing program |
JP2009076090A (en) * | 2008-10-27 | 2009-04-09 | Seiko Epson Corp | Information processing system, host system, and program for executing information processing method by computer |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015049745A (en) * | 2013-09-02 | 2015-03-16 | 株式会社オービックビジネスコンサルタント | Server device, information processing method, and program |
WO2015170365A1 (en) * | 2014-05-08 | 2015-11-12 | 三菱電機株式会社 | Server device and computer system |
WO2016075818A1 (en) * | 2014-11-14 | 2016-05-19 | 三菱電機株式会社 | Server device, client device and server device program |
Also Published As
Publication number | Publication date |
---|---|
JP5529596B2 (en) | 2014-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6600373B2 (en) | System and method for active-passive routing and control of traffic in a traffic director environment | |
CN112242923A (en) | System and method for realizing unified data management network function based on mimicry defense | |
WO2019061720A1 (en) | Data synchronization method and system | |
CN103164256A (en) | Processing method and system capable of achieving one machine supporting high concurrency | |
JP2004310745A (en) | Notification method for shared resource | |
CN108063813B (en) | Method and system for parallelizing password service network in cluster environment | |
US8898312B2 (en) | Element terminal and communication system | |
JP5970559B2 (en) | Remote network management system and operation method thereof | |
WO2009097776A1 (en) | System, device and method for achieving service upgrade | |
JP2013097548A (en) | Information processing system, information processing device, client terminal, information processing method and program | |
JP4410608B2 (en) | Web service providing method | |
CN112671554A (en) | Node fault processing method and related device | |
JP5529596B2 (en) | Processing method, processing device, communication device, and program | |
WO2020252724A1 (en) | Log processing method and device, and computer-readable storage medium | |
US20090157896A1 (en) | Tcp offload engine apparatus and method for system call processing for static file transmission | |
JP2008304982A (en) | Information management method and information processor | |
KR20210044281A (en) | Method and apparatus for ensuring continuous device operation stability in cloud degraded mode | |
US9258391B2 (en) | Processing method and apparatus | |
JP5432595B2 (en) | Communication apparatus and processing method thereof | |
JP5691248B2 (en) | Task takeover program, processing device, and computer system | |
JP2014154149A (en) | Remote control management system and remote control management method | |
CN114553900B (en) | Distributed block storage management system, method and electronic equipment | |
JP4193754B2 (en) | Data duplication method and program | |
US20230153159A1 (en) | Hardware Accelerator Service Aggregation | |
KR101148364B1 (en) | A dynamic integration among heterogeneous middleware, memory management system and the method for controller in cyber-physical system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130312 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130312 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20131121 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131125 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140124 |
|
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: 20140320 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140417 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5529596 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |