JP5552991B2 - Application deployment apparatus, application deployment method, and application deployment program - Google Patents

Application deployment apparatus, application deployment method, and application deployment program Download PDF

Info

Publication number
JP5552991B2
JP5552991B2 JP2010219871A JP2010219871A JP5552991B2 JP 5552991 B2 JP5552991 B2 JP 5552991B2 JP 2010219871 A JP2010219871 A JP 2010219871A JP 2010219871 A JP2010219871 A JP 2010219871A JP 5552991 B2 JP5552991 B2 JP 5552991B2
Authority
JP
Japan
Prior art keywords
program
content
storage unit
server
code
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
JP2010219871A
Other languages
Japanese (ja)
Other versions
JP2012073950A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010219871A priority Critical patent/JP5552991B2/en
Publication of JP2012073950A publication Critical patent/JP2012073950A/en
Application granted granted Critical
Publication of JP5552991B2 publication Critical patent/JP5552991B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、アプリケーション配備装置、アプリケーション配備方法およびアプリケーション配備プログラムに関する。   The present invention relates to an application deployment apparatus, an application deployment method, and an application deployment program.

従来、Webアプリケーションシステムでは、複数台用意されたサーバに対して処理を振り分け、この複数台のサーバに負荷を分散することで大量のアクセスを処理することが知られている。   Conventionally, in a Web application system, it is known that processing is distributed to a plurality of servers, and a large amount of access is processed by distributing a load to the plurality of servers.

このようなWebアプリケーションシステムにおいて、Webサーバに接続されるデータベースサーバが単一である場合には、単一のデータベースサーバが処理を行うので、データベースサーバがボトルネックとなり、処理が遅延することがある。このため、スケーラビリティ向上のために、Webサーバに複数のデータベースサーバを接続することが実施されている。   In such a Web application system, when there is a single database server connected to the Web server, the single database server performs processing, so the database server becomes a bottleneck and processing may be delayed. . For this reason, in order to improve scalability, connecting a plurality of database servers to a Web server has been implemented.

具体的には、Webアプリケーションシステムは、データベースサーバとして、参照用データベースサーバ(以下、参照用DBサーバという)および更新用データベースサーバ(以下、更新用DBサーバという)を有する。ここで、図17を用いて、Webアプリケーションシステムについて具体的に説明する。図17に示すように、ロードバランサ(図17の例では、LBと記載)、複数のWebサーバ、参照用DBサーバ、更新用DBサーバおよびバックアップDBサーバを有する。ロードバランサは、複数台用意されたWebサーバのうち、いずれかのWebサーバに対して処理を振り分ける。   Specifically, the Web application system includes a reference database server (hereinafter referred to as a reference DB server) and an update database server (hereinafter referred to as an update DB server) as database servers. Here, the Web application system will be specifically described with reference to FIG. As shown in FIG. 17, it has a load balancer (described as LB in the example of FIG. 17), a plurality of Web servers, a reference DB server, an update DB server, and a backup DB server. The load balancer distributes the process to any one of a plurality of prepared Web servers.

このようなWebアプリケーションシステムにおいて、Webサーバは、参照アプリおよび更新アプリを保持する。そして、Webサーバは、ロードバランサを介して更新要求を受け付けた場合には、更新アプリが更新用DBサーバにアクセスして更新用DBの更新を行う。また、Webサーバは、ロードバランサを介して参照要求を受け付けた場合には、参照アプリが参照用DBサーバにアクセスして参照用DBを参照する。   In such a Web application system, the Web server holds a reference application and an update application. When the Web server receives an update request via the load balancer, the update application accesses the update DB server and updates the update DB. When the Web server receives a reference request via the load balancer, the reference application accesses the reference DB server and refers to the reference DB.

ここで、Webアプリケーションシステムは、更新用DBに格納されたデータを定期的に参照用DBにコピーするレプリケーション処理を行うことで、参照用DBのデータと更新用DBのデータとの一貫性を確保している。ところが、レプリケーション処理を行うまでは参照用DBと更新用DBとで内容が一致しない場合があり、データを更新するユーザが更新用データベースに問い合わせる場合がある。   Here, the Web application system ensures the consistency between the data in the reference DB and the data in the update DB by performing a replication process that periodically copies the data stored in the update DB to the reference DB. doing. However, the contents of the reference DB and the update DB may not match until replication processing is performed, and a user who updates data may inquire of the update database.

例えば、日記のようなWebサイトでは、書き込まれた日記がレプリケーション処理を行うまでの数秒〜数分間は読むことができない可能性がある。つまり、日記の所有者は、結果がリアルタイムで反映されないと、本当に日記が登録されたのか確認することができない。このため、コンテンツの所有者(以下、コンテンツ所有者という)が最新のデータを保持する更新用DBに問い合わせを行う場合がある。   For example, in a website such as a diary, there is a possibility that the written diary cannot be read for several seconds to several minutes until the replication process is performed. In other words, the owner of the diary cannot confirm whether the diary is actually registered unless the result is reflected in real time. For this reason, the content owner (hereinafter referred to as the content owner) may make an inquiry to the update DB that holds the latest data.

例えば、コンテンツ所有者が更新用DBに問い合わせを行う方法として、アプリ内に参照用DBと更新用DBのURLを記述し、Webアプリケーションのなかで接続先データベースを変えるようにプログラムを手動で記述することが考えられる。このようなWebアプリケーションを実行した場合の処理について図18を用いて説明する。例えば、図18に示すように、ブラウザからログイン時に利用者IDが入力された場合に(図18の(1)参照)、APサーバは、Webで利用されるセッション情報記憶部に利用者IDを格納する(図18(2)参照)。   For example, as a method for the content owner to make an inquiry to the update DB, the URL of the reference DB and the update DB is described in the application, and the program is manually described so as to change the connection destination database in the Web application. It is possible. Processing when such a Web application is executed will be described with reference to FIG. For example, as shown in FIG. 18, when a user ID is input at the time of login from a browser (see (1) in FIG. 18), the AP server stores the user ID in the session information storage unit used on the Web. Store (see FIG. 18B).

そして、ブラウザからデータの要求を受け付けると(図18の(3)参照)、APサーバは、利用者IDを参照し(図18の(4)参照)、読み込むデータの所有者IDが利用者IDと一致する場合には更新用DBに問い合わせ、一致しない場合には参照用DBに問い合わせる(図18の(5)参照)。   When receiving a data request from the browser (see (3) in FIG. 18), the AP server refers to the user ID (see (4) in FIG. 18), and the owner ID of the data to be read is the user ID. Is matched, the update DB is inquired. If not, the reference DB is inquired (see (5) in FIG. 18).

特開2002−132568号公報JP 2002-132568 A 特開2006−4328号公報JP 2006-4328 A

ところで、上述した接続先データベースを変えるようなプログラムを手動で記述する方法では、プログラムを記述するための開発コストがかかるとともに、変更後のプログラムのテストにコストがかかるという課題があった。   By the way, the above-described method for manually describing a program for changing the connection destination database has a problem that it takes development cost for describing the program and cost for testing the program after the change.

一つの側面では、プログラムを手動で変更することなくアクセス先データベースの振り分けを適切に行うことを目的とする。   In one aspect, an object is to appropriately distribute an access destination database without manually changing a program.

第一の案では、アプリケーション配備装置は、コンテンツの所有者の識別子を保存するプログラムをコンテンツへアクセスするコンテンツアクセスプログラムに追加する。そして、アプリケーション配備装置は、コンテンツの参照を要求する利用者の識別子とプログラムによって保存された識別子とを用いて更新用記憶部または参照用記憶部にアクセスするプログラムに、コンテンツアクセスプログラムを変換する。   In the first proposal, the application deployment device adds a program for storing the identifier of the content owner to the content access program for accessing the content. Then, the application deployment apparatus converts the content access program into a program for accessing the update storage unit or the reference storage unit using the identifier of the user who requests the content reference and the identifier stored by the program.

Webアプリケーションを手動で変更することなくアクセス先データベースの振り分けを適切に行うことができる。   The access destination database can be appropriately distributed without manually changing the Web application.

図1は、実施例1に係るアプリケーション配備装置の構成を示すブロック図である。FIG. 1 is a block diagram illustrating the configuration of the application deployment apparatus according to the first embodiment. 図2は、実施例2に係るWebアプリケーションシステムの構成を説明する図である。FIG. 2 is a diagram illustrating the configuration of the Web application system according to the second embodiment. 図3は、実施例2に係る配備サーバの構成を示す図である。FIG. 3 is a diagram illustrating the configuration of the deployment server according to the second embodiment. 図4は、配備記述子にフィルタ要素を追加する処理を説明する図である。FIG. 4 is a diagram illustrating processing for adding a filter element to the deployment descriptor. 図5は、DBコネクションの変換処理を説明する図である。FIG. 5 is a diagram for explaining DB connection conversion processing. 図6は、リスナクラスのプログラム例を示す図である。FIG. 6 is a diagram illustrating an example of a listener class program. 図7は、フィルタクラスのプログラム例を示す図である。FIG. 7 is a diagram illustrating an example of a filter class program. 図8は、Webアプリケーションシステムの処理を説明する図である。FIG. 8 is a diagram for explaining processing of the Web application system. 図9は、コンテンツ所有者がコンテンツを参照する場合の処理を説明する図である。FIG. 9 is a diagram illustrating processing when the content owner refers to content. 図10は、コンテンツ読者がコンテンツを参照する場合の処理を説明する図である。FIG. 10 is a diagram for explaining processing when a content reader refers to content. 図11は、実施例2に係る配備サーバの配備記述子変更手順を説明するためのフローチャートである。FIG. 11 is a flowchart for explaining the deployment descriptor change procedure of the deployment server according to the second embodiment. 図12は、実施例2に係る配備サーバのDBコネクション変換手順を説明するためのフローチャートである。FIG. 12 is a flowchart for explaining the DB connection conversion procedure of the deployment server according to the second embodiment. 図13は、実施例2に係るWebアプリケーションシステムのコンテンツ追加時の処理手順を説明するためのフローチャートである。FIG. 13 is a flowchart for explaining the processing procedure when adding content in the Web application system according to the second embodiment. 図14は、実施例2に係るWebアプリケーションシステムのコンテンツ参照時の処理手順を説明するためのフローチャートである。FIG. 14 is a flowchart for explaining a processing procedure when referring to contents in the Web application system according to the second embodiment. 図15は、実施例3に係る配備サーバの構成を示す図である。FIG. 15 is a diagram illustrating the configuration of the deployment server according to the third embodiment. 図16は、Webアプリケーションシステムの処理を説明する図である。FIG. 16 is a diagram for explaining processing of the Web application system. 図17は、従来のWebアプリケーションシステムを説明する図である。FIG. 17 is a diagram for explaining a conventional Web application system. 図18は、従来のWebアプリケーションシステムの処理を説明する図である。FIG. 18 is a diagram for explaining processing of a conventional Web application system.

以下に、本願の開示するアプリケーション配備装置、アプリケーション配備方法およびアプリケーション配備プログラムの実施例を図面に基づいて詳細に説明する。なお、この実施例によりこの発明が限定されるものではない。   Hereinafter, embodiments of an application deployment apparatus, an application deployment method, and an application deployment program disclosed in the present application will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

まず、図1を用いて、実施例1に係るアプリケーション配備装置の構成について説明する。図1は、実施例1に係るアプリケーション配備装置の構成を示すブロック図である。   First, the configuration of the application deployment apparatus according to the first embodiment will be described with reference to FIG. FIG. 1 is a block diagram illustrating the configuration of the application deployment apparatus according to the first embodiment.

実施例1のアプリケーション配備装置1は、プログラム追加部1a、プログラム変換部1bを有し、アプリケーションサーバ2に接続されている。アプリケーションサーバ2は、利用者端末3、更新用記憶部4および参照用記憶部5とそれぞれ接続されている。アプリケーションサーバ2は、利用者端末3からの要求に応じて、更新用記憶部4および参照用記憶部5に対してアクセスしてアプリケーションを実行する。   The application deployment apparatus 1 according to the first embodiment includes a program addition unit 1 a and a program conversion unit 1 b and is connected to the application server 2. The application server 2 is connected to the user terminal 3, the update storage unit 4, and the reference storage unit 5, respectively. In response to a request from the user terminal 3, the application server 2 accesses the update storage unit 4 and the reference storage unit 5 and executes the application.

利用者端末3は、アプリケーションサーバ2に対してコンテンツの更新要求または参照要求を送信する。更新用記憶部4は、アプリケーションサーバ2によってアクセスされ、最新のコンテンツを保持する。参照用記憶部5は、アプリケーションサーバ2によってアクセスされ、更新用記憶部4が保持するコンテンツの複製を保持する。   The user terminal 3 transmits a content update request or reference request to the application server 2. The update storage unit 4 is accessed by the application server 2 and holds the latest content. The reference storage unit 5 is accessed by the application server 2 and holds a copy of the content held by the update storage unit 4.

アプリケーション配備装置1のプログラム追加部1aは、更新用記憶部4および参照用記憶部5に記憶されたコンテンツの所有者の識別子を保存するプログラムを、コンテンツへアクセスするコンテンツアクセスプログラムに追加する。プログラム変換部1bは、コンテンツの参照を要求する利用者の識別子とプログラムによって保存された識別子とを用いて更新用記憶部4または参照用記憶部5にアクセスするプログラムに、コンテンツアクセスプログラムを変換する。   The program adding unit 1a of the application deployment device 1 adds a program for storing the identifier of the content owner stored in the update storage unit 4 and the reference storage unit 5 to the content access program for accessing the content. The program conversion unit 1b converts the content access program into a program for accessing the update storage unit 4 or the reference storage unit 5 using the identifier of the user who requests the reference of the content and the identifier stored by the program. .

このように、アプリケーション配備装置1は、コンテンツへアクセスするコンテンツアクセスプログラムを自動で追加および変換し、更新用記憶部4または参照用記憶部5のいずれかをアクセス先として振り分ける。この結果、アプリケーション配備装置1は、プログラムを手動で変更することなく、プログラムを記述するための開発およびテストにかかるコストを削減してアクセス先の振り分けを適切に行うことができる。   As described above, the application deployment apparatus 1 automatically adds and converts a content access program for accessing content, and distributes either the update storage unit 4 or the reference storage unit 5 as an access destination. As a result, the application deployment apparatus 1 can appropriately distribute access destinations by reducing the cost of development and testing for writing a program without manually changing the program.

以下の実施例では、実施例2に係るWebアプリケーションシステム、配備サーバの構成および処理の流れを順に説明し、最後に実施例2による効果を説明する。   In the following embodiment, the configuration of the Web application system, the deployment server, and the processing flow according to the second embodiment will be described in order, and finally the effects of the second embodiment will be described.

[Webアプリケーションシステムの構成]
まず、図2を用いて、配備サーバを含むWebアプリケーションシステム全体の構成を説明する。図2は、実施例2に係るWebアプリケーションシステムの構成を説明する図である。図2に示すように、Webアプリケーションシステム100は、配備サーバ10、複数のAP(Application)サーバ20、ブラウザ30、LB(Load Balancer)40、参照用DB(DataBase)50、更新用DB60を有する。
[Web application system configuration]
First, the configuration of the entire Web application system including the deployment server will be described with reference to FIG. FIG. 2 is a diagram illustrating the configuration of the Web application system according to the second embodiment. As shown in FIG. 2, the Web application system 100 includes a deployment server 10, a plurality of AP (Application) servers 20, a browser 30, an LB (Load Balancer) 40, a reference DB (DataBase) 50, and an update DB 60.

配備サーバ10は、APサーバ20と接続されており、APサーバ20上に配置されたWebアプリのファイル形式であるWarファイルおよびDB定義情報ファイルを読み取り、配備サーバ10上で作成されたWebアプリをAPサーバ20上に配備する。   The deployment server 10 is connected to the AP server 20, reads the War file and the DB definition information file that are the file format of the web application arranged on the AP server 20, and reads the web application created on the deployment server 10. Deploy on the AP server 20.

APサーバ20は、外部との通信やメモリへのアクセス手段を提供するためのプラットフォームであるコンテナ機能を有し、Warファイルとして開発されたWebアプリを実行させる。Webアプリは、APサーバ20内のメモリにセッション情報等を格納することができるようになっている。また、APサーバ20の後方には、更新用DB60と参照用DB50とが接続されている。   The AP server 20 has a container function that is a platform for providing external communication and memory access means, and executes a Web application developed as a War file. The web application can store session information and the like in a memory in the AP server 20. Further, an update DB 60 and a reference DB 50 are connected behind the AP server 20.

APサーバ20は、ロードバランサ40を介して更新要求を受け付けた場合には、更新用DB60のデータを更新を行い、また、ロードバランサ40を介して参照要求を受け付けた場合には、参照用DB50のデータを参照する。また、APサーバ20は、各DB50、60に接続するためのURLが記述されたDB定義情報を保存する。このDB定義情報は、例えばXMLファイルとして保存される。また、APサーバ20は、更新用DB60に格納されたデータを定期的に参照用DB50にコピーするレプリケーション処理を行うことで、参照用DB50のデータと更新用DB60のデータとの一貫性を確保している。   The AP server 20 updates the data in the update DB 60 when an update request is received via the load balancer 40, and the reference DB 50 when a reference request is received via the load balancer 40. Refer to the data. Further, the AP server 20 stores DB definition information in which URLs for connecting to the DBs 50 and 60 are described. This DB definition information is saved as, for example, an XML file. In addition, the AP server 20 performs a replication process that periodically copies the data stored in the update DB 60 to the reference DB 50, thereby ensuring consistency between the data in the reference DB 50 and the data in the update DB 60. ing.

ブラウザ30は、ロードバランサ40とインターネットを介して接続される利用者端末において利用者が情報を閲覧するためのソフトウェアである。具体的には、ブラウザ30は、利用者のリクエストを受け付け、ロードバランサ40にリクエストを送信し、また、ロードバランサから受信したWebページを利用者端末に表示する。   The browser 30 is software for a user to browse information on a user terminal connected to the load balancer 40 via the Internet. Specifically, the browser 30 receives a user request, transmits the request to the load balancer 40, and displays a web page received from the load balancer on the user terminal.

ロードバランサ40は、複数のAPサーバ20と接続され、複数のリクエストの負荷分散を行う。具体的には、ロードバランサ40は、ブラウザ30からリクエストを受信すると、複数用意されたAPサーバ20中の一台を選択し、選択されたAPサーバ20にリクエストを送信する。   The load balancer 40 is connected to a plurality of AP servers 20 and performs load distribution of a plurality of requests. Specifically, when receiving a request from the browser 30, the load balancer 40 selects one of the plurality of prepared AP servers 20 and transmits the request to the selected AP server 20.

次に、図3を用いて、図2に示した配備サーバ10の構成を説明する。図3は、実施例2に係る配備サーバの構成を示すブロック図である。図3に示すように、この配備サーバ10は、ファイル解凍部11、配備記述子変換部12、DBコネクション変換部13、Webコンテンツ変換部14、ファイル圧縮部15を有する。以下にこれらの各部の処理を説明する。   Next, the configuration of the deployment server 10 shown in FIG. 2 will be described with reference to FIG. FIG. 3 is a block diagram illustrating the configuration of the deployment server according to the second embodiment. As illustrated in FIG. 3, the deployment server 10 includes a file decompression unit 11, a deployment descriptor conversion unit 12, a DB connection conversion unit 13, a Web content conversion unit 14, and a file compression unit 15. The processing of each of these units will be described below.

ファイル解凍部11は、圧縮形式のWebアプリファイルであるWarファイルを読み取り、通常のファイルに解凍する。ここでWarファイルとは、JCP(Java(登録商標) Community Process)の定めるServlet仕様に則っており、リクエストに対してどのプログラムを呼び出すかを定義するための配備記述子、Javaのプログラム本体であるクラスファイル、HTMLやJSP等のWebコンテンツから構成される。   The file decompression unit 11 reads a War file, which is a compressed web application file, and decompresses it into a normal file. Here, the War file is a deployment descriptor for defining which program is called in response to a request according to the Servlet specification defined by JCP (Java (registered trademark) Community Process), and a Java program body. It consists of class files, Web contents such as HTML and JSP.

配備記述子変換部12は、リクエストに対してどのプログラムを呼び出すかを定義するための配備記述子にServletフィルタを追加する。具体的には、配備記述子変換手段12は、HTTPのリクエストにパスワードが含まれる場合に付随するHTTPクエリテキストをユーザIDとしてHTTPセッション情報に保存するServletフィルタを追加する。   The deployment descriptor conversion unit 12 adds a Servlet filter to the deployment descriptor for defining which program is called for the request. Specifically, the deployment descriptor conversion unit 12 adds a Servlet filter that stores, in the HTTP session information, the HTTP query text associated with the HTTP request text when the password is included in the HTTP request.

ここで、図4を用いて、配備記述子にフィルタ要素を追加する処理を説明する。図4は、配備記述子にフィルタ要素を追加する処理を説明する図である。まず、配備記述子変換手段12は、配備記述子に<listener>要素があるか判定する。この結果、配備記述子変換手段12は、<listener>要素がないと判定した場合には、図4に示すように、<listener−class>要素を追加する。また、配備記述子変換手段12は、<listener>要素があると判定した場合には、<listener>要素内の最後に<listener−class>要素を追加する。   Here, the process of adding a filter element to the deployment descriptor will be described with reference to FIG. FIG. 4 is a diagram illustrating processing for adding a filter element to the deployment descriptor. First, the deployment descriptor conversion unit 12 determines whether there is a <listener> element in the deployment descriptor. As a result, when it is determined that there is no <listener> element, the deployment descriptor conversion unit 12 adds a <listener-class> element as shown in FIG. If the deployment descriptor conversion unit 12 determines that there is a <listener> element, the deployment descriptor conversion unit 12 adds a <listener-class> element at the end of the <listener> element.

続いて、配備記述子変換手段12は、<filter>要素があるか判定する。この結果、配備記述子変換手段12は、<filter>要素がないと判定した場合には、図4に示すように、<servlet>要素の直前に<filter>要素(図4の(1)参照)と<filter−mapping>要素(図4の(2)参照)を追加する。   Subsequently, the deployment descriptor conversion unit 12 determines whether there is a <filter> element. As a result, when the deployment descriptor conversion means 12 determines that there is no <filter> element, as shown in FIG. 4, the <filter> element (see (1) in FIG. 4) immediately before the <servlet> element. ) And <filter-mapping> element (see (2) in FIG. 4).

また、配備記述子変換手段12は、<filter>要素があると判定した場合には、最後の<filter>要素の直後に<filter>要素を追加し、最後の<filter−mapping>要素の直後に<filter−mapping>要素を追加する。   If the deployment descriptor conversion unit 12 determines that there is a <filter> element, it adds a <filter> element immediately after the last <filter> element, and immediately after the last <filter-mapping> element. To the <filter-mapping> element.

このように配備記述子を変更することで、Webアプリの起動時に「com.fujitsu.ServletListener」というリスナクラスが実行され、すべてのリクエスト処理の最初に「com.fujitsu.PasswordFilter」というフィルタクラスが実行されることを定義することができる。なお、リスナクラスおよびフィルタクラスについては、後に図6および図7を用いて詳述する。   By changing the deployment descriptor in this way, the listener class “com.fujitsu.ServletListener” is executed when the web application starts, and the filter class “com.fujitsu.PasswordFilter” is executed at the beginning of all request processing. Can be defined. The listener class and the filter class will be described in detail later with reference to FIGS.

DBコネクション変換部13は、データベースへのアクセスを行うJavaクラスに対して、実行されるSQLに所有者IDが含まれていれば更新用DB60へのコネクションを生成し所有者IDが含まれていなければ参照用DB50へのコネクションを生成するプログラムをアスペクト指向技術により埋め込む。   The DB connection conversion unit 13 generates a connection to the update DB 60 and includes the owner ID if the owner class ID is included in the executed SQL for the Java class that accesses the database. For example, a program for generating a connection to the reference DB 50 is embedded by aspect-oriented technology.

例えば、DBコネクション変換部13は、「Connection#createStatement()」メソッドや「Connection#prepareStatement()」メソッド等の、クエリを実行するためのオブジェクトを作成するコードをアスペクト指向言語等の静的解析技術でJavaクラスファイル内から検索する。   For example, the DB connection conversion unit 13 generates code for creating an object for executing a query, such as a “Connection # createStatement ()” method and a “Connection # prepareStatement ()” method, as a static analysis technology such as an aspect-oriented language. To search from within the Java class file.

そして、DBコネクション変換部13は、図5の上部に示すようなプログラムの場合には、コネクションを生成するコード部分(図5(3)参照)の前に、コンテンツ所有者IDか否かの候補の一覧を取得するためのコード(図5(4)参照)を追加する。   Then, in the case of the program as shown in the upper part of FIG. 5, the DB connection conversion unit 13 is a candidate for whether or not it is a content owner ID before the code part for generating the connection (see FIG. 5 (3)). A code (see FIG. 5 (4)) for acquiring the list is added.

その後、DBコネクション変換部13は、その所有者IDが、実行されるSQLに含まれるかどうかを判定し、含まれていれば更新用DB60へのコネクションを生成し、含まれていなければ参照用DB50へのコネクションを生成するコード(図5の(5)参照)を追加する。なお、updateやcreate等データベースの更新を行うSQLを実行する場合には、更新用DBへのコネクションを生成するようなコードとする。   Thereafter, the DB connection conversion unit 13 determines whether or not the owner ID is included in the executed SQL, and if included, generates a connection to the update DB 60, and if not included, for reference A code for generating a connection to the DB 50 (see (5) in FIG. 5) is added. In addition, when executing SQL for updating the database such as update and create, a code for generating a connection to the update DB is used.

Webコンテンツ変換部14は、HTMLファイル及びJSPファイルの中を検索し、type属性が「password」となっている<input>要素があるか否かを判定する。この結果、Webコンテンツ変換部14は、password属性の<input>要素がある場合には、同じフォーム要素内に隠しメッセージである「<input type=“hidden” name=“CONTAINS_PASSWORD_FIELD” Value=“TRUE”>」を追加する処理を行う。   The Web content conversion unit 14 searches the HTML file and the JSP file, and determines whether there is an <input> element whose type attribute is “password”. As a result, when there is an <input> element with a password attribute, the Web content conversion unit 14 is a hidden message “<input type =“ hidden ”name =“ CONTAINS_PASSWORD_FIELD ”Value =“ TRUE ”in the same form element. The process of adding “>” is performed.

つまり、HTML入力フォームがパスワード情報を含んでおり、所有者がIDを入力した可能性が高いと判断し、“CONTAINS_PASSWORD_FIELD”が含まれていれば、そのときの値をセッションに保存するように隠しメッセージを追加する。なお、IDとパスワードは同一の入力フォームを用いられることが多く、パスワードと一緒に入力される情報の中にID情報が含まれる確率が高い。   In other words, if the HTML input form includes password information and the owner has determined that there is a high possibility that the ID has been input, and if "CONTAINS_PASSWORD_FIELD" is included, the value at that time is hidden to be stored in the session. Add a message. Note that the same input form is often used for the ID and the password, and there is a high probability that the ID information is included in the information input together with the password.

ファイル圧縮部15は、変換後配備記述子、変換後クラスファイルおよび変換後Webコンテンツをリスナクラスおよびフィルタクラスとともに圧縮し、変換後アプリとして生成する。この変換後アプリは、APサーバ20上にネットワーク経由で転送、配備され、実行システム上で実行される。   The file compression unit 15 compresses the post-conversion deployment descriptor, the post-conversion class file, and the post-conversion web content together with the listener class and the filter class, and generates a post-conversion application. The converted application is transferred and deployed on the AP server 20 via the network, and is executed on the execution system.

ここで、図6の例を用いてリスナクラスについて説明する。図6は、リスナクラスのプログラム例を示す図である。リスナクラスは、配備されたWebアプリが起動する際に一度だけ実行される。そして、リスナクラスは、図6に示すように、DB定義ファイルから抽出した更新用DB及び参照用DBのURLをメモリ上に保存しておき、後でアプリ内で使えるようにする機能を有している。具体的には図5で示すコード(5)内で使用されている。   Here, the listener class will be described using the example of FIG. FIG. 6 is a diagram illustrating an example of a listener class program. The listener class is executed only once when the deployed web application is activated. As shown in FIG. 6, the listener class has a function of storing the URLs of the update DB and the reference DB extracted from the DB definition file in a memory so that they can be used later in the application. ing. Specifically, it is used in the code (5) shown in FIG.

図7は、フィルタクラスのプログラム例を示す図である。フィルタクラスは、Servlet仕様により、リクエストの最初に呼び出され、HTTPリクエストの情報を読み取ることができるようになっている。フィルタクラス「PasswordFilter」は、HTTPリクエストの情報を検索し、CONTAINS_PASSWORD_FIELDという名称のパラメータが存在しているかをチェックする。CONTAINS_PASSWORD_FIELDパラメータが存在すれば、ヘルパクラス(ScaleoutHelper)を呼び出し、すべてのパラメータの内容をセッション(ユーザごとのメモリ情報)に保存する。この内容が、所有者IDの候補となる。   FIG. 7 is a diagram illustrating an example of a filter class program. The filter class is called at the beginning of a request according to the Servlet specification, and can read information of an HTTP request. The filter class “PasswordFilter” searches the HTTP request information and checks whether a parameter named CONTAINS_PASSWORD_FIELD exists. If the CONTAINS_PASSWORD_FIELD parameter exists, a helper class (ScaleoutHelper) is called and the contents of all parameters are stored in the session (memory information for each user). This content is a candidate for the owner ID.

ここで、図8を用いて、Webアプリケーションシステムにおけるコンテンツ参照処理を説明する。図8は、Webアプリケーションシステムの処理を説明する図である。図8に示すように、Webアプリケーションシステム100では、ブラウザ30からログイン時に利用者IDの入力が受け付けられると、LB40に利用者IDを送信する(図8の(1)参照)。そして、Webアプリケーションシステム100では、LB40からAPサーバ20に利用者IDが送信されると、フィルタがパスワードとともに送られた文字列を利用者IDと特定し、セッション情報に利用者IDを格納する(図8の(2)参照)。   Here, content reference processing in the Web application system will be described with reference to FIG. FIG. 8 is a diagram for explaining processing of the Web application system. As shown in FIG. 8, in the Web application system 100, when an input of a user ID is accepted from the browser 30 at the time of login, the user ID is transmitted to the LB 40 (see (1) in FIG. 8). In the Web application system 100, when the user ID is transmitted from the LB 40 to the AP server 20, the filter identifies the character string sent together with the password as the user ID, and stores the user ID in the session information ( (See (2) in FIG. 8).

その後、Webアプリケーションシステム100では、ブラウザ30からデータ参照要求を受け付けると(図8の(3)参照)、LB40を介して、APサーバ20にデータ参照要求を送信する。そして、APサーバ20のアプリは、データ参照要求を受け付けると、SQLを発行する。続いて、APサーバ20のDB振り分けエンジンがSQLを解析し、where句内に利用者IDと一致するものが1件以上あるかセッション情報の利用者IDを参照する(図8の(4)参照)。この結果、where句内に利用者IDと一致するものが1件以上ある場合には、更新用DB60に問い合わせ、また、利用者IDと一致するものがない場合には、参照用DB50に問い合わせる(図8の(5)参照)。   Thereafter, when receiving a data reference request from the browser 30 (see (3) in FIG. 8), the Web application system 100 transmits the data reference request to the AP server 20 via the LB 40. And the application of AP server 20 will issue SQL, if a data reference request is received. Subsequently, the DB distribution engine of the AP server 20 analyzes the SQL and refers to the user ID of the session information to see if there is one or more items matching the user ID in the where clause (see (4) in FIG. 8). ). As a result, if there is one or more items that match the user ID in the where clause, the update DB 60 is inquired. If there is no item that matches the user ID, the reference DB 50 is inquired (if there is no item that matches the user ID ( (See (5) in FIG. 8).

例えば、図9を用いて、コンテンツ所有者がコンテンツを登録し、それを自分自身で確認する場合の処理を説明する。図9は、コンテンツ所有者がコンテンツを参照する場合の処理を説明する図である。トップページのHTMLコンテンツには、ID、パスワードの入力フォームがあり、この入力フォームにはtype=passwordの<input>要素が存在するので、パスワードと同時に入力されたIDが、ヘルパクラスを通じてセッション情報に保存される。例えば、図9の左側に示すように、IDとして「tanaka」と入力した場合には、takanaという文字列がセッション情報に保存される。   For example, a process in the case where the content owner registers the content and confirms it himself will be described with reference to FIG. FIG. 9 is a diagram illustrating processing when the content owner refers to content. The HTML content on the top page has an input form for ID and password. Since this input form has an <input> element of type = password, the ID entered at the same time as the password becomes session information through the helper class. Saved. For example, as shown on the left side of FIG. 9, when “tanaka” is input as the ID, a character string “takana” is stored in the session information.

その後、コンテンツ利用者が日記等のコンテンツを登録し、再度自身の作成したコンテンツの一覧を表示する。その際に、図9の右上のようなコードが実行されると、statementオブジェクトのid部分には「takana」という文字列が入るので、この文字列がセッション情報の文字列を一致し、更新用DBのURLが使用される。   Thereafter, the content user registers content such as a diary and displays a list of content created by the content user again. At that time, when the code as shown in the upper right of FIG. 9 is executed, since the character string “takana” is entered in the id part of the statement object, this character string matches the character string of the session information and is used for the update. The DB URL is used.

また、図10を用いて、コンテンツ読者がコンテンツを参照する場合の処理を説明する。図10は、コンテンツ読者がコンテンツを参照する場合の処理を説明する図である。図10に示すように、コンテンツ読者である「suzuki」がコンテンツ所有者「tanaka」とは異なるIDでログインすると、セッション情報に「suzuki」が保存される。次にコンテンツ読者である「suzuki」さんが、tanakaさんのコンテンツ一覧表示を押下すると、図10の右上のようなコードが実行される。ここで、statementオブジェクトのid部分には「takana」という文字列が入るので、この文字列がセッション情報の文字列と一致せず、参照用DBのURLが使用される。   In addition, processing when a content reader refers to content will be described with reference to FIG. FIG. 10 is a diagram for explaining processing when a content reader refers to content. As shown in FIG. 10, when the content reader “suzuki” logs in with an ID different from the content owner “tanaka”, “suzuki” is stored in the session information. Next, when the content reader “Suzuki” presses Tanaka's content list display, the code shown in the upper right of FIG. 10 is executed. Here, since the character string “takana” is entered in the id portion of the statement object, this character string does not match the character string of the session information, and the URL of the reference DB is used.

[配備サーバによる処理]
次に、図11および図12を用いて、実施例2に係る配備サーバ10による処理を説明する。図11は、実施例2に係る配備サーバの配備記述子変更手順を説明するためのフローチャートである。図12は、実施例2に係る配備サーバのDBコネクション変換手順を説明するためのフローチャートである。
[Processing by Deployment Server]
Next, processing performed by the deployment server 10 according to the second embodiment will be described with reference to FIGS. 11 and 12. FIG. 11 is a flowchart for explaining the deployment descriptor change procedure of the deployment server according to the second embodiment. FIG. 12 is a flowchart for explaining the DB connection conversion procedure of the deployment server according to the second embodiment.

図11に示すように、配備サーバ10は、配備記述子を読み込むと(ステップS101)、<listener>要素があるか判定する(ステップS102)。この結果、配備サーバ10は、<listener>要素があると判定した場合には(ステップS102肯定)、<listener>要素内の最後に<listener−class>要素を追加する(ステップS103)。   As shown in FIG. 11, when the deployment server 10 reads the deployment descriptor (step S101), the deployment server 10 determines whether there is a <listener> element (step S102). As a result, when the deployment server 10 determines that there is a <listener> element (Yes in step S102), the deployment server 10 adds a <listener-class> element at the end of the <listener> element (step S103).

そして、配備サーバ10は、<listener>要素がないと判定した場合には(ステップS102否定)、<listner−class>要素を追加する(ステップS104)。   If the deployment server 10 determines that there is no <listener> element (No in step S102), it adds a <listner-class> element (step S104).

続いて、配備サーバ10は、<filter>要素があるか判定する(ステップS105)。この結果、配備サーバ10は、<filter>要素があると判定した場合には(ステップS105肯定)、最後の<filter>要素の直後に<filter>要素を追加する(ステップS106)。そして、最後の<filter−mapping>要素の直後に<filter−mapping>要素を追加する(ステップS107)。   Subsequently, the deployment server 10 determines whether there is a <filter> element (step S105). As a result, when the deployment server 10 determines that there is a <filter> element (Yes in step S105), the deployment server 10 adds a <filter> element immediately after the last <filter> element (step S106). Then, a <filter-mapping> element is added immediately after the last <filter-mapping> element (step S107).

また、配備サーバ10は、<filter>要素がないと判定した場合には(ステップS105否定)、<servlet>要素の直前に<filter>要素と<filter−mapping>要素を追加する(ステップS108)。   If the deployment server 10 determines that there is no <filter> element (No in step S105), it adds a <filter> element and a <filter-mapping> element immediately before the <servlet> element (step S108). .

次に、図12を用いて、DBコネクション変換処理を説明する。図12に示すように、配備サーバ10は、Javaプログラムを読み込み(ステップS201)、コネクション取得部分があるか判定する(ステップS202)。この結果、配備サーバ10は、コネクション取得部分がない場合には(ステップS202否定)、DBコネクション変換処理を終了する。また、配備サーバ10は、コネクション取得部分がある場合には(ステップS202肯定)、プログラムのメソッドの先頭に所有者ID候補一覧を取得する命令を追加する(ステップS203)。   Next, the DB connection conversion process will be described with reference to FIG. As shown in FIG. 12, the deployment server 10 reads the Java program (step S201) and determines whether there is a connection acquisition part (step S202). As a result, when there is no connection acquisition part (No at Step S202), the deployment server 10 ends the DB connection conversion process. Further, when there is a connection acquisition part (Yes at Step S202), the deployment server 10 adds a command for acquiring the owner ID candidate list to the head of the program method (Step S203).

そして、配備サーバ10は、コネクションを生成するコード部分について、実行されるSQLに所有者IDが含まれていれば更新用DB60へのコネクションを生成し所有者IDが含まれていなければ参照用DB50へのコネクションを生成するコードを追加する(ステップS204)。その後、配備サーバ10は、最後の<filter−mapping>要素の直後に<filter−mapping>要素を追加する(ステップS205)。   Then, the deployment server 10 generates a connection to the update DB 60 if the SQL to be executed includes the owner ID for the code part for generating the connection, and the reference DB 50 if the owner ID is not included. A code for generating a connection to is added (step S204). Thereafter, the deployment server 10 adds a <filter-mapping> element immediately after the last <filter-mapping> element (step S205).

[Webアプリケーションシステムによる処理]
次に、図13および図14を用いて、実施例2に係るWebアプリケーションシステム100による処理を説明する。図13は、実施例2に係るWebアプリケーションシステムのコンテンツ追加時の処理手順を説明するためのフローチャートである。図14は、実施例2に係るWebアプリケーションシステムのコンテンツ参照時の処理手順を説明するためのフローチャートである。
[Processing by Web application system]
Next, processing performed by the Web application system 100 according to the second embodiment will be described with reference to FIGS. 13 and 14. FIG. 13 is a flowchart for explaining the processing procedure when adding content in the Web application system according to the second embodiment. FIG. 14 is a flowchart for explaining a processing procedure when referring to contents in the Web application system according to the second embodiment.

図13に示すように、APサーバ20は、配備記述子を読み込み(ステップS301)、リスナクラスを実行して(ステップS302)、APサーバ20のメモリ内に参照用DB50および更新用DB60のURLを保存する(ステップS303)。そして、コンテンツ所有者がブラウザ30からサイトのトップページのURLを入力してロードバランサ40にアクセスすると(ステップS304)、ロードバランサ40がHTTPリクエストをAPサーバ20に送信する(ステップS305)。   As shown in FIG. 13, the AP server 20 reads the deployment descriptor (step S301), executes the listener class (step S302), and stores the URLs of the reference DB 50 and the update DB 60 in the memory of the AP server 20. Save (step S303). Then, when the content owner inputs the URL of the top page of the site from the browser 30 to access the load balancer 40 (step S304), the load balancer 40 transmits an HTTP request to the AP server 20 (step S305).

続いて、APサーバ20は、ロードバランサ40からHTTPリクエストを受信し、配備記述子に従って該当のWebページを返却する(ステップS306)。なお、Webページには、パスワードの入力が含まれるので、「CONTAINS_PASSWORD_FIELD」パラメータが追加されている。   Subsequently, the AP server 20 receives an HTTP request from the load balancer 40, and returns the corresponding Web page according to the deployment descriptor (step S306). Since the Web page includes an input of a password, a “CONTAINS_PASSWORD_FIELD” parameter is added.

そして、コンテンツ所有者がブラウザ30から「ID」、「パスワード」を入力してログインする(ステップS307)。そして、ブラウザ30からロードバランサ40に「ID」、「パスワード」が通知され、ロードバランサ40が再度同一のAPサーバ20に送信する(ステップS308)。   Then, the content owner inputs “ID” and “password” from the browser 30 and logs in (step S307). Then, “ID” and “password” are notified from the browser 30 to the load balancer 40, and the load balancer 40 transmits the same again to the same AP server 20 (step S308).

そして、APサーバ20は、フィルタプログラムを呼び出し、「CONTAINS_PASSWORD_FIELD」パラメータが存在するため、セッション情報にコンテンツ所有者のIDを追加する(ステップS309)。続いて、APサーバ20は、配備記述子に従ってURLに対応するクラスファイルを呼び出し、認証を行ってコンテンツ所有者にWebページを返却する(ステップS310)。   Then, the AP server 20 calls the filter program and adds the content owner ID to the session information because the “CONTAINS_PASSWORD_FIELD” parameter exists (step S309). Subsequently, the AP server 20 calls the class file corresponding to the URL according to the deployment descriptor, performs authentication, and returns the web page to the content owner (step S310).

その後、コンテンツ所有者が日記などのコンテンツをブラウザから入力して登録ボタンを押下すると(ステップS311)、コンテンツがロードバランサ40経由でAPサーバ20に送信され、URLに対応するクラスファイルが呼び出される(ステップS312)。そして、登録のプログラムが更新系であるため、更新用DB60に対して書き込みが行われ(ステップS313)、APサーバ20が登録完了ページをコンテンツ所有者に返却する(ステップS314)。   Thereafter, when the content owner inputs content such as a diary from the browser and presses the registration button (step S311), the content is transmitted to the AP server 20 via the load balancer 40, and the class file corresponding to the URL is called ( Step S312). Since the registration program is an update system, writing is performed to the update DB 60 (step S313), and the AP server 20 returns a registration completion page to the content owner (step S314).

続いて、コンテンツ所有者が自分で登録したコンテンツの一覧の参照を要求するために、コンテンツの一覧の選択ボタンを押下すると(ステップS315)、ロードバランサ40経由でAPサーバ20にリクエストが送信され、URLに対応するクラスファイルが呼び出される(ステップS316)。そして、APサーバ20は、一覧表示画面が参照系であり、所有者のIDがSQL内に含まれているため更新用DB60のコネクションが使用され、更新用DB60に対して参照が行われる(ステップS317)。   Subsequently, when the content owner presses the content list selection button to request the reference of the content list registered by himself / herself (step S315), the request is transmitted to the AP server 20 via the load balancer 40, The class file corresponding to the URL is called (step S316). The AP server 20 uses the list display screen as a reference system and the owner's ID is included in the SQL, so the connection of the update DB 60 is used and the update DB 60 is referred to (step). S317).

次に、図14を用いて、コンテンツ参照処理を説明する。図14に示すように、APサーバ20は、配備記述子を読み込み(ステップS401)、リスナクラスを実行して(ステップS402)、APサーバ20のメモリ内に参照用DB50および更新用DB60のURLを保存する(ステップS403)。そして、コンテンツ読者がブラウザ30からサイトのトップページのURLを入力してロードバランサ40にアクセスすると(ステップS404)、ロードバランサ40がHTTPリクエストをAPサーバ20に送信する(ステップS405)。   Next, content reference processing will be described with reference to FIG. As shown in FIG. 14, the AP server 20 reads the deployment descriptor (step S401), executes the listener class (step S402), and stores the URLs of the reference DB 50 and the update DB 60 in the memory of the AP server 20. Save (step S403). Then, when the content reader enters the URL of the top page of the site from the browser 30 and accesses the load balancer 40 (step S404), the load balancer 40 transmits an HTTP request to the AP server 20 (step S405).

続いて、APサーバ20は、ロードバランサ40からHTTPリクエストを受信し、配備記述子に従って該当のWebページを返却する(ステップS406)。なお、Webページには、パスワードの入力が含まれるので、「CONTAINS_PASSWORD_FIELD」パラメータが追加されている。   Subsequently, the AP server 20 receives an HTTP request from the load balancer 40, and returns a corresponding Web page according to the deployment descriptor (step S406). Since the Web page includes an input of a password, a “CONTAINS_PASSWORD_FIELD” parameter is added.

そして、コンテンツ読者がブラウザ30から「ID」、「パスワード」を入力してログインする(ステップS407)。そして、ブラウザ30からロードバランサ40に「ID」、「パスワード」が通知され、ロードバランサ40が再度同一のAPサーバ20に送信する(ステップS408)。   Then, the content reader inputs “ID” and “password” from the browser 30 and logs in (step S407). Then, “ID” and “password” are notified from the browser 30 to the load balancer 40, and the load balancer 40 transmits the same again to the same AP server 20 (step S408).

そして、APサーバ20は、フィルタプログラムを呼び出し、「CONTAINS_PASSWORD_FIELD」パラメータが存在するため、セッション情報にコンテンツ読者のIDを追加する(ステップS409)。続いて、APサーバ20は、配備記述子に従ってURLに対応するクラスファイルを呼び出し、認証を行ってコンテンツ読者にWebページを返却する(ステップS410)。   Then, the AP server 20 calls the filter program and adds the content reader ID to the session information because the “CONTAINS_PASSWORD_FIELD” parameter exists (step S409). Subsequently, the AP server 20 calls the class file corresponding to the URL according to the deployment descriptor, performs authentication, and returns the Web page to the content reader (step S410).

その後、コンテンツ読者が読みたいコンテンツ所有者を選択し、そのコンテンツ一覧ボタンを押下すると(ステップS411)、ロードバランサ40経由でAPサーバ20にリクエストが送信され、URLに対応するクラスファイルが呼び出される(ステップS412)。そして、APサーバ20は、一覧表示画面が参照系であり、所有者のIDがSQL内に含まれていないため参照用DB50のコネクションが使用され、参照用DB50に対して参照が行われる(ステップS413)。なお、レプリケーションのタイミングによっては、最新のコンテンツが見られない可能性がある。   Thereafter, when the content reader selects a content owner to be read and presses the content list button (step S411), a request is transmitted to the AP server 20 via the load balancer 40, and a class file corresponding to the URL is called ( Step S412). The AP server 20 uses the list display screen as a reference system, and the owner's ID is not included in the SQL, so the connection of the reference DB 50 is used and the reference DB 50 is referred to (step). S413). Note that the latest content may not be seen depending on the replication timing.

[実施例2の効果]
上述してきたように、配備サーバ10は、最新のコンテンツを保持する更新用DB60と、更新用DB60が保持するコンテンツの複製を保持する参照用記憶部50とに記憶されたコンテンツの所有者の利用者IDを保存するServletフィルタを配備記述子に追加する。そして、配備サーバ10は、コンテンツの参照を要求する利用者の利用者IDとプログラムによって保存された利用者IDとを用いて更新用DB60または参照用DB50にアクセスするプログラムをデータベースへのアクセスを行うJavaクラスに埋め込む。
[Effect of Example 2]
As described above, the deployment server 10 uses the content owner stored in the update DB 60 that holds the latest content and the reference storage unit 50 that holds a copy of the content held in the update DB 60. A Servlet filter that stores the user ID is added to the deployment descriptor. Then, the deployment server 10 accesses the database with a program that accesses the update DB 60 or the reference DB 50 by using the user ID of the user who requests content reference and the user ID stored by the program. Embed in Java class.

このため、配備サーバ10は、プログラムを手動で変更することなく、プログラムを記述するための開発およびテストにかかるコストを削減してアクセス先データベースの振り分けを適切に行うことができる。   Therefore, the deployment server 10 can appropriately distribute the access destination database by reducing the cost for development and testing for describing the program without manually changing the program.

また、実施例2によれば、配備サーバ10は、プログラム追加部が追加するプログラムは、利用者のリクエストにパスワードが含まれる場合に、リクエストを記述するリクエストテキストをコンテンツ所有者の利用者IDとして保存する。このため、IDとパスワードは同一の入力フォームを用いられることが多く、適切に利用者IDを取得することができる。   Further, according to the second embodiment, the deployment server 10 uses the request text describing the request as the user ID of the content owner when the program added by the program adding unit includes a password in the user's request. save. For this reason, the same input form is often used for the ID and the password, and the user ID can be appropriately acquired.

また、実施例2によれば、配備サーバ10は、所有者の利用者IDを保存するプログラムを追加するとともに、更新用DB60および参照用DB50のコネクション情報を作成し、コネクション情報を用いて更新用DB60または参照用DB50にアクセスするプログラムを、データベースへのアクセスを行うJavaクラスに埋め込む。この結果、更新用DB60および参照用DB50に対して事前に作成されたコネクション情報を用いてアクセスすることが可能である。   According to the second embodiment, the deployment server 10 adds a program for storing the owner's user ID, creates connection information for the update DB 60 and the reference DB 50, and uses the connection information for update. A program that accesses the DB 60 or the reference DB 50 is embedded in a Java class that accesses the database. As a result, it is possible to access the update DB 60 and the reference DB 50 using connection information created in advance.

ところで、上記の実施例2では、Webコンテンツ変換部14の代わりにServletフィルタが、HTMLファイルの中に「<input type=“password” name=“***”>」を検出した場合に、同じフォーム要素内に<input type=“hidden”name=“CONTAINS_PASSWORD_FIELD”value=“TRUE”>を追加するようにしてもよい。   By the way, in Example 2 described above, the same applies when the Servlet filter detects “<input type =“ password ”name =“ *** ”>” in the HTML file instead of the Web content conversion unit 14. <Input type = “hidden” name = “CONTAINS_PASSWORD_FIELD” value = “TRUE”> may be added in the form element.

そこで、以下の実施例3では、Servletフィルタが、アプリが出力したHTML情報を変換して、「HTMLファイルの中に「<input type=“password” name=“***”>」を検出した場合に、同じフォーム要素内に<input type=“hidden”name=“CONTAINS_PASSWORD_FIELD”value=“TRUE”>を追加する」処理を行う場合として、図15および図16を用いて、実施例3に係る配備サーバについて説明する。図15は、実施例3に係る配備サーバの構成を示す図である。図16は、Webアプリケーションシステムの処理を説明する図である。   Therefore, in Example 3 below, the Servlet filter converts the HTML information output by the application and detects “<input type =“ password ”name =“ *** ”>” in the HTML file. In this case, <add type = “hidden” name = “CONTAINS_PASSWORD_FIELD” value = “TRUE”> is added ”in the same form element” according to the third embodiment using FIG. 15 and FIG. The deployment server will be described. FIG. 15 is a diagram illustrating the configuration of the deployment server according to the third embodiment. FIG. 16 is a diagram for explaining processing of the Web application system.

まず最初に、実施例3に係る配備サーバ10aの構成を説明する。図15に示すように、配備サーバ10aは、図3に示した配備サーバ10と比較して、Webコンテンツ変換部14がなく、フィルタクラスAを新たに有する点が相違する。かかる配備サーバ10aにおいて、フィルタクラスAは、内部に前処理を行うための前処理フィルタと、後処理を行うための後処理フィルタを有している。前処理フィルタの役割が実施例3のフィルタクラスと同様であるが、後処理フィルタが後処理としてHTML情報を変更するための処理を行う。   First, the configuration of the deployment server 10a according to the third embodiment will be described. As shown in FIG. 15, the deployment server 10 a is different from the deployment server 10 shown in FIG. 3 in that the web content conversion unit 14 is not provided and a filter class A is newly included. In the deployment server 10a, the filter class A includes a preprocessing filter for performing preprocessing and a postprocessing filter for performing postprocessing. Although the role of the preprocessing filter is the same as that of the filter class of the third embodiment, the postprocessing filter performs processing for changing the HTML information as postprocessing.

後処理は、アプリが出力したHTMLを変換して、実施例1のWebコンテンツ変換部14と同様に、「HTMLファイルの中に「<input type=“password” name=“***”>」を検出した場合に、同じフォーム要素内に<input type=“hidden”name=“CONTAINS_PASSWORD_FIELD”value=“TRUE”>を追加する」処理を行う。   The post-processing converts the HTML output by the application, and, like the Web content conversion unit 14 of the first embodiment, “<input type =“ password ”name =“ *** ”>” in the HTML file. Is detected, <input type = “hidden” name = “CONTAINS_PASSWORD_FIELD” value = “TRUE”> is added ”in the same form element.

これにより、実施例2とほぼ同等のフローで同等の機能を提供することが可能となる。また、実施例3では、最終的に出力されるHTML情報に対して変換が行われる利点がある。   As a result, it is possible to provide an equivalent function with a flow substantially equivalent to that of the second embodiment. Further, the third embodiment has an advantage that conversion is performed on finally outputted HTML information.

ここで、図16を用いて、実施例3にかかるWebアプリケーションシステムの処理を説明する。図16は、Webアプリケーションシステムの処理を説明する図である。図16に示すように、実施例3にかかるWebアプリケーションシステムでは、ブラウザ30からログイン時に利用者IDの入力が受け付けられると、LB40に利用者IDを送信する(図16の(1)参照)。そして、LB40からAPサーバ20に利用者IDが送信されると、フィルタAがパスワードとともに送られた文字列を利用者IDと特定し、セッション情報に利用者IDを格納する(図16の(2)参照)。   Here, the processing of the Web application system according to the third embodiment will be described with reference to FIG. FIG. 16 is a diagram for explaining processing of the Web application system. As shown in FIG. 16, in the Web application system according to the third embodiment, when the input of the user ID is accepted from the browser 30 at the time of login, the user ID is transmitted to the LB 40 (see (1) in FIG. 16). When the user ID is transmitted from the LB 40 to the AP server 20, the filter A identifies the character string sent together with the password as the user ID, and stores the user ID in the session information ((2 in FIG. 16). )reference).

その後、ブラウザ30からデータ参照要求を受け付けると(図16の(3)参照)、LB40を介して、APサーバ20にデータ参照要求を送信する。そして、APサーバ20のアプリは、データ参照要求を受け付けると、SQLを発行する。続いて、APサーバ20のDB振り分けエンジンがSQLを解析し、where句内に利用者IDと一致するものが1件以上あるかセッション情報の利用者IDを参照する(図16の(4)参照)。   Thereafter, when a data reference request is received from the browser 30 (see (3) in FIG. 16), the data reference request is transmitted to the AP server 20 via the LB 40. And the application of AP server 20 will issue SQL, if a data reference request is received. Subsequently, the DB distribution engine of the AP server 20 analyzes the SQL, and refers to the user ID of the session information to see if there is one or more items matching the user ID in the where clause (see (4) in FIG. 16). ).

この結果、where句内に利用者IDと一致するものが1件以上ある場合には、更新用DB60に問い合わせ、また、利用者IDと一致するものがない場合には、参照用DB50に問い合わせる。   As a result, if there is one or more items that match the user ID in the where clause, the update DB 60 is inquired. If there is no item that matches the user ID, the reference DB 50 is inquired.

このように実施例3によれば、SPファイルやHTMLファイルを使わずに、直接ServletクラスからHTML情報を生成する場合には、最終的に出力されるHTML情報に対して変換を行ことができる。   As described above, according to the third embodiment, when the HTML information is generated directly from the Servlet class without using the SP file or the HTML file, the HTML information that is finally output can be converted. .

さて、これまで本発明の実施例について説明したが、本発明は上述した実施例以外にも、種々の異なる形態にて実施されてよいものである。そこで、以下では実施例4として本発明に含まれる他の実施例を説明する。   Although the embodiments of the present invention have been described so far, the present invention may be implemented in various different forms other than the embodiments described above. Accordingly, another embodiment included in the present invention will be described below as a fourth embodiment.

(1)システム構成等
また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。例えば、ファイル解凍部11と配備記述子変換部12を統合してもよい。
(1) System Configuration, etc. Further, each component of each illustrated apparatus is functionally conceptual and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, the file decompression unit 11 and the deployment descriptor conversion unit 12 may be integrated.

(2)プログラム
なお、本実施例で説明したアプリケーション配備方法は、あらかじめ用意されたプログラムをパーソナルコンピュータやワークステーションなどのコンピュータで実行することによって実現することができる。このプログラムは、インターネットなどのネットワークを介して配布することができる。また、このプログラムは、ハードディスク、フレキシブルディスク(FD)、CD−ROM、MO、DVDなどのコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行することもできる。
(2) Program The application deployment method described in the present embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. This program can be distributed via a network such as the Internet. The program can also be executed by being recorded on a computer-readable recording medium such as a hard disk, a flexible disk (FD), a CD-ROM, an MO, and a DVD and being read from the recording medium by the computer.

1 アプリケーション配備装置
1a プログラム追加部
1b プログラム変換部
2 アプリケーションサーバ
3 利用者端末
4 更新用記憶部
5 参照用記憶部
10 配備サーバ
11 ファイル解凍部
12 配備記述子変換部
13 DBコネクション変換部
14 Webコンテンツ変換部
15 ファイル圧縮部
20 APサーバ
30 ブラウザ
40 ロードバランサ
50 参照用DB
60 更新用DB
DESCRIPTION OF SYMBOLS 1 Application deployment apparatus 1a Program addition part 1b Program conversion part 2 Application server 3 User terminal 4 Update storage part 5 Reference storage part 10 Deployment server 11 File decompression part 12 Deployment descriptor conversion part 13 DB connection conversion part 14 Web content Conversion unit 15 File compression unit 20 AP server 30 Browser 40 Load balancer 50 Reference DB
60 DB for update

Claims (5)

最新のコンテンツを保持する更新用記憶部と、該更新用記憶部が保持するコンテンツの複製を保持する参照用記憶部とに記憶されたコンテンツの所有者の識別子を保存する処理をコンピュータに実行させる保存プログラムのコードを、コンテンツへアクセスする処理をコンピュータに実行させるコンテンツアクセスプログラムのコードへ追加するプログラムコード追加部と、
前記コンテンツの参照を要求する利用者の識別子と前記保存プログラムの実行によって保存された識別子とを用いて前記更新用記憶部または前記参照用記憶部にアクセスする処理をコンピュータに実行させるアクセスプログラムへ、前記コンテンツアクセスプログラムを変換するプログラム変換部と
を有することを特徴とするアプリケーション配備装置。
Causes the computer to execute processing for storing the identifier of the content owner stored in the update storage unit that holds the latest content and the reference storage unit that holds a copy of the content held in the update storage unit A program code adding unit for adding the code of the storage program to the code of the content access program that causes the computer to execute a process of accessing the content;
To access program for executing processing for accessing said update storage unit or the reference memory unit by using the result stored identifier to the execution of the stored program and the user identifier to request a reference to the content on the computer And a program conversion unit for converting the content access program.
前記プログラムコード追加部によりコードが追加された前記コンテンツアクセスプログラムは、該コンテンツアクセスプログラムのコードにおける前記利用者のリクエストにパスワードが含まれる場合に、該リクエストを記述するリクエストテキストをコンテンツ所有者の識別子として保存する処理をコンピュータに実行させるプログラムである
ことを特徴とする請求項1に記載のアプリケーション配備装置。
The content access program to which the code has been added by the program code adding unit, when a password is included in the user's request in the code of the content access program, the request text describing the request is replaced with the identifier of the content owner The application deployment apparatus according to claim 1, wherein the application deployment apparatus is a program that causes a computer to execute processing to be stored as a program .
前記プログラムコード追加部は、前記所有者の識別子を保存する処理をコンピュータに実行させる前記保存プログラムのコードとともに、前記更新用記憶部および前記参照用記憶部のコネクション情報を作成する情報作成プログラムのコード前記コンテンツアクセスプログラムのコードへ追加し、
前記プログラム変換部は、前記コネクション情報を用いて前記更新用記憶部または前記参照用記憶部にアクセスするする処理をコンピュータに実行させる前記アクセスプログラムへ、前記コンテンツアクセスプログラムを変換する
ことを特徴とする請求項1または2に記載のアプリケーション配備装置。
The program code adding unit is a code of an information creation program for creating connection information of the update storage unit and the reference storage unit together with a code of the storage program for causing a computer to execute a process of storing the identifier of the owner To the content access program code ,
The program conversion unit, the update storage unit or a process of accessing the reference storage unit to the access program to be executed by a computer, and converting the content access program using the connection information The application deployment apparatus according to claim 1 or 2.
最新のコンテンツを保持する更新用記憶部と、該更新用記憶部が保持するコンテンツの複製を保持する参照用記憶部とに記憶されたコンテンツの所有者の識別子を保存する処理をコンピュータに実行させる保存プログラムのコードを、コンテンツへアクセスする処理をコンピュータに実行させるコンテンツアクセスプログラムのコードへ追加するプログラムコード追加ステップと、
前記コンテンツの参照を要求する利用者の識別子と前記保存プログラムの実行によって保存された識別子とを用いて前記更新用記憶部または前記参照用記憶部にアクセスする処理をコンピュータに実行させるアクセスプログラムへ、前記コンテンツアクセスプログラムを変換するプログラム変換ステップと
を含んだことを特徴とするアプリケーション配備方法。
Causes the computer to execute processing for storing the identifier of the content owner stored in the update storage unit that holds the latest content and the reference storage unit that holds a copy of the content held in the update storage unit A program code adding step for adding the code of the storage program to the code of the content access program causing the computer to execute a process of accessing the content;
To access program for executing processing for accessing said update storage unit or the reference memory unit by using the result stored identifier to the execution of the stored program and the user identifier to request a reference to the content on the computer And a program converting step for converting the content access program.
最新のコンテンツを保持する更新用記憶部と、該更新用記憶部が保持するコンテンツの複製を保持する参照用記憶部とに記憶されたコンテンツの所有者の識別子を保存する処理をコンピュータに実行させる保存プログラムのコードを、コンテンツへアクセスする処理をコンピュータに実行させるコンテンツアクセスプログラムのコードへ追加するプログラムコード追加手順と、
前記コンテンツの参照を要求する利用者の識別子と前記保存プログラムの実行によって保存された識別子とを用いて前記更新用記憶部または前記参照用記憶部にアクセスする処理をコンピュータに実行させるアクセスプログラムへ、前記コンテンツアクセスプログラムを変換するプログラム変換手順と
をコンピュータに実行させることを特徴とするアプリケーション配備プログラム。
Causes the computer to execute processing for storing the identifier of the content owner stored in the update storage unit that holds the latest content and the reference storage unit that holds a copy of the content held in the update storage unit A program code addition procedure for adding the code of the storage program to the code of the content access program causing the computer to execute a process of accessing the content;
To access program for executing processing for accessing said update storage unit or the reference memory unit by using the result stored identifier to the execution of the stored program and the user identifier to request a reference to the content on the computer An application deployment program that causes a computer to execute a program conversion procedure for converting the content access program.
JP2010219871A 2010-09-29 2010-09-29 Application deployment apparatus, application deployment method, and application deployment program Expired - Fee Related JP5552991B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010219871A JP5552991B2 (en) 2010-09-29 2010-09-29 Application deployment apparatus, application deployment method, and application deployment program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010219871A JP5552991B2 (en) 2010-09-29 2010-09-29 Application deployment apparatus, application deployment method, and application deployment program

Publications (2)

Publication Number Publication Date
JP2012073950A JP2012073950A (en) 2012-04-12
JP5552991B2 true JP5552991B2 (en) 2014-07-16

Family

ID=46170029

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010219871A Expired - Fee Related JP5552991B2 (en) 2010-09-29 2010-09-29 Application deployment apparatus, application deployment method, and application deployment program

Country Status (1)

Country Link
JP (1) JP5552991B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002132568A (en) * 2000-10-30 2002-05-10 Nec Corp System and method for client control
JP4702835B2 (en) * 2005-07-06 2011-06-15 株式会社日立ソリューションズ Web service customization system
JP2007219608A (en) * 2006-02-14 2007-08-30 Fujitsu Ltd Load balancing processing program and load balancing device
JP2008186425A (en) * 2007-01-31 2008-08-14 Ntt Docomo Inc Data management system
JP5454201B2 (en) * 2010-02-15 2014-03-26 富士通株式会社 Data store switching device, data store switching method, and data store switching program

Also Published As

Publication number Publication date
JP2012073950A (en) 2012-04-12

Similar Documents

Publication Publication Date Title
US8131753B2 (en) Apparatus and method for accessing and indexing dynamic web pages
CN109104467A (en) Develop environment construction method, apparatus and plateform system and storage medium
US7797432B2 (en) Sharing state information between dynamic web page generators
US11553035B2 (en) Cross-platform module for loading across a plurality of device types
US20050160153A1 (en) Publishing multipart WSDL files to URL
CN104765592B (en) A kind of plug-in management method and its device of object web page acquisition tasks
US20150317042A1 (en) System and Methods for Loading an Application and its Modules in a Client Device
CN101184105A (en) Client appartus for updating data
JP2002108870A (en) System and method for processing information
CN103248641A (en) Network download method, device and system
JP5049172B2 (en) Reverse proxy system
JP4282312B2 (en) Web server, Web server having Java servlet function, and computer program
JP2008165447A (en) Data access device, data access method and computer program
JP5499524B2 (en) Relay program and relay device
JP2010102625A (en) Method and device for rewriting uniform resource locator
US7539776B1 (en) Dynamic uniform resource locator compression
CN101300559A (en) Extensible remote tag markup system and method
US20070055663A1 (en) Programmatic response for detected variants of HTTP requests
CN104980464A (en) Network request processing method, network server and network system
JP5552991B2 (en) Application deployment apparatus, application deployment method, and application deployment program
WO2001048630A2 (en) Client-server data communication system and method for data transfer between a server and different clients
JP5243452B2 (en) Browser program and terminal device
Touronen Microservice architecture patterns with GraphQL
JP5049367B2 (en) Information retrieval method and WEB system
JPH11161603A (en) Device and method of repeating data, information terminal device and method thereof, data communication system, and record medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130702

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140204

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140407

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140513

R150 Certificate of patent or registration of utility model

Ref document number: 5552991

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees