JP2008146380A - Cache server, control method for it, program, and information storage medium - Google Patents

Cache server, control method for it, program, and information storage medium Download PDF

Info

Publication number
JP2008146380A
JP2008146380A JP2006333243A JP2006333243A JP2008146380A JP 2008146380 A JP2008146380 A JP 2008146380A JP 2006333243 A JP2006333243 A JP 2006333243A JP 2006333243 A JP2006333243 A JP 2006333243A JP 2008146380 A JP2008146380 A JP 2008146380A
Authority
JP
Japan
Prior art keywords
data
cache
server
acquisition
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006333243A
Other languages
Japanese (ja)
Other versions
JP4763587B2 (en
Inventor
Yoshitaka Yasumura
義孝 安村
Masashi Saito
応志 齊藤
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.)
Sony Interactive Entertainment Inc
Original Assignee
Sony Computer Entertainment Inc
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 Sony Computer Entertainment Inc filed Critical Sony Computer Entertainment Inc
Priority to JP2006333243A priority Critical patent/JP4763587B2/en
Publication of JP2008146380A publication Critical patent/JP2008146380A/en
Application granted granted Critical
Publication of JP4763587B2 publication Critical patent/JP4763587B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a cache server capable of providing cache data to an application server without complicating processing in the application server. <P>SOLUTION: In this cache server, original data acquired from a data storage means 3 are stored as cache data, a request for referring to data in at least a partial reference range of the original data stored in the data storage means 3 and acquiring the whole or a part of the referred data is received from the application server 2, and it is determined whether the cache data are available as data required by the requestor or not. According to the determination result, the required data are acquired by referring to at least either of the cache data and the data within the reference range stored in the data storage means 3, and before determination, the data storage means 3 starts lock control by which update on the original data including the data within the reference range stored in the data storage means 3 is restricted. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、データ格納手段及びアプリケーションサーバに接続されるキャッシュサーバ、キャッシュサーバの制御方法、プログラム及び情報記憶媒体に関する。   The present invention relates to a data storage unit and a cache server connected to an application server, a cache server control method, a program, and an information storage medium.

例えばデータベースサーバなどのデータ格納手段と、このデータ格納手段に格納されたデータに基づく処理を実行するアプリケーションサーバと、を含んだ分散処理システム等のコンピュータシステムがある。このようなコンピュータシステムにおいて、アプリケーションサーバは、実行する処理に応じてデータ格納手段に格納されたデータを参照することによって、必要なデータを取得する。しかしながら、例えば必要なデータがデータベースサーバに格納されたデータベースの中の指定した条件を満たすレコードなどである場合、このようなデータを取得する際にはデータベースサーバにおいてデータベースの検索等による処理負荷が発生する。そのため、アプリケーションサーバにおいて必要となる都度、データ格納手段に格納されたデータを参照して必要なデータを取得するのは、非効率な場合がある。   For example, there is a computer system such as a distributed processing system including data storage means such as a database server and an application server that executes processing based on data stored in the data storage means. In such a computer system, the application server acquires necessary data by referring to the data stored in the data storage means according to the processing to be executed. However, for example, when the necessary data is a record that satisfies a specified condition in the database stored in the database server, processing load due to database search or the like occurs in the database server when such data is acquired. To do. For this reason, it may be inefficient to acquire necessary data by referring to data stored in the data storage unit whenever necessary in the application server.

そこで、このようなコンピュータシステムは、データ格納手段から取得したデータをキャッシュデータとして一時的に格納するキャッシュサーバを備える場合がある。図15は、このようなキャッシュサーバを備えるコンピュータシステムの一例を示すシステム構成図である。この図に示すコンピュータシステムにおいて、アプリケーションサーバは、データベースサーバに格納されたデータが必要になった場合、当該データがキャッシュサーバに既に格納されているか否かをまず判定する。そして、キャッシュサーバ内に必要なデータが既に格納されていれば、データベースサーバにはアクセスせずにキャッシュサーバから必要なデータを取得する。これにより、当該コンピュータシステムは、アプリケーションサーバによるデータ取得の効率化を図ることができる。   Therefore, such a computer system may include a cache server that temporarily stores data acquired from the data storage means as cache data. FIG. 15 is a system configuration diagram illustrating an example of a computer system including such a cache server. In the computer system shown in this figure, when data stored in the database server is necessary, the application server first determines whether or not the data is already stored in the cache server. If the necessary data is already stored in the cache server, the necessary data is acquired from the cache server without accessing the database server. As a result, the computer system can improve the efficiency of data acquisition by the application server.

しかしながら、上記従来例のコンピュータシステムによれば、アプリケーションサーバは、必要なデータを取得する際にキャッシュサーバからデータを取得するのか、あるいはデータベースサーバからデータを取得するのかを判断する必要がある。また、データベースサーバからデータを取得した場合には、再利用に備えてキャッシュサーバに取得したデータを格納する必要がある。そのため、アプリケーションサーバはキャッシュサーバの有無やキャッシュデータの格納状況などに応じた処理を実行しなければならず、処理が煩雑になってしまう場合がある。   However, according to the conventional computer system, the application server needs to determine whether to acquire data from the cache server or to acquire data from the database server when acquiring necessary data. When data is acquired from the database server, it is necessary to store the acquired data in the cache server in preparation for reuse. Therefore, the application server has to execute processing according to the presence / absence of the cache server, the storage state of the cache data, and the like, and the processing may become complicated.

具体例として、例えば複数のアプリケーションサーバがデータベースサーバにアクセスする場合や、1台のアプリケーションサーバ内で起動された複数のプロセスがそれぞれデータベースサーバにアクセスする場合などにおいては、複数のプロセスがデータベースサーバ内のデータをそれぞれ独立に更新してしまう可能性がある。このような場合、各プロセスはキャッシュサーバに格納されたキャッシュデータを利用する際に、当該キャッシュデータが最新のものであるか否かを判断する必要があり、各プロセスが実行する処理は複雑化してしまう。   As a specific example, for example, when a plurality of application servers access the database server, or when a plurality of processes started in one application server access the database server, the plurality of processes are stored in the database server. May be updated independently. In such a case, when each process uses the cache data stored in the cache server, it is necessary to determine whether or not the cache data is the latest, and the process executed by each process becomes complicated. End up.

本発明は上記実情に鑑みてなされたものであって、その目的の一つは、アプリケーションサーバの処理を複雑化させることなく、アプリケーションサーバに対してキャッシュデータを提供できるキャッシュサーバ、キャッシュサーバの制御方法、プログラム及び情報記憶媒体を提供することにある。   The present invention has been made in view of the above circumstances, and one of its purposes is a cache server that can provide cache data to an application server without complicating the processing of the application server, and control of the cache server It is to provide a method, a program, and an information storage medium.

上記課題を解決するための本発明に係るキャッシュサーバは、データ格納手段と、当該データ格納手段に格納された元データに基づく処理を実行するアプリケーションサーバと、に接続され、前記データ格納手段から取得される前記元データの一部又は全部をキャッシュデータとして格納するキャッシュデータ格納手段と、前記データ格納手段に格納された前記元データの少なくとも一部の参照範囲のデータを参照して、当該参照範囲のデータの全部又は一部を取得対象データとして取得するデータ取得要求を、前記アプリケーションサーバから受け付けるデータ取得要求受付手段と、前記データ取得要求を受け付けた場合に、当該データ取得要求により要求される前記取得対象データの少なくとも一部として、前記キャッシュデータを利用可能か否か判定するキャッシュデータ利用可否判定手段と、前記キャッシュデータ利用可否判定手段による判定の結果に応じて、前記キャッシュデータの一部又は全部と、前記データ格納手段に格納された前記元データのうち前記参照範囲のデータの一部又は全部と、のいずれか少なくとも一方を参照して前記取得対象データを取得する取得対象データ取得手段と、前記データ取得要求を受け付けた場合に、少なくとも前記キャッシュデータ利用可否判定手段による判定の前に、前記データ格納手段に格納された前記元データのうち、前記参照範囲のデータを含む前記元データに対する更新を制限するロック制御を、前記データ格納手段に開始させるロック制御手段と、を含むことを特徴とする。   A cache server according to the present invention for solving the above problems is connected to a data storage means and an application server that executes processing based on the original data stored in the data storage means, and is acquired from the data storage means Cache data storage means for storing a part or all of the original data as cache data, and at least a part of the reference range of the original data stored in the data storage means, the reference range A data acquisition request receiving means for receiving from the application server a data acquisition request for acquiring all or part of the data as acquisition target data, and the data acquisition request when the data acquisition request is received Use the cache data as at least part of the acquisition target data Cache data availability determination means for determining whether or not the cache data is available, and part or all of the cache data and the original data stored in the data storage means according to the result of determination by the cache data availability determination means Acquisition target data acquisition means for acquiring the acquisition target data with reference to at least one of part or all of the data in the reference range, and at least the cache when the data acquisition request is received Prior to the determination by the data availability determination unit, the data storage unit starts lock control for restricting the update of the original data including the reference range data among the original data stored in the data storage unit. And a lock control means.

また、本発明に係るキャッシュサーバの制御方法は、データ格納手段と、当該データ格納手段に格納された元データに基づく処理を実行するアプリケーションサーバと、に接続され、前記データ格納手段から取得される前記元データの一部又は全部をキャッシュデータとして格納するキャッシュデータ格納手段を備えるキャッシュサーバの制御方法であって、前記データ格納手段に格納された前記元データの少なくとも一部の参照範囲のデータを参照して、当該参照範囲のデータの全部又は一部を取得対象データとして取得するデータ取得要求を、前記アプリケーションサーバから受け付けるデータ取得要求受付ステップと、前記データ取得要求を受け付けた場合に、当該データ取得要求により要求される前記取得対象データの少なくとも一部として、前記キャッシュデータを利用可能か否か判定するキャッシュデータ利用可否判定ステップと、前記キャッシュデータ利用可否判定ステップによる判定の結果に応じて、前記キャッシュデータの一部又は全部と、前記データ格納手段に格納された前記元データのうち前記参照範囲のデータの一部又は全部と、のいずれか少なくとも一方を参照して前記取得対象データを取得する取得対象データ取得ステップと、前記データ取得要求を受け付けた場合に、少なくとも前記キャッシュデータ利用可否判定ステップによる判定の前に、前記データ格納手段に格納された前記元データのうち、前記参照範囲のデータを含む前記元データに対する更新を制限するロック制御を、前記データ格納手段に開始させるロック制御ステップと、を含むことを特徴とする。   The cache server control method according to the present invention is connected to a data storage means and an application server that executes processing based on the original data stored in the data storage means, and is acquired from the data storage means. A cache server control method comprising cache data storage means for storing part or all of the original data as cache data, wherein at least a part of the reference range data of the original data stored in the data storage means The data acquisition request receiving step of receiving from the application server a data acquisition request for acquiring all or part of the data in the reference range as acquisition target data, and the data acquisition request when the data acquisition request is received At least one of the acquisition target data requested by the acquisition request The cache data availability determination step for determining whether or not the cache data can be used, and a part or all of the cache data according to the result of the determination by the cache data availability determination step, and the data storage means An acquisition target data acquisition step for acquiring the acquisition target data with reference to at least one of part or all of the data in the reference range among the original data stored in the data, and accepting the data acquisition request Lock control for restricting updates to the original data including the reference range data among the original data stored in the data storage means at least before the determination by the cache data availability determination step. And a lock control step for starting the data storage means. The features.

また、本発明に係るプログラムは、データ格納手段と、当該データ格納手段に格納された元データに基づく処理を実行するアプリケーションサーバと、に接続され、前記データ格納手段から取得される前記元データの一部又は全部をキャッシュデータとして格納するキャッシュデータ格納手段を備えるキャッシュサーバとしてコンピュータを機能させるためのプログラムであって、前記データ格納手段に格納された前記元データの少なくとも一部の参照範囲のデータを参照して、当該参照範囲のデータの全部又は一部を取得対象データとして取得するデータ取得要求を、前記アプリケーションサーバから受け付けるデータ取得要求受付手段、前記データ取得要求を受け付けた場合に、当該データ取得要求により要求される前記取得対象データの少なくとも一部として、前記キャッシュデータを利用可能か否か判定するキャッシュデータ利用可否判定手段、前記キャッシュデータ利用可否判定手段による判定の結果に応じて、前記キャッシュデータの一部又は全部と、前記データ格納手段に格納された前記元データのうち前記参照範囲のデータの一部又は全部と、のいずれか少なくとも一方を参照して前記取得対象データを取得する取得対象データ取得手段、及び前記データ取得要求を受け付けた場合に、少なくとも前記キャッシュデータ利用可否判定手段による判定の前に、前記データ格納手段に格納された前記元データのうち、前記参照範囲のデータを含む前記元データに対する更新を制限するロック制御を、前記データ格納手段に開始させるロック制御手段、として前記コンピュータを機能させるためのプログラムである。このプログラムは、コンピュータ読み取り可能な情報記憶媒体に記憶されてよい。   The program according to the present invention is connected to a data storage unit and an application server that executes processing based on the original data stored in the data storage unit, and the program stores the original data acquired from the data storage unit. A program for causing a computer to function as a cache server comprising cache data storage means for storing a part or all of the data as cache data, wherein at least part of the reference data of the original data stored in the data storage means The data acquisition request receiving means for receiving a data acquisition request for acquiring all or part of the data in the reference range as acquisition target data from the application server, and when the data acquisition request is received, the data The acquisition target data requested by the acquisition request At least a part of the cache data according to the result of determination by the cache data availability determination unit, the cache data availability determination unit that determines whether the cache data is available, and the data Acquisition target data acquisition means for acquiring the acquisition target data with reference to at least one of part or all of the data in the reference range among the original data stored in the storage means, and the data acquisition request Is received, and at least before the determination by the cache data availability determination unit, the lock that restricts the update of the original data including the reference range data among the original data stored in the data storage unit Lock control means for causing the data storage means to start control, It is a program for the functioning of the over data. This program may be stored in a computer-readable information storage medium.

以下、本発明の一実施形態について、図面を参照しながら説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の実施の形態に係るキャッシュサーバ1を含んだコンピュータシステムの一例を示すシステム構成図である。本発明の実施の形態に係るコンピュータシステムは、図1に示すように、キャッシュサーバ1と、アプリケーションサーバ2と、データ格納手段3と、を含んで構成される。本実施形態において、データ格納手段3は、1又は複数のデータベースサーバ4を含んで構成される。また、図1においては、キャッシュサーバ1が2台あって、それぞれ4台のアプリケーションサーバ2と接続されている場合の例が示されているが、これは例示であって、キャッシュサーバ1及びアプリケーションサーバ2の数はこれ以外であってもよい。すなわち、アプリケーションサーバ2とキャッシュサーバ1は1台ずつであってもよいし、図1の例よりも多数あってもよい。また、各キャッシュサーバ1と接続されるアプリケーションサーバ2の数は、それぞれ異なってもよい。   FIG. 1 is a system configuration diagram showing an example of a computer system including a cache server 1 according to an embodiment of the present invention. As shown in FIG. 1, the computer system according to the embodiment of the present invention includes a cache server 1, an application server 2, and data storage means 3. In the present embodiment, the data storage unit 3 includes one or a plurality of database servers 4. Further, FIG. 1 shows an example in which there are two cache servers 1 connected to four application servers 2, but this is only an example, and the cache server 1 and the application The number of servers 2 may be other than this. That is, the application server 2 and the cache server 1 may be one each, or there may be more than the example of FIG. Further, the number of application servers 2 connected to each cache server 1 may be different.

また、本実施形態に係るコンピュータシステムは、例えばインターネット等の通信ネットワークを介して、複数のユーザ端末5と接続される。ユーザ端末5は、例えばパーソナルコンピュータや家庭用ゲーム機などの情報処理装置であって、本実施形態に係るコンピュータシステムによって提供されるサービスを利用する各ユーザが使用する端末である。本実施形態において、ユーザ端末5はウェブブラウザプログラム等のクライアントプログラムを実行して、いずれか1台のアプリケーションサーバ2に対してアプリケーション実行要求を送信したり、当該アプリケーション実行要求に応じてアプリケーションサーバ2から送信された処理結果を示すデータを画面上に表示したりする。   Further, the computer system according to the present embodiment is connected to a plurality of user terminals 5 via a communication network such as the Internet. The user terminal 5 is an information processing apparatus such as a personal computer or a consumer game machine, and is a terminal used by each user who uses a service provided by the computer system according to the present embodiment. In the present embodiment, the user terminal 5 executes a client program such as a web browser program and transmits an application execution request to any one of the application servers 2, or the application server 2 in response to the application execution request. The data indicating the processing result transmitted from is displayed on the screen.

キャッシュサーバ1は、予め対応づけられたアプリケーションサーバ2、及びデータ格納手段3に含まれる各データベースサーバ4と相互にデータ通信可能に接続されたサーバコンピュータである。キャッシュサーバ1は、対応するアプリケーションサーバ2からのデータベースサーバ4に対するデータアクセス要求を受け付けて、このデータアクセス要求に応じた処理を行う。キャッシュサーバ1の構成及び機能については、後に詳しく説明する。   The cache server 1 is a server computer connected to the application server 2 associated in advance and each database server 4 included in the data storage means 3 so as to be able to perform data communication with each other. The cache server 1 receives a data access request from the corresponding application server 2 to the database server 4 and performs processing according to the data access request. The configuration and function of the cache server 1 will be described in detail later.

アプリケーションサーバ2は、複数のユーザ端末5及び予め対応づけられたキャッシュサーバ1と相互にデータ通信可能に接続されたサーバコンピュータである。アプリケーションサーバ2は、各ユーザ端末5から送信されるアプリケーション実行要求に応じて、各種の処理を実行する。この処理の少なくとも一部は、データ格納手段3に格納されたデータ(以下、元データという)に基づく処理である。アプリケーションサーバ2は、その処理内容に応じて、データ格納手段3に格納された元データを参照して必要なデータを取得するデータ取得要求や、データ格納手段3に格納された元データの内容を更新するデータ更新要求などのデータアクセス要求を出力する。ただし、本実施形態においてアプリケーションサーバ2は、このデータアクセス要求をデータ格納手段3ではなく対応するキャッシュサーバ1に対して送信する。   The application server 2 is a server computer connected to the plurality of user terminals 5 and the cache server 1 associated in advance so as to be able to perform data communication with each other. The application server 2 executes various processes in response to the application execution request transmitted from each user terminal 5. At least a part of this processing is processing based on data stored in the data storage means 3 (hereinafter referred to as original data). Depending on the processing contents, the application server 2 refers to the original data stored in the data storage means 3 and acquires a data acquisition request for acquiring necessary data, or the contents of the original data stored in the data storage means 3. A data access request such as a data update request to be updated is output. However, in this embodiment, the application server 2 transmits this data access request to the corresponding cache server 1 instead of the data storage unit 3.

すなわち、本実施形態においては、後に詳しく説明するように、キャッシュサーバ1がアプリケーションサーバ2のデータ格納手段3に対するアクセスを仲介する。これにより、アプリケーションサーバ2は、それぞれ個別にデータ格納手段3に含まれる各データベースサーバ4との間で直接接続を確立せずとも、データベースサーバ4に格納されたデータに基づく処理を実行できる。こうすれば、アプリケーションサーバ2の数が多くなっても、データベースサーバ4が各アプリケーションサーバ2からの接続を受け付けるためのサーバプロセスを多数起動する必要はなくなり、データベースサーバ4への接続が確立できずにアプリケーションサーバ2が待たされる状態を避けることができる。また、各アプリケーションサーバ2がそれぞれ個別に接続されたキャッシュサーバ1にキャッシュデータを格納する場合と異なり、アプリケーションサーバ2は従来のデータベースサーバ4へのアクセスと同様の手順でキャッシュサーバ1にアクセスすることにより、キャッシュデータを利用できる。   That is, in this embodiment, as will be described in detail later, the cache server 1 mediates access to the data storage means 3 of the application server 2. As a result, the application server 2 can execute processing based on the data stored in the database server 4 without establishing a direct connection with each database server 4 included in the data storage unit 3 individually. In this way, even if the number of application servers 2 increases, it is not necessary for the database server 4 to start a large number of server processes for accepting connections from the respective application servers 2, and connection to the database server 4 cannot be established. Thus, it is possible to avoid a state in which the application server 2 is kept waiting. Further, unlike the case where each application server 2 stores cache data in the cache server 1 connected individually, the application server 2 accesses the cache server 1 in the same procedure as the access to the conventional database server 4. Thus, cache data can be used.

データ格納手段3に含まれる各データベースサーバ4は、各キャッシュサーバ1と相互にデータ通信可能に接続されたサーバコンピュータである。各データベースサーバ4は、それぞれ1又は複数のデータベースを所定の記憶領域に格納している。さらに各データベースには、元データとして、1又は複数のテーブルが含まれている。ここで所定の記憶領域は、データベースサーバ4の筐体に内蔵されたハードディスク等のディスクデバイスであってもよいし、データベースサーバ4とストレージエリアネットワーク等を介して接続されたストレージデバイスであってもよい。各データベースサーバ4は、キャッシュサーバ1から送信されるアクセス要求に応じて、格納しているテーブル内のデータを更新したり、格納しているテーブルから要求された条件に基づいて抽出したデータをキャッシュサーバ1に対して送信したりする。   Each database server 4 included in the data storage means 3 is a server computer connected to each cache server 1 so as to be capable of data communication with each other. Each database server 4 stores one or more databases in a predetermined storage area. Further, each database includes one or more tables as original data. Here, the predetermined storage area may be a disk device such as a hard disk built in the housing of the database server 4 or a storage device connected to the database server 4 via a storage area network or the like. Good. Each database server 4 updates the data in the stored table in response to the access request transmitted from the cache server 1, or caches the data extracted from the stored table based on the requested condition. Or transmit to the server 1.

以上説明したように、アプリケーションサーバ2、キャッシュサーバ1、及び各データベースサーバ4が相互に連携して動作することにより、本実施形態に係るコンピュータシステムは、ユーザ端末5からのアプリケーション実行要求に応じて、データベースサーバ4に格納されたデータベースに基づく処理を実行し、処理結果を示すデータをユーザ端末5に対して送信する。   As described above, the application system 2, the cache server 1, and each database server 4 operate in cooperation with each other, whereby the computer system according to the present embodiment responds to an application execution request from the user terminal 5. Then, processing based on the database stored in the database server 4 is executed, and data indicating the processing result is transmitted to the user terminal 5.

ここで、本実施形態に係るアプリケーションサーバ2のハードウェア構成の例について、図2の構成図に基づいて説明する。アプリケーションサーバ2は、図2に示すように、制御部21と、メインメモリ24と、通信部25と、を含んで構成される。   Here, an example of the hardware configuration of the application server 2 according to the present embodiment will be described based on the configuration diagram of FIG. As shown in FIG. 2, the application server 2 includes a control unit 21, a main memory 24, and a communication unit 25.

本実施形態において、アプリケーションサーバ2は、それぞれ所定の記憶容量の記憶手段を備える複数のデータ処理手段を含んで構成される。具体例として、制御部21は、1つのメインプロセッサ22と、データ処理手段としての複数のサブプロセッサ23と、を含んで構成される。また、各サブプロセッサ23は、それぞれサブプロセッサユニット23a及びローカルメモリ23bを含んで構成される。   In the present embodiment, the application server 2 includes a plurality of data processing units each including a storage unit having a predetermined storage capacity. As a specific example, the control unit 21 includes one main processor 22 and a plurality of sub-processors 23 as data processing means. Each sub-processor 23 includes a sub-processor unit 23a and a local memory 23b.

メインプロセッサ22は、メインメモリ24に格納されたプログラムに基づいて、各種の情報処理を行う。また、メインプロセッサ22は、各サブプロセッサ23に対して、処理を割り当てるなどの制御を行う。   The main processor 22 performs various types of information processing based on programs stored in the main memory 24. The main processor 22 performs control such as assigning processing to each sub-processor 23.

サブプロセッサユニット23aは、メインプロセッサ22からの指示に従って、各種の情報処理を行う。ローカルメモリ23bは、所定の記憶容量の記憶手段であって、サブプロセッサユニット23aに割り当てられたプログラムやデータの少なくとも一部を格納し、サブプロセッサユニット23aのワークメモリとして動作する。   The sub processor unit 23a performs various types of information processing in accordance with instructions from the main processor 22. The local memory 23b is a storage unit having a predetermined storage capacity, stores at least part of programs and data allocated to the sub processor unit 23a, and operates as a work memory of the sub processor unit 23a.

メインメモリ24は、RAMやROM等のメモリ素子を含んで構成されるコンピュータ読み取り可能な情報記憶媒体であって、制御部21によって実行されるプログラムが格納される。また、メインメモリ24は、制御部21のワークメモリとしても動作する。   The main memory 24 is a computer-readable information storage medium including memory elements such as RAM and ROM, and stores a program executed by the control unit 21. The main memory 24 also operates as a work memory for the control unit 21.

通信部25は、LANボード等のネットワークインタフェースであって、制御部21からの指示に従って、通信ネットワークを介して情報を送信する。また、通信部25は、通信ネットワークを介して到来する情報を受信して制御部21に出力する。   The communication unit 25 is a network interface such as a LAN board, and transmits information via a communication network in accordance with an instruction from the control unit 21. The communication unit 25 receives information that arrives via the communication network and outputs the information to the control unit 21.

続いて、アプリケーションサーバ2が実現する機能について説明する。本実施形態において、アプリケーションサーバ2は、機能的に図3に示すように、複数のアプリケーションプロセス部31と、データベースプロキシ部32と、を含んで構成される。   Next, functions realized by the application server 2 will be described. In the present embodiment, the application server 2 is configured to include a plurality of application process units 31 and a database proxy unit 32 as functionally shown in FIG.

アプリケーションプロセス部31は、複数のサブプロセッサ23のそれぞれがメインメモリ24に格納されたプログラムを実行することによって実現される。すなわち、複数のアプリケーションプロセス部31は、各サブプロセッサ23によってそれぞれ独立に実行される。アプリケーションプロセス部31は、それぞれ対応するユーザ端末5で実行されるクライアントプログラムからアプリケーション実行要求を受け付けて、データベースサーバ4に格納されたデータベースに基づくトランザクション処理を含む、所定の情報処理(アプリケーション実行処理)を実行する。また、アプリケーションプロセス部31は、トランザクション処理を実行する過程で、データベースサーバ4に格納されたデータベースに対する各種の処理要求を、データベースプロキシ部32に対して出力する。   The application process unit 31 is realized by each of the plurality of sub-processors 23 executing a program stored in the main memory 24. In other words, the plurality of application process units 31 are independently executed by each sub-processor 23. The application process unit 31 receives an application execution request from a client program executed on the corresponding user terminal 5 and performs predetermined information processing (application execution processing) including transaction processing based on a database stored in the database server 4. Execute. Further, the application process unit 31 outputs various processing requests for the database stored in the database server 4 to the database proxy unit 32 in the course of executing transaction processing.

ここで、トランザクション処理は、データベースサーバ4に格納されているデータベースとの接続を確立するデータベースオープン要求や、接続が確立されたデータベースに含まれるテーブルを参照したり更新したりするデータアクセス要求などを含む、連続して実行される一連の処理である。アプリケーションプロセス部31は、このトランザクション処理を含むアプリケーション実行処理を実行して、対応するユーザ端末5を利用するユーザに対してアプリケーションサービスを提供するアプリケーション実行手段として機能する。   Here, the transaction processing includes a database open request for establishing a connection with a database stored in the database server 4 and a data access request for referring to or updating a table included in the database with the connection established. It is a series of processes that are executed continuously. The application process unit 31 functions as an application execution unit that executes an application execution process including the transaction process and provides an application service to a user who uses the corresponding user terminal 5.

データベースプロキシ部32は、メインプロセッサ22がメインメモリ24に格納されたプログラムを実行することによって実現される。データベースプロキシ部32は、複数のアプリケーションプロセス部31とキャッシュサーバ1との間のデータの中継を行う。すなわち、データベースプロキシ部32は、各アプリケーションプロセス部31が出力する処理要求を受け付けて、当該処理要求をキャッシュサーバ1に対して送信する。また、キャッシュサーバ1から当該処理要求に応じて返信される応答データを、処理要求を出力したアプリケーションプロセス部31に対して出力する。   The database proxy unit 32 is realized by the main processor 22 executing a program stored in the main memory 24. The database proxy unit 32 relays data between the plurality of application process units 31 and the cache server 1. That is, the database proxy unit 32 receives a processing request output from each application process unit 31 and transmits the processing request to the cache server 1. Also, response data returned from the cache server 1 in response to the processing request is output to the application process unit 31 that has output the processing request.

次に、本実施形態に係るキャッシュサーバ1のハードウェア構成について、図4の構成図に基づいて説明する。キャッシュサーバ1は、図4に示すように、制御部11と、記憶部12と、通信部13と、を含んで構成されるサーバコンピュータである。   Next, the hardware configuration of the cache server 1 according to the present embodiment will be described based on the configuration diagram of FIG. As shown in FIG. 4, the cache server 1 is a server computer that includes a control unit 11, a storage unit 12, and a communication unit 13.

制御部11は、CPU等であって、記憶部12に格納されたプログラムに従って動作する。制御部11は、アプリケーションサーバ2から送信されるデータ取得要求やデータ更新要求に応じて、データベースサーバ4からデータを取得したり、データベースサーバ4に格納されたデータを更新したりする。また、データベースサーバ4から取得したデータをキャッシュデータとして記憶部12に格納し、所定の条件を満たす場合に当該キャッシュデータをアプリケーションサーバ2に対して出力する。本実施形態において制御部11が実現する機能については、後に詳しく説明する。   The control unit 11 is a CPU or the like, and operates according to a program stored in the storage unit 12. The control unit 11 acquires data from the database server 4 or updates data stored in the database server 4 in response to a data acquisition request or data update request transmitted from the application server 2. Further, the data acquired from the database server 4 is stored in the storage unit 12 as cache data, and the cache data is output to the application server 2 when a predetermined condition is satisfied. Functions realized by the control unit 11 in the present embodiment will be described in detail later.

記憶部12は、RAMやROM等のメモリ素子と、ハードディスク等のディスクデバイスと、の少なくとも一方を含んで構成されるコンピュータ読み取り可能な情報記憶媒体である。記憶部12には、制御部11によって実行されるプログラムが格納される。また、記憶部12は、制御部11のワークメモリとしても動作する。   The storage unit 12 is a computer-readable information storage medium including at least one of a memory element such as a RAM or a ROM and a disk device such as a hard disk. The storage unit 12 stores a program executed by the control unit 11. The storage unit 12 also operates as a work memory for the control unit 11.

さらに本実施形態において、記憶部12は、キャッシュデータ格納手段としての機能を実現する。すなわち、記憶部12は、各データベースサーバ4から取得される元データの一部又は全部をキャッシュデータとして格納する。   Further, in the present embodiment, the storage unit 12 realizes a function as a cache data storage unit. That is, the storage unit 12 stores part or all of the original data acquired from each database server 4 as cache data.

通信部13は、LANボード等のネットワークインタフェースであって、制御部11からの指示に従って、通信ネットワークを介して情報を送信する。また、通信部13は、通信ネットワークを介して到来する情報を受信して制御部11に出力する。   The communication unit 13 is a network interface such as a LAN board, and transmits information via a communication network in accordance with an instruction from the control unit 11. The communication unit 13 receives information that arrives via the communication network and outputs the information to the control unit 11.

以下、本実施形態に係るキャッシュサーバ1が実現する機能について、説明する。本実施形態において、キャッシュサーバ1は、機能的に図5に示すように、処理要求受付部41と、データアクセス要求処理部42と、キャッシュデータ管理部43と、ロック制御部44と、を含んで構成される。これらの機能は、例えば制御部11が記憶部12に格納されたプログラムを実行することによって実現できる。このプログラムは、CD−ROMやDVD−ROM等のコンピュータ読み取り可能な情報記憶媒体に格納されて提供されてもよいし、インターネット等の通信ネットワークを介して提供されてもよい。   Hereinafter, functions realized by the cache server 1 according to the present embodiment will be described. In the present embodiment, the cache server 1 functionally includes a processing request receiving unit 41, a data access request processing unit 42, a cache data management unit 43, and a lock control unit 44, as functionally shown in FIG. Consists of. These functions can be realized, for example, when the control unit 11 executes a program stored in the storage unit 12. This program may be provided by being stored in a computer-readable information storage medium such as a CD-ROM or a DVD-ROM, or may be provided via a communication network such as the Internet.

処理要求受付部41は、アプリケーションプロセス部31が出力するデータベースサーバ4に対する各種の処理要求を受け付ける。この処理要求の中には、アプリケーションプロセス部31がデータベースサーバ4に格納されている特定のデータベースへアクセスするための接続を確立するデータベースオープン要求や、接続が確立されたデータベースに含まれる各テーブルに対するデータアクセス要求などが含まれる。さらに、このデータアクセス要求には、データベースサーバ4に格納されたテーブルの内容を更新するデータ更新要求と、データベースサーバ4に格納されたテーブルを参照して指定した条件を満たすデータを取得するデータ取得要求と、が含まれる。また、処理要求の中には、データアクセス要求に応じてなされたデータの取得や更新の処理内容を確定させるコミット要求が含まれてもよい。   The processing request receiving unit 41 receives various processing requests for the database server 4 output by the application process unit 31. The processing request includes a database open request for establishing a connection for the application process unit 31 to access a specific database stored in the database server 4, and a table for each table included in the established database. Includes data access requests. Further, the data access request includes a data update request for updating the contents of the table stored in the database server 4 and data acquisition for acquiring data satisfying a specified condition with reference to the table stored in the database server 4 Request. Further, the processing request may include a commit request for confirming data acquisition or update processing contents made in response to the data access request.

データ取得要求は、データ格納手段3に格納された元データの少なくとも一部の参照範囲のデータを参照して、当該参照範囲のデータの全部又は一部を取得対象データとして取得する要求である。本実施形態においては、データ取得要求によって指定される参照範囲は、データ格納手段3に格納された元データのうちの1又は複数のテーブルであるものとする。すなわち、データ取得要求には、参照範囲として指定する1又は複数のテーブルを特定するテーブル特定情報が含まれる。テーブル特定情報は、例えばテーブル名と、当該テーブルを格納するデータベース名との組み合わせからなる情報である。また、データ取得要求には、取得対象データを特定するためのデータ特定情報も含まれている。ここでは具体例として、データ取得要求は、テーブル特定情報によって特定されるテーブルの中から検索すべきデータの条件を指定する検索条件指定情報を、データ特定情報として含んでいることとする。この検索条件指定情報によって指定された検索条件を満たすデータが、データ取得要求によって要求される取得対象データとなる。   The data acquisition request is a request for referring to at least part of the reference range data of the original data stored in the data storage unit 3 and acquiring all or part of the reference range data as acquisition target data. In the present embodiment, it is assumed that the reference range specified by the data acquisition request is one or more tables of the original data stored in the data storage unit 3. That is, the data acquisition request includes table specifying information for specifying one or more tables specified as the reference range. The table specifying information is information including a combination of a table name and a database name storing the table, for example. The data acquisition request also includes data specifying information for specifying acquisition target data. Here, as a specific example, it is assumed that the data acquisition request includes, as data specifying information, search condition specifying information for specifying a condition of data to be searched from the table specified by the table specifying information. Data satisfying the search condition specified by the search condition specifying information is acquisition target data requested by the data acquisition request.

データアクセス要求処理部42は、処理要求受付部41が受け付けたデータアクセス要求に応じて、このデータアクセス要求によって指定されたテーブルに対するデータの更新又は取得を行う。具体的に、データアクセス要求処理部42は、処理要求受付部41がデータ更新要求を受け付けた場合、指定されたテーブルに対してアクセスし、指示された内容に基づいてデータの更新を行う。また、この場合、データアクセス要求処理部42は、更新対象として指定されたテーブルを過去に参照して取得したキャッシュデータが記憶部12に格納されている場合、当該格納されたキャッシュデータを破棄する指示をキャッシュデータ管理部43に対して出力してもよい。   In response to the data access request received by the processing request receiving unit 41, the data access request processing unit 42 updates or acquires data for the table specified by the data access request. Specifically, when the process request receiving unit 41 receives a data update request, the data access request processing unit 42 accesses the specified table and updates the data based on the instructed contents. In this case, when the cache data acquired by referring to the table designated as the update target in the past is stored in the storage unit 12, the data access request processing unit 42 discards the stored cache data. The instruction may be output to the cache data management unit 43.

一方、処理要求受付部41がデータ取得要求を受け付けた場合、データアクセス要求処理部42は、記憶部12に格納されているキャッシュデータの一部又は全部と、データ取得要求によって指定されたテーブルの一部又は全部と、のいずれか少なくとも一方を参照して、当該データ取得要求により要求される取得対象データを取得する。   On the other hand, when the processing request receiving unit 41 receives a data acquisition request, the data access request processing unit 42 stores part or all of the cache data stored in the storage unit 12 and the table specified by the data acquisition request. The acquisition target data requested by the data acquisition request is acquired with reference to at least one of part or all.

具体例として、処理要求受付部41がデータ取得要求を受け付けた場合、データアクセス要求処理部42は、まずキャッシュデータ管理部43に問い合わせて、当該データ取得要求により要求される取得対象データの少なくとも一部として、記憶部12に格納されているキャッシュデータを利用可能か否か判定する。そして、この判定の結果に応じて、記憶部12に格納されたキャッシュデータとデータベースサーバ4に格納されたテーブルと、のいずれか一方を参照して取得対象データを取得する。例えば取得対象データの全部についてキャッシュデータを利用できると判定された場合、データアクセス要求処理部42は、データベースサーバ4に格納されたテーブルへのアクセスは行わずに、記憶部12に格納されているキャッシュデータを取得対象データとして取得する。一方、キャッシュデータを利用できないと判定した場合、データアクセス要求処理部42は、データベースサーバ4に格納されたテーブルを参照するアクセスを実行する。そして、当該アクセスに応じてデータベースサーバ4が指定された検索条件に基づく検索を実行して得られたデータを、取得対象データとして取得する。この場合において、データアクセス要求処理部42は、データベースサーバ4から取得したデータをキャッシュデータとして記憶部12内に格納する指示を、キャッシュデータ管理部43に対して出力する。   As a specific example, when the processing request receiving unit 41 receives a data acquisition request, the data access request processing unit 42 first queries the cache data management unit 43 and at least one of the acquisition target data requested by the data acquisition request. It is determined whether or not the cache data stored in the storage unit 12 can be used. Then, according to the determination result, the acquisition target data is acquired with reference to either the cache data stored in the storage unit 12 or the table stored in the database server 4. For example, when it is determined that the cache data can be used for all the acquisition target data, the data access request processing unit 42 is stored in the storage unit 12 without accessing the table stored in the database server 4. Acquire cache data as acquisition target data. On the other hand, when it is determined that the cache data cannot be used, the data access request processing unit 42 executes an access that refers to the table stored in the database server 4. Then, the data obtained by executing the search based on the search condition designated by the database server 4 in response to the access is acquired as acquisition target data. In this case, the data access request processing unit 42 outputs an instruction to store the data acquired from the database server 4 as cache data in the storage unit 12 to the cache data management unit 43.

キャッシュデータの利用の可否に関わらず、以上説明した処理によって、データ取得要求によって要求された取得対象データはキャッシュデータとして記憶部12に格納された状態となる。データアクセス要求処理部42は、アプリケーションプロセス部31からデータ取得要求に続いて同一トランザクション処理内において出力される取得結果送信要求に応じて、この記憶部12に格納されたキャッシュデータを取得対象データとして送信する。   Regardless of whether or not the cache data can be used, the acquisition target data requested by the data acquisition request is stored in the storage unit 12 as cache data by the processing described above. The data access request processing unit 42 uses the cache data stored in the storage unit 12 as acquisition target data in response to an acquisition result transmission request output within the same transaction process following the data acquisition request from the application process unit 31. Send.

キャッシュデータ管理部43は、データアクセス要求処理部42の指示に従って、キャッシュデータの記憶部12への格納や、格納されたキャッシュデータの読み出しを行う。具体例として、キャッシュデータ管理部43は、データアクセス要求処理部42がデータ取得要求に応じてデータベースサーバ4から取得対象データを取得した場合に、この取得対象データをキャッシュデータとして記憶部12内に格納するとともに、格納したキャッシュデータの内容を示す情報をキャッシュデータ管理データとして記録する。ここで、キャッシュデータ管理データは、例えば図6に例示するように、データ取得要求に含まれるテーブル特定情報及び検索条件指定情報と、取得日時の情報と、キャッシュデータの記憶部12内の格納位置を示す情報(例えばメモリアドレス)と、を関連づけるデータである。このキャッシュデータ管理データを参照することで、キャッシュデータ管理部43は、記憶部12内に格納された各キャッシュデータの内容及び取得時期に関する情報を取得できる。   The cache data management unit 43 stores the cache data in the storage unit 12 and reads the stored cache data in accordance with an instruction from the data access request processing unit 42. As a specific example, when the data access request processing unit 42 acquires the acquisition target data from the database server 4 in response to the data acquisition request, the cache data management unit 43 stores the acquisition target data as cache data in the storage unit 12. In addition to storing, information indicating the contents of the stored cache data is recorded as cache data management data. Here, for example, as illustrated in FIG. 6, the cache data management data includes table specifying information and search condition designation information included in the data acquisition request, acquisition date / time information, and storage location of the cache data in the storage unit 12. Is data that associates information (for example, a memory address) indicating By referring to the cache data management data, the cache data management unit 43 can acquire information on the contents and acquisition timing of each cache data stored in the storage unit 12.

なお、キャッシュデータ管理部43は、データベースサーバ4から取得されるデータを、アプリケーションサーバ2による処理の単位となる所定のデータサイズ以下のサイズのデータに分割し、この分割されたデータをキャッシュデータとして記憶部12に格納することとしてもよい。この場合の所定のデータサイズは、例えばアプリケーションサーバ2内のローカルメモリ23bの記憶容量に応じて決定される。また、この所定のデータサイズは、キャッシュサーバ1がアプリケーションサーバ2に対してデータベースサーバ4から取得されるデータを送信する際のデータ送信単位に応じて決定されてもよい。   The cache data management unit 43 divides the data acquired from the database server 4 into data having a size equal to or smaller than a predetermined data size as a unit of processing by the application server 2, and uses the divided data as cache data. It is good also as storing in the memory | storage part 12. FIG. The predetermined data size in this case is determined according to the storage capacity of the local memory 23b in the application server 2, for example. The predetermined data size may be determined according to a data transmission unit when the cache server 1 transmits data acquired from the database server 4 to the application server 2.

これにより、キャッシュサーバ1は、例えば複数のアプリケーションプロセス部31から同じキャッシュデータを利用可能なデータ取得要求を複数回受け付けた場合に、このようなデータ取得要求を受け付けるたびにキャッシュデータを分割する処理をすることなく、分割された状態で格納された各キャッシュデータをそのままパケットに格納してアプリケーションサーバ2に対して送信できる。アプリケーションプロセス部31は、キャッシュサーバ1から送信された所定のデータサイズのキャッシュデータをローカルメモリ23bに読み込むことによって、要求したデータに応じた処理を実行できる。   Thus, for example, when the cache server 1 receives a plurality of data acquisition requests that can use the same cache data from a plurality of application process units 31, the cache server 1 divides the cache data every time such a data acquisition request is received. The cache data stored in the divided state can be stored in the packet as it is and transmitted to the application server 2 without performing the process. The application process unit 31 can execute processing according to the requested data by reading the cache data having a predetermined data size transmitted from the cache server 1 into the local memory 23b.

また、キャッシュデータ管理部43は、アプリケーションプロセス部31からデータ取得要求があった場合に、データアクセス要求処理部42からの問い合わせに応じて、当該データ取得要求により要求された取得対象データとしてキャッシュデータを利用可能か否か判定する。具体的に、キャッシュデータ管理部43は、データ取得要求に含まれるデータ特定情報に基づいて過去にデータベースサーバ4から取得されたデータがキャッシュデータとして記憶部12に格納されており、かつ当該キャッシュデータを取得した後に、当該データ取得要求により参照範囲として指定されたデータベースサーバ4内のテーブルが更新されていない場合に、当該キャッシュデータを取得対象データとして利用可能と判断する。   Further, when there is a data acquisition request from the application process unit 31, the cache data management unit 43 responds to an inquiry from the data access request processing unit 42 as cache data to be acquired requested by the data acquisition request. It is determined whether or not can be used. Specifically, the cache data management unit 43 stores data acquired from the database server 4 in the past as cache data in the storage unit 12 based on the data specifying information included in the data acquisition request, and the cache data If the table in the database server 4 designated as the reference range by the data acquisition request has not been updated after the acquisition, the cache data is determined to be usable as acquisition target data.

具体例として、キャッシュデータ管理部43は、データアクセス要求処理部42からの問い合わせがあった場合、まずキャッシュデータ管理データを参照して、アプリケーションプロセス部31から要求された取得対象データがキャッシュデータとして記憶部12に格納されているか否かを判定する。具体的には、データ取得要求に含まれるテーブル特定情報及び検索条件指定情報と一致するテーブル特定情報及び検索条件指定情報の組み合わせが、キャッシュデータ管理データ内にあるか否かを判定する。一致するテーブル特定情報及び検索条件指定情報の組み合わせがキャッシュデータ管理データ内になければ、キャッシュデータ管理部43は要求された取得対象データをキャッシュデータとして保持していないと判定する。逆に、一致する組み合わせがあれば、データ取得要求で指定されたテーブルから過去に同条件で取得されたデータが、キャッシュデータとして記憶部12内に格納されていることとなる。   As a specific example, when there is an inquiry from the data access request processing unit 42, the cache data management unit 43 first refers to the cache data management data, and obtains the acquisition target data requested from the application process unit 31 as cache data. It is determined whether or not it is stored in the storage unit 12. Specifically, it is determined whether or not the combination of the table specifying information and the search condition specifying information that matches the table specifying information and the search condition specifying information included in the data acquisition request is in the cache data management data. If the combination of the matching table specifying information and search condition specifying information is not in the cache data management data, the cache data management unit 43 determines that the requested acquisition target data is not held as cache data. Conversely, if there is a matching combination, data acquired in the past under the same conditions from the table specified by the data acquisition request is stored in the storage unit 12 as cache data.

この場合、続いてキャッシュデータ管理部43は、キャッシュデータ管理データにおいて当該テーブル特定情報及び検索条件指定情報の組み合わせに関連づけられた取得日時の情報を取得する。そして、この取得日時以降に、テーブル特定情報によって特定されるテーブルが更新されているか否かを判定する。なお、以下ではこの判定の対象となるテーブルを判定対象テーブルという。   In this case, subsequently, the cache data management unit 43 acquires the acquisition date information associated with the combination of the table specifying information and the search condition designation information in the cache data management data. Then, after this acquisition date and time, it is determined whether or not the table specified by the table specifying information has been updated. Hereinafter, the table that is the object of this determination is referred to as a determination target table.

具体的に、例えばキャッシュデータ管理部43は、判定対象テーブルを格納しているデータベースサーバ4に問い合わせて、判定対象テーブルの最終更新日時の情報を取得する。ここで、各データベースサーバ4は、例えば図7に例示するようなテーブル更新管理データを保持しているものとする。テーブル更新管理データは、格納されている各テーブルを特定するテーブル特定情報と、各テーブルの最終更新日時の情報と、を関連づけるデータである。各データベースサーバ4は、キャッシュサーバ1からの問い合わせに対して、当該テーブル更新管理データを参照して判定対象テーブルの最終更新日時の情報を取得し、キャッシュサーバ1に対して返信する。   Specifically, for example, the cache data management unit 43 inquires of the database server 4 that stores the determination target table, and acquires information on the last update date and time of the determination target table. Here, it is assumed that each database server 4 holds table update management data as exemplified in FIG. The table update management data is data associating table specifying information for specifying each stored table with information on the last update date / time of each table. In response to the inquiry from the cache server 1, each database server 4 refers to the table update management data, acquires information on the last update date / time of the determination target table, and returns the information to the cache server 1.

なお、各データベースサーバ4は、格納している各テーブルに対する更新処理を監視し、更新処理があった場合に当該更新処理の対象となったテーブルの最終更新日時の情報を更新することとしてもよい。また、本実施形態において各データベースサーバ4に格納されたテーブルはキャッシュサーバ1からのアクセスによって更新される。そこで、キャッシュサーバ1は、アプリケーションプロセス部31からデータ更新要求を受け付けて、データベースサーバ4に格納されたテーブルの更新を行った場合に、当該データベースサーバ4に保持されたテーブル更新管理データ内における、当該テーブルの最終更新日時の情報を更新してもよい。これにより、データベースサーバ4がテーブルの更新処理を監視する機能を備えていない場合であっても、各テーブルの更新に応じてテーブル更新管理データを更新することができる。   Each database server 4 may monitor the update process for each stored table and update the information of the last update date and time of the table that is the target of the update process when there is an update process. . In the present embodiment, the table stored in each database server 4 is updated by access from the cache server 1. Therefore, when the cache server 1 receives a data update request from the application process unit 31 and updates the table stored in the database server 4, the cache server 1 in the table update management data held in the database server 4 Information on the last update date and time of the table may be updated. Thereby, even if the database server 4 does not have a function of monitoring the table update process, the table update management data can be updated in accordance with the update of each table.

データベースサーバ4から最終更新日時の情報を取得したキャッシュデータ管理部43は、この最終更新日時と、記憶部12に格納されたキャッシュデータの取得日時とを比較する。そして、最終更新日時が取得日時より後であれば、キャッシュデータの取得後に判定対象テーブルが更新されており、キャッシュデータは利用できないと判定する。逆に取得日時が最終更新日時より後であれば、キャッシュデータの取得以後、判定対象テーブルは更新されておらず、キャッシュデータの内容は最新の判定対象テーブルの内容に基づくものであると判定する。この場合、キャッシュデータ管理部43は、データ取得要求により要求された取得対象データとしてキャッシュデータを利用可能であるとの判定結果を、データアクセス要求処理部42に対して出力する。   The cache data management unit 43 that acquired the information on the last update date and time from the database server 4 compares the last update date and time with the acquisition date and time of the cache data stored in the storage unit 12. If the last update date and time is later than the acquisition date and time, it is determined that the determination target table has been updated after the cache data is acquired and the cache data cannot be used. Conversely, if the acquisition date / time is after the last update date / time, the determination target table has not been updated since the acquisition of the cache data, and it is determined that the cache data content is based on the latest determination target table content. . In this case, the cache data management unit 43 outputs to the data access request processing unit 42 a determination result that the cache data can be used as the acquisition target data requested by the data acquisition request.

なお、キャッシュデータ管理部43は、キャッシュデータの利用可否を判定するために、判定対象テーブルの最終更新日時をキャッシュデータの取得日時と比較するだけでなく、判定対象テーブルのロック状態を確認することとしてもよい。この場合、キャッシュデータ管理部43は、判定対象テーブルに対するロックがなされているか否かを、判定対象テーブルを格納するデータベースサーバ4に問い合わせる。ここで、各データベースサーバ4は、格納している各テーブルのロック状態を管理するために、例えば図8に例示するようなテーブルロック管理データを保持しているものとする。テーブルロック管理データは、格納されている各テーブルを特定するテーブル特定情報と、各テーブルに対するロック制御の契機となったトランザクション処理を特定するトランザクション特定情報(トランザクション番号など)と、当該トランザクション処理によってなされたロックのモードを示す情報(リードロックか、又はライトロックかを示す情報)と、を関連づけるデータである。各データベースサーバ4は、キャッシュサーバ1からの問い合わせに対して、このテーブルロック管理データを参照して判定対象テーブルに対してライトロックがなされているか否かを判定し、判定結果をキャッシュサーバ1に対して返信する。   Note that the cache data management unit 43 not only compares the last update date / time of the determination target table with the acquisition date / time of the cache data but also checks the lock state of the determination target table in order to determine whether the cache data can be used. It is good. In this case, the cache data management unit 43 inquires of the database server 4 that stores the determination target table whether or not the determination target table is locked. Here, it is assumed that each database server 4 holds table lock management data as exemplified in FIG. 8 in order to manage the lock state of each stored table. The table lock management data is created by table specification information for specifying each stored table, transaction specification information (transaction number, etc.) for specifying transaction processing that triggers lock control for each table, and the transaction processing. This is data for associating information indicating a lock mode (information indicating read lock or write lock). In response to the inquiry from the cache server 1, each database server 4 refers to this table lock management data to determine whether the determination target table is write-locked, and sends the determination result to the cache server 1. Reply to.

キャッシュデータ管理部43は、問い合わせたデータベースサーバ4から返信された判定結果に応じて、判定対象テーブルに対してライトロックがなされていれば、キャッシュデータ管理部43はキャッシュデータの利用はできないと判定する。なぜなら、ライトロックがなされている場合、他のキャッシュサーバ1により判定対象テーブルに対するデータ更新の処理が実行中であると推定されるためである。   The cache data management unit 43 determines that the cache data cannot be used if the write lock is made on the determination target table according to the determination result returned from the inquired database server 4. To do. This is because when the write lock is performed, it is presumed that the data update processing for the determination target table is being executed by another cache server 1.

以上説明したように、キャッシュデータ管理部43は、データ取得要求によって参照範囲として指定されたテーブルに対するデータ更新の有無に関する情報を取得することによって、記憶部12内に格納されたキャッシュデータが最新の判定対象テーブルの内容に基づいて取得されたデータであるか否かを判定できる。   As described above, the cache data management unit 43 acquires the information on the presence or absence of data update for the table specified as the reference range by the data acquisition request, so that the cache data stored in the storage unit 12 is the latest. It can be determined whether or not the data is acquired based on the contents of the determination target table.

ロック制御部44は、処理要求受付部41がデータアクセス要求を受け付けた場合に、このデータアクセス要求によりアクセスの対象として指定されたテーブルを格納するデータベースサーバ4に対して、指定されたテーブルをロックするロック制御を実行させるロック制御命令を出力する。このロック制御命令に応じて、データベースサーバ4は、指定されたテーブルに対してリードロック又はライトロックのいずれかのロック制御を行い、前述したテーブルロック管理データを更新する。   When the processing request receiving unit 41 receives a data access request, the lock control unit 44 locks the specified table against the database server 4 that stores the table specified as an access target by the data access request. The lock control command for executing the lock control to be executed is output. In response to this lock control command, the database server 4 performs lock control of either the read lock or the write lock on the specified table, and updates the above-described table lock management data.

例えばロック制御部44は、処理要求受付部41がデータ取得要求を受け付けた場合に、少なくともキャッシュデータ管理部43による取得対象データとしてキャッシュデータを利用可能か否かの判定が実行される前に、当該データ取得要求により指定されたテーブルを格納するデータベースサーバ4に対して、当該テーブルを含む元データに対する更新を制限するリードロックを開始させる。こうすれば、キャッシュデータ管理部43がキャッシュデータの利用可否を判定している間に、データベースサーバ4内の参照範囲として指定されたテーブルが他のキャッシュサーバ1からのアクセスによって更新されてしまうことを防ぐことができる。これにより、キャッシュサーバ1は、取得対象データとしてキャッシュデータを取得すると判定しても、データベースサーバ4内のテーブルを参照して取得対象データを取得すると判定しても、どちらの場合であっても最新のテーブル内容に基づくデータを取得対象データとして取得することができる。   For example, when the processing request reception unit 41 receives a data acquisition request, the lock control unit 44 at least before the cache data management unit 43 determines whether or not the cache data can be used as acquisition target data. The database server 4 that stores the table specified by the data acquisition request is caused to start a read lock that restricts updates to the original data including the table. By doing so, the table designated as the reference range in the database server 4 is updated by access from another cache server 1 while the cache data management unit 43 determines whether or not the cache data can be used. Can be prevented. Thereby, the cache server 1 determines whether to acquire the cache data as the acquisition target data, or determines whether to acquire the acquisition target data with reference to the table in the database server 4. Data based on the latest table contents can be acquired as acquisition target data.

さらに、ロック制御部44は、少なくともデータアクセス要求処理部42による当該データ取得要求に応じた取得対象データの取得が完了するまでの間、当該データ取得要求により指定されたテーブルを格納するデータベースサーバ4に対して、当該テーブルを含む元データに対する更新を制限するリードロックを実行させてもよい。   Furthermore, the lock control unit 44 stores the table specified by the data acquisition request until at least the acquisition of data to be acquired according to the data acquisition request by the data access request processing unit 42 is completed. On the other hand, a read lock that restricts updating of the original data including the table may be executed.

具体例として、ロック制御部44は、処理要求受付部41がデータ取得要求を受け付けた時点でロック制御命令をデータベースサーバ4に対して出力し、ロック制御を実行させる。また、データアクセス要求処理部42による取得対象データの取得の完了後に、ロックを解除するロック解除命令をデータベースサーバ4に対して出力する。例えばロック制御部44は、アプリケーションプロセス部31が当該データ取得要求に応じた処理の完了後にコミット要求(データ取得要求によって要求されたデータの取得を確定させる要求)をキャッシュサーバ1に対して出力した場合に、このコミット要求の受け付けに応じてロック解除命令をデータベースサーバ4に対して出力してもよい。   As a specific example, the lock control unit 44 outputs a lock control command to the database server 4 when the processing request receiving unit 41 receives a data acquisition request, and executes lock control. Further, after the acquisition of the acquisition target data by the data access request processing unit 42 is completed, a lock release command for releasing the lock is output to the database server 4. For example, the lock control unit 44 outputs a commit request (a request for confirming acquisition of data requested by the data acquisition request) to the cache server 1 after the application process unit 31 completes the processing according to the data acquisition request. In this case, a lock release command may be output to the database server 4 in response to acceptance of this commit request.

以上説明したようなロック制御により、キャッシュサーバ1は、既に記憶部12に格納されているキャッシュデータをデータ取得要求に応じた取得対象データとして取得する場合も含めて、取得対象データの取得が完了するまで指定されたテーブルへの更新を制限することができる。これにより、キャッシュサーバ1が取得した取得対象データが取得時点におけるデータベースサーバ4内のテーブルの内容に基づいて取得されたデータであることを保証できる。   By the lock control as described above, the cache server 1 completes the acquisition of the acquisition target data including the case where the cache data already stored in the storage unit 12 is acquired as the acquisition target data in response to the data acquisition request. Until then, updates to the specified table can be restricted. Thereby, it can be guaranteed that the acquisition target data acquired by the cache server 1 is data acquired based on the contents of the table in the database server 4 at the time of acquisition.

また、ロック制御部44は、処理要求受付部41がデータ更新要求を受け付けた場合に、少なくともデータアクセス要求処理部42による当該データ更新要求に応じたテーブルの更新が完了するまでの間、当該データ更新要求により指定されたテーブルを格納するデータベースサーバ4に対して、当該テーブルを含む元データに対する更新及び参照の双方を制限するライトロックを実行させるロック制御命令を出力してもよい。   Further, when the processing request receiving unit 41 receives a data update request, the lock control unit 44 at least until the data access request processing unit 42 completes updating of the table according to the data update request. A lock control command for executing a write lock that restricts both update and reference to the original data including the table may be output to the database server 4 that stores the table specified by the update request.

さらにロック制御部44は、データアクセス要求処理部42がデータベースサーバ4に格納されたデータベースに対する参照又は更新のアクセスを実行し、その応答がデータベースサーバ4から所定時間以上ない場合に、デッドロックの発生の有無を検査するデッドロック検出処理を実行してもよい。   Further, the lock control unit 44 executes a reference or update access to the database stored in the database server 4 by the data access request processing unit 42, and a deadlock occurs when the response is not received from the database server 4 for a predetermined time or more. A deadlock detection process for inspecting for the presence or absence of this may be executed.

具体例として、ロック制御部44は、データアクセス要求処理部42によるデータベースサーバ4へのアクセスにおいてタイムアウトが発生した場合に、アクセス先のデータベースサーバ4が保持しているテーブルロック管理データを参照して、このタイムアウトがテーブルのロックによるものか否かを判定する。タイムアウトがテーブルのロックによるものである場合、さらに当該ロック制御を行ったトランザクション処理をトランザクション番号によって特定し、特定されたトランザクション処理が他のテーブルのロック解除を待っているか否かを判定する。このような処理を繰り返すことによって、ロック制御部44は、デッドロックの発生を検出できる。デッドロックの発生を検出した場合、ロック制御部44は、このデッドロックの発生原因となったトランザクション処理によるデータベースへのアクセスをトランザクション処理開始時点の状態に戻すロールバック処理を実行する。   As a specific example, the lock control unit 44 refers to the table lock management data held in the access destination database server 4 when a timeout occurs in the access to the database server 4 by the data access request processing unit 42. It is determined whether this timeout is due to table lock. If the timeout is due to table lock, the transaction process that performed the lock control is further specified by the transaction number, and it is determined whether or not the specified transaction process is waiting for the lock release of another table. By repeating such processing, the lock control unit 44 can detect the occurrence of deadlock. When the occurrence of the deadlock is detected, the lock control unit 44 executes a rollback process for returning the access to the database by the transaction process causing the deadlock to the state at the start of the transaction process.

以下、本実施形態に係るキャッシュサーバが実行する処理の流れのいくつかの例について、説明する。   Hereinafter, some examples of the flow of processing executed by the cache server according to the present embodiment will be described.

まず、アプリケーションプロセス部31からデータベースオープン要求が出力された場合にキャッシュサーバ1が実行する処理の例について、図9のフロー図に基づいて説明する。   First, an example of processing executed by the cache server 1 when a database open request is output from the application process unit 31 will be described with reference to the flowchart of FIG.

この場合、まず処理要求受付部41が、アプリケーションプロセス部31から出力されたデータベースオープン要求を受け付ける(S1)。そして、処理要求受付部41は、S1で受け付けたデータベースオープン要求によって要求されたデータベース(接続対象データベース)にアクセスするための通信先となる、データベースサーバ内で起動されているサーバプロセスを特定するサーバプロセス特定情報を、データベース管理データを参照して取得する(S2)。   In this case, the processing request receiving unit 41 first receives the database open request output from the application process unit 31 (S1). Then, the processing request receiving unit 41 is a server that identifies a server process activated in the database server that is a communication destination for accessing the database (connection target database) requested by the database open request received in S1. Process identification information is acquired with reference to the database management data (S2).

ここで、データベース管理データは、例えば図10に例示するように、各データベースサーバ4に格納されたデータベースを特定するデータベース特定情報(データベース名など)と、当該データベース特定情報によって特定されるデータベースへのアクセス要求を受け付けるサーバプロセス特定情報と、を関連づけるデータである。このデータベース管理データは、例えばデータ格納手段3に含まれるデータベースサーバ4のうち、予め定められた1台のデータベースサーバ4内に格納されている。このデータベース管理データには、データ格納手段3に含まれる全てのデータベースサーバ4に格納されているデータベースに関する情報が記録されているものとする。   Here, as shown in FIG. 10, for example, the database management data includes database identification information (such as a database name) for identifying the database stored in each database server 4 and the database identified by the database identification information. This is data for associating server process specifying information for receiving an access request. This database management data is stored in a predetermined database server 4 among the database servers 4 included in the data storage means 3, for example. In this database management data, information on databases stored in all database servers 4 included in the data storage means 3 is recorded.

例えばサーバプロセス特定情報は、データベース特定情報によって特定されるデータベースを格納しているデータベースサーバ4のネットワーク上の位置を特定する情報(IPアドレスなど)と、データベースサーバ4内で実行される当該データベースへのアクセスを受け付けるサーバプロセスに対する通信先を特定する情報(当該プロセスにアクセスするためのポート番号など)と、の組み合わせからなる情報である。本実施形態において、各データベースサーバ4は、当該データベースサーバ4に格納された1又は複数のデータベースのいずれかに関連づけられ、キャッシュサーバ1から送信される当該関連づけられたデータベースに対するアクセス要求を受け付けるアクセス受付手段として、1又は複数のサーバプロセスを予め起動している。そして、このサーバプロセスへのアクセスを受け付けるためのポート番号の情報を、データベース管理データを保持するデータベースサーバ4に対して送信する。これにより、データベース管理データには、データ格納手段3に格納された各データベースに関連づけられたサーバプロセスを特定するサーバプロセス特定情報が登録されることとなる。   For example, the server process specifying information includes information (IP address or the like) specifying the position of the database server 4 storing the database specified by the database specifying information on the network and the database executed in the database server 4. Information specifying a communication destination for a server process that accepts access (such as a port number for accessing the process). In the present embodiment, each database server 4 is associated with either one or a plurality of databases stored in the database server 4 and receives an access request for receiving an access request for the associated database transmitted from the cache server 1. As a means, one or a plurality of server processes are activated in advance. Then, information on the port number for accepting access to this server process is transmitted to the database server 4 holding the database management data. As a result, server process specifying information for specifying a server process associated with each database stored in the data storage means 3 is registered in the database management data.

S2の処理でサーバプロセス特定情報を取得した処理要求受付部41は、当該データベースオープン要求を出力したアプリケーションプロセス部31を特定するアプリケーションプロセス特定情報と、接続対象データベースを特定するデータベース特定情報と、接続対象データベースについてS2で取得されたサーバプロセス特定情報と、を関連づけて、データベース接続情報として記憶部12内に登録する(S3)。そして、データベース接続情報が登録されたことを示す情報を、データベースオープン要求に対する応答データとして出力する(S4)。この応答データは、データベースプロキシ部32を介してアプリケーションプロセス部31に対して送信される。   The process request receiving unit 41 that has acquired the server process specifying information in the process of S2 includes application process specifying information that specifies the application process unit 31 that has output the database open request, database specifying information that specifies a connection target database, and connection The server process specifying information acquired in S2 for the target database is associated and registered as database connection information in the storage unit 12 (S3). Then, information indicating that the database connection information is registered is output as response data to the database open request (S4). This response data is transmitted to the application process unit 31 via the database proxy unit 32.

以上説明した処理によってキャッシュサーバ1内にデータベース接続情報が登録されることによって、アプリケーションプロセス部31と接続対象データベースとの間の接続が確立される。これ以降データベースクローズ要求を受け付けるまで、データアクセス要求処理部42は、アプリケーションプロセス部31からデータアクセス要求が送信された場合には、このデータベース接続情報を参照することで、データアクセス要求によって指定されたテーブルを格納するデータベースにアクセスするための通信先となるサーバプロセスを特定できる。すなわち、データアクセス要求処理部42は、各アプリケーションプロセス部21から受け付けた、接続対象データベースに含まれるテーブルを参照範囲又は更新対象として指定するデータアクセス要求に応じて、当該アプリケーションプロセス部21を特定するアプリケーションプロセス特定情報に関連づけられたサーバプロセス特定情報により特定されるサーバプロセスに対して、アクセス要求を送信する。特に処理要求受付部41がデータ取得要求を受け付けた場合には、このデータ取得要求により要求された取得対象データとしてキャッシュデータを利用できないとキャッシュデータ管理部43が判定する場合に、このようなサーバプロセスを介してデータベースへのアクセスを行う。   By registering the database connection information in the cache server 1 by the processing described above, the connection between the application process unit 31 and the connection target database is established. The data access request processing unit 42 is designated by the data access request by referring to this database connection information when a data access request is transmitted from the application process unit 31 until a database close request is received thereafter. It is possible to specify a server process as a communication destination for accessing a database storing a table. That is, the data access request processing unit 42 specifies the application process unit 21 in response to a data access request that is received from each application process unit 21 and that specifies a table included in the connection target database as a reference range or update target. An access request is transmitted to the server process specified by the server process specifying information associated with the application process specifying information. In particular, when the processing request receiving unit 41 receives a data acquisition request, such a server is used when the cache data management unit 43 determines that the cache data cannot be used as the acquisition target data requested by the data acquisition request. Access the database through a process.

以上説明した処理の例によれば、予め各データベースサーバ4はキャッシュサーバ1との通信に必要なサーバプロセスを起動しているので、キャッシュサーバ1は、データベースオープン要求を受け付けた時点では、データベースサーバ4にサーバプロセスを起動させる制御を行うことはない。このため、データベースオープン要求のたびにデータベースサーバ4においてサーバプロセスの起動処理が発生することを避け、データベースサーバ4の処理負荷を減らすことができる。   According to the example of the processing described above, each database server 4 has started a server process necessary for communication with the cache server 1 in advance, so that the cache server 1 is the database server when receiving the database open request. 4 is not controlled to start the server process. For this reason, it is possible to avoid the start process of the server process in the database server 4 at every database open request, and to reduce the processing load on the database server 4.

また、キャッシュサーバ1は、同時期に複数のアプリケーションプロセス部31から同一のデータベースに対する複数のデータアクセス要求を受け付けた場合であっても、当該各要求に応じたデータベースへのアクセスを、サーバプロセス特定情報によって特定される一つのサーバプロセスとの間の通信によって実現できる。すなわち、データアクセス要求処理部42は、複数のアプリケーションプロセス部31からのデータ取得要求に応じた同一のデータベースに対するアクセスを、当該データベースに対応するサーバプロセス特定情報により特定される1つのサーバプロセスを共用して実行することができる。これにより、予めコネクションプールとして同一のデータベースにアクセスするためのサーバプロセスを複数データベースサーバ4内に起動させる場合と異なり、コネクションプールの不足によってデータベースへのアクセスが待たされるような状態が生じないようにすることができる。   Further, even when the cache server 1 receives a plurality of data access requests for the same database from a plurality of application process units 31 at the same time, the cache server 1 specifies the server process to access the database corresponding to each request. This can be realized by communication with one server process specified by information. That is, the data access request processing unit 42 shares one server process specified by the server process specifying information corresponding to the database for access to the same database in response to data acquisition requests from the plurality of application process units 31. And can be executed. As a result, unlike the case where server processes for accessing the same database as a connection pool are started in the plurality of database servers 4 in advance, a state in which access to the database is awaited due to a lack of connection pools does not occur. can do.

なお、本実施形態においてキャッシュサーバ1は、前述したようにアプリケーションプロセス部31から受け付けたデータアクセス要求に応じて各データベースサーバ4に対して直接ロック制御を実行させるロック制御命令を出力する。これにより、一つのサーバプロセスに対して複数のデータアクセス要求に応じたアクセスが同時期に発生したとしても、データベースへのアクセスが競合することによるデータの不整合が生じないよう制御することができる。   In this embodiment, the cache server 1 outputs a lock control command for causing each database server 4 to directly perform lock control in response to a data access request received from the application process unit 31 as described above. As a result, even if accesses corresponding to a plurality of data access requests occur simultaneously for one server process, it is possible to control data inconsistency due to conflicting access to the database. .

次に、アプリケーションプロセス部31からデータ取得要求が出力された場合にキャッシュサーバ1が実行する処理の例について、図11のフロー図に基づいて説明する。   Next, an example of processing executed by the cache server 1 when a data acquisition request is output from the application process unit 31 will be described with reference to the flowchart of FIG.

まず、処理要求受付部41が、アプリケーションプロセス部31から出力されたデータ取得要求を受け付ける(S11)。S11で受け付けたデータ取得要求は、前述したように、参照範囲のデータとして指定する1又は複数のテーブルを特定するテーブル特定情報と、指定されたテーブルから検索すべきデータの条件を指定する検索条件指定情報と、を含んでいる。   First, the processing request receiving unit 41 receives a data acquisition request output from the application process unit 31 (S11). As described above, the data acquisition request received in S11 includes table specifying information for specifying one or more tables specified as reference range data, and a search condition for specifying a condition of data to be searched from the specified table. Specified information.

次に、データアクセス要求処理部42の指示に基づいて、ロック制御部44が、参照範囲として指定されたテーブルを格納するデータベースサーバ4に対して、当該テーブルに対するリードロックを実行させるロック制御命令を出力する(S12)。   Next, based on an instruction from the data access request processing unit 42, the lock control unit 44 issues a lock control command for causing the database server 4 storing the table specified as the reference range to execute a read lock on the table. Output (S12).

続いて、キャッシュデータ管理部43が、S11のデータ取得要求により要求された取得対象データをキャッシュデータとして記憶部12に格納しているか否かを、キャッシュデータ管理データを参照して判定する(S13)。   Subsequently, the cache data management unit 43 determines whether or not the acquisition target data requested by the data acquisition request in S11 is stored in the storage unit 12 as cache data with reference to the cache data management data (S13). ).

S13の処理によりキャッシュデータを格納していると判定した場合、キャッシュデータ管理部43は、さらに当該キャッシュデータをS11で受け付けたデータ取得要求に応じた取得対象データとして利用可能かを判定する(S14)。具体的には、前述したように、参照範囲として指定されたテーブルの最終更新日時や、当該テーブルに対する現在時点のロック状態に関する情報を取得することによって、キャッシュデータ取得後に当該テーブルに対して更新処理がなされていないかを判定する。S14の処理によりキャッシュデータを取得対象データとして利用可能であると判定した場合、キャッシュデータ管理部43は、当該キャッシュデータの格納位置を示す情報をデータアクセス要求処理部42に出力する(S15)。   When it is determined that the cache data is stored in the process of S13, the cache data management unit 43 further determines whether the cache data can be used as acquisition target data according to the data acquisition request received in S11 (S14). ). Specifically, as described above, update processing is performed on the table after acquiring cache data by acquiring information about the last update date and time of the table specified as the reference range and the lock state at the current time for the table. It is determined whether or not When it is determined that the cache data can be used as the acquisition target data in the process of S14, the cache data management unit 43 outputs information indicating the storage location of the cache data to the data access request processing unit 42 (S15).

一方、S13の処理によりキャッシュデータを格納していないと判定された場合、又はS14の処理により格納しているキャッシュデータを取得対象データとして利用できないと判定された場合、データアクセス要求処理部42は、当該判定結果を受けて、データベースサーバ4に格納されている指定されたテーブルを参照するアクセスを実行する(S16)。このとき、データアクセス要求処理部42は、前述したS3の処理によって記憶部12に格納されているデータベース接続情報を参照して、指定されたテーブルへのアクセスの通信先を特定する。このアクセスに応じて、データベースサーバ4は、S11で受け付けたデータ取得要求において指定された検索条件に基づいて指定されたテーブルの検索を行い、検索結果をキャッシュサーバ1に対して送信する。   On the other hand, when it is determined that the cache data is not stored by the process of S13, or when it is determined that the cache data stored by the process of S14 cannot be used as the acquisition target data, the data access request processing unit 42 Then, in response to the determination result, access for referring to the specified table stored in the database server 4 is executed (S16). At this time, the data access request processing unit 42 refers to the database connection information stored in the storage unit 12 by the process of S3 described above, and specifies the communication destination of access to the specified table. In response to this access, the database server 4 searches the specified table based on the search condition specified in the data acquisition request received in S11, and transmits the search result to the cache server 1.

キャッシュデータ管理部43は、この検索結果のデータを、所定のデータサイズに分割して、キャッシュデータとして記憶部12に格納する(S17)。そして、その格納位置を示す情報をデータアクセス要求処理部42に出力する(S18)。   The cache data management unit 43 divides the search result data into a predetermined data size and stores it as cache data in the storage unit 12 (S17). Then, information indicating the storage position is output to the data access request processing unit 42 (S18).

S15又はS18の処理によって、キャッシュデータとして格納された取得対象データの格納位置を取得したデータアクセス要求処理部42は、S11で受け付けたデータ取得要求に対して、取得対象データの取得が完了した旨の応答データを出力する(S19)。この応答データは、キャッシュサーバ1からアプリケーションサーバ2に送信され、データベースプロキシ部32を介してS11のデータ取得要求を出力したアプリケーションプロセス部31に通知される。   The data access request processing unit 42 that has acquired the storage location of the acquisition target data stored as cache data by the processing of S15 or S18 indicates that acquisition of the acquisition target data has been completed in response to the data acquisition request received in S11. Response data is output (S19). The response data is transmitted from the cache server 1 to the application server 2 and notified to the application process unit 31 that has output the data acquisition request of S11 via the database proxy unit 32.

以上説明した処理によって、キャッシュサーバ1は、データ取得要求により要求された取得対象データをキャッシュデータとして保持していれば、データベースサーバ4にアクセスすることなく取得対象データの取得を完了できる。また、キャッシュデータの有無に関わらず、参照範囲として指定されたテーブルに対してリードロック制御を行うことによって、少なくとも取得対象データの取得完了まで当該テーブルが更新されないように制御できる。これにより、取得されたデータが最新のテーブル内容に基づくものであることを保証できる。   By the processing described above, the cache server 1 can complete the acquisition of the acquisition target data without accessing the database server 4 if the acquisition target data requested by the data acquisition request is held as cache data. Further, by performing read lock control on a table designated as a reference range regardless of the presence or absence of cache data, it is possible to control the table so that it is not updated until at least completion of acquisition of acquisition target data. Thereby, it can be guaranteed that the acquired data is based on the latest table contents.

次に、図11のフローに示した処理によってキャッシュサーバ1によるデータ取得要求に応じた処理が完了した後、アプリケーションプロセス部31から取得結果送信要求が出力された場合にキャッシュサーバ1が実行する処理の例について、図12のフロー図に基づいて説明する。   Next, after the process according to the data acquisition request by the cache server 1 is completed by the process shown in the flow of FIG. 11, the process executed by the cache server 1 when the acquisition result transmission request is output from the application process unit 31 Will be described based on the flowchart of FIG.

まず、取得結果送信要求によって送信が要求される取得結果のデータについて説明する。図11のフローによってキャッシュサーバ1が取得した取得対象データは、前述したように、所定のデータサイズに分割された状態でキャッシュデータとして記憶部12に格納されている。この分割された各キャッシュデータを、以下ではページデータという。取得対象データは1又は複数のページデータによって構成され、取得対象データ内の各ページデータには、当該ページデータを特定するページ番号が割り当てられている。図13は、このようなキャッシュデータのデータ構造の一例を示す説明図である。   First, acquisition result data requested to be transmitted by an acquisition result transmission request will be described. As described above, the acquisition target data acquired by the cache server 1 according to the flow of FIG. 11 is stored in the storage unit 12 as cache data in a state of being divided into predetermined data sizes. Each of the divided cache data is hereinafter referred to as page data. The acquisition target data is composed of one or a plurality of page data, and each page data in the acquisition target data is assigned a page number for specifying the page data. FIG. 13 is an explanatory diagram showing an example of the data structure of such cache data.

この場合、まず処理要求受付部41が、アプリケーションプロセス部31から出力された取得結果送信要求を受け付ける(S21)。この取得結果送信要求には、データ取得要求によって取得された取得対象データのうち、アプリケーションプロセス部31が要求するページデータを指定するページ番号情報が含まれている。   In this case, the processing request receiving unit 41 first receives the acquisition result transmission request output from the application process unit 31 (S21). This acquisition result transmission request includes page number information that specifies page data requested by the application process unit 31 among the acquisition target data acquired by the data acquisition request.

キャッシュデータ管理部43は、データアクセス要求処理部42の指示に基づいて、S21で受け付けた取得結果送信要求により指定されたページデータを、記憶部12から読み出す(S22)。S22で読み出されたページデータは、処理要求受付部41によって、アプリケーションサーバ2に対して送信される(S23)。これにより、アプリケーションプロセス部31は、要求したページデータを取得できる。   Based on the instruction from the data access request processing unit 42, the cache data management unit 43 reads the page data specified by the acquisition result transmission request received in S21 from the storage unit 12 (S22). The page data read in S22 is transmitted to the application server 2 by the processing request receiving unit 41 (S23). Thereby, the application process part 31 can acquire the requested page data.

以上説明した図12のフローに示す処理を繰り返すことによって、例えばアプリケーションプロセス部31は、データ取得要求に応じて取得された取得対象データを順に読み出して、当該読み出したデータに応じた各種の処理を実行できる。この場合において、ページデータは予めアプリケーションプロセス部31による処理に適したデータサイズでキャッシュデータとして記憶部12に格納されているため、キャッシュサーバ1やデータベースプロキシ部32は改めてキャッシュデータを分割する処理を行うことなく、アプリケーションプロセス部31に要求されたデータを送信できる。   By repeating the process shown in the flow of FIG. 12 described above, for example, the application process unit 31 sequentially reads the acquisition target data acquired in response to the data acquisition request, and performs various processes according to the read data. Can be executed. In this case, since the page data is stored in advance in the storage unit 12 as cache data with a data size suitable for processing by the application process unit 31, the cache server 1 and the database proxy unit 32 perform processing for dividing the cache data again. The requested data can be transmitted to the application process unit 31 without performing it.

次に、アプリケーションプロセス部31からデータ更新要求が出力された場合にキャッシュサーバ1が実行する処理の例について、図14のフロー図に基づいて説明する。   Next, an example of processing executed by the cache server 1 when a data update request is output from the application process unit 31 will be described with reference to the flowchart of FIG.

まず、処理要求受付部41が、アプリケーションプロセス部31から出力されたデータ更新要求を受け付ける(S31)。S31で受け付けたデータ更新要求は、更新対象となる1又は複数のテーブルを特定するテーブル特定情報と、当該テーブルに対する更新内容を示す情報と、を含んでいる。   First, the processing request receiving unit 41 receives a data update request output from the application process unit 31 (S31). The data update request received in S31 includes table specifying information for specifying one or more tables to be updated, and information indicating update contents for the table.

次に、データアクセス要求処理部42の指示に基づいて、ロック制御部44が、更新対象として指定されたテーブルを格納するデータベースサーバ4に対して、当該テーブルに対するライトロックを実行させるロック制御命令を出力する(S32)。   Next, based on an instruction from the data access request processing unit 42, the lock control unit 44 issues a lock control command for causing the database server 4 storing the table specified as the update target to execute a write lock on the table. Output (S32).

続いて、キャッシュデータ管理部43が、更新対象として指定されたテーブルを参照してこれまでに取得されたキャッシュデータを破棄する(S33)。これから実行する更新処理によって、記憶部12に格納されたキャッシュデータは古いデータ内容に基づくものになってしまうためである。   Next, the cache data management unit 43 refers to the table designated as the update target and discards the cache data acquired so far (S33). This is because the cache data stored in the storage unit 12 is based on the old data contents due to the update process to be executed.

次に、データアクセス要求処理部42は、データベースサーバ4内の更新対象として指定されたテーブルに対して、指定された更新を行うアクセスを実行する(S34)。なお、データアクセス要求処理部42は、この場合も前述したS16の処理の場合と同様に、データベース接続情報を参照して通信先を特定できる。このアクセスに応じて、データベースサーバ4は、指定されたテーブルの更新を行う。   Next, the data access request processing unit 42 executes access for performing the designated update on the table designated as the update target in the database server 4 (S34). In this case as well, the data access request processing unit 42 can specify the communication destination by referring to the database connection information, as in the case of the process of S16 described above. In response to this access, the database server 4 updates the specified table.

さらに、キャッシュデータ管理部43は、データベースサーバ4に格納されたテーブル更新管理データ内における、更新対象として指定されたテーブルの最終更新日時の情報を、現在日時を示す情報に更新する(S35)。   Further, the cache data management unit 43 updates the information on the last update date and time of the table designated as the update target in the table update management data stored in the database server 4 to information indicating the current date and time (S35).

その後、データアクセス要求処理部42は、S31で受け付けたデータ更新要求に対して、データの更新が完了した旨の応答データを出力する(S36)。この応答データは、データ取得要求を受け付けた場合と同様に、アプリケーションプロセス部31に通知される。   Thereafter, the data access request processing unit 42 outputs response data indicating that the data update is completed in response to the data update request received in S31 (S36). This response data is notified to the application process unit 31 in the same manner as when a data acquisition request is received.

以上説明した本実施の形態によれば、複数のキャッシュサーバ1からデータベースサーバ4内のデータが参照又は更新される場合であっても、各キャッシュサーバ1は格納しているキャッシュデータを条件に応じて利用しつつ、アプリケーションサーバ2の要求に応じて取得するデータがデータベースサーバ4内における最新のデータに基づくものであることを保証できる。これにより、アプリケーションサーバ1は、キャッシュデータの有無やキャッシュデータの利用可否を気にすることなく、キャッシュサーバ1から取得するデータを用いてデータベースサーバ4に格納されたデータに基づくトランザクション処理を実行できる。   According to the present embodiment described above, even when data in the database server 4 is referred to or updated from a plurality of cache servers 1, each cache server 1 can store the cache data according to conditions. It can be ensured that the data acquired in response to the request from the application server 2 is based on the latest data in the database server 4. As a result, the application server 1 can execute transaction processing based on data stored in the database server 4 using data acquired from the cache server 1 without worrying about the presence or absence of cache data or the availability of cache data. .

また、本発明は上記実施形態に限定されるものではなく、種々の変形実施が可能である。例えば、本実施形態においてアプリケーションサーバ2が実行することとした機能の少なくとも一部は、通信ネットワークを介して接続されたウェブサーバ等の他のサーバコンピュータにより実現されてもよい。   Further, the present invention is not limited to the above-described embodiment, and various modifications can be made. For example, at least a part of the functions to be executed by the application server 2 in the present embodiment may be realized by another server computer such as a web server connected via a communication network.

また、以上の説明においては、テーブルロック管理データやテーブル更新管理データは、1又は複数のデータベースサーバ4のそれぞれに格納されて、当該データベースサーバ4に格納されたテーブルの情報を管理するものであるとしたが、これらの情報は一元管理されてもよい。例えば、データベース管理データと同様に、1又は複数のデータベースサーバ4のうち、所定の1台のデータベースサーバ4にこれらのデータが格納されることとしてもよい。こうすれば、キャッシュサーバ1は、常にこの所定のデータベースサーバ4に格納されたデータを参照することで、データ格納手段3に格納された全てのテーブルの最終更新日時やテーブルのロック状態に関する情報を取得できる。   Further, in the above description, the table lock management data and the table update management data are stored in each of one or a plurality of database servers 4 to manage the information of the tables stored in the database server 4. However, these pieces of information may be centrally managed. For example, similar to the database management data, these data may be stored in one predetermined database server 4 among one or a plurality of database servers 4. In this way, the cache server 1 always refers to the data stored in the predetermined database server 4 to obtain information on the last update date / time of all the tables stored in the data storage means 3 and the table lock state. You can get it.

また、以上の説明においては、データ取得要求により指定される参照範囲は、1又は複数のテーブルであることとしたが、これに限らず、データベース単位で参照範囲が指定されることとしてもよい。あるいは、1つのテーブルに含まれる一部のレコードが参照範囲として指定されることとしてもよい。これに応じて、ロック制御部44がデータベースサーバ4に実行させるロック制御も、データベース単位やレコード単位で実行されることとしてもよい。また、キャッシュデータ管理部43によるキャッシュデータの利用可否の判定に用いられるデータベースサーバ4内のデータの最終更新日時の情報も、データベース単位やレコード単位で記録されることとしてもよい。   In the above description, the reference range specified by the data acquisition request is one or a plurality of tables. However, the reference range is not limited to this, and the reference range may be specified in units of databases. Alternatively, some records included in one table may be designated as a reference range. In response to this, the lock control that the lock control unit 44 causes the database server 4 to execute may be executed in units of databases or records. Further, information on the last update date and time of data in the database server 4 used for determining whether or not the cache data can be used by the cache data management unit 43 may be recorded in units of databases or records.

本発明の実施の形態に係るコンピュータシステムの構成例を示すシステム構成図である。It is a system configuration figure showing an example of composition of a computer system concerning an embodiment of the invention. アプリケーションサーバの構成例を示す構成図である。It is a block diagram which shows the structural example of an application server. アプリケーションサーバの機能例を示す機能ブロック図である。It is a functional block diagram which shows the function example of an application server. キャッシュサーバの構成例を示す構成図である。It is a block diagram which shows the structural example of a cache server. キャッシュサーバの機能例を示す機能ブロック図である。It is a functional block diagram which shows the function example of a cache server. キャッシュデータ管理データの一例を示す説明図である。It is explanatory drawing which shows an example of cache data management data. テーブル更新管理データの一例を示す説明図である。It is explanatory drawing which shows an example of table update management data. テーブルロック管理データの一例を示す説明図である。It is explanatory drawing which shows an example of table lock management data. データベースオープン要求受け付け時にキャッシュサーバが実行する処理の一例を示すフロー図である。It is a flowchart which shows an example of the process which a cache server performs at the time of database open request reception. データベース管理データの一例を示す説明図である。It is explanatory drawing which shows an example of database management data. データ取得要求受け付け時にキャッシュサーバが実行する処理の一例を示すフロー図である。It is a flowchart which shows an example of the process which a cache server performs at the time of data acquisition request reception. 取得結果送信要求受け付け時にキャッシュサーバが実行する処理の一例を示すフロー図である。It is a flowchart which shows an example of the process which a cache server performs at the time of acquisition result transmission request reception. ページデータに分割されたキャッシュデータの一例を示す説明図である。It is explanatory drawing which shows an example of the cache data divided | segmented into page data. データ更新要求受け付け時にキャッシュサーバが実行する処理の一例を示すフロー図である。It is a flowchart which shows an example of the process which a cache server performs at the time of data update request reception. キャッシュサーバを含むコンピュータシステムの構成例を示すシステム構成図である。It is a system configuration figure showing an example of composition of a computer system containing a cache server.

符号の説明Explanation of symbols

1 キャッシュサーバ、2 アプリケーションサーバ、3 データ格納手段、4 データベースサーバ、5 ユーザ端末、11,21 制御部、12 記憶部、13,25 通信部、22 メインプロセッサ、23 サブプロセッサ、24 メインメモリ、31 アプリケーションプロセス部、32 データベースプロキシ部、41 処理要求受付部、42 データアクセス要求処理部、43 キャッシュデータ管理部、44 ロック制御部。   1 cache server, 2 application server, 3 data storage means, 4 database server, 5 user terminal, 11 and 21 control unit, 12 storage unit, 13, 25 communication unit, 22 main processor, 23 sub processor, 24 main memory, 31 Application process part, 32 Database proxy part, 41 Processing request reception part, 42 Data access request processing part, 43 Cache data management part, 44 Lock control part.

Claims (11)

データ格納手段と、当該データ格納手段に格納された元データに基づく処理を実行するアプリケーションサーバと、に接続され、
前記データ格納手段から取得される前記元データの一部又は全部をキャッシュデータとして格納するキャッシュデータ格納手段と、
前記データ格納手段に格納された前記元データの少なくとも一部の参照範囲のデータを参照して、当該参照範囲のデータの全部又は一部を取得対象データとして取得するデータ取得要求を、前記アプリケーションサーバから受け付けるデータ取得要求受付手段と、
前記データ取得要求を受け付けた場合に、当該データ取得要求により要求される前記取得対象データの少なくとも一部として、前記キャッシュデータを利用可能か否か判定するキャッシュデータ利用可否判定手段と、
前記キャッシュデータ利用可否判定手段による判定の結果に応じて、前記キャッシュデータの一部又は全部と、前記データ格納手段に格納された前記元データのうち前記参照範囲のデータの一部又は全部と、のいずれか少なくとも一方を参照して前記取得対象データを取得する取得対象データ取得手段と、
前記データ取得要求を受け付けた場合に、少なくとも前記キャッシュデータ利用可否判定手段による判定の前に、前記データ格納手段に格納された前記元データのうち、前記参照範囲のデータを含む前記元データに対する更新を制限するロック制御を、前記データ格納手段に開始させるロック制御手段と、
を含むことを特徴とするキャッシュサーバ。
Connected to the data storage means and an application server that executes processing based on the original data stored in the data storage means;
Cache data storage means for storing a part or all of the original data acquired from the data storage means as cache data;
A data acquisition request for referring to at least a part of the reference range data of the original data stored in the data storage unit and acquiring all or a part of the reference range data as acquisition target data. A data acquisition request accepting means for accepting from,
Cache data availability determination means for determining whether or not the cache data can be used as at least a part of the acquisition target data requested by the data acquisition request when the data acquisition request is received;
Depending on the result of determination by the cache data availability determination unit, part or all of the cache data, and part or all of the data in the reference range among the original data stored in the data storage unit, Acquisition target data acquisition means for acquiring the acquisition target data with reference to at least one of:
When the data acquisition request is received, at least before the determination by the cache data availability determination unit, the update of the original data including the data in the reference range among the original data stored in the data storage unit Lock control means for causing the data storage means to start lock control for limiting
Including a cache server.
請求項1に記載のキャッシュサーバにおいて、
前記ロック制御手段は、少なくとも前記取得対象データ取得手段による前記取得対象データの取得が完了するまでの間、前記ロック制御を前記データ格納手段に実行させる
ことを特徴とするキャッシュサーバ。
The cache server according to claim 1,
The cache server, wherein the lock control unit causes the data storage unit to execute the lock control until at least the acquisition of the acquisition target data by the acquisition target data acquisition unit is completed.
請求項1又は2に記載のキャッシュサーバにおいて、
前記データ格納手段は、前記元データとしてそれぞれ1又は複数のテーブルを格納する1又は複数のデータベースサーバからなり、
前記データ取得要求は、前記参照範囲のデータとして、1又は複数の前記テーブルを指定する情報を含む
ことを特徴とするキャッシュサーバ。
In the cache server according to claim 1 or 2,
The data storage means comprises one or a plurality of database servers each storing one or a plurality of tables as the original data,
The data acquisition request includes information specifying one or a plurality of the tables as data of the reference range.
請求項1乃至3のいずれか一項に記載のキャッシュサーバにおいて、
前記データ取得要求は、前記取得対象データを特定するためのデータ特定情報を含み、
前記キャッシュデータ利用可否判定手段は、前記データ取得要求に含まれる前記データ特定情報に基づいて過去に前記データ格納手段から取得されたデータを前記キャッシュデータ格納手段が前記キャッシュデータとして格納しており、かつ当該キャッシュデータを前記データ格納手段から取得した後に、当該データ格納手段に格納された前記参照範囲のデータが更新されていない場合に、前記キャッシュデータを利用可能と判定する
ことを特徴とするキャッシュサーバ。
In the cache server according to any one of claims 1 to 3,
The data acquisition request includes data specifying information for specifying the acquisition target data,
The cache data availability determination means stores the data acquired from the data storage means in the past based on the data specifying information included in the data acquisition request as the cache data. And after acquiring the said cache data from the said data storage means, when the data of the said reference range stored in the said data storage means are not updated, it determines with the said cache data being usable. server.
請求項4に記載のキャッシュサーバにおいて、
前記データ特定情報は、前記取得対象データとして前記参照範囲のデータの中から検索すべきデータの条件を指定する検索条件指定情報である
ことを特徴とするキャッシュサーバ。
The cache server according to claim 4,
The cache server, wherein the data specifying information is search condition specifying information for specifying a condition of data to be searched from the data in the reference range as the acquisition target data.
請求項1乃至5のいずれか一項に記載のキャッシュサーバにおいて、
前記データ格納手段から取得される前記元データを、前記アプリケーションサーバによる処理の単位となる所定のデータサイズ以下のサイズのデータに分割する取得データ分割手段をさらに含み、
前記キャッシュデータ格納手段は、前記所定のデータサイズに分割された前記元データを前記キャッシュデータとして格納する
ことを特徴とするキャッシュサーバ。
The cache server according to any one of claims 1 to 5,
Further comprising an acquired data dividing means for dividing the original data acquired from the data storage means into data having a size equal to or smaller than a predetermined data size as a unit of processing by the application server;
The cache data storage means stores the original data divided into the predetermined data size as the cache data.
請求項6に記載のキャッシュサーバにおいて、
前記アプリケーションサーバは、それぞれ所定の記憶容量の記憶手段を備える複数のデータ処理手段を含んで構成され、
前記所定のデータサイズは、前記各記憶手段の記憶容量に応じて決定される
ことを特徴とするキャッシュサーバ。
The cache server according to claim 6,
The application server includes a plurality of data processing units each including a storage unit having a predetermined storage capacity,
The cache server according to claim 1, wherein the predetermined data size is determined according to a storage capacity of each storage unit.
請求項1乃至7のいずれか一項に記載のキャッシュサーバにおいて、
前記データ格納手段は、
1又は複数のデータベースを格納し、
それぞれ前記1又は複数のデータベースのいずれかに関連づけられ、前記キャッシュサーバから送信される当該関連づけられたデータベースに対するアクセス要求を受け付ける1又は複数のアクセス受付手段を含み、
前記キャッシュサーバは、
それぞれ1又は複数のアプリケーション実行手段を備える複数の前記アプリケーションサーバに接続され、
前記1又は複数のデータベースのそれぞれについて、当該データベースに関連づけられた前記アクセス受付手段を特定するアクセス受付手段特定情報を取得する手段と、
前記各アプリケーション実行手段から受け付けた、前記1又は複数のデータベースのうちの接続対象データベースに対するデータベース接続要求に応じて、当該アプリケーション実行手段を特定するアプリケーション実行手段特定情報と、当該接続対象データベースについて取得された1つの前記アクセス受付手段特定情報と、を関連づけて記憶する手段と、
前記各アプリケーション実行手段から受け付けた、前記接続対象データベースに含まれるデータを前記参照範囲のデータとして指定する前記データ取得要求に応じて、前記キャッシュデータ利用可否判定手段が前記キャッシュデータを利用できないと判定する場合に、当該アプリケーション実行手段を特定する前記アプリケーション実行手段特定情報に関連づけられた前記アクセス受付手段特定情報により特定される前記アクセス受付手段に対して前記アクセス要求を送信する手段と、
をさらに含むことを特徴とするキャッシュサーバ。
The cache server according to any one of claims 1 to 7,
The data storage means includes
Store one or more databases,
One or more access accepting means each associated with any one of the one or more databases and accepting an access request for the associated database transmitted from the cache server,
The cache server is
Connected to a plurality of application servers each comprising one or more application execution means,
For each of the one or a plurality of databases, means for acquiring access reception means specifying information for specifying the access reception means associated with the database;
In response to a database connection request for the connection target database of the one or more databases received from each of the application execution means, the application execution means specifying information for specifying the application execution means and the connection target database are acquired. Means for associating and storing the one access receiving means specifying information;
In response to the data acquisition request for specifying data included in the connection target database as data in the reference range received from each application execution unit, the cache data availability determination unit determines that the cache data cannot be used. Means for transmitting the access request to the access receiving means specified by the access receiving means specifying information associated with the application executing means specifying information for specifying the application executing means,
A cache server further comprising:
データ格納手段と、当該データ格納手段に格納された元データに基づく処理を実行するアプリケーションサーバと、に接続され、
前記データ格納手段から取得される前記元データの一部又は全部をキャッシュデータとして格納するキャッシュデータ格納手段を備えるキャッシュサーバの制御方法であって、
前記データ格納手段に格納された前記元データの少なくとも一部の参照範囲のデータを参照して、当該参照範囲のデータの全部又は一部を取得対象データとして取得するデータ取得要求を、前記アプリケーションサーバから受け付けるデータ取得要求受付ステップと、
前記データ取得要求を受け付けた場合に、当該データ取得要求により要求される前記取得対象データの少なくとも一部として、前記キャッシュデータを利用可能か否か判定するキャッシュデータ利用可否判定ステップと、
前記キャッシュデータ利用可否判定ステップによる判定の結果に応じて、前記キャッシュデータの一部又は全部と、前記データ格納手段に格納された前記元データのうち前記参照範囲のデータの一部又は全部と、のいずれか少なくとも一方を参照して前記取得対象データを取得する取得対象データ取得ステップと、
前記データ取得要求を受け付けた場合に、少なくとも前記キャッシュデータ利用可否判定ステップによる判定の前に、前記データ格納手段に格納された前記元データのうち、前記参照範囲のデータを含む前記元データに対する更新を制限するロック制御を、前記データ格納手段に開始させるロック制御ステップと、
を含むことを特徴とするキャッシュサーバの制御方法。
Connected to the data storage means and an application server that executes processing based on the original data stored in the data storage means;
A cache server control method comprising cache data storage means for storing a part or all of the original data acquired from the data storage means as cache data,
A data acquisition request for referring to at least a part of the reference range data of the original data stored in the data storage unit and acquiring all or a part of the reference range data as acquisition target data. A data acquisition request acceptance step accepted from
A cache data availability determination step for determining whether or not the cache data can be used as at least a part of the acquisition target data requested by the data acquisition request when the data acquisition request is received;
Depending on the result of the determination in the cache data availability determination step, a part or all of the cache data, and a part or all of the data in the reference range among the original data stored in the data storage unit, An acquisition target data acquisition step of acquiring the acquisition target data with reference to at least one of
When the data acquisition request is accepted, at least before the determination by the cache data availability determination step, the update of the original data including the reference range data among the original data stored in the data storage means A lock control step for causing the data storage means to start lock control for limiting
A control method for a cache server, comprising:
データ格納手段と、当該データ格納手段に格納された元データに基づく処理を実行するアプリケーションサーバと、に接続され、
前記データ格納手段から取得される前記元データの一部又は全部をキャッシュデータとして格納するキャッシュデータ格納手段を備えるキャッシュサーバとしてコンピュータを機能させるためのプログラムであって、
前記データ格納手段に格納された前記元データの少なくとも一部の参照範囲のデータを参照して、当該参照範囲のデータの全部又は一部を取得対象データとして取得するデータ取得要求を、前記アプリケーションサーバから受け付けるデータ取得要求受付手段、
前記データ取得要求を受け付けた場合に、当該データ取得要求により要求される前記取得対象データの少なくとも一部として、前記キャッシュデータを利用可能か否か判定するキャッシュデータ利用可否判定手段、
前記キャッシュデータ利用可否判定手段による判定の結果に応じて、前記キャッシュデータの一部又は全部と、前記データ格納手段に格納された前記元データのうち前記参照範囲のデータの一部又は全部と、のいずれか少なくとも一方を参照して前記取得対象データを取得する取得対象データ取得手段、及び
前記データ取得要求を受け付けた場合に、少なくとも前記キャッシュデータ利用可否判定手段による判定の前に、前記データ格納手段に格納された前記元データのうち、前記参照範囲のデータを含む前記元データに対する更新を制限するロック制御を、前記データ格納手段に開始させるロック制御手段、
として前記コンピュータを機能させるためのプログラム。
Connected to the data storage means and an application server that executes processing based on the original data stored in the data storage means;
A program for causing a computer to function as a cache server comprising cache data storage means for storing a part or all of the original data acquired from the data storage means as cache data,
A data acquisition request for referring to at least a part of the reference range data of the original data stored in the data storage unit and acquiring all or a part of the reference range data as acquisition target data. Data acquisition request accepting means accepted from
Cache data availability determination means for determining whether or not the cache data can be used as at least a part of the acquisition target data requested by the data acquisition request when the data acquisition request is received;
Depending on the result of determination by the cache data availability determination unit, part or all of the cache data, and part or all of the data in the reference range among the original data stored in the data storage unit, Acquisition target data acquisition means for acquiring the acquisition target data with reference to at least one of the data storage, and when the data acquisition request is received, at least before the determination by the cache data availability determination means Lock control means for causing the data storage means to start lock control for restricting updates to the original data including the data in the reference range among the original data stored in the means,
A program for causing the computer to function as
請求項10記載のプログラムが記憶されたコンピュータ読み取り可能な情報記憶媒体。   A computer-readable information storage medium storing the program according to claim 10.
JP2006333243A 2006-12-11 2006-12-11 Cache server, cache server control method, program, and information storage medium Expired - Fee Related JP4763587B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006333243A JP4763587B2 (en) 2006-12-11 2006-12-11 Cache server, cache server control method, program, and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006333243A JP4763587B2 (en) 2006-12-11 2006-12-11 Cache server, cache server control method, program, and information storage medium

Publications (2)

Publication Number Publication Date
JP2008146380A true JP2008146380A (en) 2008-06-26
JP4763587B2 JP4763587B2 (en) 2011-08-31

Family

ID=39606492

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006333243A Expired - Fee Related JP4763587B2 (en) 2006-12-11 2006-12-11 Cache server, cache server control method, program, and information storage medium

Country Status (1)

Country Link
JP (1) JP4763587B2 (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010217974A (en) * 2009-03-13 2010-09-30 Toshiba Corp Information retrieval device, information retrieval method, and program
JP2011028658A (en) * 2009-07-28 2011-02-10 Nippon Telegr & Teleph Corp <Ntt> Database device, cache device, database system, cache maintenance method and program thereof
JP2011065244A (en) * 2009-09-15 2011-03-31 Yahoo Japan Corp System for providing event notification function
WO2011105488A1 (en) * 2010-02-25 2011-09-01 楽天株式会社 Storage device, server device, storage system, database device, provision method of data, and program
JP2011253299A (en) * 2010-06-01 2011-12-15 Nippon Telegr & Teleph Corp <Ntt> Retrieval device, retrieval method and retrieval program
JP2012043338A (en) * 2010-08-23 2012-03-01 Nippon Telegr & Teleph Corp <Ntt> Cache management apparatus, cache management program and recording medium
JP2012043098A (en) * 2010-08-17 2012-03-01 Fujitsu Ltd Management device, file server system, processing method and management program
JP2012141900A (en) * 2011-01-05 2012-07-26 Nippon Telegr & Teleph Corp <Ntt> Cache control system and cache control method
JP2012146076A (en) * 2011-01-11 2012-08-02 Yahoo Japan Corp Cache server, cache management method, and cache management program
JP2013058148A (en) * 2011-09-09 2013-03-28 Yahoo Japan Corp Aggregation device, aggregation method, and aggregation program
JP2014006635A (en) * 2012-06-22 2014-01-16 Toshiba Corp Distributed database system and program
WO2014155553A1 (en) * 2013-03-27 2014-10-02 富士通株式会社 Information processing method for distributed processing, information processing device and program, and distributed processing system
JP2016520931A (en) * 2013-05-31 2016-07-14 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. System and method for transferring a group of files associated as one logical unit
JP2020504377A (en) * 2016-12-23 2020-02-06 イングラム マイクロ インコーポレーテッド Techniques for scaling user interface backend clusters for database-bound applications
WO2021111710A1 (en) * 2019-12-06 2021-06-10 株式会社ソニー・インタラクティブエンタテインメント Delivery control device, delivery control method, and delivery control program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001027965A (en) * 1999-05-11 2001-01-30 Nippon Telegr & Teleph Corp <Ntt> File distribution device and recording medium stored with file distribution program
JP2002215445A (en) * 2001-01-18 2002-08-02 Toshiba Corp Pdm system, its pdm cache server device, and pdm server device
JP2002351729A (en) * 2001-05-22 2002-12-06 Nec Corp Data sharing system
JP2003006036A (en) * 2001-06-26 2003-01-10 Hitachi Ltd Clustered application server and web system having database structure
JP2004342071A (en) * 2003-04-22 2004-12-02 Hitachi Ltd Storage device and network system
JP2006516341A (en) * 2003-01-17 2006-06-29 タシット ネットワークス,インク. Method and system for storage caching with distributed file system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001027965A (en) * 1999-05-11 2001-01-30 Nippon Telegr & Teleph Corp <Ntt> File distribution device and recording medium stored with file distribution program
JP2002215445A (en) * 2001-01-18 2002-08-02 Toshiba Corp Pdm system, its pdm cache server device, and pdm server device
JP2002351729A (en) * 2001-05-22 2002-12-06 Nec Corp Data sharing system
JP2003006036A (en) * 2001-06-26 2003-01-10 Hitachi Ltd Clustered application server and web system having database structure
JP2006516341A (en) * 2003-01-17 2006-06-29 タシット ネットワークス,インク. Method and system for storage caching with distributed file system
JP2004342071A (en) * 2003-04-22 2004-12-02 Hitachi Ltd Storage device and network system

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010217974A (en) * 2009-03-13 2010-09-30 Toshiba Corp Information retrieval device, information retrieval method, and program
JP2011028658A (en) * 2009-07-28 2011-02-10 Nippon Telegr & Teleph Corp <Ntt> Database device, cache device, database system, cache maintenance method and program thereof
JP2011065244A (en) * 2009-09-15 2011-03-31 Yahoo Japan Corp System for providing event notification function
CN102763089B (en) * 2010-02-25 2015-08-12 乐天株式会社 The supplying method of memory storage, server unit, storage system, data library device, data
WO2011105488A1 (en) * 2010-02-25 2011-09-01 楽天株式会社 Storage device, server device, storage system, database device, provision method of data, and program
CN102763089A (en) * 2010-02-25 2012-10-31 乐天株式会社 Storage device, server device, storage system, database device, provision method of data, and program
US20120323966A1 (en) * 2010-02-25 2012-12-20 Rakuten, Inc. Storage device, server device, storage system, database device, provision method of data, and program
JP2011175547A (en) * 2010-02-25 2011-09-08 Rakuten Inc Storage device, server device, storage system, database device, data providing method, and program
JP2011253299A (en) * 2010-06-01 2011-12-15 Nippon Telegr & Teleph Corp <Ntt> Retrieval device, retrieval method and retrieval program
JP2012043098A (en) * 2010-08-17 2012-03-01 Fujitsu Ltd Management device, file server system, processing method and management program
JP2012043338A (en) * 2010-08-23 2012-03-01 Nippon Telegr & Teleph Corp <Ntt> Cache management apparatus, cache management program and recording medium
JP2012141900A (en) * 2011-01-05 2012-07-26 Nippon Telegr & Teleph Corp <Ntt> Cache control system and cache control method
JP2012146076A (en) * 2011-01-11 2012-08-02 Yahoo Japan Corp Cache server, cache management method, and cache management program
JP2013058148A (en) * 2011-09-09 2013-03-28 Yahoo Japan Corp Aggregation device, aggregation method, and aggregation program
JP2014006635A (en) * 2012-06-22 2014-01-16 Toshiba Corp Distributed database system and program
WO2014155553A1 (en) * 2013-03-27 2014-10-02 富士通株式会社 Information processing method for distributed processing, information processing device and program, and distributed processing system
JPWO2014155553A1 (en) * 2013-03-27 2017-02-16 富士通株式会社 Information processing method, information processing apparatus and program for distributed processing, and distributed processing system
US10049049B2 (en) 2013-03-27 2018-08-14 Fujitsu Limited Method and system for caching data managed by plural information processing apparatuses
JP2016520931A (en) * 2013-05-31 2016-07-14 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. System and method for transferring a group of files associated as one logical unit
JP2020504377A (en) * 2016-12-23 2020-02-06 イングラム マイクロ インコーポレーテッド Techniques for scaling user interface backend clusters for database-bound applications
WO2021111710A1 (en) * 2019-12-06 2021-06-10 株式会社ソニー・インタラクティブエンタテインメント Delivery control device, delivery control method, and delivery control program
JP7291247B2 (en) 2019-12-06 2023-06-14 株式会社ソニー・インタラクティブエンタテインメント Delivery control device, delivery control method and delivery control program

Also Published As

Publication number Publication date
JP4763587B2 (en) 2011-08-31

Similar Documents

Publication Publication Date Title
JP4763587B2 (en) Cache server, cache server control method, program, and information storage medium
US11388251B2 (en) Providing access to managed content
US7194532B2 (en) Distributed file management method and program therefor
JP4559158B2 (en) Method and system for accessing data
US20080256248A1 (en) Single server access in a multiple tcp/ip instance environment
JP6220850B2 (en) System and method for supporting inline delegation of middle tier transaction logs to a database
US8620926B2 (en) Using a hashing mechanism to select data entries in a directory for use with requested operations
US20030018740A1 (en) Contents sharing system and software program executed by devices of the system
US8600933B2 (en) Multi-master attribute uniqueness
JPH10320361A (en) Dynamic mobile agent
US10333788B2 (en) System and method for acquiring, processing and updating global information
US20060123121A1 (en) System and method for service session management
US6058425A (en) Single server access in a multiple TCP/IP instance environment
US8196179B2 (en) Storage controller for controlling access based on location of controller
US8996484B2 (en) Recursive lock-and-propagate operation
KR20060116140A (en) System and method for locking and isolation in a storage platform
US20090165011A1 (en) Resource management method, information processing system, information processing apparatus, and program
JP2006172067A (en) Database management method, system and program
JP2006268632A (en) Computer system, storage server, retrieval server, terminal device and retrieval method
JP2006106933A (en) Load sharing network system and load sharing program
JP5300650B2 (en) Service registration apparatus, content registration apparatus, service registration method, content registration method, program, and recording medium using http service
US20030154221A1 (en) System and method for accessing file system entities
US20080140687A1 (en) Socket structure simultaneously supporting both toe and ethernet network interface card and method of forming the socket structure
JP2006085521A (en) Information transfer method and host device
JP4232606B2 (en) File distribution system, client program, client, server program, server, and method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100301

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100316

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100514

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100803

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101004

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20101124

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20101203

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110125

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110328

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110609

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

Free format text: PAYMENT UNTIL: 20140617

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees