JP2005173823A - Web application, and data sharing method and program thereof - Google Patents
Web application, and data sharing method and program thereof Download PDFInfo
- Publication number
- JP2005173823A JP2005173823A JP2003410609A JP2003410609A JP2005173823A JP 2005173823 A JP2005173823 A JP 2005173823A JP 2003410609 A JP2003410609 A JP 2003410609A JP 2003410609 A JP2003410609 A JP 2003410609A JP 2005173823 A JP2005173823 A JP 2005173823A
- Authority
- JP
- Japan
- Prior art keywords
- web
- session
- file
- processing
- data
- 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.)
- Pending
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、Webアプリケーション及びそのデータ共有方法、並びにプログラムに関し、特に、複数のWebサーバから構成されるWebサーバクラスタ上で動作するWebアプリケーション及びそのデータ共有方法、並びにプログラムに関する。 The present invention relates to a web application and its data sharing method and program, and more particularly to a web application and its data sharing method and program that operate on a web server cluster composed of a plurality of web servers.
従来、複数のWebサーバから構成されるWebサーバクラスタ上でWebアプリケーションを動作させる場合、共有ディスク装置等の特別なハードウエアを用いて、Webアプリケーションが動作するために必要な情報を共有するのが普通であったが(例えば、特許文献1参照)、共有ディスク装置等は一般に高価であるため、このような装置を用いずともWebサーバクラスタ上でWebアプリケーションを動作させたいという要望があった。 Conventionally, when a Web application is operated on a Web server cluster composed of a plurality of Web servers, information necessary for the Web application to operate is shared using special hardware such as a shared disk device. Although it is normal (see, for example, Patent Document 1), since a shared disk device or the like is generally expensive, there has been a demand for operating a Web application on a Web server cluster without using such a device.
一方、OS(オペレーティングシステム)には、Webサーバクラスタ上のWebサーバの夫々が保有するファイルのうち、他のWebサーバからのアクセスが不能であるファイル(以下「ローカルファイル」という。)を、Webサーバクラスタ上のWebサーバの全てからのアクセスが可能であるファイル(以下「共有ファイル」という。)に設定変更する機能がある。 On the other hand, in the OS (operating system), among files held by each of the Web servers on the Web server cluster, files that cannot be accessed from other Web servers (hereinafter referred to as “local files”) are stored on the Web. There is a function of changing the setting to a file (hereinafter referred to as “shared file”) that can be accessed from all of the Web servers on the server cluster.
従って、このOSの機能を用いることにより、共有ディスク装置のような特別なハードウェアを用いなくても、Webアプリケーションが動作するために必要な情報をWebサーバクラスタ上のWebサーバが共有することができる。
しかしながら、Webサーバクラスタ上のWebサーバの夫々が自己のローカルファイルにアクセスする処理と比べて、共有ファイルにアクセスする処理は時間がかかるので、共有ファイルにWebサーバがアクセスする頻度が多くなると、Webアプリケーションの応答速度が低下してしまうという問題がある。 However, the process of accessing a shared file takes longer than the process of each of the web servers on the web server cluster accessing its own local file. Therefore, if the frequency at which the web server accesses the shared file increases, There is a problem that the response speed of the application decreases.
本発明は、共有ファイルへのWebサーバのアクセスを最低限に抑えることにより、応答速度の低下を防止できるWebアプリケーション及びそのデータ共有方法、並びにプログラムを提供することを目的とする。 It is an object of the present invention to provide a Web application, a data sharing method, and a program that can prevent the response speed from being lowered by minimizing the access of the Web server to the shared file.
請求項1記載のWebアプリケーションは、複数のWebサーバにより構成され、複数のWebクライアントとセッションを行うWebサーバクラスタ上で、セッション中のWebクライアントから受信したHTTPリクエストの要求処理を実行するWebアプリケーションにおいて、前記Webサーバクラスタは、前記複数のWebサーバの全てで共有する第1のファイルと、前記複数のWebサーバの夫々が有するファイルであって、他のWebサーバからのアクセスが不能な第2のファイルとを備え、前記複数のWebクライアントのいずれか1つとのセッションの開始時に、当該セッションが終了するまで、前記複数のWebクライアントのいずれか1つからのHTTPリクエストの要求処理を実行するWebサーバを前記複数のWebサーバのいずれか1つに割り振るセッション時処理割振手段と、前記セッション中のWebクライアントからのHTTPリクエストが前記Webサーバクラスタに送信されたときに、前記割り振られたWebサーバの有する前記第2のファイルに前記第1のファイルのデータをコピーするデータコピー手段と、前記セッション中のWebクライアントからのHTTPリクエストの要求処理により前記第1のファイルのデータを更新する必要がない場合、前記第2のファイルにコピーされたデータを用いて前記要求処理を実行する要求処理実行手段とを備えることを特徴とする。 The Web application according to claim 1 is a Web application configured by a plurality of Web servers and executing processing for requesting an HTTP request received from a Web client in session on a Web server cluster that performs a session with a plurality of Web clients. The Web server cluster includes a first file shared by all of the plurality of Web servers and a file included in each of the plurality of Web servers, and the second file cannot be accessed from other Web servers. A Web server that executes a request process for an HTTP request from any one of the plurality of Web clients at the start of a session with any one of the plurality of Web clients until the session ends. The plurality of W b) session allocation processing means for allocating to any one of the servers, and when the HTTP request from the Web client in the session is transmitted to the Web server cluster, the second Web server has the second When it is not necessary to update the data of the first file by the request processing of the HTTP request from the Web client in the session and the data copy means for copying the data of the first file to the file, the second file Request processing executing means for executing the request processing using data copied to a file.
請求項2記載のWebアプリケーションは、請求項1記載のWebアプリケーションにおいて、前記セッション中のWebクライアントからのHTTPリクエストの要求処理により前記第1のファイルのデータを更新する必要があるとき、前記第1のファイル及び前記第2のファイルのデータを共に更新することを特徴とする。 When the web application according to claim 2 needs to update data of the first file by request processing of an HTTP request from the web client during the session in the web application according to claim 1, the first application Both the file and the data of the second file are updated.
請求項3記載のデータ共有方法は、複数のWebサーバにより構成され、複数のWebクライアントとセッションを行うWebサーバクラスタ上で、セッション中のWebクライアントから受信したHTTPリクエストの要求処理を実行するデータ共有方法において、前記Webサーバクラスタは、前記複数のWebサーバの全てで共有する第1のファイルと、前記複数のWebサーバの夫々が有するファイルであって、他のWebサーバからのアクセスが不能な第2のファイルとを備え、前記複数のWebクライアントのいずれか1つとのセッションの開始時に、当該セッションが終了するまで、前記複数のWebクライアントのいずれか1つからのHTTPリクエストの要求処理を実行するWebサーバを前記複数のWebサーバのいずれか1つに割り振るセッション時処理割振ステップと、前記セッション中のWebクライアントからのHTTPリクエストが前記Webサーバクラスタに送信されたときに、前記割り振られたWebサーバの有する前記第2のファイルに前記第1のファイルのデータをコピーするデータコピーステップと、前記セッション中のWebクライアントからのHTTPリクエストの要求処理により前記第1のファイルのデータを更新する必要がない場合、前記第2のファイルにコピーされたデータを用いて前記要求処理を実行する要求処理実行ステップとを有することを特徴とする。 The data sharing method according to claim 3, comprising: a plurality of Web servers, and data sharing for executing a request process for an HTTP request received from a Web client in session on a Web server cluster that performs a session with a plurality of Web clients. In the method, the Web server cluster includes a first file shared by all of the plurality of Web servers and a file included in each of the plurality of Web servers, and cannot be accessed from other Web servers. 2, and at the start of a session with any one of the plurality of Web clients, the HTTP request request processing from any one of the plurality of Web clients is executed until the session ends. Any of the plurality of Web servers A session time allocation step for allocating to one, and when the HTTP request from the web client in the session is transmitted to the web server cluster, the second file of the allocated web server is added to the second file. When it is not necessary to update the data of the first file by the data copy step of copying the data of one file and the request processing of the HTTP request from the Web client during the session, the data is copied to the second file. And a request processing execution step for executing the request processing using the obtained data.
請求項4記載のデータ共有方法は、請求項3記載のデータ共有方法において、前記セッション中のWebクライアントからのHTTPリクエストの要求処理により前記第1のファイルのデータを更新する必要があるとき、前記第1のファイル及び前記第2のファイルのデータを共に更新することを特徴とする。 The data sharing method according to claim 4, wherein in the data sharing method according to claim 3, when it is necessary to update data of the first file by request processing of an HTTP request from the Web client in the session, The data of the first file and the second file are updated together.
請求項5記載のプログラムは、複数のWebサーバにより構成され、複数のWebクライアントとセッションを行うWebサーバクラスタ上で、セッション中のWebクライアントから受信したHTTPリクエストの要求処理を実行するデータ共有方法をコンピュータに実行させることを特徴とするプログラムにおいて、前記Webサーバクラスタは、前記複数のWebサーバの全てで共有する第1のファイルと、前記複数のWebサーバの夫々が有するファイルであって、他のWebサーバからのアクセスが不能な第2のファイルとを備え、前記複数のWebクライアントのいずれか1つとのセッションの開始時に、当該セッションが終了するまで、前記複数のWebクライアントのいずれか1つからのHTTPリクエストの要求処理を実行するWebサーバを前記複数のWebサーバのいずれか1つに割り振るセッション時処理割振モジュールと、前記セッション中のWebクライアントからのHTTPリクエストが前記Webサーバクラスタに送信されたときに、前記割り振られたWebサーバの有する前記第2のファイルに前記第1のファイルのデータをコピーするデータコピーモジュールと、前記セッション中のWebクライアントからのHTTPリクエストの要求処理により前記第1のファイルのデータを更新する必要がない場合、前記第2のファイルにコピーされたデータを用いて前記要求処理を実行する要求処理実行モジュールとを有することを特徴とする。 According to a fifth aspect of the present invention, there is provided a data sharing method for executing processing for requesting an HTTP request received from a Web client in a session on a Web server cluster configured by a plurality of Web servers and performing a session with a plurality of Web clients. In the program that is executed by a computer, the Web server cluster includes a first file shared by all of the plurality of Web servers, and a file included in each of the plurality of Web servers, A second file that cannot be accessed from a Web server, and at the start of a session with any one of the plurality of Web clients, from any one of the plurality of Web clients until the session ends. Execute HTTP request request processing A session processing allocation module that allocates a Web server to be assigned to any one of the plurality of Web servers, and when the HTTP request from the Web client in the session is transmitted to the Web server cluster, the allocated Web It is necessary to update the data of the first file by request processing of the HTTP request from the Web client in the session and the data copy module that copies the data of the first file to the second file of the server. A request processing execution module that executes the request processing using the data copied to the second file.
請求項1記載のWebアプリケーション、請求項3記載のデータ共有方法、及び請求項5記載のプログラムによれば、複数のWebクライアントのいずれか1つとのセッションの開始時に、このセッションが終了するまで、この複数のWebクライアントのいずれか1つからのHTTPリクエストの要求処理を実行するWebサーバを複数のWebサーバのいずれか1つに割り振り、セッション中のWebクライアントからのHTTPリクエストがWebサーバクラスタに送信されたときに、割り振られたWebサーバの有する第2のファイルに第1のファイルのデータをコピーし、セッション中のWebクライアントからのHTTPリクエストの要求処理により第1のファイルのデータを更新する必要がない場合、第2のファイルにコピーされたデータを用いて要求処理を実行するので、共有ファイルへのWebサーバのアクセスを最低限に抑えることにより、応答速度の低下を防止できる。 According to the Web application according to claim 1, the data sharing method according to claim 3, and the program according to claim 5, at the start of a session with any one of a plurality of Web clients, until the session ends, A web server that executes processing for requesting an HTTP request from any one of the plurality of web clients is allocated to any one of the plurality of web servers, and an HTTP request from the web client in the session is transmitted to the web server cluster. When this is done, it is necessary to copy the data of the first file to the second file of the allocated Web server and update the data of the first file by the request processing of the HTTP request from the Web client during the session If not, copy to second file Since execution request processing using the data, by minimizing the access of the Web server to the shared file, it is possible to prevent deterioration of response speed.
請求項2記載のWebアプリケーション、請求項4記載のデータ共有方法、及び請求項5記載のプログラムによれば、セッション中のWebクライアントからのHTTPリクエストの要求処理により第1のファイルのデータを更新する必要があるとき、第1のファイル及び第2のファイルのデータを共に更新するので、共有ファイルへのWebサーバのアクセスを最低限に抑えることにより、応答速度の低下を防止できる。 According to the Web application according to claim 2, the data sharing method according to claim 4, and the program according to claim 5, the data of the first file is updated by the request processing of the HTTP request from the Web client during the session. When necessary, both the data of the first file and the second file are updated. Therefore, it is possible to prevent the response speed from being lowered by minimizing the access of the Web server to the shared file.
以下、本発明の実施の形態を図面を用いて詳説する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
図1は、本発明の実施の形態に係るWebアプリケーションを実行するネットワークの概略構成を示す図である。 FIG. 1 is a diagram showing a schematic configuration of a network that executes a Web application according to an embodiment of the present invention.
図1において、ネットワーク100は、Webブラウザが動作しているWebクライアント101,102,103と、Webサーバクラスタ110を構成するWebサーバ111,112,113と、文書管理サーバ121と、リレーショナルデータベース125とを備え、これらはローカルエリアネットワーク131,132により相互に接続する。
In FIG. 1, a
リレーショナルデータベース125は、フォルダや文書の属性情報や文書を記憶している。文書管理サーバ121は、リレーショナルデータベース125にアクセスして、データベース内に文書を登録して文書を管理している。また、Webサーバ111は、共有ファイル115(第2のファイル)を有し、この共有ファイル115は、オペレーティングシステム(OS)のファイルシステム共有機能により、他のWebサーバ112,113からもアクセスできるように構成されている。さらに、各Webサーバ111,112,113は、他のコンピュータからの直接のアクセスは禁止されているローカルファイル111a,112a,113a(第1のファイル)を有する。
The
Webクライアント101,102,103は、Webサーバクラスタ110へHTTPリクエストを送付することにより、Webサーバクラスタ110内のWebサーバ111,112,113からHTTPレスポンスを受信できるように構成されている。
The
また、Webサーバクラスタ110は、Webクライアント101,102,103からのHTTPリクエストを受信してWebサーバ111,112,113のいずれかにそのリクエストの処理を割り振り、割り振られた処理を各Webサーバ111,112,113に実行させるWebアプリケーションを稼動させる。
The
図2は、図1におけるWebサーバクラスタ110上で稼動するWebアプリケーションのノードを説明するのに用いられる図である。
FIG. 2 is a diagram used for explaining the nodes of the Web application running on the
図2において、Webサーバクラスタ110のWebアプリケーションは、Webクラスタ制御部211,Webサーバ部215、及び文書管理部220の3つのノードを備える。
In FIG. 2, the Web application of the
Webクラスタ制御部211は、上述の割振処理を行ったり、Webサーバ111,112,113のいずれかで作成されたHTTPレスポンスを所定のWebクライアント(101,102,103)へ送信する。
The Web
Webサーバ部215は、Webサーバ111,112,113による一般的な処理を行う。具体的には、Webクライアント101,102,103からのHTTPリクエストに応じて、要求されたHTMLページやイメージファイル等のコンテンツをHTTPレスポンスとしてWebクライアントに送信したり、Webクライアントからのプログラム実行要求に応じてプログラムを実行しその結果をHTTPレスポンスとしてWebクライアントに送信する処理を行う。
The
文書管理部220は、制御部221、要求解析部223、共有データアクセス部224、及び要求処理部226を備える。
The
制御部221は、Webサーバ部215とのデータの送受やWebサーバクラスタ110の全体の処理を制御する。本制御部221では、Webサーバ111,112,113を経由してWebクライアント101,102,103から依頼されたHTTPリクエストのプログラム実行要求内容を要求解析部223で解析し、解析された結果により、共有データアクセス部224、ローカルデータアクセス部225、要求処理部226等を制御して、上述の実行要求がされたプログラムを実行し、最後にHTMLページ生成部227により実行内容に応じたHTMLページを作成する。また、制御部221は、Webクライアント101,102,103にHTTPレスポンスを返すようにWebサーバ部215に依頼する。
The
要求解析部223ではWebサーバ部215を経由してWebクライアント101,102,103から送信されたHTTPリクエストのプログラム実行要求のパラメータを解析し、実行要求の種別を解析する。実行要求の種別としては、Webアプリケーション起動処理、ログイン処理、ログアウト処理、表示形式変更処理、文書一覧処理、文書検索処理、文書登録処理、文書削除処理等がある。
The
共有データアクセス部224は、Webサーバ111で公開されている共有ファイル115へのアクセスを行い、共有ファイル115からのデータ読み出しや、共有ファイル115へのデータの書き込みを行うようになっている。共有ファイル115では、Webアプリケーションを使用できるユーザごとに、HTMLページ作成の際に必要となる情報が格納されている。たとえば、文書一覧画面に表示する文書の数、文書一覧画面に表示する項目名等がこれに相当する。
The shared
ローカルデータアクセス部225は、各Webサーバ111,112,113がセッション内でHTMLページを作成するために必要なデータを格納するローカルファイルへのアクセスを行う。ローカルデータとしては、上記共有ファイル115の情報に加えて、セッション内で頻繁に更新される情報や一時的に作成されたイメージファイル等が格納される。
The local
要求処理部226では、要求解析部223で解析析された実行要求の種別に応じて、文書管理サーバ121と通信を行い、ログイン処理、ログアウト処理、文書一覧処理、文書検索処理、文書登録処理、文書削除処理等の処理を実際に行う。また、表示形式変更処理においては共有データアクセス部224、ローカルデータアクセス部225によりローカルファイル、共有ファイル115に書き込む処理も行う。
The
HTML作成部227は、要求処理部226で行った処理の結果を、ローカルデータアクセス部225により取得したローカルデータをもとにHTMLページを作成する部分である。具体的には、文書一覧画面に表示する文書の数、文書一覧画面等の情報等に基づいてHTMLページを作成する。
The
図3は、図2のWebアプリケーションによる文書管理処理のフローチャートである。 FIG. 3 is a flowchart of document management processing by the Web application of FIG.
図3において、まず、Webアプリケーションは、Webクライアント101,102,103のいずれか1つからWebクラスタサーバ110に送信されたHTTPリクエストにセッションIDがあるか否かを判別する(ステップS310)。以下、Webクラスタサーバ110にHTTPリクエストを送信したWebクライアントを「セッションWebクライアント」という。ここで、セッションWebクライアントから送信されたHTTPリクエストには、パラメータとして、少なくともセッションIDと処理要求コマンドが付与されているものとする。ただし、本Webアプリケーション起動時に送信されたHTTPリクエストにはパラメータは一切付与されていない。
In FIG. 3, first, the Web application determines whether or not there is a session ID in the HTTP request transmitted from any one of the
ステップS310の判別の結果、HTTPリクエストにセッションIDがないとき、Webアプリケーションは、このセッションWebクライアントとは初めてセッションが行われたと判断し、Webサーバ111,112,113のいずれか1つをこのセッションWebクライアントからのHTTPリクエストの処理を行うWebサーバ(以下「セッションWebサーバ」という。)に割り振り、このセッションWebサーバのローカルファイルにセッション設定ファイルを作成する(ステップS311)。ここで、セッション設定ファイルは、セッションIDにより特定されるファイルであり、セッションWebサーバのローカルファイル中の予め定められたセッション管理フォルダの下に作成される。この時点では、空のファイルが作成されるだけである。
As a result of the determination in step S310, when there is no session ID in the HTTP request, the Web application determines that a session has been performed for the first time with this session Web client, and any one of the
引き続き、セッションWebサーバでログインに必要なユーザ名、パスワード等を入力させるためのログイン画面(図4)のHTMLページを作成し、このHTMLページをセッションWebクライアントに返送し(ステップS370)、本処理を終了する。このとき、送信されるHTTPリスポンスには、ステップS311で作成されたセッション設定ファイルを特定するセッションIDがパラメータとして付与される。以後、このセッションが有効な間、即ち後述するステップS341でローカルファイル中の設定情報が削除されるまで、セッションWebクライアントとセッションWebサーバの間で送受信されるHTTPリクエスト及びHTTPリスポンスには同一のセッションIDが付される。 Subsequently, an HTML page of a login screen (FIG. 4) for inputting a user name, a password, and the like necessary for login on the session Web server is created, and this HTML page is returned to the session Web client (step S370). Exit. At this time, a session ID that identifies the session setting file created in step S311 is assigned as a parameter to the HTTP response to be transmitted. Thereafter, while this session is valid, that is, until the setting information in the local file is deleted in step S341 described later, the same session is used for the HTTP request and the HTTP response transmitted / received between the session Web client and the session Web server. ID is attached.
ステップS310の判別の結果、HTTPリクエストにセッションIDがあるときは、このセッションIDにより特定されるセッション設定ファイルがWebサーバクラスタ110内のWebサーバ111,112,113のいずれか1つのローカルファイル中にあるか否かを判別する(ステップS320)。この判別の結果、上記セッション設定ファイルがないとき、Webアプリケーションは、このHTTPリクエストは不正なアクセスにより送信されたと判断して、不正なアクセスであることを警告するHTMLページをWebサーバ111,112,113のいずれか1つで作成し、このHTMLページをセッションWebクライアントに返送し(ステップS370)、本処理を終了する。
If it is determined in step S310 that the HTTP request has a session ID, the session setting file specified by the session ID is included in any one of the local files of the
ステップS320の判別の結果、上記セッション設定ファイルがあるときは、Webアプリケーションは、このHTTPリクエストは有効なセッションであると判断して、このHTTPリクエストのパラメータとして付与された処理要求コマンドを解析することにより、処理要求コマンドがログイン処理であるか否か(ステップS330)、ログアウト処理であるか否か(ステップS340)、表示形式変更処理であるか否か(ステップS350)を順に判別する。 If it is determined in step S320 that the session setting file is present, the Web application determines that the HTTP request is a valid session and analyzes the processing request command given as a parameter of the HTTP request. Thus, it is sequentially determined whether the processing request command is a login process (step S330), a logout process (step S340), and a display format change process (step S350).
ステップS330の判別の結果、HTTPリクエストの処理要求コマンドがログイン処理であるときは、以下のログイン処理を実行する。 If the result of determination in step S330 is that the HTTP request processing request command is login processing, the following login processing is executed.
Webアプリケーションは、セッションWebクライアント側でこのログイン画面のHTMLページにユーザ名とパスワードが入力され、OKボタンが押され、ログイン処理を内容とする処理要求コマンドをパラメータに含むHTTPリクエストがWebサーバクラスタ110に返送されたときに、そのHTTPリクエストの処理要求コマンドがログイン処理であると判別する。
In the Web application, the user name and password are input to the HTML page of the login screen on the session Web client side, the OK button is pressed, and an HTTP request including a processing request command including login processing as a parameter is sent to the
また、上記ログイン処理は、ステップS311の処理の後にセッションWebサーバにより作成された上述のログイン画面のHTMLページが、セッションWebクライアントに送信された後に行われる。 The login process is performed after the HTML page of the above-described login screen created by the session Web server after the process of step S311 is transmitted to the session Web client.
上記ログイン処理では、まず、Webアプリケーションは、セッションWebクライアント側で図4のログイン画面に入力されたユーザ名とパスワードの組み合わせが共有ファイル115内にあるか否かを判別する(ステップS331)。この判別の結果、上記組み合わせは共有ファイル115中にあるときは、ログイン処理が正常に行われたと判断して、共有ファイル115中のそのユーザ用の設定情報(共有データ)をこのセッションIDで特定されるセッション設定ファイルに記憶することにより、共有データをローカルファイル内に取得する(ステップS332)。その後、この取得した共有データにある設定情報に基づき文書一覧画面(図5)及びその表示形式変更画面(図7)のHTMLページを作成し、これらのHTMLページをセッションWebクライアントに返信して(ステップS370)、本処理を終了する。
In the login process, first, the Web application determines whether or not the combination of the user name and password input on the login screen in FIG. 4 is in the shared
ステップS331の判別の結果、上記組み合わせは共有ファイル115内にないときは、このログイン処理をパラメータとするHTTPリクエストは不正なアクセスにより送信されたと判断して、不正なアクセスであることを警告するHTMLページを作成し、セッションWebクライアントに返送して(ステップS370)、本処理を終了する。
As a result of the determination in step S331, if the above combination is not in the shared
ステップS340の判別の結果、HTTPリクエストの処理要求コマンドがログアウト処理であるときは、以下のログアウト処理を実行する。 If the result of determination in step S340 is that the HTTP request processing request command is logout processing, the following logout processing is executed.
Webアプリケーションは、セッションWebクライアント側で、この文書一覧画面のHTMLページのログアウトボタン500が押され、ログアウト処理を内容とする処理要求コマンドをパラメータに含むHTTPリクエストがWebサーバクラスタ110に返送されたとき、そのHTTPリクエストの処理要求コマンドがログアウト処理であると判別する。
In the Web application, when the
また、上記ログアウト処理は、ログイン処理により文書一覧画面(図5)のHTMLページが、セッションWebクライアントに送信された後に行われる。 The logout process is performed after the HTML page of the document list screen (FIG. 5) is transmitted to the session Web client by the login process.
上記ログアウト処理では、まず、Webアプリケーションは、セッションWebサーバのローカルファイル中から、上記セッションIDにより特定されるセッション設定ファイルを探し、探し出されたセッション設定ファイル内に作成されたセッション情報を削除する(ステップS341)。その後、セッションWebサーバでセッションが終了したことを告知するHTMLページを作成し、このHTMLページをセッションWebクライアントに返送し(ステップS370)、本処理を終了する。 In the logout process, first, the Web application searches for a session setting file specified by the session ID from the local file of the session Web server, and deletes the session information created in the found session setting file. (Step S341). Thereafter, an HTML page for notifying the end of the session is created on the session Web server, this HTML page is returned to the session Web client (step S370), and this process ends.
ステップS350の判別の結果、HTTPリクエストの処理要求コマンドが表示形式変更処理であるときは、以下の表示形式変更処理を行う。 If the result of determination in step S350 is that the HTTP request processing request command is display format change processing, the following display format change processing is performed.
Webアプリケーションは、セッションWebクライアント側で、表示設定変更画面(図7)のHTMLページでこの文書一覧画面の表示設定を変更したとき、例えば、図7に示すように、図5の文書一覧画面で1ページに表示する文書数を変更するため、「Maximum Number of Documents to Display in a Page」の右横の数値を10から20にスクロールバーを用いて変更した後に上部のOKボタンが押されたとき、セッションID及び表示形式変更処理を内容とする処理要求コマンドをパラメータとするHTTPリクエストがWebサーバクラスタ110に返送される。このとき、そのHTTPリクエストの処理要求コマンドが表示形式変更処理であると判別する。
When the display setting of the document list screen is changed on the HTML page of the display setting change screen (FIG. 7) on the session Web client side, for example, as shown in FIG. When the upper OK button is pressed after changing the value on the right side of “Maximum Number of Documents to Display in a Page” from 10 to 20 using the scroll bar to change the number of documents displayed on one page Then, an HTTP request having a process request command including the session ID and display format change process as a parameter is returned to the
また、上記表示形式変更処理は、ログイン処理により文書一覧画面(図5)のHTMLページが、セッションWebクライアントに送信された後に行われる。 The display format change process is performed after the HTML page of the document list screen (FIG. 5) is transmitted to the session Web client by the login process.
上記表示形式変更処理では、まず、Webアプリケーションは、セッションWebクライアント側で図7の表示設定変更画面により変更された内容を上記セッションIDにより特定されるセッション設定ファイル内に記憶するとともに、共有ファイル115のユーザ毎に設定されているデータの設定値の変更を行う(ステップS351)。
In the display format changing process, first, the Web application stores the content changed on the session Web client side on the display setting change screen in FIG. 7 in the session setting file specified by the session ID, and also the shared
その後、Webアプリケーションは、変更された設定値に基づいて文書一覧画面(図6)をセッションWebサーバで作成し、このHTMLページをセッションWebクライアントに送信して(ステップS370)、本処理を終了する。 Thereafter, the Web application creates a document list screen (FIG. 6) on the session Web server based on the changed setting value, transmits this HTML page to the session Web client (step S370), and ends this processing. .
上記ステップS330,S340,S350の判別の結果、上述のログイン処理、ログアウト処理、表示形式変更処理のいずれの処理でもないときは、その他の処理を実行する(ステップS360)。 If it is determined in steps S330, S340, and S350 that the process is not one of the above-described login process, logout process, and display format change process, other processes are executed (step S360).
具体的には、Webアプリケーションは、HTTPリクエストの処理要求コマンドがその他の処理、即ち、ログイン処理、ログアウト処理、表示形式変更処理以外であると判断してその処理を実行する。その後、その処理結果を示すHTMLページの作成し、このHTMLページをセッションWebクライアントに送信して(ステップS370)、本処理を終了する。 Specifically, the Web application determines that the HTTP request processing request command is other processing, that is, other than login processing, logout processing, and display format change processing, and executes the processing. Thereafter, an HTML page indicating the processing result is created, this HTML page is transmitted to the session Web client (step S370), and this processing is terminated.
上記実施の形態では、Webサーバクラスタ110上で文書管理を行う場合を例として説明したが、Webサーバクラスタ110上で行う処理であれば文書管理に限定されるわけでなく、共有ファイル中の共有データを各Webサーバ111,112,113で共有するおおまかな流れが図3のフローチャートで示すような処理となればよい。
In the above embodiment, the case where document management is performed on the
具体的には、図8に示すように、まず、HTTPリクエストを受けると、セッション中か否かを判別し(ステップS810)、この判別の結果、セッション中でないとき、即ち、セッションがこのHTTPリクエストを受けたことにより開始したと判断したとき、Webサーバ111,112,113のいずれか1つをこのセッションWebクライアントに対するセッションWebサーバに割り振ると共に、共有ファイル115からセッションWebサーバのローカルファイルにセッションWebクライアントからのHTTPリクエストの要求処理を行うために必要な共有データをコピーし(ステップS830)、このローカルファイルに保存された情報に基づきHTMLページを作成し、セッションWebクライアントに返信して(ステップS870)、本処理を終了する。セッションの開始時は、セッションWebサーバの割り振りのみを行い、次のセッションがセッションWebクライアントからあったときに、ステップS830の処理を行うようにしてもよい。
Specifically, as shown in FIG. 8, first, when an HTTP request is received, it is determined whether or not the session is in progress (step S810). If the result of this determination is that the session is not in progress, that is, the session is this HTTP request. When one of the
ステップS810の判別の結果、セッション中であるとき、HTTPリクエストの要求処理を行うのに共有ファイルの共有データを更新する必要があるか否かを判別し(ステップS820)、この判別の結果、更新の必要があるとき、上記ローカルファイルに保存されたデータと共有ファイル115のデータの両方を更新し(ステップS840)、その後、ローカルファイル中のこの更新データに基づいてHTTPリクエストの要求処理をセッションWebサーバで実行する(ステップS850)。その後、この処理結果を示すHTMLページを作成し、セッションWebクライアントに返信して(ステップS870)、本処理を終了する。ただし、この場合、共有ファイル115内の共有データの更新を最小限に抑えるために、頻繁に更新されるような情報はローカルファイルのみで管理されるようになっていることが好ましい。
As a result of the determination in step S810, it is determined whether or not the shared data of the shared file needs to be updated in order to perform HTTP request request processing during the session (step S820). When it is necessary to update both the data stored in the local file and the data of the shared file 115 (step S840), the HTTP request request processing is then performed based on the updated data in the local file. This is executed by the server (step S850). Thereafter, an HTML page indicating the processing result is created and sent back to the session Web client (step S870), and this processing is terminated. However, in this case, in order to minimize the update of the shared data in the shared
ステップS820の判別の結果、更新の必要がないとき(ステップS820でNO)、ローカルファイル中にステップS830でコピーされた共有データに基づいてHTTPリクエストの要求処理をセッションWebサーバで実行し(ステップS860)、その処理結果を示すHTMLページを作成し、セッションWebクライアントに送信して(ステップS870)、本処理を終了する。 As a result of the determination in step S820, when update is not necessary (NO in step S820), the HTTP request request process is executed on the session Web server based on the shared data copied in step S830 in the local file (step S860). ), An HTML page indicating the processing result is created and transmitted to the session Web client (step S870), and the process is terminated.
以上、本実施の形態によれば、Webアプリケーションは、セッションがこのHTTPリクエストを受けたことにより開始したと判断したとき(ステップS810でNO)、共有ファイル115内の共有データをセッションWebサーバのローカルファイルにコピーし(ステップS830)、その後のセッション中は(ステップS810でYES)、HTTPリクエストの処理が共有データの更新を伴う処理でない場合(ステップS820でNO)、ローカルファイルにコピーされた共有データに基づいてHTTPリクエストの要求処理を行うので(ステップS860)、共有ファイルへのアクセスを最低限に抑えることができ、応答速度の低下を防止することができる。
As described above, according to the present embodiment, when the Web application determines that the session is started by receiving this HTTP request (NO in step S810), the shared data in the shared
本発明は、Webサーバ111,112,113のいずれか1つの記憶媒体等の媒体から読み出されたプログラムコード自体が上述した実施形態の機能を実現し、そのプログラムコードを記憶した記憶媒体等の媒体が本発明を構成する。プログラムコードを供給するための記憶媒体等の媒体としては、例えば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、DVD+RW、磁気テープ、不揮発性のメモリカード、ROM、或いはネットワークを介したダウンロード等を用いることができる。
The present invention realizes the functions of the above-described embodiment by the program code read from a medium such as any one of the
また、コンピュータが読み出したプログラムコードを実行することにより、上述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS等が実際の処理の一部又は全部を行い、その処理によって上述した実施形態の機能が実現される場合も、本発明に含まれることは言うまでもない。 Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS or the like running on the computer performs an actual process based on an instruction of the program code. Needless to say, the present invention includes a case where the function of the above-described embodiment is realized by performing part or all of the processing.
更に、記憶媒体等の媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって上述した実施形態の機能が実現される場合も、本発明に含まれることは言うまでもない。 Furthermore, after the program code read from a medium such as a storage medium is written in a memory provided in a function expansion board inserted in the computer or a function expansion unit connected to the computer, based on the instruction of the program code, Needless to say, the present invention includes the case where the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
100 ネットワーク
101,102,103 Webクライアント
111a,112a,113a ローカルファイル
110 Webサーバクラスタ
111,112,113 Webサーバ
115 共有ファイル
131,132 ローカルエリアネットワーク
Claims (5)
前記Webサーバクラスタは、前記複数のWebサーバの全てで共有する第1のファイルと、前記複数のWebサーバの夫々が有するファイルであって、他のWebサーバからのアクセスが不能な第2のファイルとを備え、
前記複数のWebクライアントのいずれか1つとのセッションの開始時に、当該セッションが終了するまで、前記複数のWebクライアントのいずれか1つからのHTTPリクエストの要求処理を実行するWebサーバを前記複数のWebサーバのいずれか1つに割り振るセッション時処理割振手段と、
前記セッション中のWebクライアントからのHTTPリクエストが前記Webサーバクラスタに送信されたときに、前記割り振られたWebサーバの有する前記第2のファイルに前記第1のファイルのデータをコピーするデータコピー手段と、
前記セッション中のWebクライアントからのHTTPリクエストの要求処理により前記第1のファイルのデータを更新する必要がない場合、前記第2のファイルにコピーされたデータを用いて前記要求処理を実行する要求処理実行手段とを備えることを特徴とするWebアプリケーション。 In a Web application that is configured by a plurality of Web servers and executes processing for requesting an HTTP request received from a Web client in session on a Web server cluster that performs a session with a plurality of Web clients.
The web server cluster includes a first file shared by all of the plurality of web servers and a second file that is included in each of the plurality of web servers and cannot be accessed from other web servers. And
At the start of a session with any one of the plurality of Web clients, a Web server that executes processing for requesting an HTTP request from any one of the plurality of Web clients until the session ends. A session processing allocation means to allocate to any one of the servers;
Data copy means for copying data of the first file to the second file of the allocated Web server when an HTTP request from the Web client in the session is transmitted to the Web server cluster; ,
Request processing for executing the request processing using the data copied to the second file when it is not necessary to update the data of the first file by the request processing of the HTTP request from the Web client in the session A Web application comprising execution means.
前記Webサーバクラスタは、前記複数のWebサーバの全てで共有する第1のファイルと、前記複数のWebサーバの夫々が有するファイルであって、他のWebサーバからのアクセスが不能な第2のファイルとを備え、
前記複数のWebクライアントのいずれか1つとのセッションの開始時に、当該セッションが終了するまで、前記複数のWebクライアントのいずれか1つからのHTTPリクエストの要求処理を実行するWebサーバを前記複数のWebサーバのいずれか1つに割り振るセッション時処理割振ステップと、
前記セッション中のWebクライアントからのHTTPリクエストが前記Webサーバクラスタに送信されたときに、前記割り振られたWebサーバの有する前記第2のファイルに前記第1のファイルのデータをコピーするデータコピーステップと、
前記セッション中のWebクライアントからのHTTPリクエストの要求処理により前記第1のファイルのデータを更新する必要がない場合、前記第2のファイルにコピーされたデータを用いて前記要求処理を実行する要求処理実行ステップとを有することを特徴とするデータ共有方法。 In a data sharing method for executing processing for requesting an HTTP request received from a Web client in a session on a Web server cluster configured by a plurality of Web servers and performing a session with a plurality of Web clients.
The web server cluster includes a first file shared by all of the plurality of web servers and a second file that is included in each of the plurality of web servers and cannot be accessed from other web servers. And
At the start of a session with any one of the plurality of Web clients, a Web server that executes processing for requesting an HTTP request from any one of the plurality of Web clients until the session ends. A session time allocation step to allocate to any one of the servers;
A data copy step of copying data of the first file to the second file of the allocated Web server when an HTTP request from the Web client in the session is transmitted to the Web server cluster; ,
Request processing for executing the request processing using the data copied to the second file when it is not necessary to update the data of the first file by the request processing of the HTTP request from the Web client in the session And a data sharing method.
前記Webサーバクラスタは、前記複数のWebサーバの全てで共有する第1のファイルと、前記複数のWebサーバの夫々が有するファイルであって、他のWebサーバからのアクセスが不能な第2のファイルとを備え、
前記複数のWebクライアントのいずれか1つとのセッションの開始時に、当該セッションが終了するまで、前記複数のWebクライアントのいずれか1つからのHTTPリクエストの要求処理を実行するWebサーバを前記複数のWebサーバのいずれか1つに割り振るセッション時処理割振モジュールと、
前記セッション中のWebクライアントからのHTTPリクエストが前記Webサーバクラスタに送信されたときに、前記割り振られたWebサーバの有する前記第2のファイルに前記第1のファイルのデータをコピーするデータコピーモジュールと、
前記セッション中のWebクライアントからのHTTPリクエストの要求処理により前記第1のファイルのデータを更新する必要がない場合、前記第2のファイルにコピーされたデータを用いて前記要求処理を実行する要求処理実行モジュールとを有することを特徴とするプログラム。 A computer is configured to execute a data sharing method for executing a request process for an HTTP request received from a Web client in a session on a Web server cluster configured by a plurality of Web servers and performing a session with a plurality of Web clients. In the program to
The web server cluster includes a first file shared by all of the plurality of web servers and a second file that is included in each of the plurality of web servers and cannot be accessed from other web servers. And
At the start of a session with any one of the plurality of Web clients, a Web server that executes processing for requesting an HTTP request from any one of the plurality of Web clients until the session ends. A session processing allocation module that allocates to any one of the servers;
A data copy module that copies data of the first file to the second file of the allocated Web server when an HTTP request from the Web client in the session is transmitted to the Web server cluster; ,
Request processing for executing the request processing using the data copied to the second file when it is not necessary to update the data of the first file by the request processing of the HTTP request from the Web client in the session An execution module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003410609A JP2005173823A (en) | 2003-12-09 | 2003-12-09 | Web application, and data sharing method and program thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003410609A JP2005173823A (en) | 2003-12-09 | 2003-12-09 | Web application, and data sharing method and program thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005173823A true JP2005173823A (en) | 2005-06-30 |
Family
ID=34731656
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003410609A Pending JP2005173823A (en) | 2003-12-09 | 2003-12-09 | Web application, and data sharing method and program thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005173823A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007334481A (en) * | 2006-06-13 | 2007-12-27 | Nippon Telegraph & Telephone East Corp | E-mail delivery system and method |
WO2008100881A1 (en) * | 2007-02-12 | 2008-08-21 | Microsoft Corporation | Web data usage platform |
US8429185B2 (en) | 2007-02-12 | 2013-04-23 | Microsoft Corporation | Using structured data for online research |
CN110601960A (en) * | 2019-09-09 | 2019-12-20 | 珠海格力电器股份有限公司 | Selective report sharing method, server, terminal and system |
JP7500359B2 (en) | 2020-09-09 | 2024-06-17 | 株式会社東芝 | Data reference server, database system and fee management system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000105744A (en) * | 1998-09-29 | 2000-04-11 | Toshiba Corp | Distributed data base system |
JP2001175515A (en) * | 1999-12-17 | 2001-06-29 | Hitachi Ltd | File display method |
JP2001509925A (en) * | 1996-12-09 | 2001-07-24 | ジーティーイー インターネットワーキング インコーポレイテッド | Distributed computer system and method for distributing user requests to replica network servers |
JP2002297430A (en) * | 2001-03-30 | 2002-10-11 | Toshiba Corp | Transaction-processing-type database system |
JP2002312428A (en) * | 2001-04-09 | 2002-10-25 | Advanced Technology & Planning Co Ltd | Information providing service system for defense industry |
-
2003
- 2003-12-09 JP JP2003410609A patent/JP2005173823A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001509925A (en) * | 1996-12-09 | 2001-07-24 | ジーティーイー インターネットワーキング インコーポレイテッド | Distributed computer system and method for distributing user requests to replica network servers |
JP2000105744A (en) * | 1998-09-29 | 2000-04-11 | Toshiba Corp | Distributed data base system |
JP2001175515A (en) * | 1999-12-17 | 2001-06-29 | Hitachi Ltd | File display method |
JP2002297430A (en) * | 2001-03-30 | 2002-10-11 | Toshiba Corp | Transaction-processing-type database system |
JP2002312428A (en) * | 2001-04-09 | 2002-10-25 | Advanced Technology & Planning Co Ltd | Information providing service system for defense industry |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007334481A (en) * | 2006-06-13 | 2007-12-27 | Nippon Telegraph & Telephone East Corp | E-mail delivery system and method |
WO2008100881A1 (en) * | 2007-02-12 | 2008-08-21 | Microsoft Corporation | Web data usage platform |
US7917507B2 (en) | 2007-02-12 | 2011-03-29 | Microsoft Corporation | Web data usage platform |
US8429185B2 (en) | 2007-02-12 | 2013-04-23 | Microsoft Corporation | Using structured data for online research |
US8595259B2 (en) | 2007-02-12 | 2013-11-26 | Microsoft Corporation | Web data usage platform |
US8832146B2 (en) | 2007-02-12 | 2014-09-09 | Microsoft Corporation | Using structured data for online research |
US9164970B2 (en) | 2007-02-12 | 2015-10-20 | Microsoft Technology Licensing, Llc | Using structured data for online research |
CN110601960A (en) * | 2019-09-09 | 2019-12-20 | 珠海格力电器股份有限公司 | Selective report sharing method, server, terminal and system |
CN110601960B (en) * | 2019-09-09 | 2020-08-21 | 珠海格力电器股份有限公司 | Selective report sharing method, server, terminal and system |
JP7500359B2 (en) | 2020-09-09 | 2024-06-17 | 株式会社東芝 | Data reference server, database system and fee management system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2344468C2 (en) | Method of multiple file conditions management for duplicated file | |
US8103720B2 (en) | Apparatus and computer-readable media for processing HTTP requests | |
JP5963957B2 (en) | Development environment system, development environment device, development environment providing method and program | |
US7197608B2 (en) | Software management method for a storage system, and storage system | |
JPH11232226A (en) | Cooperative work aiding system and storage medium | |
JPH07262072A (en) | File controller | |
JP4366426B2 (en) | Image processing apparatus and control method thereof | |
KR101661789B1 (en) | Synchronizing self-referencing fields during two-way synchronization | |
JP2006172067A (en) | Database management method, system and program | |
JP2001306382A (en) | Method for accessing shared file, device for executing the method and recording medium recording its processing program | |
JP2002049637A (en) | Database management method, device and recording medium | |
JP2008257340A (en) | Information processing apparatus, information processing method, storage medium and program | |
JP2005173823A (en) | Web application, and data sharing method and program thereof | |
JP4237658B2 (en) | Synthetic service providing method, synthetic service providing system, execution apparatus, and program | |
JP4929142B2 (en) | Data processing apparatus, control method therefor, and computer program | |
JP2005310173A (en) | Remote installation system and method | |
JP2004078535A (en) | Exclusive control device, method, and program | |
JP4342326B2 (en) | Database controller | |
JP2006268126A (en) | Database access system and database object generation program | |
JP4492569B2 (en) | File operation control device, file operation control system, file operation control method, and file operation control program | |
JP2006235751A (en) | Virtual storage device, virtual storage method and program | |
JP2008140344A (en) | Information processing method, information processor, and computer program | |
JP4516404B2 (en) | Database construction method, database construction system, and database construction program | |
JP5504452B1 (en) | Sales information synchronization system | |
JP2003058496A (en) | Multimedia information terminal system and computer program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20060418 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061129 |
|
RD05 | Notification of revocation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7425 Effective date: 20070626 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090805 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091002 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091215 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100215 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100621 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100819 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110308 |