JP4627789B2 - Information processing apparatus, information processing method, and program - Google Patents

Information processing apparatus, information processing method, and program Download PDF

Info

Publication number
JP4627789B2
JP4627789B2 JP2008168553A JP2008168553A JP4627789B2 JP 4627789 B2 JP4627789 B2 JP 4627789B2 JP 2008168553 A JP2008168553 A JP 2008168553A JP 2008168553 A JP2008168553 A JP 2008168553A JP 4627789 B2 JP4627789 B2 JP 4627789B2
Authority
JP
Japan
Prior art keywords
virtual machine
request
worker
application
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008168553A
Other languages
Japanese (ja)
Other versions
JP2009151744A (en
Inventor
和幸 熊谷
大介 阪井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2008168553A priority Critical patent/JP4627789B2/en
Priority to US12/261,795 priority patent/US8239862B2/en
Publication of JP2009151744A publication Critical patent/JP2009151744A/en
Application granted granted Critical
Publication of JP4627789B2 publication Critical patent/JP4627789B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Description

本発明は、複数の仮想マシンが動作する環境において、単一の仮想マシンが動作する環境と同様にしてアプリケーション開発を行うことができる情報処理装置、情報処理方法およびそれを実現するための装置可読なプログラムに関する。   The present invention relates to an information processing apparatus, an information processing method, and an apparatus readable for realizing the same, capable of developing an application in an environment where a plurality of virtual machines operate in the same manner as an environment where a single virtual machine operates. Related to various programs.

顧客ごとに最適なオフィス環境を提供するために、アプリケーションの追加により顧客ごとにカスタマイズ可能なシステムが検討されている。追加されるアプリケーションには、第3ベンダが開発するものも含まれるが、この追加により、システムの基本機能が損なわれるものであってはならない。ここで、第3ベンダとは、ハードウェアやOS等、既存の環境に組み込むことで、新しい機能を提供するハードウェアまたはソフトウェア等を提供するベンダをいう。   In order to provide an optimal office environment for each customer, a system that can be customized for each customer by adding an application is being studied. The added applications include those developed by third vendors, but the addition should not impair the basic functions of the system. Here, the third vendor refers to a vendor that provides hardware or software that provides a new function by being incorporated into an existing environment, such as hardware or an OS.

アプリケーションを開発し、追加するにあたって、そのアプリケーションに対するリクエストを受けた場合、そのアプリケーションを実行するリソースへ適切にそのリクエストを振り分けなければならない。   When developing and adding an application, if a request for the application is received, the request must be appropriately distributed to the resource that executes the application.

アクセス状況や処理負荷に応じて、サーバに組み込まれたCPUやメモリを制御して最適な処理性能を提供するキャパシティオンデマンドという技術がある。このキャパシティオンデマンドを容易にするために、Webサーバを遠隔かつ動的に構成する方法およびシステムが提案されている(例えば、特許文献1参照)。   There is a technology called capacity on demand that provides optimum processing performance by controlling the CPU and memory incorporated in the server according to the access status and processing load. In order to facilitate this capacity on demand, a method and a system for remotely and dynamically configuring a Web server have been proposed (see, for example, Patent Document 1).

この方法およびシステムでは、クライアントからのリクエストを処理するサーバ群1と、リソースを提供するサーバ群3と、サーバ群1のパフォーマンスとサーバ群3のパフォーマンスとが閾値に達しているかどうかを判定するサーバ2とからなり、サーバ群1またはサーバ群3のパフォーマンス状況に応じてサーバ群に対してサーバを追加または削除する。これにより、頑強かつ柔軟なWebサーバを実現している。この方法およびシステムでは、1つのサーバが他のサーバへ処理を適切に振り分けており、リソースの動的追加が可能である。   In this method and system, a server group 1 that processes requests from clients, a server group 3 that provides resources, and a server that determines whether the performance of the server group 1 and the performance of the server group 3 have reached a threshold. The server is added to or deleted from the server group according to the performance status of the server group 1 or the server group 3. Thereby, a robust and flexible Web server is realized. In this method and system, one server appropriately distributes processing to other servers, and dynamic addition of resources is possible.

また、パーソナルコンピュータ(PC)にドライバを必要とすることなく、PCの機種やOSに依存することなく、Webサービスを提供することが可能な画像形成装置が提案されている(例えば、特許文献2参照)。この画像形成装置は、複数のハードウェア資源ごとにWebサービスを提供するための手段を備え、リクエスト内のメッセージ交換プロトコルに従って記述されたメッセージに含まれるWebサービスを特定する情報に対応するWebサービス関数をコールすることにより、Webサービスを特定し、Webサービスに分配してレスポンスを提供している。この装置では、リクエストを解析し、適切な処理部へリクエストを振り分けている。   In addition, an image forming apparatus that can provide a Web service without requiring a driver for a personal computer (PC) and without depending on the model or OS of the PC has been proposed (for example, Patent Document 2). reference). This image forming apparatus includes means for providing a Web service for each of a plurality of hardware resources, and a Web service function corresponding to information for specifying a Web service included in a message described according to a message exchange protocol in a request To identify the Web service, distribute it to the Web service, and provide a response. This apparatus analyzes the request and distributes the request to an appropriate processing unit.

UNIX(登録商標)等のプロセスベースのオペレーティングシステム(OS)で、上記のアプリケーションの追加により顧客ごとにカスタマイズ可能なシステムを構築する場合、システムの堅牢性を向上させるために、適度な粒度でプロセスを分割するのが一般的である。ここで、堅牢性とは、プログラムにおいて、エラーや例外等に強く、簡単には暴走しないことをいう。   In a process-based operating system (OS) such as UNIX (registered trademark), when building a system that can be customized for each customer by adding the above-mentioned application, in order to improve the robustness of the system, the process is performed with an appropriate granularity. Is generally divided. Here, robustness means that the program is resistant to errors and exceptions and does not easily run away.

アプリケーションの開発言語としてJava(登録商標)言語を用いる場合、単一のプロセス、すなわち単一の仮想マシン上で複数のアプリケーションを動作させることになる。この場合、細かい粒度でプロセスを分割するのは現実的ではない。しかしながら、仮想マシンを2つにし、少なくとも基本機能を実現するアプリケーションを一方の仮想マシン上で動作させ、第3ベンダが開発したアプリケーションをもう一方の仮想マシン上で動作させるように構成することで、システムの堅牢性を向上させることが可能となる。   When the Java (registered trademark) language is used as an application development language, a plurality of applications are operated on a single process, that is, a single virtual machine. In this case, dividing the process with fine granularity is not practical. However, by configuring two virtual machines to run at least one application that realizes basic functions on one virtual machine and run an application developed by a third vendor on the other virtual machine, The robustness of the system can be improved.

特表2005−539298号公報JP 2005-539298 A 特開2007−135238号公報JP 2007-135238 A

上記特許文献1の技術は、サーバ資源の最適化であり、各サーバがハードウェア的に独立していることを前提とし、複数の仮想マシンが動作する装置に適用することはできない。   The technique of the above-mentioned patent document 1 is server resource optimization and cannot be applied to an apparatus in which a plurality of virtual machines operate on the premise that each server is hardware independent.

上記特許文献2の技術は、利用者の環境に依存することなく、Webサービスを提供するものであり、複数の仮想マシンが動作する環境において、各仮想マシン上で動作するアプリケーションにリクエストを適切に振り分けるものではない。   The technique of the above-mentioned patent document 2 provides a Web service without depending on the user's environment, and appropriately requests requests to applications operating on each virtual machine in an environment where a plurality of virtual machines operate. It is not something to distribute.

複数の仮想マシンが動作する環境でアプリケーション開発を行う場合に、1つのHTTPサーバですべての仮想マシンのWebアプリケーションを管理しようとすると、HTTPサーバとWebアプリケーションとの間にプロセス間通信が必要となる。各Webアプリケーションにプロセス間通信の処理を加えることは、アプリケーション開発に大きな負担がかかり、その開発が困難なものとなる。これに対し、単一の仮想マシンが動作する環境では、単一のプロセス上で1つのHTTPサーバおよび複数のアプリケーションが動作するため、プロセス間通信は不要であり、このような問題は生じない。   When application development is performed in an environment in which a plurality of virtual machines operate, if one HTTP server attempts to manage all virtual machine Web applications, inter-process communication is required between the HTTP server and the Web application. . Adding inter-process communication processing to each Web application places a heavy burden on application development and makes the development difficult. On the other hand, in an environment where a single virtual machine operates, since one HTTP server and a plurality of applications operate on a single process, inter-process communication is unnecessary, and such a problem does not occur.

そこで、Webアプリケーションにプロセス間通信の処理を加えることなく簡単にアプリケーション開発を行うことができ、複数の仮想マシンが動作する環境にその開発したアプリケーションを追加しても、クライアントから受信したリクエストを適切に各仮想マシン上で動作するアプリケーションに振り分けることができる装置の提供が望まれている。   Therefore, application development can be easily performed without adding inter-process communication processing to the Web application. Even if the developed application is added to an environment in which multiple virtual machines operate, the request received from the client is appropriately handled. In addition, it is desired to provide an apparatus that can be distributed to applications running on each virtual machine.

本発明は、上記課題に鑑み、3つ以上の仮想マシンが動作する情報処理装置であって、各前記仮想マシンは、自己の仮想マシン上で動作するアプリケーションの各々について、当該アプリケーションでの処理の対象となるファイル名及びファイル拡張子を登録した第1管理情報を保持し、この第1管理情報に基づいて、クライアントから受信したリクエストに含まれるファイル名及びファイル拡張子に対応するアプリケーションを、前記リクエストを処理するアプリケーションとして判別するアプリケーション管理部を含み、前記複数の仮想マシンのうち、前記クライアントからリクエストを受信する一のマスター仮想マシンは、当該マスター仮想マシン以外の各ワーカー仮想マシンを識別するための識別情報と、当該ワーカー仮想マシン上で動作するアプリケーションの各々が処理の対象とするファイル拡張子とを少なくとも対応付けた第2管理情報を保持し、前記ワーカー仮想マシン上で動作するアプリケーションが処理の対象とするファイル拡張子を含んだリクエストを前記クライアントから受信した場合に、前記第2管理情報に基づいて、前記リクエストに含まれたファイル拡張子に対応する識別情報のワーカー仮想マシン宛に前記リクエストを転送するリクエスト転送部を更に備え、前記マスター仮想マシンのリクエスト転送部は、前記リクエストに含まれたファイル識別子に対応する識別情報が前記第2管理情報に複数登録されている場合に、これら複数の識別情報のなかから所定の優先順位に基づいて選択した一の識別情報のワーカー仮想マシン宛に前記リクエストを転送し、前記ワーカー仮想マシンの前記アプリケーション管理部は、前記第1管理情報に基づいて、前記マスター仮想マシンから転送された前記リクエストに含まれるファイル名及びファイル拡張子に対応するアプリケーションが自己のワーカー仮想マシン内に存在するか否かを判定し、存在していると判定した場合に、このアプリケーションを使用して前記リクエストを処理した結果を、前記マスター仮想マシンを介して前記クライアントに送信し、存在しないと判定した場合に、自己のワーカー仮想マシン以外の他のワーカー仮想マシン内に対応するアプリケーションが存在しているか否かを調査し、この調査結果を前記マスター仮想マシンへ送信し、前記マスター仮想マシンのリクエスト転送部は、前記リクエストを転送した前記ワーカー仮想マシンから、当該ワーカー仮想マシン以外の他のワーカー仮想マシンに対応するアプリケーションが存在する旨の前記調査結果を受け付けた場合に、前記複数の識別情報のなかから選択した次の優先順位の識別情報のワーカー仮想マシン宛に前記リクエストを転送し、いずれのワーカー仮想マシンにも対応するアプリケーションが存在しない旨の前記調査結果を受け付けた場合に、前記次の優先順位のワーカー仮想マシンへ前記リクエストを転送せず、対応するアプリケーションが存在しない旨のレスポンスを前記クライアントに送信することを特徴とする。 In view of the above problems, the present invention is an information processing apparatus in which three or more virtual machines operate, and each of the virtual machines performs processing in the application for each of the applications operating on its own virtual machine. The first management information in which the target file name and file extension are registered is retained, and an application corresponding to the file name and file extension included in the request received from the client is stored on the basis of the first management information. An application management unit that determines an application that processes a request, and one master virtual machine that receives a request from the client among the plurality of virtual machines identifies each worker virtual machine other than the master virtual machine Identification information on the worker virtual machine A request in which each of the operating applications holds the second management information associated with at least the file extension to be processed, and the application operating on the worker virtual machine includes the file extension to be processed A request transfer unit that transfers the request to a worker virtual machine having identification information corresponding to the file extension included in the request, based on the second management information, When a plurality of pieces of identification information corresponding to file identifiers included in the request are registered in the second management information, the request transfer unit of the master virtual machine has a predetermined priority order from the plurality of pieces of identification information. The request addressed to the worker virtual machine of one identification information selected based on The application management unit of the worker virtual machine transfers the application corresponding to the file name and file extension included in the request transferred from the master virtual machine based on the first management information. If it is determined whether or not it exists in the virtual machine, and if it is determined to exist, the result of processing the request using this application is sent to the client via the master virtual machine, If it is determined that the application does not exist, the application checks whether there is a corresponding application in another worker virtual machine other than its own worker virtual machine, and sends the result of the investigation to the master virtual machine. The request transfer unit of the virtual machine transfers the request that has transferred the request. Identification of the next priority selected from the plurality of identification information when the investigation result indicating that an application corresponding to another worker virtual machine other than the worker virtual machine exists is received from the car virtual machine When the request is forwarded to the information worker virtual machine and the investigation result indicating that there is no application corresponding to any worker virtual machine is received, the request is sent to the worker virtual machine of the next priority. A response indicating that there is no corresponding application is not transmitted to the client .

また、本発明は、3つ以上の仮想マシンが動作する情報処理装置で実行される情報処理方法であって、各前記仮想マシンは、自己の仮想マシン上で動作するアプリケーションの各々について、当該アプリケーションでの処理の対象となるファイル名及びファイル拡張子を登録した第1管理情報を保持し、前記複数の仮想マシンの一つであるマスター仮想マシンは、さらに、他の仮想マシンである各ワーカー仮想マシンを識別するための識別情報と、当該ワーカー仮想マシン上で動作するアプリケーションの各々が処理の対象とするファイル拡張子とを少なくとも対応付けた第2管理情報を保持し、前記マスター仮想マシンにおいて、前記ワーカー仮想マシン上で動作するアプリケーションが処理の対象とするファイル拡張子を含んだリクエストを前記クライアントから受信した場合に、このリクエストに含まれたファイル拡張子に対応する識別情報が前記第2管理情報に複数登録されているか否かを判定する第1判定ステップと、前記第1判定ステップにおいて、一の識別情報のみ登録されていると判定された場合に、この識別情報のワーカー仮想マシン宛に前記リクエストを転送し、複数の識別情報が登録されていると判定された場合に、所定の優先順位に基づいてこれら複数の識別情報のなかから選択した一の識別情報のワーカー仮想マシン宛に前記リクエストを転送する転送ステップと、前記ワーカー仮想マシンにおいて、前記第1管理情報に基づき、前記マスター仮想マシンから転送された前記リクエストに含まれるファイル名及びファイル拡張子に対応するアプリケーションが自己のワーカー仮想マシン内に存在するか否かを判定する第2判定ステップと、前記第2判定ステップにおいて、対応するアプリケーションが存在していると判定された場合に、このアプリケーションを使用して前記リクエストを処理した結果を、前記マスター仮想マシンを介して前記クライアントに送信し、対応するアプリケーションが存在しないと判定された場合に、自己のワーカー仮想マシン以外の他のワーカー仮想マシン内に対応するアプリケーションが存在しているか否かを調査し、この調査結果を前記マスター仮想マシンに送信する第1送信ステップと、前記マスター仮想マシンにおいて、前記リクエストを転送した前記ワーカー仮想マシンから、当該ワーカー仮想マシン以外の他のワーカー仮想マシンに対応するアプリケーションが存在する旨の前記調査結果を受け付けた場合に、前記複数の識別情報のなかから選択した次の優先順位の識別情報のワーカー仮想マシン宛に前記リクエストを転送し、いずれのワーカー仮想マシンにも対応するアプリケーションが存在しない旨の前記調査結果を受け付けた場合に、前記次の優先順位のワーカー仮想マシンへ前記リクエストを転送せず、対応するアプリケーションが存在しない旨のレスポンスを前記クライアントに送信する第2送信ステップと、を含む。 The present invention is also an information processing method executed by an information processing apparatus on which three or more virtual machines operate, wherein each of the virtual machines has an application for each of the applications operating on its own virtual machine. The first management information in which the file name and the file extension to be processed in is registered, and the master virtual machine that is one of the plurality of virtual machines is further connected to each worker virtual machine that is another virtual machine. Holding second management information in which at least the identification information for identifying the machine and the file extension to be processed by each of the applications running on the worker virtual machine are associated, A request including a file extension to be processed by an application running on the worker virtual machine. A first determination step for determining whether or not a plurality of identification information corresponding to the file extension included in the request is registered in the second management information when the client receives a request from the client; When it is determined in the determination step that only one piece of identification information is registered, the request is transferred to the worker virtual machine of this identification information, and when it is determined that a plurality of pieces of identification information are registered. A transfer step of forwarding the request to the worker virtual machine of one identification information selected from among the plurality of identification information based on a predetermined priority, and in the worker virtual machine, based on the first management information , An application corresponding to the file name and file extension included in the request transferred from the master virtual machine. In the second determination step for determining whether or not the application exists in its own worker virtual machine, and in the second determination step, this application is used when it is determined that the corresponding application exists. The result of processing the request is sent to the client via the master virtual machine, and if it is determined that the corresponding application does not exist, it is handled in another worker virtual machine other than its own worker virtual machine. A first transmission step of transmitting whether or not there is an application to be transmitted, and transmitting the result of the investigation to the master virtual machine; and in the master virtual machine, from the worker virtual machine that has transferred the request, App for other worker virtual machines other than machines The request is forwarded to the worker virtual machine of the next priority identification information selected from the plurality of identification information, and to any worker virtual machine When the investigation result indicating that there is no corresponding application is received, the request is not transferred to the worker virtual machine having the next priority, and a response indicating that the corresponding application does not exist is transmitted to the client. A second transmission step.

また、本発明は、3つ以上の仮想マシンが動作する情報処理装置により読み取り可能な、クライアントからのリクエストを処理するためのプログラムであって、各前記仮想マシンは、自己の仮想マシン上で動作するアプリケーションの各々について、当該アプリケーションでの処理の対象となるファイル名及びファイル拡張子を登録した第1管理情報を保持し、前記複数の仮想マシンの一つであるマスター仮想マシンは、さらに、他の仮想マシンである各ワーカー仮想マシンを識別するための識別情報と、当該ワーカー仮想マシン上で動作するアプリケーションの各々が処理の対象とするファイル拡張子とを少なくとも対応付けた第2管理情報を保持し、前記マスター仮想マシンにおいて、前記ワーカー仮想マシン上で動作するアプリケーションが処理の対象とするファイル拡張子を含んだリクエストを前記クライアントから受信した場合に、このリクエストに含まれたファイル拡張子に対応する識別情報が前記第2管理情報に複数登録されているか否かを判定する第1判定ステップと、前記第1判定ステップにおいて、一の識別情報のみ登録されていると判定された場合に、この識別情報のワーカー仮想マシン宛に前記リクエストを転送し、複数の識別情報が登録されていると判定された場合に、所定の優先順位に基づいてこれら複数の識別情報のなかから選択した一の識別情報のワーカー仮想マシン宛に前記リクエストを転送する転送ステップと、前記ワーカー仮想マシンにおいて、前記第1管理情報に基づき、前記マスター仮想マシンから転送された前記リクエストに含まれるファイル名及びファイル拡張子に対応するアプリケーションが自己のワーカー仮想マシン内に存在するか否かを判定する第2判定ステップと、前記第2判定ステップにおいて、対応するアプリケーションが存在していると判定された場合に、このアプリケーションを使用して前記リクエストを処理した結果を、前記マスター仮想マシンを介して前記クライアントに送信し、対応するアプリケーションが存在しないと判定された場合に、自己のワーカー仮想マシン以外の他のワーカー仮想マシン内に対応するアプリケーションが存在しているか否かを調査し、この調査結果を前記マスター仮想マシンに送信する第1送信ステップと、前記マスター仮想マシンにおいて、前記リクエストを転送した前記ワーカー仮想マシンから、当該ワーカー仮想マシン以外の他のワーカー仮想マシンに対応するアプリケーションが存在する旨の前記調査結果を受け付けた場合に、前記複数の識別情報のなかから選択した次の優先順位の識別情報のワーカー仮想マシン宛に前記リクエストを転送し、いずれのワーカー仮想マシンにも対応するアプリケーションが存在しない旨の前記調査結果を受け付けた場合に、前記次の優先順位のワーカー仮想マシンへ前記リクエストを転送せず、対応するアプリケーションが存在しない旨のレスポンスを前記クライアントに送信する第2送信ステップと、を前記情報処理装置に実行させる。 Further, the present invention is a program for processing a request from a client that can be read by an information processing apparatus in which three or more virtual machines operate, and each of the virtual machines operates on its own virtual machine For each of the applications, the first management information in which the file name and the file extension to be processed by the application are registered, and the master virtual machine that is one of the plurality of virtual machines further includes other Second management information in which identification information for identifying each worker virtual machine that is a virtual machine of the virtual machine is associated with at least a file extension to be processed by each of the applications running on the worker virtual machine In the master virtual machine, an application running on the worker virtual machine Whether a plurality of identification information corresponding to the file extension included in the request is registered in the second management information when a request including a file extension to be processed is received from the client. When it is determined in the first determination step that determines whether or not only one piece of identification information is registered in the first determination step, the request is forwarded to the worker virtual machine of this identification information, A transfer step of transferring the request to the worker virtual machine of one identification information selected from among the plurality of identification information based on a predetermined priority when it is determined that the identification information is registered. The worker virtual machine is included in the request transferred from the master virtual machine based on the first management information. In the second determination step for determining whether or not an application corresponding to the file name and the file extension exists in the worker virtual machine, and in the second determination step, it is determined that the corresponding application exists. If the result of processing the request using this application is sent to the client via the master virtual machine and it is determined that the corresponding application does not exist, A first transmission step of investigating whether or not a corresponding application exists in another worker virtual machine and transmitting the investigation result to the master virtual machine, and forwarding the request in the master virtual machine From the worker virtual machine, the worker temporary When the investigation result indicating that an application corresponding to another worker virtual machine other than the machine exists is received, the worker information of the next priority identification information selected from the plurality of identification information is addressed to the worker virtual machine. When the request is transferred and the investigation result indicating that there is no application corresponding to any worker virtual machine is received, the request is not transferred to the worker virtual machine of the next priority, and the corresponding application is Causing the information processing apparatus to execute a second transmission step of transmitting a response to the effect that it does not exist to the client.

本発明によれば、クライアントから受信したリクエストに含まれるアドレス情報と、管理情報および識別情報とから、このリクエストを処理すべき仮想マシンを判別し、当該仮想マシンへ前記リクエストを転送する。これにより、複数の仮想マシンが動作する環境にその開発したアプリケーションを追加しても、クライアントから受信したリクエストを適切に各仮想マシン上で動作するアプリケーションに振り分けることができる。   According to the present invention, a virtual machine that should process this request is determined from address information, management information, and identification information included in the request received from the client, and the request is transferred to the virtual machine. As a result, even if the developed application is added to an environment where a plurality of virtual machines operate, a request received from a client can be appropriately distributed to applications operating on each virtual machine.

図1は、本発明の情報処理装置の一つの実施形態であるサーバ装置を含むネットワーク機器構成を例示した図である。図1では、サーバ装置10と、クライアント装置11とがネットワーク12に接続され、互いに通信可能とされている。   FIG. 1 is a diagram exemplifying a network device configuration including a server device which is an embodiment of an information processing apparatus of the present invention. In FIG. 1, a server device 10 and a client device 11 are connected to a network 12 and can communicate with each other.

クライアント装置11は、ソフトウェアとしてWebブラウザを実装し、サーバ装置10は、ソフトウェアとしてWebサーバを実装している。Webサーバは、Webブラウザから出されるリクエストを、インターネット等のネットワーク12を介して受信し、Webアプリケーションにより処理し、その処理結果をWebブラウザへ送信する。   The client device 11 implements a web browser as software, and the server device 10 implements a web server as software. The Web server receives a request issued from the Web browser via the network 12 such as the Internet, processes the request by the Web application, and transmits the processing result to the Web browser.

Webブラウザが、ユーザにより指定されたURLに対応する情報を取り寄せる場合、Webブラウザは、Webサーバに対し、リクエストとしてそのURLを送る。Webサーバは、そのURLを受け取り、URLに含まれるパス名、すなわちファイル名あるいはディレクトリ名から、Webページを表示させるためのファイルを読み出し、そのファイルを処理結果として返す。   When the Web browser obtains information corresponding to the URL specified by the user, the Web browser sends the URL as a request to the Web server. The Web server receives the URL, reads a file for displaying the Web page from a path name included in the URL, that is, a file name or a directory name, and returns the file as a processing result.

WebブラウザとWebサーバとの間の通信は、HTTP等の通信プロトコルを使用して行われる。このHTTPを用いて通信を行うWebブラウザは、HTTPクライアントと呼ばれ、Webサーバは、HTTPサーバと呼ばれる。以下では、WebブラウザをHTTPクライアント、WebサーバをHTTPサーバと表記する。HTTPサーバは、HTTPクライアントからのリクエストを受信するために、互いを接続する接続口となる外部ポートを開く。この外部ポートは、一般にポート番号80で、1つのみである。このため、HTTPサーバとHTTPクライアントとの間の通信は、この1つの外部ポートのみを介して行われる。   Communication between the Web browser and the Web server is performed using a communication protocol such as HTTP. A web browser that performs communication using this HTTP is called an HTTP client, and a web server is called an HTTP server. Hereinafter, the Web browser is referred to as an HTTP client, and the Web server is referred to as an HTTP server. In order to receive a request from an HTTP client, the HTTP server opens an external port serving as a connection port for connecting each other. This external port is generally port number 80 and there is only one. For this reason, communication between the HTTP server and the HTTP client is performed only through this one external port.

このサーバ装置10およびクライアント装置11は、HTTPサーバおよびHTTPクライアントを動作させるためのCPU、CPUが実行するためのプログラムを格納するメモリ、通信を行うためのネットワークボードやネットワークカードといった通信インタフェースを備えるPCや複合機等とすることができる。なお、図1では、クライアント装置11として1つのPCのみが示されているが、2つ以上のクライアント装置11がネットワーク12に接続され、各クライアント装置11からリクエストを送信することもできる。   The server device 10 and the client device 11 include a CPU for operating an HTTP server and an HTTP client, a memory for storing a program to be executed by the CPU, and a communication interface such as a network board and a network card for performing communication. Or a multifunction machine. In FIG. 1, only one PC is shown as the client device 11, but two or more client devices 11 are connected to the network 12, and a request can be transmitted from each client device 11.

次に、図1に示すサーバ装置10に実装されるモジュールの構成を、図2を参照して詳細に説明する。このサーバ装置10は、複数の仮想マシンを備えることができるが、図2では、3つの仮想マシンのみが示されている。ここで、仮想マシンとは、コンピュータのCPUやメモリ等のリソースを、物理的構成によらず柔軟に分割したり統合して仮想化した上で、その仮想化したコンピュータを実行するソフトウェアである。また、仮想マシンは、Java(登録商標)をプログラミング言語とするJava(登録商標)仮想マシンとすることができる。なお、このJava(登録商標)仮想マシンは、各OSに実行ファイルとして存在し、実行後、クラスファイルを読み込み、クラス内のメソッドを呼び出し実行する。   Next, the configuration of modules mounted on the server apparatus 10 shown in FIG. 1 will be described in detail with reference to FIG. The server device 10 can include a plurality of virtual machines, but only three virtual machines are shown in FIG. Here, the virtual machine is software that executes a virtualized computer after resources such as a CPU and a memory of the computer are virtualized by being flexibly divided or integrated regardless of a physical configuration. Further, the virtual machine can be a Java (registered trademark) virtual machine whose programming language is Java (registered trademark). Note that this Java (registered trademark) virtual machine exists as an execution file in each OS, and after execution, the class file is read and a method in the class is called and executed.

サーバ装置10は、3つの仮想マシンを同時に起動させることができ、このため、同時に異なる3つのOSを実行し、それらOS上でそれぞれ、アプリケーションを動作させることができる。図2では、3つの仮想マシン20、30、40がそれぞれ1つのHTTPサーバ21、31、41を含み、仮想マシン20が3つのWebアプリケーション22a〜22c、仮想マシン30が2つのWebアプリケーション32a、32b、仮想マシン40が2つのWebアプリケーション42a、42bを備えている。各仮想マシン上では、各HTTPサーバおよび各Webアプリケーションを動作させることができる。なお、HTTPサーバ21、31、41は、同一のモジュールである。一方、Webアプリケーション22a〜22c、32a、32b、42a、42bは、互いに異なるモジュールである。   The server apparatus 10 can start up three virtual machines at the same time. Therefore, three different OSs can be executed at the same time, and applications can be operated on the OSs. In FIG. 2, three virtual machines 20, 30, and 40 each include one HTTP server 21, 31, and 41, the virtual machine 20 includes three Web applications 22a to 22c, and the virtual machine 30 includes two Web applications 32a and 32b. The virtual machine 40 includes two Web applications 42a and 42b. Each HTTP server and each Web application can be operated on each virtual machine. Note that the HTTP servers 21, 31, and 41 are the same module. On the other hand, the Web applications 22a to 22c, 32a, 32b, 42a, and 42b are different modules.

3つの仮想マシン20、30、40は、1つのマスター仮想マシン20と、それ以外のワーカー仮想マシン30、40とに分類される。マスター仮想マシン20は、サーバ装置10の外部から外部ポートを使用してリクエストを受信し、そのリクエストに含まれるURL等のアドレス情報がワーカー仮想マシン30のWebアプリケーションあるいはワーカー仮想マシン40のWebアプリケーションを指し示すものである場合、そのリクエストの処理をそれらの仮想マシンに振り分ける。ワーカー仮想マシン30、40は、マスター仮想マシン20から、サーバ装置10の内部でのみ用いられる内部ポートを使用してリクエストを受け取り、そのリクエストに含まれるURLで指し示されるWebアプリケーションにより処理を実行し、処理結果をマスター仮想マシン20へ返す。その後、マスター仮想マシン20は、リクエストの送信元であるクライアント装置11へ外部ポートを使用してその処理結果を送信する。   The three virtual machines 20, 30 and 40 are classified into one master virtual machine 20 and other worker virtual machines 30 and 40. The master virtual machine 20 receives a request from the outside of the server apparatus 10 using an external port, and address information such as a URL included in the request is a Web application of the worker virtual machine 30 or a Web application of the worker virtual machine 40. If so, distribute the request processing to those virtual machines. The worker virtual machines 30 and 40 receive a request from the master virtual machine 20 using an internal port that is used only inside the server apparatus 10, and execute processing by a Web application indicated by the URL included in the request. The processing result is returned to the master virtual machine 20. Thereafter, the master virtual machine 20 transmits the processing result using the external port to the client apparatus 11 that is the transmission source of the request.

Java(登録商標)では、サーブレットやJSP(登録商標)という形でWebアプリケーションを作り、このWebアプリケーションを、上記でいうHTTPサーバに対応するアプリケーションサーバを用いて実行する。ここで、サーブレットとは、サーバで実行するためのJava(登録商標)プログラムで、JSP(登録商標)とは、HTMLにJava(登録商標)プログラムを埋め込んだファイルである。アプリケーションサーバとしては、一例としてTomcat(登録商標)を用いることができ、さらに、Webアプリケーション用フレームワークとしてStruts(登録商標)を用いることができる。このフレームワークは、プログラムの枠組みを提供するライブラリであり、アプリケーションに必要なデータの入出力やエラー処理、画面遷移等の基本的なしくみを提供する。Java(登録商標)アプリケーションを開発する基本ツールとしてJ2SEを用い、Webアプリケーションを作ることができる。作られたWebアプリケーションは、データベースに格納される。   In Java (registered trademark), a Web application is created in the form of a servlet or JSP (registered trademark), and the Web application is executed using an application server corresponding to the HTTP server described above. Here, the servlet is a Java (registered trademark) program to be executed on the server, and the JSP (registered trademark) is a file in which the Java (registered trademark) program is embedded in HTML. As an application server, Tomcat (registered trademark) can be used as an example, and Struts (registered trademark) can be used as a web application framework. This framework is a library that provides a program framework and provides basic mechanisms such as data input / output, error handling, and screen transition required for applications. Web applications can be created using J2SE as a basic tool for developing Java (registered trademark) applications. The created web application is stored in a database.

作成されたWebアプリケーションを使用しての具体的な処理を説明すると、Java(登録商標)仮想マシンであるJ2SE上でアプリケーションサーバであるTomcat(登録商標)を稼動させ、Webアプリケーションを読み出し、そのWebアプリケーションを構成するサーブレットおよびJSP(登録商標)を実行してリクエストを処理し、処理結果をHTTPクライアントへ返すことができる。したがって、このJ2SEを仮想マシンとして、Tomcat(登録商標)をHTTPサーバとして利用することができる。   A specific process using the created Web application will be described. Tomcat (registered trademark), which is an application server, is run on J2SE, which is a Java (registered trademark) virtual machine, the Web application is read, and the Web It is possible to execute a servlet and JSP (registered trademark) constituting an application, process a request, and return a processing result to an HTTP client. Therefore, this J2SE can be used as a virtual machine, and Tomcat (registered trademark) can be used as an HTTP server.

このように、各仮想マシン上にHTTPサーバが存在するため、仮想マシンごとに独立して、Webアプリケーションの開発を行うことができる。また、複数の仮想マシンが動作する環境であっても、単一の仮想マシンが動作する環境と同様に、プロセス間通信の処理を加えることなく、簡単にWebアプリケーションの開発を行うことができ、これにより、Webアプリケーションの開発時の負荷が軽減し、Webアプリケーション開発効率を向上させることができる。   As described above, since an HTTP server exists on each virtual machine, it is possible to develop a Web application independently for each virtual machine. In addition, even in an environment where a plurality of virtual machines operate, similarly to an environment where a single virtual machine operates, a web application can be easily developed without adding inter-process communication processing. Thereby, the load at the time of development of a Web application can be reduced, and Web application development efficiency can be improved.

図3を参照して、マスター仮想マシン20上で動作するHTTPサーバの構成について詳細に説明する。HTTPサーバは、クライアント装置11のHTTPクライアント100から出されたリクエストを、ネットワーク12を介して受信し、そのリクエストを解釈するリクエスト受信部23と、Webアプリケーションによる処理結果をレスポンスとして組み立て、ネットワーク12を介してクライアント装置11のHTTPクライアントへ送信するレスポンス送信部24と、複数のWebアプリケーションをそれぞれURLと対応付けて保持するアプリケーション管理部25と、他のHTTPサーバに処理を振り分けるためにリクエストを転送するリクエスト転送部26とを備える。   With reference to FIG. 3, the configuration of an HTTP server operating on the master virtual machine 20 will be described in detail. The HTTP server receives a request issued from the HTTP client 100 of the client device 11 via the network 12, assembles a request reception unit 23 that interprets the request, a processing result by the Web application as a response, A request transmission unit 24 that transmits a request to the HTTP client of the client device 11, an application management unit 25 that holds a plurality of Web applications in association with URLs, and another HTTP server to distribute processing. And a request transfer unit 26.

さらに、図3では、リクエストを一時的にメモリに保存し、要求に応じて取り出すリクエスト保存部27と、複数のワーカーHTTPサーバへリクエストを転送する優先順位に関する優先度情報を保存する仮想マシン制御部28とを備えている。   Further, in FIG. 3, a request storage unit 27 that temporarily stores a request in a memory and retrieves the request in response to a request, and a virtual machine control unit that stores priority information related to a priority order for transferring the request to a plurality of worker HTTP servers 28.

ここで、マスター仮想マシン20上で動作するHTTPサーバ21は、マスターHTTPサーバであり、ワーカー仮想マシン30、40上で動作するHTTPサーバ31、41は、ワーカーHTTPサーバである。これらのHTTPサーバ21、31、41は、同一のモジュールであるが、それら自身が存在する仮想マシンがマスターであるか、ワーカーであるかにより、マスターHTTPサーバあるいはワーカーHTTPサーバのいずれかとして振る舞う。例えば、マスター仮想マシン20は、基本機能を実現するためのWebアプリケーションを実装する仮想マシンとし、ワーカー仮想マシン30、40は、サーバ装置10の管理者が機能を追加するために作成したWebアプリケーションを実装する仮想マシンや、第3ベンダが作成したWebアプリケーションを実装する仮想マシンとすることができる。   Here, the HTTP server 21 operating on the master virtual machine 20 is a master HTTP server, and the HTTP servers 31 and 41 operating on the worker virtual machines 30 and 40 are worker HTTP servers. These HTTP servers 21, 31, and 41 are the same module, but behave as either a master HTTP server or a worker HTTP server depending on whether the virtual machine in which they exist is a master or a worker. For example, the master virtual machine 20 is a virtual machine that implements a Web application for realizing basic functions, and the worker virtual machines 30 and 40 are Web applications created by the administrator of the server device 10 to add functions. It can be a virtual machine to be mounted or a virtual machine to be mounted with a Web application created by a third vendor.

マスターHTTPサーバ21は、サーバ装置10外部の装置であるクライアント装置11とネットワーク12を介して通信を行うために外部ポートを開く。これにより、サーバ装置10の外部、例えばクライアント装置11から、この外部向けのポートに対してアクセスすることが可能となる。   The master HTTP server 21 opens an external port in order to communicate with the client device 11 that is an external device of the server device 10 via the network 12. As a result, it is possible to access the external port from the outside of the server device 10, for example, the client device 11.

一方、ワーカーHTTPサーバ31、41は、サーバ装置10の内部で通信を行うために内部ポートを開く。この内部ポートは、マスターHTTPサーバ21とワーカーHTTPサーバ31、41との間の通信を可能にするためのもので、内部送信・受信機能であるループバックを使用してアクセスすることができる。内部ポートは、サーバ装置10内部のHTTPサーバ間通信でのみ使用されるため、サーバ装置10外部からワーカーHTTPサーバ31、41へアクセスすることはできない。なお、ポート番号の重複は許されないので、外部ポートと内部ポートとは異なるポート番号が割り当てられる。外部ポートは、一般にポート番号80であるため、内部ポートは、それ以外の、例えばポート番号8080、8081を割り当てることができる。   On the other hand, the worker HTTP servers 31 and 41 open an internal port in order to perform communication inside the server device 10. This internal port is for enabling communication between the master HTTP server 21 and the worker HTTP servers 31 and 41, and can be accessed using a loopback which is an internal transmission / reception function. Since the internal port is used only for communication between HTTP servers inside the server device 10, the worker HTTP servers 31 and 41 cannot be accessed from outside the server device 10. Since duplication of port numbers is not permitted, different port numbers are assigned to external ports and internal ports. Since the external port is generally port number 80, the internal port can be assigned other port numbers 8080 and 8081, for example.

マスターHTTPサーバ21およびワーカーHTTPサーバ31、41は、自身がマスターであるか、ワーカーであるかを知っている。しかしながら、マスター仮想マシン20およびワーカー仮想マシン30、40上で動作するWebアプリケーション22a〜22c、32a、32b、42a、42bはいずれも、自身がマスターであるか、ワーカーであるかを知らない。これらは、自身がマスターか、ワーカーかを知っているHTTPサーバ21、31、41により管理される。このため、Webアプリケーションをマスターであるか、ワーカーであるかを区別することなく開発することができる。   The master HTTP server 21 and the worker HTTP servers 31 and 41 know whether they are masters or workers. However, none of the web applications 22a to 22c, 32a, 32b, 42a, and 42b running on the master virtual machine 20 and the worker virtual machines 30 and 40 knows whether they are a master or a worker. These are managed by HTTP servers 21, 31 and 41 that know whether they are masters or workers. For this reason, a web application can be developed without distinguishing whether it is a master or a worker.

図4を参照して、マスター仮想マシン20上のWebアプリケーションを、マスターHTTPサーバ21に登録する場合の処理について説明する。Webアプリケーションを登録する場合、マスター仮想マシン20に存在するWebアプリケーションは、マスター仮想マシン20に存在するHTTPサーバ21に対してURLの登録を行う。具体的には、Webアプリケーション22aが、HTTPサーバ21に対して、「url1」のURL登録を要求すると(ステップS11)、HTTPサーバ21に含まれるアプリケーション管理部25が、このURLをWebアプリケーション22aと対応付けて記憶する(ステップS12)。すなわち、そのURLを、Webアプリケーション22aを識別するアプリケーション名等と対応付けて対応テーブル等に記憶する。また、アプリケーション管理部25は、URLの記憶後、記憶が完了したことのレスポンスをWebアプリケーション22aへ返す(ステップS13)。   With reference to FIG. 4, processing when a Web application on the master virtual machine 20 is registered in the master HTTP server 21 will be described. When registering a Web application, the Web application existing in the master virtual machine 20 registers a URL to the HTTP server 21 existing in the master virtual machine 20. Specifically, when the Web application 22a requests the HTTP server 21 to register URL of “url1” (step S11), the application management unit 25 included in the HTTP server 21 sets the URL as the Web application 22a. The data is stored in association with each other (step S12). That is, the URL is stored in the correspondence table or the like in association with the application name or the like for identifying the Web application 22a. Further, after storing the URL, the application management unit 25 returns a response indicating that the storage is completed to the Web application 22a (step S13).

一方、URLの登録後、クライアント装置11のHTTPクライアント100から、「GET /url1 HTTP/1.1」のリクエストが送信されると(ステップS14)、HTTPサーバ21のリクエスト受信部23がこれを受け取り、リクエストを解釈する(ステップS15)。ここでは、「url1にあるファイルを転送規格HTTP/1.1で取得する」と解釈する。そして、リクエスト受信部23は、このリクエストをどのWebアプリケーションに振り分けるかを決定するため、アプリケーション管理部25に引き渡す(ステップS16)。   On the other hand, after the URL is registered, when a “GET / url1 HTTP / 1.1” request is transmitted from the HTTP client 100 of the client device 11 (step S14), the request receiving unit 23 of the HTTP server 21 receives the request and receives the request. Is interpreted (step S15). Here, it is interpreted as “obtain the file at url1 with the transfer standard HTTP / 1.1”. Then, the request reception unit 23 delivers the request to the application management unit 25 in order to determine which Web application the request is distributed to (step S16).

アプリケーション管理部25は、対応テーブルを参照し、リクエスト受信部23から受け付けたリクエストに含まれるURLに対応するWebアプリケーションを探索する(ステップS17)。ここで、対応するWebアプリケーションが見つかった場合、アプリケーション管理部25は、その対応するWebアプリケーション(Webアプリケーション22a)に処理を依頼する(ステップS18)。Webアプリケーション22aでは、依頼された処理を実行し(ステップS19)、この処理結果をレスポンスとしてアプリケーション管理部25へ送信する(ステップS20)。   The application management unit 25 refers to the correspondence table and searches for a Web application corresponding to the URL included in the request received from the request reception unit 23 (step S17). Here, when a corresponding Web application is found, the application management unit 25 requests the corresponding Web application (Web application 22a) to perform processing (step S18). The Web application 22a executes the requested processing (step S19), and transmits the processing result as a response to the application management unit 25 (step S20).

次いで、アプリケーション管理部25が、Webアプリケーションから受け付けたレスポンスをレスポンス送信部24へ送信し(ステップS21)、レスポンス送信部24は、そのレスポンスをHTTPクライアント100へ送信する(ステップS22)。図4では、見つかったことを示す「HTTP/1.1 200 OK」というメッセージが送信されている。「HTTP/1.1」は転送規格で、「200」は成功を意味するステータスコードである。これらのメッセージとともに、そのアドレスにあるWebページを表示させるためのファイルがHTTPクライアント100へ送られ、クライアント装置11の画面上にWebページが表示される。なお、図4では、Webアプリケーション22aの登録について説明したが、Webアプリケーション22b、22cについても同様の処理が行われるものとする。   Next, the application management unit 25 transmits the response received from the Web application to the response transmission unit 24 (step S21), and the response transmission unit 24 transmits the response to the HTTP client 100 (step S22). In FIG. 4, a message “HTTP / 1.1 200 OK” indicating that the message has been found is transmitted. “HTTP / 1.1” is a transfer standard, and “200” is a status code indicating success. Along with these messages, a file for displaying the Web page at the address is sent to the HTTP client 100, and the Web page is displayed on the screen of the client device 11. Although the registration of the Web application 22a has been described with reference to FIG. 4, it is assumed that the same processing is performed for the Web applications 22b and 22c.

ステップS17において、URLに対応するWebアプリケーションが見つからない場合には、リソースが見つからない旨のエラーメッセージをレスポンスとして送信するものとする。以下、図5を参照して、URLに対応するWebアプリケーションが見つからない場合の処理について説明する。なお、図5においてステップS31〜S36の処理については、上述したステップS11〜S16の処理と同様であるため、説明を省略する。   In step S17, when the Web application corresponding to the URL is not found, an error message indicating that the resource is not found is transmitted as a response. Hereinafter, with reference to FIG. 5, processing when a Web application corresponding to the URL is not found will be described. In addition, about the process of step S31-S36 in FIG. 5, since it is the same as that of the process of step S11-S16 mentioned above, description is abbreviate | omitted.

ステップS37において、アプリケーション管理部25は、対応テーブルを参照し、リクエスト受信部23から渡されたURL「foo」に対応するWebアプリケーションを探索する。ここで、対応するWebアプリケーションが見つからないと判定した場合、アプリケーション管理部25は、図5に示したように、リソースが見つからない旨のエラーメッセージ「404 Not Found」を作成し、そのエラーメッセージをレスポンスとしてレスポンス送信部24へ送信する(ステップS38)。レスポンス送信部24は、このエラーメッセージをHTTPクライアント100へ送信する(ステップS39)。HTTPプロトコルにおいて、「404」は見つからなかったことを示すステータスコードである。これにより、クライアント装置11を操作するユーザに、リソースが見つからないことを認識させることができる。   In step S <b> 37, the application management unit 25 refers to the correspondence table and searches for a Web application corresponding to the URL “foo” passed from the request reception unit 23. If it is determined that the corresponding Web application is not found, the application management unit 25 creates an error message “404 Not Found” indicating that the resource is not found as shown in FIG. A response is transmitted to the response transmitter 24 (step S38). The response transmission unit 24 transmits this error message to the HTTP client 100 (step S39). In the HTTP protocol, “404” is a status code indicating that it was not found. Thereby, the user who operates the client apparatus 11 can be made to recognize that a resource is not found.

次に、図6を参照して、ワーカー仮想マシン30上のWebアプリケーションをワーカーHTTPサーバ31に登録する場合について説明する。ワーカー仮想マシン30に存在するWebアプリケーション32aは、同じワーカー仮想マシン30に存在するHTTPサーバ31に対してURLの登録を行う。具体的には、Webアプリケーション32aが、HTTPサーバ31に対して「url2」のURL登録を行うと(ステップS41)、アプリケーション管理部35は、このURLをWebアプリケーション32aと対応付け、対応テーブル等に記憶する(ステップS42)。   Next, a case where a Web application on the worker virtual machine 30 is registered in the worker HTTP server 31 will be described with reference to FIG. The Web application 32 a existing in the worker virtual machine 30 registers a URL with respect to the HTTP server 31 existing in the same worker virtual machine 30. Specifically, when the Web application 32a performs URL registration of “url2” to the HTTP server 31 (step S41), the application management unit 35 associates this URL with the Web application 32a and stores it in a correspondence table or the like. Store (step S42).

URLの登録後、HTTPサーバ31は、HTTPサーバ31自身が存在する仮想マシンの種別、すなわちマスターかワーカーかを判別する。この場合、ワーカーと判別し、マスターHTTPサーバ21へリクエストを転送してもらうための依頼を行う(ステップS43)。なお、ワーカーHTTPサーバ31からは、登録を行ったURLと、外部ポートのポート名あるいは番号と、内部ポートのポート名あるいはポート番号とを含む情報が、振り分け依頼登録としてマスターHTTPサーバ21に送信されるものとする。これは、異なるマシンで処理を実行する手続きを規定するリモートプロシージャコール(RPC)を使用することにより実現することができる。このように、RPCを使用することでマスターHTTPサーバ21へWebアプリケーションのURLを動的に登録することができるため、ワーカーHTTPサーバ31、41にWebアプリケーションを追加しても、マスターHTTPサーバ21へ修正を加える必要がなくなる。これにより、Webアプリケーション開発時の負荷が軽減し、Webアプリケーション開発効率を向上させることができる。   After registering the URL, the HTTP server 31 determines the type of virtual machine in which the HTTP server 31 itself exists, that is, whether it is a master or a worker. In this case, it is determined that the worker is a worker, and a request for transferring the request to the master HTTP server 21 is made (step S43). The worker HTTP server 31 transmits information including the registered URL, the port name or number of the external port, and the port name or port number of the internal port to the master HTTP server 21 as a distribution request registration. Shall be. This can be achieved by using a remote procedure call (RPC) that defines a procedure for executing processing on different machines. As described above, since the URL of the Web application can be dynamically registered in the master HTTP server 21 by using the RPC, even if the Web application is added to the worker HTTP servers 31 and 41, the master HTTP server 21 can be added. No need to make corrections. Thereby, the load at the time of web application development can be reduced, and web application development efficiency can be improved.

マスターHTTPサーバ21が備えるリクエスト転送部26では、ワーカーHTTPサーバ31からURLと、外部ポートのポート名あるいは番号と、内部ポートのポート名あるいはポート番号とを受け取ると、これらの情報をアプリケーション管理部25に渡す(ステップS44)。アプリケーション管理部25は、リクエスト転送部26から受け取った各情報を対応付け、対応テーブル等に記憶すると(ステップS45)、リクエスト転送部26を介して記憶が完了したことを通知するレスポンスをワーカー仮想マシン30のアプリケーション管理部35に送信する(ステップS46、S47)。   When the request transfer unit 26 included in the master HTTP server 21 receives the URL, the port name or number of the external port, and the port name or port number of the internal port from the worker HTTP server 31, the application management unit 25 stores these pieces of information. (Step S44). When the application management unit 25 associates each piece of information received from the request transfer unit 26 and stores the information in the correspondence table or the like (step S45), the application management unit 25 sends a response notifying the completion of storage via the request transfer unit 26 to the worker virtual machine. 30 to the application management unit 35 (steps S46 and S47).

一方、アプリケーション管理部35では、リクエスト転送部26から記憶が完了したことを通知するレスポンスを受け付けると、このレスポンスをWebアプリケーション32aに返すことで(ステップS48)、登録処理が完了する。なお、図6では、Webアプリケーション32aの登録について説明したが、Webアプリケーション32bについても同様の処理が行われるものとする。また、図6では、ワーカー仮想マシン30について説明したが、ワーカー仮想マシン40の場合でも同様の処理が行われるものとする。   On the other hand, when receiving a response notifying that the storage has been completed from the request transfer unit 26, the application management unit 35 returns this response to the Web application 32a (step S48), thereby completing the registration process. Although the registration of the Web application 32a has been described with reference to FIG. 6, it is assumed that the same processing is performed for the Web application 32b. Further, although the worker virtual machine 30 has been described with reference to FIG. 6, it is assumed that the same processing is performed even in the case of the worker virtual machine 40.

一方、URLの登録後に、クライアント装置11のHTTPクライアント100から、「GET /url2 HTTP/1.1」がリクエストとして送信されると(ステップS49)、HTTPサーバ21のリクエスト受信部23がこれを受け取り、そのリクエストを解釈する(ステップS50)。この場合、「url2にあるファイルを転送規格HTTP/1.1で取得する」と解釈する。リクエスト受信部23は、受け付けたリクエストをアプリケーション管理部25へ渡すと(ステップS51)、アプリケーション管理部25は、対応テーブルを参照し、このリクエストに含まれたURLに対応するWebアプリケーション32aを探索する(ステップS52)。   On the other hand, when “GET / url2 HTTP / 1.1” is transmitted as a request from the HTTP client 100 of the client device 11 after registration of the URL (step S49), the request receiving unit 23 of the HTTP server 21 receives this, The request is interpreted (step S50). In this case, it is interpreted as “obtain the file at url2 with the transfer standard HTTP / 1.1”. When the request reception unit 23 passes the received request to the application management unit 25 (step S51), the application management unit 25 refers to the correspondence table and searches for the Web application 32a corresponding to the URL included in the request. (Step S52).

ここで、リクエストに含まれたURL“url2”がWebアプリケーション32aに対応するものとすると、Webアプリケーション32aはワーカー仮想マシン30上で動作するアプリケーションであるため、マスター仮想マシン20上では見つからない。そのため、アプリケーション管理部25は、リクエスト転送部26に対し、ワーカー仮想マシン30上で動作するワーカーHTTPサーバ31へ転送するように、リクエストの転送依頼をする(ステップS53)。リクエスト転送部26では、リクエストの転送依頼を受け付けると、転送先となるワーカー仮想マシン30の内部ポートのポート番号に対してリクエストを転送する(ステップS54)。   If the URL “url2” included in the request corresponds to the Web application 32a, the Web application 32a is an application that operates on the worker virtual machine 30, and thus cannot be found on the master virtual machine 20. Therefore, the application management unit 25 requests the request transfer unit 26 to transfer the request to transfer to the worker HTTP server 31 operating on the worker virtual machine 30 (step S53). Upon receiving the request transfer request, the request transfer unit 26 transfers the request to the port number of the internal port of the worker virtual machine 30 that is the transfer destination (step S54).

このように、マスターHTTPサーバ21は、ワーカーHTTPサーバ31、41へHTTPを用いてリクエストを転送する。この場合、ワーカーHTTPサーバ31、41は、一般的なWebブラウザからのリクエストを受けた場合と同じとなるため、ワーカーHTTPサーバ31、41のリクエスト処理に手を加える必要はない。また、マスターHTTPサーバ21は、情報処理装置の外部と通信を行うために外部ポートを使用し、ワーカーHTTPサーバ31、41は、マスターHTTPサーバ21と通信を行うために内部ポートと自身を識別するループバックアドレスとを使用して、リクエストを受信し、リクエストに対する処理結果を送信する。これにより、サーバ装置10の外部からワーカーHTTPサーバ31、41への直接的なアクセスを防止することができるため、セキュリティ面を考慮しなければならないのはマスターHTTPサーバ21のみでよく、装置全体として保守・管理の負担を軽減させることができる。   As described above, the master HTTP server 21 transfers the request to the worker HTTP servers 31 and 41 using HTTP. In this case, since the worker HTTP servers 31 and 41 are the same as when receiving a request from a general Web browser, it is not necessary to modify the request processing of the worker HTTP servers 31 and 41. Further, the master HTTP server 21 uses an external port to communicate with the outside of the information processing apparatus, and the worker HTTP servers 31 and 41 identify themselves with the internal port to communicate with the master HTTP server 21. A request is received using a loopback address, and a processing result for the request is transmitted. As a result, direct access to the worker HTTP servers 31 and 41 from the outside of the server apparatus 10 can be prevented, so that only the master HTTP server 21 needs to be considered in terms of security, and the entire apparatus The burden of maintenance and management can be reduced.

リクエスト転送部26から送信されたリクエストは、ワーカー仮想マシン30上で動作するワーカーHTTPサーバ31のリクエスト受信部33で解釈が行われた後(ステップS55)、アプリケーション管理部35へ渡される(ステップS56)。アプリケーション管理部35は、対応テーブルを参照し、リクエスト受信部33から受け付けたリクエストに含まれるURLに対応するWebアプリケーションを探索する(ステップS57)。この場合、ワーカー仮想マシン30上で動作するWebアプリケーション32a、32bの中にそのURLに対応するWebアプリケーション32aが含まれているため、アプリケーション管理部35は、Webアプリケーション32aに処理を依頼する(ステップS58)。Webアプリケーション32aは依頼された処理を実行し(ステップS59)、この処理結果をレスポンスとしてアプリケーション管理部35へ送信する(ステップS60)。アプリケーション管理部35は、Webアプリケーション32aから受け付けたレスポンスをレスポンス送信部34へ送信すると(ステップS61)、レスポンス送信部34は、そのレスポンスをマスター仮想マシン20のリクエスト転送部26に送信する(ステップS62)。   The request transmitted from the request transfer unit 26 is interpreted by the request reception unit 33 of the worker HTTP server 31 operating on the worker virtual machine 30 (step S55), and then passed to the application management unit 35 (step S56). ). The application management unit 35 refers to the correspondence table and searches for a Web application corresponding to the URL included in the request received from the request reception unit 33 (step S57). In this case, since the web application 32a corresponding to the URL is included in the web applications 32a and 32b operating on the worker virtual machine 30, the application management unit 35 requests the web application 32a to perform processing (step) S58). The Web application 32a executes the requested processing (step S59), and transmits the processing result as a response to the application management unit 35 (step S60). When the application management unit 35 transmits the response received from the Web application 32a to the response transmission unit 34 (step S61), the response transmission unit 34 transmits the response to the request transfer unit 26 of the master virtual machine 20 (step S62). ).

一方、リクエスト転送部26では、レスポンス送信部34からレスポンスを受け付けると、このレスポンスをアプリケーション管理部25に送信する(ステップS63)。続いて、アプリケーション管理部25は、リクエスト転送部26から受け付けたレスポンスをレスポンス送信部24に送信すると(ステップS64)、レスポンス送信部24は、そのレスポンスをHTTPクライアント100へ送信する(ステップS65)。   On the other hand, when receiving a response from the response transmission unit 34, the request transfer unit 26 transmits this response to the application management unit 25 (step S63). Subsequently, when the application management unit 25 transmits the response received from the request transfer unit 26 to the response transmission unit 24 (step S64), the response transmission unit 24 transmits the response to the HTTP client 100 (step S65).

このように、マスターHTTPサーバ21では、ワーカーHTTPサーバ各々が有するWebアプリケーションのURLと、当該ワーカーHTTPサーバの外部・内部ポートに関する情報とを対応付けた対応テーブルを用いて、HTTPクライアント100から受信したリクエストに含まれるURL(アドレス情報)に対応する仮想マシンを判別し、当該仮想マシンへ前記リクエストを転送する。   As described above, the master HTTP server 21 receives the URL of the Web application included in each worker HTTP server from the HTTP client 100 using the correspondence table in which the information about the external / internal port of the worker HTTP server is associated with each other. The virtual machine corresponding to the URL (address information) included in the request is determined, and the request is transferred to the virtual machine.

次に、各ワーカー仮想マシンのWebアプリケーションが、同一のURLに対応付けられた場合の動作について説明する。まず、各ワーカー仮想マシンのWebアプリケーションに、同一のURLが設定されることになる背景について説明する。   Next, an operation when the Web application of each worker virtual machine is associated with the same URL will be described. First, the background that the same URL is set in the Web application of each worker virtual machine will be described.

Java(登録商標)を用いてWebアプリケーションを作成する場合、上述したようにStruts(登録商標)等のフレームワークを利用することが一般的に行われている。フレームワークには商用又はオープンソースのものなど多種存在するが、その仕様によっては、URLに含まれたディレクトリ指定部分に関わらず、当該URLで指定されるファイルの拡張子部分に基づいて、Webアプリケーションが処理を行うものがある。このような仕様のフレームワークを用いた場合、Webアプリケーションの夫々が同一の拡張子について処理を行うよう規定されていると、各Webアプリケーションは実質同一のURL、即ちファイル拡張子に対応付けられることになる。以下では、複数のWebアプリケーションが同一のURLに対応付けられた場合の処理について説明する。   When creating a Web application using Java (registered trademark), a framework such as Struts (registered trademark) is generally used as described above. There are various types of frameworks such as commercial or open source, but depending on the specifications, the web application is based on the extension part of the file specified by the URL regardless of the directory specifying part included in the URL. There is something that does the processing. When a framework with such a specification is used, if each Web application is specified to perform processing for the same extension, each Web application is associated with the same URL, that is, a file extension. become. Hereinafter, processing when a plurality of Web applications are associated with the same URL will be described.

図7を参照して、Webアプリケーション32a、42aをワーカーHTTPサーバ31、41に登録する場合の処理について説明する。なお、図7では、Webアプリケーション32a、42aについて説明するが、Webアプリケーション32b、42bについても同様の処理が行われるものとする。また、図7において、ワーカー仮想マシン30及びワーカー仮想マシン40が有するWebアプリケーションの夫々は、同一のURL、つまり同一のファイル拡張子に対応付けられているものとする。   With reference to FIG. 7, the process in the case of registering the Web applications 32a and 42a in the worker HTTP servers 31 and 41 will be described. In FIG. 7, the Web applications 32a and 42a will be described. However, the same processing is also performed for the Web applications 32b and 42b. In FIG. 7, it is assumed that each of the Web applications included in the worker virtual machine 30 and the worker virtual machine 40 is associated with the same URL, that is, the same file extension.

まず、Webアプリケーション32aがHTTPサーバ31に対し、URLの登録を行うと(ステップS71)、上述したように、アプリケーション管理部35が、このURLとアプリケーション32aを対応付け、対応テーブル等に記憶する(ステップS72)。なお、図7では、登録を行うURLを「/*.cgi」(アスタリスクは、任意の文字列)とした例を示しているが、これに限定されないものとする。   First, when the Web application 32a registers a URL with the HTTP server 31 (step S71), as described above, the application management unit 35 associates the URL with the application 32a and stores them in a correspondence table or the like ( Step S72). Although FIG. 7 shows an example in which the URL for registration is “/*.cgi” (an asterisk is an arbitrary character string), it is not limited to this.

URLの登録後、HTTPサーバ31は、HTTPサーバ31自身が存在する仮想マシンの種別、すなわちマスターかワーカーかを判別する。この場合、ワーカーと判別し、マスターHTTPサーバ21へリクエストを転送してもらうための依頼を行う(ステップS73)。   After registering the URL, the HTTP server 31 determines the type of virtual machine in which the HTTP server 31 itself exists, that is, whether it is a master or a worker. In this case, it is determined as a worker, and a request is made to have the request transferred to the master HTTP server 21 (step S73).

また、Webアプリケーション42aがHTTPサーバ41に対し、Webアプリケーション32aと同じURL(/*.cgi)の登録を行うと(ステップS74)、アプリケーション管理部45は、Webアプリケーション32aと同様に、このURLとWebアプリケーション42aとを対応付け、対応テーブル等に記憶する(ステップS75)。URLの登録後、HTTPサーバ41は、HTTPサーバ41自身が存在する仮想マシンの種別、すなわちマスターかワーカーかを判別する。この場合、ワーカーと判別し、マスターHTTPサーバ21へリクエストを転送してもらうための依頼を行う(ステップS76)。   When the Web application 42a registers the same URL (/*.cgi) as the Web application 32a in the HTTP server 41 (step S74), the application management unit 45, as with the Web application 32a, The web application 42a is associated and stored in a correspondence table or the like (step S75). After registering the URL, the HTTP server 41 determines the type of virtual machine on which the HTTP server 41 itself exists, that is, whether it is a master or a worker. In this case, it is determined that the worker is a worker, and a request for transferring the request to the master HTTP server 21 is made (step S76).

一方、マスターHTTPサーバ21が備えるリクエスト転送部26では、ワーカーHTTPサーバ31、41からURLと、外部ポートのポート名あるいは番号と、内部ポートのポート名あるいはポート番号とを受け取ると、これらの情報をアプリケーション管理部25に渡す(ステップS77、S78)。アプリケーション管理部25は、リクエスト転送部26から受け取ったワーカーHTTPサーバ31、41についての各情報を夫々対応付け、対応テーブル等に記憶すると(ステップS79、S80)、記憶が完了したことを通知するレスポンスをリクエスト転送部26に送信する(ステップS81、S82)。リクエスト転送部26は、アプリケーション管理部25からレスポンスを受け付けると、ワーカー仮想マシン30、40のアプリケーション管理部35、45の夫々に対し、当該レスポンスを夫々送信する(ステップS83、S84)。一方、アプリケーション管理部35、45の夫々では、リクエスト転送部26から記憶が完了したことを通知するレスポンスを受け付けると、このレスポンスをWebアプリケーション32a、42aに夫々返すことで(ステップS85、S86)、登録処理が完了する。   On the other hand, when the request transfer unit 26 provided in the master HTTP server 21 receives the URL, the port name or number of the external port, and the port name or port number of the internal port from the worker HTTP servers 31 and 41, these information are stored. The data is passed to the application management unit 25 (steps S77 and S78). The application management unit 25 associates each information about the worker HTTP servers 31 and 41 received from the request transfer unit 26 and stores them in the correspondence table or the like (steps S79 and S80), and a response notifying that the storage is completed Is transmitted to the request transfer unit 26 (steps S81 and S82). Upon receiving a response from the application management unit 25, the request transfer unit 26 transmits the response to the application management units 35 and 45 of the worker virtual machines 30 and 40, respectively (steps S83 and S84). On the other hand, when each of the application management units 35 and 45 receives a response notifying that the storage is completed from the request transfer unit 26, the response is returned to the Web applications 32a and 42a, respectively (steps S85 and S86). The registration process is complete.

なお、マスターHTTPサーバ21では、リクエストを振り分けるために、ワーカーHTTPサーバ31、41からURLを受け取り、記憶するが、この場合、同じURLである。しかしながら、ワーカーHTTPサーバ31が開いた内部ポートのポート番号は8080で、ワーカーHTTPサーバ41が開いた内部ポートのポート番号は8081と異なり、この内部ポートのポート番号により判別することができるため、複数のアプリケーションについて同一のURLを登録することができる。これにより、各ワーカーHTTPサーバ31、41のWebアプリケーション開発者は、アプリケーション開発の際、他のワーカーHTTPサーバを有するWebアプリケーションとURLが重複しているかを意識する必要がなくなる。したがって、ワーカーHTTPサーバ間でWebアプリケーションのURLを調整する必要がないため、アプリケーション開発時の負荷を軽減し、アプリケーション開発効率を向上させることができる。   Note that the master HTTP server 21 receives and stores URLs from the worker HTTP servers 31 and 41 in order to distribute requests, but in this case, the URL is the same. However, since the port number of the internal port opened by the worker HTTP server 31 is 8080 and the port number of the internal port opened by the worker HTTP server 41 is different from 8081, it can be determined by the port number of this internal port. The same URL can be registered for these applications. Thereby, the Web application developer of each worker HTTP server 31 or 41 does not need to be aware of whether the URL overlaps with a Web application having another worker HTTP server when developing the application. Therefore, since it is not necessary to adjust the URL of the Web application between the worker HTTP servers, the load during application development can be reduced and the application development efficiency can be improved.

一方、URL登録後に、クライアント装置11のHTTPクライアント100から、「GET /url/app2.cgi HTTP/1.1」のリクエストが送信されると(ステップS87)、HTTPサーバ21のリクエスト受信部23がこれを受け取り、このリクエストを解釈する(ステップS88)。この場合、「ディレクトリ名urlのディレクトリにあるファイル名app2.cgiというファイルを転送規格HTTP/1.1で取得する」と解釈する。   On the other hand, when a request “GET /url/app2.cgi HTTP / 1.1” is transmitted from the HTTP client 100 of the client apparatus 11 after URL registration (step S87), the request receiving unit 23 of the HTTP server 21 transmits this request. The request is received and the request is interpreted (step S88). In this case, it is interpreted that “a file named app2.cgi in the directory of the directory name url is acquired by the transfer standard HTTP / 1.1”.

リクエスト受信部23は、HTTPクライアント100から受け付けたリクエストをアプリケーション管理部25へ渡す(ステップS89)。アプリケーション管理部25は、リクエスト受信部23からリクエストを受け取ると、対応テーブルを参照し、このリクエストに含まれたURLに対応するWebアプリケーションを探索する(ステップS90)。この場合、URLに対応するWebアプリケーションはワーカー仮想マシン30またはワーカー仮想マシン40上で動作するアプリケーションであるため、マスター仮想マシン20上では見つからない。そのため、アプリケーション管理部25は、リクエスト転送部26に対し、ワーカー仮想マシン30上で動作するワーカーHTTPサーバ31またはワーカーHTTPサーバ41へリクエストを転送するよう依頼する(ステップS91)。   The request reception unit 23 passes the request received from the HTTP client 100 to the application management unit 25 (step S89). When receiving a request from the request reception unit 23, the application management unit 25 refers to the correspondence table and searches for a Web application corresponding to the URL included in the request (step S90). In this case, since the Web application corresponding to the URL is an application that operates on the worker virtual machine 30 or the worker virtual machine 40, it cannot be found on the master virtual machine 20. Therefore, the application management unit 25 requests the request transfer unit 26 to transfer the request to the worker HTTP server 31 or the worker HTTP server 41 operating on the worker virtual machine 30 (step S91).

ここで、2つのWebアプリケーション32a、42aが登録したURLが同じであることから、リクエスト転送部26は、2つのワーカー仮想マシン30、40のどちらかへリクエストを転送する(ステップS92)。この場合、後に残りの仮想マシンへリクエストを再送する可能性があるため、リクエスト転送部26は、受け付けたリクエストをリクエスト保存部27に送信することで(ステップS93)、当該リクエスト保存部27にリクエストを一時的に保存する。   Here, since the URL registered by the two Web applications 32a and 42a is the same, the request transfer unit 26 transfers the request to one of the two worker virtual machines 30 and 40 (step S92). In this case, since the request may be retransmitted to the remaining virtual machines later, the request transfer unit 26 transmits the accepted request to the request storage unit 27 (step S93), thereby requesting the request storage unit 27 to make a request. Is temporarily saved.

ステップS92において、リクエスト転送部26は、例えば、Webアプリケーションがアプリケーション管理部25に予め登録しておいた各ワーカー仮想マシン(Webアプリケーション)への転送順序や、予め登録しておいた各ワーカー仮想マシン(Webアプリケーション)の優先順位を示す優先度情報等に従ってリクエストを転送する。ワーカー仮想マシン30上で動作するWebアプリケーション32aが先に登録あるいは優先順位が高い場合、リクエスト転送部26は、ワーカー仮想マシン30が開いた内部ポートのポート番号に対してリクエストを転送する。   In step S92, the request transfer unit 26, for example, the transfer order to each worker virtual machine (Web application) registered in advance in the application management unit 25 by the Web application, or each worker virtual machine registered in advance. The request is transferred according to priority information indicating the priority of (Web application). When the Web application 32a operating on the worker virtual machine 30 is registered or has a higher priority, the request transfer unit 26 transfers the request to the port number of the internal port opened by the worker virtual machine 30.

ワーカー仮想マシン30上で動作するワーカーHTTPサーバ31のリクエスト受信部33では、マスター仮想マシン20から転送されたリクエストを受信すると、このリクエストをリクエスト受信部23と同様に解釈する(ステップS94)。そして、リクエスト受信部33は、このリクエストをどのWebアプリケーションに振り分けるかを決定するため、アプリケーション管理部35に引き渡す(ステップS95)。   When receiving a request transferred from the master virtual machine 20, the request receiving unit 33 of the worker HTTP server 31 operating on the worker virtual machine 30 interprets the request in the same manner as the request receiving unit 23 (step S94). Then, the request reception unit 33 delivers the request to the application management unit 35 in order to determine which Web application the request is distributed to (step S95).

アプリケーション管理部35は、対応テーブルを参照し、リクエスト受信部33から受け付けたリクエストに含まれるURLに対応するWebアプリケーションを探索する(ステップS96)。ここで、リクエストされたファイル“app2.cgi”が、Webアプリケーション32aに対応するものとすると、アプリケーション管理部35は、ワーカー仮想マシン30上で動作するWebアプリケーション32a、32bの中に、そのURLに対応するWebアプリケーション32aが含まれていると判定し、Webアプリケーション32aに処理を依頼する(ステップS97)。Webアプリケーション32aでは、依頼された処理を実行し(ステップS98)、この処理結果をレスポンスとして、成功を示すステータスコード「200」とともにアプリケーション管理部35へ送信する(ステップS99)。アプリケーション管理部35では、Webアプリケーション32aからレスポンスを受け付けると、レスポンス送信部34へ送信し(ステップS100)、レスポンス送信部34では、アプリケーション管理部35から送信されたレスポンスを、マスター仮想マシン20のリクエスト転送部26へ送信する(ステップS101)。   The application management unit 35 refers to the correspondence table and searches for a web application corresponding to the URL included in the request received from the request reception unit 33 (step S96). Here, assuming that the requested file “app2.cgi” corresponds to the Web application 32a, the application management unit 35 includes the URL in the Web applications 32a and 32b operating on the worker virtual machine 30. It is determined that the corresponding web application 32a is included, and the web application 32a is requested to perform processing (step S97). The Web application 32a executes the requested processing (step S98), and transmits the processing result as a response to the application management unit 35 together with the status code “200” indicating success (step S99). When receiving a response from the Web application 32a, the application management unit 35 transmits the response to the response transmission unit 34 (step S100), and the response transmission unit 34 sends the response transmitted from the application management unit 35 to the request of the master virtual machine 20. It transmits to the transfer part 26 (step S101).

一方、リクエスト転送部26では、ステップS92で転送したリクエストに対するレスポンスを受け付けると、このレスポンスに含まれるステータスコードが予め設定された特別な値、例えば「900」であるか否かを判定する(ステップS102)。ステータスコードが特別な値でない場合、リクエスト転送部26は、アプリケーション管理部25を介してレスポンスをレスポンス送信部24に送信する(ステップS103、S104)。次いで、レスポンス送信部24は、アプリケーション管理部25から受け付けたレスポンスを、HTTPクライアント100へ送信する(ステップS105)。   On the other hand, when receiving a response to the request transferred in step S92, the request transfer unit 26 determines whether or not the status code included in the response is a special value set in advance, for example, “900” (step S102). If the status code is not a special value, the request transfer unit 26 transmits a response to the response transmission unit 24 via the application management unit 25 (steps S103 and S104). Next, the response transmission unit 24 transmits the response received from the application management unit 25 to the HTTP client 100 (step S105).

上記の特別な値は、HTTPプロトコルでのステータスコードとして設定されていない値であればいかなる値であってもよく、例えば、上記のように「900」とすることができる。なお、この「900」というステータスコードは、リクエストが転送されたワーカー仮想マシンにおいて、対応するWebアプリケーションが見つからない場合に送信されるよう予め設定されているものとする。   The special value may be any value as long as it is not set as a status code in the HTTP protocol. For example, it may be “900” as described above. It is assumed that the status code “900” is set in advance to be transmitted when a corresponding Web application is not found in the worker virtual machine to which the request has been transferred.

上記の優先順位は、優先度情報としてユーザにより予め設定され、マスター仮想マシン20上で動作するマスターHTTPサーバ21に含まれる仮想マシン制御部28が保持する。例えば、ワーカー仮想マシン30に対し、優先度1、ワーカー仮想マシン40に対し、優先度2として設定することができる。この優先度情報は、サーバ装置10の起動時に設定され、また、実行時に動的に変更することができる。   The above priority is preset by the user as priority information, and is held by the virtual machine control unit 28 included in the master HTTP server 21 operating on the master virtual machine 20. For example, the priority 1 can be set for the worker virtual machine 30 and the priority 2 can be set for the worker virtual machine 40. This priority information is set when the server device 10 is activated, and can be dynamically changed during execution.

この優先度情報を使用した処理について説明すると、マスターHTTPサーバ21のリクエスト転送部26は、仮想マシン制御部28からマスター仮想マシン20の優先度情報を取得し、リクエストを転送していない仮想マシンの中で最も優先度が高いものを選択してリクエストを転送する。その後、予め設定された特別な値のステータスコード、上記でいう「900」を受け取った場合、次の優先度の仮想マシンを選択し、リクエストを転送する。特別な値のステータスコードを受け取らなかった場合は、次の優先度の仮想マシンは選択されず、最も高い優先度の仮想マシン上で動作する、URLに対応したWebアプリケーションにより処理を実行し、処理結果がリクエスト転送部26へ送信される。   The processing using this priority information will be described. The request transfer unit 26 of the master HTTP server 21 acquires the priority information of the master virtual machine 20 from the virtual machine control unit 28, and the virtual machine that has not transferred the request. Select the highest priority among them and transfer the request. After that, when a status code having a special value set in advance, “900”, is received, the virtual machine having the next priority is selected and the request is transferred. If a special value status code is not received, the virtual machine with the next priority is not selected, and the process is executed by the Web application corresponding to the URL that operates on the virtual machine with the highest priority. The result is transmitted to the request transfer unit 26.

上記においてリクエストを再送する可能性がありうることを説明した。しかしながら、サーバ装置10内で利用可能な高速メモリ(RAM)には上限があり、リクエストをすべてこのRAMに保持することができない場合がある。そこで、RAMに保持するサイズの上限を設け、リクエストのサイズが上限を超える場合には、リクエスト保存部27は、その他のHDD等の記憶媒体に一時的に保存することができる。これにより、RAMのメモリサイズに制約がある場合でも、代わりとなる代替記憶媒体を利用することで、リクエストを再送することができる。   In the above, it has been explained that there is a possibility of resending a request. However, there is an upper limit to the high-speed memory (RAM) that can be used in the server device 10, and there are cases where all requests cannot be held in this RAM. Therefore, an upper limit is set for the size held in the RAM, and when the request size exceeds the upper limit, the request storage unit 27 can temporarily store it in another storage medium such as an HDD. Thereby, even when there is a restriction on the memory size of the RAM, the request can be retransmitted by using an alternative alternative storage medium.

アプリケーション管理部25に登録されたURLが同一で、リクエストを先に振り分けたワーカー仮想マシン30上に対応するWebアプリケーションが存在する場合、図7に示した処理となる。しかしながら、先に振り分けたワーカー仮想マシン30上に対応するWebアプリケーションが存在しない場合、図7と同様の処理にはならない。そこで、この場合の処理の流れを、図8を参照して説明する。   When the URL registered in the application management unit 25 is the same and there is a corresponding Web application on the worker virtual machine 30 to which the request has been distributed first, the processing shown in FIG. 7 is performed. However, when there is no corresponding Web application on the worker virtual machine 30 that has been distributed first, the same processing as in FIG. 7 is not performed. Therefore, the flow of processing in this case will be described with reference to FIG.

まず、クライアント装置11のHTTPクライアント100から、「GET /url/app3.cgi HTTP/1.1」のリクエストが送信されると(ステップS111)、HTTPサーバ21のリクエスト受信部23がこれを受け取り、そのリクエストを解釈する(ステップS112)。この場合、「ディレクトリ名urlのディレクトリにあるファイル名app3.cgiというファイルを転送規格HTTP/1.1で取得する」と解釈する。なお、リクエストされたファイル“app3.cgi”は、Webアプリケーション42aを指定するものとする。   First, when a request “GET /url/app3.cgi HTTP / 1.1” is transmitted from the HTTP client 100 of the client device 11 (step S111), the request receiving unit 23 of the HTTP server 21 receives the request and receives the request. Is interpreted (step S112). In this case, it is interpreted that “a file named app3.cgi in the directory of the directory name url is acquired by the transfer standard HTTP / 1.1”. The requested file “app3.cgi” designates the Web application 42a.

リクエスト受信部23は、リクエストを解釈した後、受け取ったリクエストをアプリケーション管理部25へ渡す(ステップS113)。アプリケーション管理部25は、リクエスト受信部23からリクエストを受け取ると、対応テーブルを参照し、このリクエストに含まれたURLに対応するWebアプリケーションを探索する(ステップS114)。この場合、URLに対応するWebアプリケーションはワーカー仮想マシン30またはワーカー仮想マシン40上で動作するアプリケーションであるため、マスター仮想マシン20上では見つからない。そのため、アプリケーション管理部25は、リクエスト転送部26に対し、ワーカー仮想マシン30上で動作するワーカーHTTPサーバ31またはワーカーHTTPサーバ41へリクエストを転送するよう依頼する(ステップS115)。   The request receiving unit 23 interprets the request and then passes the received request to the application management unit 25 (step S113). When receiving a request from the request reception unit 23, the application management unit 25 refers to the correspondence table and searches for a Web application corresponding to the URL included in the request (step S114). In this case, since the Web application corresponding to the URL is an application that operates on the worker virtual machine 30 or the worker virtual machine 40, it cannot be found on the master virtual machine 20. Therefore, the application management unit 25 requests the request transfer unit 26 to transfer the request to the worker HTTP server 31 or the worker HTTP server 41 operating on the worker virtual machine 30 (step S115).

リクエスト転送部26は、アプリケーション管理部25から転送の依頼を受け付けると、ワーカー仮想マシン30又は40が開いた内部ポートのポート番号に対してリクエストを転送する(ステップS116)。この場合もアプリケーション管理部25に登録されたURLが同じであることから、リクエスト転送部26は、予め設定された優先順位等に基づいて2つのワーカー仮想マシン30、40のどちらかへリクエストを転送する。また、後に残りの仮想マシンへリクエストを再送する可能性があるため、リクエスト転送部26は、受け付けたリクエストをリクエスト保存部27に送信することで(ステップS117)、このリクエストをリクエスト保存部27に一時的に保存する。   When receiving the transfer request from the application management unit 25, the request transfer unit 26 transfers the request to the port number of the internal port opened by the worker virtual machine 30 or 40 (step S116). Also in this case, since the URL registered in the application management unit 25 is the same, the request transfer unit 26 transfers the request to one of the two worker virtual machines 30 and 40 based on a preset priority order or the like. To do. Further, since there is a possibility that the request is retransmitted to the remaining virtual machines later, the request transfer unit 26 transmits the accepted request to the request storage unit 27 (step S117), and this request is sent to the request storage unit 27. Save temporarily.

ステップS116において、ワーカー仮想マシン30の優先順位がワーカー仮想マシン40よりも上位であった場合、リクエスト転送部26は、まず、ワーカー仮想マシン30の内部ポートのポート番号に対してリクエストを転送する。ワーカー仮想マシン30では、ワーカーHTTPサーバ31のリクエスト受信部33がリクエストを受け付けると、リクエスト受信部23と同様に解釈した後(ステップS118)、このリクエストをどのWebアプリケーションに振り分けるかを決定するため、アプリケーション管理部35に引き渡す(ステップS119)。   In step S <b> 116, when the priority order of the worker virtual machine 30 is higher than that of the worker virtual machine 40, the request transfer unit 26 first transfers the request to the port number of the internal port of the worker virtual machine 30. In the worker virtual machine 30, when the request receiving unit 33 of the worker HTTP server 31 accepts the request, the request is interpreted in the same manner as the request receiving unit 23 (step S118), and then it is determined to which web application the request is distributed. The application management unit 35 is handed over (step S119).

アプリケーション管理部35は、対応テーブルを参照し、リクエスト受信部33から受け付けたリクエストに含まれるURLに対応するWebアプリケーションを探索する(ステップS120)。しかしながら、ワーカー仮想マシン30上で動作するWebアプリケーション32a、32bの中には、リクエストされたURLに対応するWebアプリケーションは含まれていない。そこで、アプリケーション管理部35は、Webアプリケーション32aを介し、他のワーカー仮想マシン40にリクエストされたURLに対応するWebアプリケーションが存在するか否かを、RPC(VM間通信)を使用して問い合わせる(ステップS121、S122)。なお、ここではWebアプリケーション32aを介して問い合わせを行う態様としたが、これに限らず、ワーカー仮想マシン30上で動作する他のWebアプリケーション(32b)を介して問い合わせを行う態様としてもよい。   The application management unit 35 refers to the correspondence table and searches for a Web application corresponding to the URL included in the request received from the request reception unit 33 (step S120). However, the web applications 32a and 32b operating on the worker virtual machine 30 do not include a web application corresponding to the requested URL. Therefore, the application management unit 35 uses the RPC (inter-VM communication) to inquire whether there is a web application corresponding to the requested URL from the other worker virtual machine 40 via the web application 32a ( Steps S121 and S122). Note that, here, the inquiry is made via the Web application 32a. However, the invention is not limited to this, and the inquiry may be made via another Web application (32b) operating on the worker virtual machine 30.

一方、問い合わせを受け付けたワーカー仮想マシン40のWebアプリケーション42a(42b)では、リクエストされたURLに対応するWebアプリケーションが自身に該当するか否かを判定する(ステップS123)。ここで、自己のWebアプリケーションがリクエストされたURLに該当すると判定した場合、該当するWebアプリケーション42aは、当該URLに該当することを指示したレスポンス(TRUE)を、問い合わせを行ったWebアプリケーション32aに通知する(ステップS124)。なお、図8の場合、Webアプリケーション42bはリクエストされたURLに対応しないが、この場合、Webアプリケーション42bからはURLに該当しないことを指示するレスポンス(FALSE)が通知されるものとする。このように、リクエストが転送されたワーカーHTTPサーバのアプリケーション管理部は、他のワーカーHTTPサーバが対応するアプリケーションを有するか否かを調査するアプリケーション調査部として機能する。   On the other hand, the Web application 42a (42b) of the worker virtual machine 40 that has received the inquiry determines whether the Web application corresponding to the requested URL corresponds to itself (step S123). Here, when it is determined that the own Web application corresponds to the requested URL, the corresponding Web application 42a notifies the inquired Web application 32a of a response (TRUE) instructing that it corresponds to the URL. (Step S124). In the case of FIG. 8, the Web application 42b does not correspond to the requested URL, but in this case, the Web application 42b is notified of a response (FALSE) instructing that it does not correspond to the URL. As described above, the application management unit of the worker HTTP server to which the request has been transferred functions as an application survey unit that investigates whether or not another worker HTTP server has a corresponding application.

Webアプリケーション32aでは、他のワーカー仮想マシン40(Webアプリケーション42a)から、レスポンス(TRUE)を受け取ると(ステップS123)、リクエストされたURLに該当するWebアプリケーションが他のワーカー仮想マシンに存在すること示したレスポンスをアプリケーション管理部35に返す(ステップS125)。アプリケーション管理部35では、Webアプリケーション32aからレスポンスを受け付けると、このレスポンスをレスポンス送信部34に送信する(ステップS126)。レスポンス送信部34は、アプリケーション管理部35から受け付けたレスポンス(TRUE)に応じて、予め設定された特別な値のステータスコード(900 Forward Other)を、マスター仮想マシン20のリクエスト転送部26に送信する(ステップS127)。   When the web application 32a receives a response (TRUE) from another worker virtual machine 40 (web application 42a) (step S123), it indicates that the web application corresponding to the requested URL exists in the other worker virtual machine. The returned response is returned to the application management unit 35 (step S125). When receiving a response from the Web application 32a, the application management unit 35 transmits this response to the response transmission unit 34 (step S126). In response to the response (TRUE) received from the application management unit 35, the response transmission unit 34 transmits a preset special value status code (900 Forward Other) to the request transfer unit 26 of the master virtual machine 20. (Step S127).

リクエスト転送部26は、ワーカー仮想マシン30からステータスコードを受け付けると、このステータスコードが他のワーカー仮想マシンに存在することを示す特別な値、即ち、「900」であるか否かを判定する(ステップS128)。ここで、リクエスト転送部26は、ステータスコードが他のワーカー仮想マシンに存在することを示す特別な値であると判定すると、リクエスト保存部27に保持されたリクエストを読み込み(ステップS129)、次の優先順位のワーカー仮想マシン(ワーカー仮想マシン40)に対し、読み込んだリクエストを転送する(ステップS130)。このように、マスターHTTPサーバ21のリクエスト転送部26は、リクエストを転送したワーカーHTTPサーバから、他のワーカーHTTPサーバが対応するアプリケーションを有しているとのレスポンスを受信した場合にのみ、次の優先順位のワーカーHTTPサーバへリクエストを転送する。   Upon receiving the status code from the worker virtual machine 30, the request transfer unit 26 determines whether or not the status code is a special value indicating that the status code exists in another worker virtual machine, that is, “900” ( Step S128). If the request transfer unit 26 determines that the status code is a special value indicating that it exists in another worker virtual machine, the request transfer unit 26 reads the request held in the request storage unit 27 (step S129), and The read request is transferred to the priority worker virtual machine (worker virtual machine 40) (step S130). Thus, only when the request transfer unit 26 of the master HTTP server 21 receives a response from the worker HTTP server that transferred the request that the other worker HTTP server has a corresponding application, Forward the request to the priority worker HTTP server.

一方、ワーカー仮想マシン40では、リクエスト受信部43がリクエストを受信すると、リクエスト受信部23と同様に当該リクエストを解釈する(ステップS131)。次いで、リクエスト受信部43は、このリクエストをどのWebアプリケーションに振り分けるかを決定するため、アプリケーション管理部45に引き渡す(ステップS132)。アプリケーション管理部45は、対応テーブルを参照し、リクエスト受信部43から受け付けたリクエストに含まれるURLに対応するWebアプリケーションを探索する(ステップS133)。ここで、Webアプリケーション42aは、リクエストされた“app3.cgi”に対応するため、アプリケーション管理部45は、対応するWebアプリケーションがあると判断し、Webアプリケーション42aへ処理を依頼する(ステップS134)。   On the other hand, in the worker virtual machine 40, when the request receiving unit 43 receives the request, the request is interpreted in the same manner as the request receiving unit 23 (step S131). Next, the request reception unit 43 passes the request to the application management unit 45 in order to determine which Web application the request is distributed to (step S132). The application management unit 45 refers to the correspondence table and searches for a Web application corresponding to the URL included in the request received from the request reception unit 43 (step S133). Here, since the Web application 42a corresponds to the requested “app3.cgi”, the application management unit 45 determines that there is a corresponding Web application, and requests the Web application 42a to perform processing (step S134).

Webアプリケーション42aでは、依頼された処理を実行すると(ステップS135)、この処理結果とともに、リクエストに対する処理が成功した旨のステータスコード「200」をレスポンスとしてアプリケーション管理部45へ返す(ステップS136)。アプリケーション管理部45では、Webアプリケーション42aからレスポンスを受け付けると、このレスポンスをレスポンス送信部44へ送信する(ステップS137)。また、レスポンス送信部44は、アプリケーション管理部45からレスポンスを受け付けると、このレスポンスをマスター仮想マシン20のリクエスト転送部26へ送信する(ステップS138)。   When the requested processing is executed (step S135), the Web application 42a returns a status code “200” indicating that the processing with respect to the request has been successful to the application management unit 45 as a response (step S136). When receiving a response from the Web application 42a, the application management unit 45 transmits this response to the response transmission unit 44 (step S137). Further, when receiving a response from the application management unit 45, the response transmission unit 44 transmits this response to the request transfer unit 26 of the master virtual machine 20 (step S138).

一方、マスター仮想マシン20のリクエスト転送部26では、ステップS129で転送したリクエストに対するレスポンスを受け付けると、このレスポンスに含まれるステータスコードが他のワーカー仮想マシンに存在することを示す特別な値、即ち「900」であるか否かを判定する(ステップS139)。ステータスコードが特別な値でない場合(本処理では「200」)、リクエスト転送部26は、受け付けたレスポンスを、アプリケーション管理部25を介してレスポンス送信部24に送信する(ステップS140、S141)。次いで、レスポンス送信部24は、アプリケーション管理部25から受け付けたレスポンスをHTTPクライアント100に送信する(ステップS142)。   On the other hand, when the request transfer unit 26 of the master virtual machine 20 receives a response to the request transferred in step S129, a special value indicating that the status code included in this response exists in another worker virtual machine, that is, “ Whether or not “900” is determined (step S139). If the status code is not a special value (“200” in this process), the request transfer unit 26 transmits the received response to the response transmission unit 24 via the application management unit 25 (steps S140 and S141). Next, the response transmission unit 24 transmits the response received from the application management unit 25 to the HTTP client 100 (step S142).

なお、リクエストされたWebアプリケーションがいずれの仮想マシンにも存在しないような場合も想定される。そこで、図9を参照して、クライアント装置11のHTTPクライアント100から送信されたリクエスト(GET /url/app4.cgi HTTP/1.1)が、各仮想マシンのいずれのWebアプリケーションにも対応しない場合の処理の流れについて説明する。なお、リクエストで指定される“app4.cgi”は、Webアプリケーション22a〜22c、32a、32b、42a、42bの何れにも対応しないものとする。   A case where the requested Web application does not exist in any virtual machine is also assumed. Therefore, referring to FIG. 9, processing when the request (GET /url/app4.cgi HTTP / 1.1) transmitted from the HTTP client 100 of the client apparatus 11 does not correspond to any Web application of each virtual machine. The flow will be described. Note that “app4.cgi” specified in the request does not correspond to any of the Web applications 22a to 22c, 32a, 32b, 42a, and 42b.

クライアント装置11のHTTPクライアント100から、「GET /url/app4.cgi HTTP/1.1」を含んだリクエストが送信されると(ステップS151)、上記と同様に、マスター仮想マシン20のリクエスト受信部23は、そのリクエストを受信し、その内容を解釈する(ステップS152)。そして、リクエスト受信部23は、このリクエストをどのWebアプリケーションに振り分けるかを決定するため、アプリケーション管理部25に引き渡す(ステップS153)。   When a request including “GET / url / app4.cgi HTTP / 1.1” is transmitted from the HTTP client 100 of the client apparatus 11 (step S151), the request receiving unit 23 of the master virtual machine 20 is similar to the above. The request is received and the content is interpreted (step S152). Then, the request reception unit 23 delivers the request to the application management unit 25 in order to determine which Web application the request is distributed to (step S153).

アプリケーション管理部25は、対応テーブルを参照し、リクエスト受信部23から受け付けたリクエストに含まれるURLに対応するWebアプリケーションを探索する(ステップS154)。この場合、URLに対応するWebアプリケーションはマスター仮想マシン20上では見つからない。そのため、アプリケーション管理部25は、リクエスト転送部26に対し、ワーカー仮想マシン30上で動作するワーカーHTTPサーバ31またはワーカーHTTPサーバ41へリクエストを転送するよう依頼する(ステップS155)。   The application management unit 25 refers to the correspondence table and searches for a Web application corresponding to the URL included in the request received from the request reception unit 23 (step S154). In this case, the Web application corresponding to the URL cannot be found on the master virtual machine 20. Therefore, the application management unit 25 requests the request transfer unit 26 to transfer the request to the worker HTTP server 31 or the worker HTTP server 41 operating on the worker virtual machine 30 (step S155).

リクエスト転送部26は、アプリケーション管理部25から転送の依頼を受け付けると、ワーカー仮想マシン30又は40が開いた内部ポートのポート番号に対してリクエストを転送する(ステップS156)。この場合もアプリケーション管理部25に登録されたURLが同じであることから、リクエスト転送部26は、予め設定された優先順位等に基づいて2つのワーカー仮想マシン30、40のどちらかへリクエストを転送する。また、後に残りの仮想マシンへリクエストを再送する可能性があるため、リクエスト転送部26は、受け付けたリクエストをリクエスト保存部27に送信することで(ステップS157)、このリクエストをリクエスト保存部27に一時的に保存する。   When receiving the transfer request from the application management unit 25, the request transfer unit 26 transfers the request to the port number of the internal port opened by the worker virtual machine 30 or 40 (step S156). Also in this case, since the URL registered in the application management unit 25 is the same, the request transfer unit 26 transfers the request to one of the two worker virtual machines 30 and 40 based on a preset priority order or the like. To do. Further, since there is a possibility that the request will be retransmitted to the remaining virtual machines later, the request transfer unit 26 transmits the received request to the request storage unit 27 (step S157), and this request is sent to the request storage unit 27. Save temporarily.

ステップS156において、ワーカー仮想マシン30の優先順位がワーカー仮想マシン40よりも上位であった場合、リクエスト転送部26は、まず、ワーカー仮想マシン30の内部ポートのポート番号に対してリクエストを転送する。ワーカー仮想マシン30では、ワーカーHTTPサーバ31のリクエスト受信部33がリクエストを受け付けると、リクエスト受信部23と同様に解釈した後(ステップS158)、このリクエストをどのWebアプリケーションに振り分けるかを決定するため、アプリケーション管理部35に引き渡す(ステップS159)。   If the priority of the worker virtual machine 30 is higher than that of the worker virtual machine 40 in step S156, the request transfer unit 26 first transfers the request to the port number of the internal port of the worker virtual machine 30. In the worker virtual machine 30, when the request reception unit 33 of the worker HTTP server 31 receives the request, the request is interpreted in the same manner as the request reception unit 23 (step S158), and in order to determine which Web application the request is distributed to, The application management unit 35 is handed over (step S159).

アプリケーション管理部35は、対応テーブルを参照し、リクエスト受信部33から受け付けたリクエストに含まれるURLに対応するWebアプリケーションを探索する(ステップS160)。しかしながら、ワーカー仮想マシン30上で動作するWebアプリケーション32a、32bの中には、リクエストされたURLに対応するWebアプリケーションは含まれていない。そこで、アプリケーション管理部35は、Webアプリケーション32aを介し、他のワーカー仮想マシン40にリクエストされたURLに対応するWebアプリケーションが存在するか否かを、RPC(VM間通信)を使用して問い合わせる(ステップS161、S162)。なお、ここではWebアプリケーション32aを介して問い合わせを行う態様としたが、これに限らず、ワーカー仮想マシン30上で動作する他のWebアプリケーション(32b)を介して問い合わせを行う態様としてもよい。   The application management unit 35 refers to the correspondence table and searches for a Web application corresponding to the URL included in the request received from the request reception unit 33 (step S160). However, the web applications 32a and 32b operating on the worker virtual machine 30 do not include a web application corresponding to the requested URL. Therefore, the application management unit 35 uses the RPC (inter-VM communication) to inquire whether there is a web application corresponding to the requested URL from the other worker virtual machine 40 via the web application 32a ( Steps S161 and S162). Note that, here, the inquiry is made via the Web application 32a. However, the invention is not limited to this, and the inquiry may be made via another Web application (32b) operating on the worker virtual machine 30.

一方、問い合わせを受け付けたワーカー仮想マシン40のWebアプリケーション42a(42b)では、リクエストされたURLに対応するWebアプリケーションが自身に該当するか否かを判定する(ステップS163)。なお、本処理の場合、リクエストされたURLに該当するWebアプリケーションは存在しないため、Webアプリケーション42a(42b)は、リクエストされたURLに該当しないことを指示するレスポンス(FALSE)を、問い合わせを行ったWebアプリケーション32aに通知する(ステップS164)。   On the other hand, the Web application 42a (42b) of the worker virtual machine 40 that has received the inquiry determines whether the Web application corresponding to the requested URL corresponds to itself (step S163). In the case of this processing, since there is no Web application corresponding to the requested URL, the Web application 42a (42b) inquires a response (FALSE) instructing that it does not correspond to the requested URL. The web application 32a is notified (step S164).

Webアプリケーション32aでは、問い合わせを行ったワーカー仮想マシン40の全てのWebアプリケーション(42a、42b)からレスポンス(FALSE)の通知を受けると、リクエストされたURLに対応するWebアプリケーションが存在しないことを示したレスポンスをアプリケーション管理部35に返す(ステップS165)。アプリケーション管理部35では、Webアプリケーション32aからレスポンスを受け付けると、このレスポンスをレスポンス送信部34に送信する(ステップS166)。レスポンス送信部34は、アプリケーション管理部35から受け付けたレスポンス(FALSE)に応じて、HTTPプロトコルにて存在不明を表すステータスコード「404」を、マスター仮想マシン20のリクエスト転送部26にリクエスト転送部26に送信する(ステップS167)。   When the Web application 32a receives response (FALSE) notifications from all the Web applications (42a, 42b) of the worker virtual machine 40 that has inquired, it indicates that there is no Web application corresponding to the requested URL. A response is returned to the application management unit 35 (step S165). When receiving a response from the Web application 32a, the application management unit 35 transmits this response to the response transmission unit 34 (step S166). In response to the response (FALSE) received from the application management unit 35, the response transmission unit 34 sends the status code “404” indicating the presence unknown in the HTTP protocol to the request transfer unit 26 of the master virtual machine 20. (Step S167).

リクエスト転送部26は、ワーカー仮想マシン30からステータスコードを受け付けると、このステータスコードが他のワーカー仮想マシンに存在することを示す特別な値、即ち、「900」であるか否かを判定する(ステップS168)。ステータスコードが特別な値でない場合(本処理では「404」)、リクエスト転送部26は、受け付けたレスポンスを、アプリケーション管理部25を介してレスポンス送信部24に送信する(ステップS169、S170)。次いで、レスポンス送信部24は、受け付けたレスポンスをHTTPクライアント100に送信する(ステップS171)。   Upon receiving the status code from the worker virtual machine 30, the request transfer unit 26 determines whether or not the status code is a special value indicating that the status code exists in another worker virtual machine, that is, “900” ( Step S168). When the status code is not a special value (“404” in this process), the request transfer unit 26 transmits the received response to the response transmission unit 24 via the application management unit 25 (steps S169 and S170). Next, the response transmission unit 24 transmits the received response to the HTTP client 100 (step S171).

このように、マスターHTTPサーバ21のリクエスト転送部26は、リクエストを転送したワーカーHTTPサーバから、当該リクエストに対応するアプリケーションを有していないとのレスポンスを受信した場合、次の優先順位のワーカーHTTPサーバへリクエストを転送せず、対応するアプリケーションが存在しない旨のレスポンスをクライアントへ送信する。これにより、他の仮想マシンへ無駄にリクエストを転送することを防止することができ、Webブラウザへの応答を速くすることができる。   Thus, when the request transfer unit 26 of the master HTTP server 21 receives a response from the worker HTTP server that transferred the request that it does not have an application corresponding to the request, the worker HTTP of the next priority order. The request is not transferred to the server, and a response indicating that the corresponding application does not exist is sent to the client. As a result, it is possible to prevent a request from being transferred to another virtual machine unnecessarily, and to speed up the response to the Web browser.

以上のように、本実施形態によれば、マスターHTTPサーバ21では、対応テーブルと、HTTPクライアント100から受信したリクエストに含まれるURL(アドレス情報)とに基づいて、このリクエストを処理すべき仮想マシンを判別し、当該仮想マシンへ前記リクエストを転送する。これにより、複数の仮想マシンが動作する環境にその開発したWebアプリケーションを追加しても、HTTPクライアント100から受信したリクエストを適切に各仮想マシン上で動作するアプリケーションに振り分けることができる。   As described above, according to the present embodiment, the master HTTP server 21 is a virtual machine that should process this request based on the correspondence table and the URL (address information) included in the request received from the HTTP client 100. And the request is transferred to the virtual machine. As a result, even if the developed Web application is added to an environment where a plurality of virtual machines operate, the request received from the HTTP client 100 can be appropriately distributed to the applications operating on each virtual machine.

また、クライアント側では、HTTPサーバにアクセスするのみで、複数のワーカーHTTPサーバが提供するWebアプリケーションによるサービスを利用することができる。したがって、クライアントは、複数のHTTPサーバが動作していることを意識することなくサービスを利用することができる。   On the client side, a service by a Web application provided by a plurality of worker HTTP servers can be used only by accessing the HTTP server. Therefore, the client can use the service without being aware that a plurality of HTTP servers are operating.

これまで本発明を上述した実施の形態をもって説明してきたが、本発明は上述した実施の形態に限定されるものではなく、他の実施の形態、追加、変更、削除など、当業者が想到することができる範囲内で変更することができ、いずれの態様においても本発明の作用・効果を奏する限り、本発明の範囲に含まれるものである。   The present invention has been described with the above-described embodiments, but the present invention is not limited to the above-described embodiments, and those skilled in the art will conceive other embodiments, additions, changes, deletions, and the like. It can be changed within the range that can be performed, and any embodiment is included in the scope of the present invention as long as the operation and effect of the present invention are exhibited.

したがって、上記の処理をプログラムとして構成し、サーバ装置にそのプログラムを実行させることにより実現することもできる。これは、コンピュータ可読なプログラムとして、そのプログラムを格納したCD−ROMやメモリカード等の記録媒体として提供することもできる。   Therefore, the above processing can be implemented as a program and executed by causing the server device to execute the program. This can also be provided as a computer-readable program as a recording medium such as a CD-ROM or memory card storing the program.

本発明の情報処理装置の一実施形態としてサーバ装置を含むネットワーク機器の構成例を示した図である。It is the figure which showed the structural example of the network apparatus containing a server apparatus as one Embodiment of the information processing apparatus of this invention. 情報処理装置のモジュール構成を示した図である。It is the figure which showed the module structure of information processing apparatus. HTTPサーバの構成を示した図である。It is the figure which showed the structure of the HTTP server. マスターHTTPサーバへのWebアプリケーションの登録およびリクエスト処理の流れを示したシーケンス図である。It is the sequence figure which showed the flow of registration of a Web application to a master HTTP server, and a request process. マスター仮想マシン上に対応するWebアプリケーションが見つからない場合の処理の流れを示したシーケンス図である。It is the sequence diagram which showed the flow of the process when the corresponding Web application is not found on the master virtual machine. ワーカーHTTPサーバへのWebアプリケーションの登録およびリクエスト処理の流れを示したシーケンス図である。It is the sequence figure which showed the flow of registration of a Web application to a worker HTTP server, and a request process. 同一URLのWebアプリケーションを登録する処理およびリクエスト処理の流れを示したシーケンス図である。It is the sequence diagram which showed the flow of the process which registers the web application of the same URL, and a request process. 第1のワーカー仮想マシン上に対応するWebアプリケーションが見つからず、第2のワーカー仮想マシン上に対応するWebアプリケーションが見つかった場合のリクエスト処理の流れを示したシーケンス図である。FIG. 11 is a sequence diagram illustrating a flow of request processing when a corresponding Web application is not found on the first worker virtual machine and a corresponding Web application is found on the second worker virtual machine. いずれの仮想マシン上にも、対応するWebアプリケーションが存在しない場合のリクエスト処理の流れを示したシーケンス図である。It is the sequence diagram which showed the flow of the request processing when the corresponding web application does not exist on any virtual machine.

符号の説明Explanation of symbols

10 サーバ装置
11 クライアント装置
12 ネットワーク
20、30、40 仮想マシン
21、31、41 HTTPサーバ
22a、22b、22c、32a、32b、42a、42b Webアプリケーション
23、33、43 リクエスト受信部
24、34、44 レスポンス送信部
25、35、45 アプリケーション管理部
26 リクエスト転送部
27 リクエスト保存部
28 仮想マシン制御部
DESCRIPTION OF SYMBOLS 10 Server apparatus 11 Client apparatus 12 Network 20, 30, 40 Virtual machine 21, 31, 41 HTTP server 22a, 22b, 22c, 32a, 32b, 42a, 42b Web application 23, 33, 43 Request receiving part 24, 34, 44 Response transmitter
25, 35, 45 Application management unit 26 Request transfer unit 27 Request storage unit 28 Virtual machine control unit

Claims (13)

3つ以上の仮想マシンが動作する情報処理装置であって、
各前記仮想マシンは、自己の仮想マシン上で動作するアプリケーションの各々について、当該アプリケーションでの処理の対象となるファイル名及びファイル拡張子を登録した第1管理情報を保持し、この第1管理情報に基づいて、クライアントから受信したリクエストに含まれるファイル名及びファイル拡張子に対応するアプリケーションを、前記リクエストを処理するアプリケーションとして判別するアプリケーション管理部を含み、
前記複数の仮想マシンのうち、前記クライアントからリクエストを受信する一のマスター仮想マシンは、当該マスター仮想マシン以外の各ワーカー仮想マシンを識別するための識別情報と、当該ワーカー仮想マシン上で動作するアプリケーションの各々が処理の対象とするファイル拡張子とを少なくとも対応付けた第2管理情報を保持し、前記ワーカー仮想マシン上で動作するアプリケーションが処理の対象とするファイル拡張子を含んだリクエストを前記クライアントから受信した場合に、前記第2管理情報に基づいて、前記リクエストに含まれたファイル拡張子に対応する識別情報のワーカー仮想マシン宛に前記リクエストを転送するリクエスト転送部を更に備え、
前記マスター仮想マシンのリクエスト転送部は、前記リクエストに含まれたファイル識別子に対応する識別情報が前記第2管理情報に複数登録されている場合に、これら複数の識別情報のなかから所定の優先順位に基づいて選択した一の識別情報のワーカー仮想マシン宛に前記リクエストを転送し、
前記ワーカー仮想マシンの前記アプリケーション管理部は、前記第1管理情報に基づいて、前記マスター仮想マシンから転送された前記リクエストに含まれるファイル名及びファイル拡張子に対応するアプリケーションが自己のワーカー仮想マシン内に存在するか否かを判定し、存在していると判定した場合に、このアプリケーションを使用して前記リクエストを処理した結果を、前記マスター仮想マシンを介して前記クライアントに送信し、存在しないと判定した場合に、自己のワーカー仮想マシン以外の他のワーカー仮想マシン内に対応するアプリケーションが存在しているか否かを調査し、この調査結果を前記マスター仮想マシンへ送信し、
前記マスター仮想マシンのリクエスト転送部は、前記リクエストを転送した前記ワーカー仮想マシンから、当該ワーカー仮想マシン以外の他のワーカー仮想マシンに対応するアプリケーションが存在する旨の前記調査結果を受け付けた場合に、前記複数の識別情報のなかから選択した次の優先順位の識別情報のワーカー仮想マシン宛に前記リクエストを転送し、いずれのワーカー仮想マシンにも対応するアプリケーションが存在しない旨の前記調査結果を受け付けた場合に、前記次の優先順位のワーカー仮想マシンへ前記リクエストを転送せず、対応するアプリケーションが存在しない旨のレスポンスを前記クライアントに送信することを特徴とする情報処理装置。
An information processing apparatus in which three or more virtual machines operate,
Each of the virtual machines holds, for each application running on its own virtual machine, first management information in which a file name and a file extension to be processed by the application are registered. An application management unit for determining an application corresponding to the file name and file extension included in the request received from the client as an application for processing the request ,
Among the plurality of virtual machines, one master virtual machine that receives a request from the client includes identification information for identifying each worker virtual machine other than the master virtual machine, and an application that operates on the worker virtual machine. Each of which holds second management information associated with at least a file extension to be processed, and an application operating on the worker virtual machine sends a request including the file extension to be processed to the client A request transfer unit that forwards the request to the worker virtual machine of the identification information corresponding to the file extension included in the request based on the second management information,
When a plurality of pieces of identification information corresponding to file identifiers included in the request are registered in the second management information, the request transfer unit of the master virtual machine has a predetermined priority order from the plurality of pieces of identification information. Forwards the request to the worker virtual machine of one identity selected based on
The application management unit of the worker virtual machine has an application corresponding to the file name and file extension included in the request transferred from the master virtual machine based on the first management information. If it is determined that the request exists, the result of processing the request using this application is transmitted to the client via the master virtual machine. If determined, investigate whether there is a corresponding application in another worker virtual machine other than its own worker virtual machine, and send this investigation result to the master virtual machine,
When the request transfer unit of the master virtual machine receives the investigation result indicating that there is an application corresponding to a worker virtual machine other than the worker virtual machine from the worker virtual machine that transferred the request, The request is forwarded to the worker virtual machine of the next priority identification information selected from the plurality of identification information, and the investigation result indicating that there is no application corresponding to any worker virtual machine is accepted. In this case, the information processing apparatus is characterized in that the request is not transferred to the worker virtual machine having the next priority order, and a response indicating that there is no corresponding application is transmitted to the client .
前記仮想マシンは、自己の仮想マシン上で動作するHTTPサーバと、自己の仮想マシン上で動作する少なくとも一つの前記アプリケーションとを含み、The virtual machine includes an HTTP server running on its own virtual machine and at least one of the applications running on its own virtual machine,
前記HTTPサーバが、前記アプリケーション管理部と、前記リクエストを受信し当該リクエストに含まれた前記アドレス情報を抽出するリクエスト受信部と、前記アプリケーションによる処理結果をレスポンスとして送信するリクエスト送信部とを含み、The HTTP server includes the application management unit, a request reception unit that receives the request and extracts the address information included in the request, and a request transmission unit that transmits a processing result by the application as a response,
前記マスター仮想マシンに含まれるHTTPサーバが、前記リクエストを転送する前記リクエスト転送部を備えるマスターHTTPサーバとされ、前記ワーカー仮想マシンに含まれるHTTPサーバが、転送された前記リクエストを処理し、処理結果を送信するワーカーHTTPサーバとされる請求項1に記載の情報処理装置。The HTTP server included in the master virtual machine is a master HTTP server including the request transfer unit that transfers the request, and the HTTP server included in the worker virtual machine processes the transferred request, and the processing result The information processing apparatus according to claim 1, wherein the information processing apparatus is a worker HTTP server that transmits.
前記マスターHTTPサーバは、前記ワーカーHTTPサーバへHTTPを用いて前記リクエストを転送する請求項2に記載の情報処理装置。The information processing apparatus according to claim 2, wherein the master HTTP server transfers the request to the worker HTTP server using HTTP. 前記マスターHTTPサーバは、前記情報処理装置の外部と通信を行うために外部ポートを使用し、The master HTTP server uses an external port to communicate with the outside of the information processing apparatus,
前記ワーカーHTTPサーバは、前記情報処理装置の内部で前記マスターHTTPサーバと通信を行うために内部ポートと、前記情報処理装置自身を識別するループバックアドレスとを使用して、前記リクエストを受信し、前記リクエストに対する処理結果を送信する請求項3に記載の情報処理装置。The worker HTTP server receives the request using an internal port and a loopback address for identifying the information processing device itself to communicate with the master HTTP server inside the information processing device, The information processing apparatus according to claim 3, wherein a processing result for the request is transmitted.
前記ワーカーHTTPサーバは、リモートプロシージャコールを使用して自己の仮想マシン上で動作するアプリケーションのURLを取得し、当該URLを前記マスター仮想マシンの前記第2管理情報に登録させる、請求項2〜4のいずれか一項に記載の情報処理装置。The worker HTTP server acquires a URL of an application running on its own virtual machine using a remote procedure call, and registers the URL in the second management information of the master virtual machine. The information processing apparatus according to any one of the above. 前記マスターHTTPサーバの前記リクエスト転送部は、複数の前記ワーカーHTTPサーバから同一の前記URLを取得した場合に、これらワーカーHTTPサーバの各々と通信を行うための内部ポートを前記識別情報として、同一の前記URLと対応付けて前記第2管理情報に登録する請求項5に記載の情報処理装置。The request transfer unit of the master HTTP server, when acquiring the same URL from a plurality of worker HTTP servers, uses the same internal port for communicating with each of the worker HTTP servers as the identification information. The information processing apparatus according to claim 5, wherein the information processing apparatus registers the second management information in association with the URL. 前記マスターHTTPサーバは、前記クライアントから受信した前記リクエストを保存するリクエスト保存部と、複数の前記ワーカーHTTPサーバへリクエストを転送する優先順位に関する優先度情報を保存する仮想マシン制御部とをさらに含む請求項6に記載の情報処理装置。The master HTTP server further includes a request storage unit that stores the request received from the client, and a virtual machine control unit that stores priority information related to a priority order of transferring requests to the plurality of worker HTTP servers. Item 7. The information processing device according to Item 6. 前記マスターHTTPサーバの前記リクエスト転送部は、前記リクエストを転送した前記ワーカーHTTPサーバから、他の前記ワーカーHTTPサーバが対応するアプリケーションを有しているとのレスポンスを受信した場合にのみ、次の優先順位の前記ワーカーHTTPサーバへ前記リクエストを転送し、前記対応するアプリケーションを有していないとのレスポンスを受信した場合には、前記次の優先順位の前記ワーカーHTTPサーバへ前記リクエストを転送せず、前記対応するアプリケーションが存在しない旨のレスポンスを前記クライアントへ送信し、The request transfer unit of the master HTTP server has the following priority only when receiving a response from the worker HTTP server that transferred the request that the other worker HTTP server has a corresponding application. When the request is transferred to the worker HTTP server of the rank and a response indicating that the corresponding application is not received is received, the request is not transferred to the worker HTTP server of the next priority, A response indicating that the corresponding application does not exist is sent to the client;
前記リクエストが転送された前記ワーカーHTTPサーバの前記アプリケーション管理部は、前記他のワーカーHTTPサーバが前記対応するアプリケーションを有するか否かを調査するアプリケーション調査部として機能し、前記アプリケーション調査部が、前記他のワーカーHTTPサーバが前記対応するアプリケーションを有することを検出した場合には、前記対応するアプリケーションが存在する旨のレスポンスを送信し、検出しない場合には、前記対応するアプリケーションが存在しない旨のレスポンスを送信する請求項6に記載の情報処理装置。The application management unit of the worker HTTP server to which the request has been transferred functions as an application survey unit that investigates whether the other worker HTTP server has the corresponding application, When it is detected that another worker HTTP server has the corresponding application, a response indicating that the corresponding application exists is transmitted, and when not detected, a response indicating that the corresponding application does not exist The information processing apparatus according to claim 6, which transmits
3つ以上の仮想マシンが動作する情報処理装置で実行される情報処理方法であって、An information processing method executed by an information processing apparatus in which three or more virtual machines operate,
各前記仮想マシンは、自己の仮想マシン上で動作するアプリケーションの各々について、当該アプリケーションでの処理の対象となるファイル名及びファイル拡張子を登録した第1管理情報を保持し、前記複数の仮想マシンの一つであるマスター仮想マシンは、さらに、他の仮想マシンである各ワーカー仮想マシンを識別するための識別情報と、当該ワーカー仮想マシン上で動作するアプリケーションの各々が処理の対象とするファイル拡張子とを少なくとも対応付けた第2管理情報を保持し、Each of the virtual machines holds, for each of the applications running on its own virtual machine, first management information in which file names and file extensions to be processed by the application are registered, and the plurality of virtual machines The master virtual machine, which is one of the above, further includes identification information for identifying each worker virtual machine that is another virtual machine, and file extension that each of the applications running on the worker virtual machine processes. Holding the second management information associated with at least the child,
前記マスター仮想マシンにおいて、前記ワーカー仮想マシン上で動作するアプリケーションが処理の対象とするファイル拡張子を含んだリクエストを前記クライアントから受信した場合に、このリクエストに含まれたファイル拡張子に対応する識別情報が前記第2管理情報に複数登録されているか否かを判定する第1判定ステップと、In the master virtual machine, when a request including a file extension to be processed by an application running on the worker virtual machine is received from the client, an identification corresponding to the file extension included in the request is received. A first determination step of determining whether a plurality of pieces of information are registered in the second management information;
前記第1判定ステップにおいて、一の識別情報のみ登録されていると判定された場合に、この識別情報のワーカー仮想マシン宛に前記リクエストを転送し、複数の識別情報が登録されていると判定された場合に、所定の優先順位に基づいてこれら複数の識別情報のなかから選択した一の識別情報のワーカー仮想マシン宛に前記リクエストを転送する転送ステップと、In the first determination step, when it is determined that only one piece of identification information is registered, the request is transferred to the worker virtual machine of this identification information, and it is determined that a plurality of pieces of identification information are registered. A transfer step of transferring the request to the worker virtual machine of one identification information selected from among the plurality of identification information based on a predetermined priority,
前記ワーカー仮想マシンにおいて、前記第1管理情報に基づき、前記マスター仮想マシンから転送された前記リクエストに含まれるファイル名及びファイル拡張子に対応するアプリケーションが自己のワーカー仮想マシン内に存在するか否かを判定する第2判定ステップと、In the worker virtual machine, whether or not an application corresponding to the file name and the file extension included in the request transferred from the master virtual machine exists in the worker virtual machine based on the first management information A second determination step for determining
前記第2判定ステップにおいて、対応するアプリケーションが存在していると判定された場合に、このアプリケーションを使用して前記リクエストを処理した結果を、前記マスター仮想マシンを介して前記クライアントに送信し、対応するアプリケーションが存在しないと判定された場合に、自己のワーカー仮想マシン以外の他のワーカー仮想マシン内に対応するアプリケーションが存在しているか否かを調査し、この調査結果を前記マスター仮想マシンに送信する第1送信ステップと、In the second determination step, when it is determined that the corresponding application exists, the result of processing the request using the application is transmitted to the client via the master virtual machine, and the response When it is determined that there is no application to be checked, it is investigated whether there is a corresponding application in another worker virtual machine other than its own worker virtual machine, and the result is sent to the master virtual machine. A first transmitting step,
前記マスター仮想マシンにおいて、前記リクエストを転送した前記ワーカー仮想マシンから、当該ワーカー仮想マシン以外の他のワーカー仮想マシンに対応するアプリケーションが存在する旨の前記調査結果を受け付けた場合に、前記複数の識別情報のなかから選択した次の優先順位の識別情報のワーカー仮想マシン宛に前記リクエストを転送し、いずれのワーカー仮想マシンにも対応するアプリケーションが存在しない旨の前記調査結果を受け付けた場合に、前記次の優先順位のワーカー仮想マシンへ前記リクエストを転送せず、対応するアプリケーションが存在しない旨のレスポンスを前記クライアントに送信する第2送信ステップと、In the master virtual machine, when the investigation result indicating that there is an application corresponding to another worker virtual machine other than the worker virtual machine is received from the worker virtual machine that transferred the request, the plurality of identifications When the request is forwarded to the worker virtual machine of the next priority identification information selected from the information, and when the investigation result indicating that there is no application corresponding to any worker virtual machine is received, A second transmission step of not transmitting the request to a worker virtual machine of the next priority and transmitting a response to the effect that there is no corresponding application to the client;
を含む情報処理方法。An information processing method including:
前記転送ステップでは、前記マスター仮想マシンから前記ワーカー仮想マシンへHTTPを用いて前記リクエストを転送する請求項9に記載の情報処理方法。The information processing method according to claim 9, wherein in the transfer step, the request is transferred from the master virtual machine to the worker virtual machine using HTTP. 前記ワーカー仮想マシンにおいて、リモートプロシージャコールを使用して自己のワーカー仮想マシン上で動作するアプリケーションのURLを取得する取得ステップを更に含み、The worker virtual machine further includes obtaining a URL of an application running on the worker virtual machine using a remote procedure call.
前記マスター仮想マシンにおいて、前記取得ステップで取得された前記URLを、当該URLを取得した前記マスター仮想マシンの識別情報と対応付けて前記第2管理情報に登録する登録ステップを更に含む請求項9又は10に記載の情報処理方法。  The registration method further includes a registration step of registering the URL acquired in the acquisition step in the second management information in the master virtual machine in association with identification information of the master virtual machine that acquired the URL. 10. The information processing method according to 10.
前記マスター仮想マシンの前記登録ステップにおいて、複数の前記ワーカー仮想マシンから同一の前記URLを取得した場合に、これらワーカー仮想マシン各々の前記識別情報と同一の前記URLとを対応付けて前記第2管理情報に登録する請求項11に記載の情報処理方法。In the registration step of the master virtual machine, when the same URL is obtained from a plurality of the worker virtual machines, the second management is performed by associating the identification information of each of the worker virtual machines with the same URL. The information processing method according to claim 11, registered in information. 3つ以上の仮想マシンが動作する情報処理装置により読み取り可能な、クライアントからのリクエストを処理するためのプログラムであって、A program for processing a request from a client that can be read by an information processing apparatus in which three or more virtual machines operate,
各前記仮想マシンは、自己の仮想マシン上で動作するアプリケーションの各々について、当該アプリケーションでの処理の対象となるファイル名及びファイル拡張子を登録した第1管理情報を保持し、前記複数の仮想マシンの一つであるマスター仮想マシンは、さらに、他の仮想マシンである各ワーカー仮想マシンを識別するための識別情報と、当該ワーカー仮想マシン上で動作するアプリケーションの各々が処理の対象とするファイル拡張子とを少なくとも対応付けた第2管理情報を保持し、Each of the virtual machines holds, for each of the applications running on its own virtual machine, first management information in which file names and file extensions to be processed by the application are registered, and the plurality of virtual machines The master virtual machine, which is one of the above, further includes identification information for identifying each worker virtual machine that is another virtual machine, and file extension that each of the applications running on the worker virtual machine processes. Holding the second management information associated with at least the child,
前記マスター仮想マシンにおいて、前記ワーカー仮想マシン上で動作するアプリケーションが処理の対象とするファイル拡張子を含んだリクエストを前記クライアントから受信した場合に、このリクエストに含まれたファイル拡張子に対応する識別情報が前記第2管理情報に複数登録されているか否かを判定する第1判定ステップと、In the master virtual machine, when a request including a file extension to be processed by an application running on the worker virtual machine is received from the client, an identification corresponding to the file extension included in the request is received. A first determination step of determining whether a plurality of pieces of information are registered in the second management information;
前記第1判定ステップにおいて、一の識別情報のみ登録されていると判定された場合に、この識別情報のワーカー仮想マシン宛に前記リクエストを転送し、複数の識別情報が登録されていると判定された場合に、所定の優先順位に基づいてこれら複数の識別情報のなかから選択した一の識別情報のワーカー仮想マシン宛に前記リクエストを転送する転送ステップと、In the first determination step, when it is determined that only one piece of identification information is registered, the request is transferred to the worker virtual machine of this identification information, and it is determined that a plurality of pieces of identification information are registered. A transfer step of transferring the request to the worker virtual machine of one identification information selected from among the plurality of identification information based on a predetermined priority,
前記ワーカー仮想マシンにおいて、前記第1管理情報に基づき、前記マスター仮想マシンから転送された前記リクエストに含まれるファイル名及びファイル拡張子に対応するアプリケーションが自己のワーカー仮想マシン内に存在するか否かを判定する第2判定ステップと、In the worker virtual machine, whether or not an application corresponding to the file name and the file extension included in the request transferred from the master virtual machine exists in the worker virtual machine based on the first management information A second determination step for determining
前記第2判定ステップにおいて、対応するアプリケーションが存在していると判定された場合に、このアプリケーションを使用して前記リクエストを処理した結果を、前記マスター仮想マシンを介して前記クライアントに送信し、対応するアプリケーションが存在しないと判定された場合に、自己のワーカー仮想マシン以外の他のワーカー仮想マシン内に対応するアプリケーションが存在しているか否かを調査し、この調査結果を前記マスター仮想マシンに送信する第1送信ステップと、In the second determination step, when it is determined that the corresponding application exists, the result of processing the request using the application is transmitted to the client via the master virtual machine, and the response When it is determined that there is no application to be checked, it is investigated whether there is a corresponding application in another worker virtual machine other than its own worker virtual machine, and the result is sent to the master virtual machine. A first transmitting step,
前記マスター仮想マシンにおいて、前記リクエストを転送した前記ワーカー仮想マシンから、当該ワーカー仮想マシン以外の他のワーカー仮想マシンに対応するアプリケーションが存在する旨の前記調査結果を受け付けた場合に、前記複数の識別情報のなかから選択した次の優先順位の識別情報のワーカー仮想マシン宛に前記リクエストを転送し、いずれのワーカー仮想マシンにも対応するアプリケーションが存在しない旨の前記調査結果を受け付けた場合に、前記次の優先順位のワーカー仮想マシンへ前記リクエストを転送せず、対応するアプリケーションが存在しない旨のレスポンスを前記クライアントに送信する第2送信ステップと、In the master virtual machine, when the investigation result indicating that there is an application corresponding to another worker virtual machine other than the worker virtual machine is received from the worker virtual machine that transferred the request, the plurality of identifications When the request is forwarded to the worker virtual machine of the next priority identification information selected from the information, and when the investigation result indicating that there is no application corresponding to any worker virtual machine is received, A second transmission step of not transmitting the request to a worker virtual machine of the next priority and transmitting a response to the effect that there is no corresponding application to the client;
を前記情報処理装置に実行させるためのプログラム。For causing the information processing apparatus to execute the program.
JP2008168553A 2007-11-26 2008-06-27 Information processing apparatus, information processing method, and program Expired - Fee Related JP4627789B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008168553A JP4627789B2 (en) 2007-11-26 2008-06-27 Information processing apparatus, information processing method, and program
US12/261,795 US8239862B2 (en) 2007-11-26 2008-10-30 Apparatus, method, and computer program product for processing information

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2007303914 2007-11-26
JP2008168553A JP4627789B2 (en) 2007-11-26 2008-06-27 Information processing apparatus, information processing method, and program

Publications (2)

Publication Number Publication Date
JP2009151744A JP2009151744A (en) 2009-07-09
JP4627789B2 true JP4627789B2 (en) 2011-02-09

Family

ID=40920782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008168553A Expired - Fee Related JP4627789B2 (en) 2007-11-26 2008-06-27 Information processing apparatus, information processing method, and program

Country Status (1)

Country Link
JP (1) JP4627789B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120246740A1 (en) * 2011-03-22 2012-09-27 Brooker Marc J Strong rights management for computing application functionality
JP6057666B2 (en) * 2012-10-25 2017-01-11 キヤノン株式会社 Image forming apparatus, information processing method, and program
JP6337437B2 (en) 2013-09-30 2018-06-06 富士通株式会社 Information processing apparatus, information processing system, and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000057112A (en) * 1998-08-11 2000-02-25 Fuji Xerox Co Ltd Method for executing remote procedure call on network, and network system capable of executing remote procedure call
JP2004192449A (en) * 2002-12-12 2004-07-08 Toshiba Corp Load distribution method for web client/server system, load distribution system, and load distribution program
JP2005092811A (en) * 2003-09-19 2005-04-07 Ricoh Co Ltd Built-in apparatus having www server function, http request distribution method and program, and web system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04322359A (en) * 1991-04-23 1992-11-12 Nec Corp Program remote execution system
JPH10334058A (en) * 1997-05-27 1998-12-18 Shikoku Nippon Denki Software Kk On-line system and load dispersing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000057112A (en) * 1998-08-11 2000-02-25 Fuji Xerox Co Ltd Method for executing remote procedure call on network, and network system capable of executing remote procedure call
JP2004192449A (en) * 2002-12-12 2004-07-08 Toshiba Corp Load distribution method for web client/server system, load distribution system, and load distribution program
JP2005092811A (en) * 2003-09-19 2005-04-07 Ricoh Co Ltd Built-in apparatus having www server function, http request distribution method and program, and web system

Also Published As

Publication number Publication date
JP2009151744A (en) 2009-07-09

Similar Documents

Publication Publication Date Title
EP0817043B1 (en) Apparatus and method for operating an aggregation of server computers using a dual-role proxy server computer
US5818448A (en) Apparatus and method for identifying server computer aggregation topologies
JP5123800B2 (en) Information processing apparatus, information processing method, and program
JP6092249B2 (en) Virtual channel for embedded process communication
JP3853592B2 (en) Distributed web application server
JP4729172B2 (en) Method and apparatus for performing transactions in a stateless web environment that supports a declarative paradigm
JP3853593B2 (en) Method and apparatus for implementing an extensible authentication mechanism in a web application server
US9183066B2 (en) Downloadable smart proxies for performing processing associated with a remote procedure call in a distributed system
KR20190085108A (en) Run code on demand with localized device controller
US9398084B2 (en) Information processing system
CN110352401B (en) Local device coordinator with on-demand code execution capability
US20180011749A1 (en) System and method for extending a web service environment to support scalable asynchronous clients
JPH1083308A (en) Subsystem, method, and recording medium for stab retrieval and loading
JP5970559B2 (en) Remote network management system and operation method thereof
US20030055862A1 (en) Methods, systems, and articles of manufacture for managing systems using operation objects
US7500251B2 (en) Method and system for managing programs for web service system
US20180234517A1 (en) Redirecting scanners and printers over a wan
US8239862B2 (en) Apparatus, method, and computer program product for processing information
US20020046228A1 (en) Method and system for facilitating access to a lookup service
JP4627789B2 (en) Information processing apparatus, information processing method, and program
US7089263B2 (en) Apparatus and method for dynamically verifying information in a distributed system
TW582147B (en) Inbound connector
WO1999044134A1 (en) Method and system for facilitating access to a lookup service
JP6205013B1 (en) Application usage system
EP1058880A1 (en) Downloadable smart proxies for performing processing associated with a remote procedure call in a distributed system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091022

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091117

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100824

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101014

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: 20101102

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: 20101108

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131119

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4627789

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees