JP2012194951A - Transaction processing system and transaction processing method - Google Patents
Transaction processing system and transaction processing method Download PDFInfo
- Publication number
- JP2012194951A JP2012194951A JP2011060401A JP2011060401A JP2012194951A JP 2012194951 A JP2012194951 A JP 2012194951A JP 2011060401 A JP2011060401 A JP 2011060401A JP 2011060401 A JP2011060401 A JP 2011060401A JP 2012194951 A JP2012194951 A JP 2012194951A
- Authority
- JP
- Japan
- Prior art keywords
- file
- request
- control unit
- file information
- transaction
- 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.)
- Withdrawn
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、トランザクション処理システムおよびトランザクション処理方法に関する。 The present invention relates to a transaction processing system and a transaction processing method.
従来のトランザクション処理システム(T101)は、アプリケーションサーバ間でのデータの受け渡しや、データ保証、運用管理の目的から、データを格納するファイルの保存先としてNAS(Network Attached Storage)を採用し、NFS(Network File System)を使用してアクセスする(例えば、下記特許文献1参照)。 The conventional transaction processing system (T101) adopts NAS (Network Attached Storage) as a storage destination of a file for storing data for the purpose of data transfer between application servers, data assurance, and operation management. Network File System) is used (for example, see Patent Document 1 below).
NFSは、汎用的なファイルプロトコルであるが、トランザクション処理システム(T101)固有のファイルアクセスの方法とは相容れないものがある。 NFS is a general-purpose file protocol, but is incompatible with the file access method unique to the transaction processing system (T101).
トランザクション処理システム(T101)にとって、NFSには以下の(1)〜(4)の問題点がある。 For the transaction processing system (T101), NFS has the following problems (1) to (4).
(1)ハードマウントを用いた場合、NFSサーバ障害時にNFSクライアントがハングアップしてしまう。ソフトマウントを用いることでハングアップを回避できるが、トランザクション処理システム(T101)では、ファイルの確証をファイル出力関数の成功終了としているため、ハードマウントによるデータ書き込み保証が必須となり、書き込み保証のないソフトマウントを用いることができない。 (1) When a hard mount is used, the NFS client hangs up when the NFS server fails. Hang-up can be avoided by using soft mount. However, in the transaction processing system (T101), the file output function is confirmed as the successful completion of the file output function, so data write guarantee by hard mount is indispensable, and software without write guarantee The mount cannot be used.
(2)1ディレクトリ内のリンク数に上限がある。トランザクション処理システム(T101)では、ディスク配置の構成、トランザクションのコミットを管理する目的、障害復旧時のファイル情報の取得などの目的で、出力先ごとや、その配下についてトランザクション単位にディレクトリを分割している。大規模なシステムであっても、出力先の数はあまり許容範囲であるが、出力先が障害で止まっている間に多数のトランザクションを実行してデータを出力すると、トランザクション単位のディレクトリ数が増えすぎて、ファイルを出力することができなくなってしまう。 (2) There is an upper limit on the number of links in one directory. In the transaction processing system (T101), for the purpose of managing the disk arrangement, transaction commit, and obtaining file information at the time of failure recovery, the directory is divided into transaction units for each output destination and its subordinates. Yes. Even in a large-scale system, the number of output destinations is very acceptable, but if a large number of transactions are executed while the output destination is stopped due to a failure, the number of directories per transaction increases. Too much will not be able to output the file.
(3)通信処理の冗長性。トランザクション処理システム(T101)のファイルアクセスは、例えば、データ出力の場合には、必要なディレクトリの作成、ファイルのオープン、データの書き込み、ファイルのクローズという一連の操作が決まっている。これに対して、NFSは、ファイルアクセスの要求(オープンやクローズなど)ごとに、NFSサーバとクライアントとの間で通信が行われ、実行結果を確認した後に、次の要求が行われるため、速度性能が低い。 (3) Redundancy of communication processing. For file access of the transaction processing system (T101), for example, in the case of data output, a series of operations including creation of a necessary directory, file opening, data writing, and file closing are determined. On the other hand, since the NFS performs communication between the NFS server and the client for each file access request (open, close, etc.) and checks the execution result, the next request is performed. Low performance.
(4)キャッシュの非効率性。トランザクション処理システム(T101)では、トランザクションが入力するファイルは順序性を維持するため、古いものから順にファイル読込を行う。これに対して、ディスクキャッシュは、一般的によく使うファイルや最新のファイルを優先する。したがって、回数としては均等にアクセスするファイルの中の最も古いものからアクセスするトランザクション処理システム(T101)に、ディスクキャッシュは適さない。 (4) Cash inefficiency. In the transaction processing system (T101), the files input by the transaction are read in order from the oldest one in order to maintain the order. On the other hand, the disk cache generally gives priority to frequently used files and the latest files. Therefore, the disk cache is not suitable for the transaction processing system (T101) that accesses the oldest file among the files that are equally accessed.
本発明は、上述した課題を解決するためになされたものであり、NFSに対する問題点を解消し、性能を改善することができるトランザクション処理システムおよびトランザクション処理方法を提供することを目的とする。 The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a transaction processing system and a transaction processing method capable of solving problems with NFS and improving performance.
本発明のトランザクション処理システムは、所定の操作単位に要求を送信するファイルクライアントと、前記要求を受信するたびに、当該要求に対する結果を送信するファイルエージェントと、を備え、前記ファイルエージェントは、前記要求に対応するトランザクション識別子のハッシュ値を用いてディレクトリ名を生成する通信制御部と、前記要求として登録要求を受信したときに、登録対象のファイルをファイル記憶装置に登録するファイルアクセス制御部と、前記登録要求を受信したときに、登録対象のファイル情報を仮登録する仮登録リスト記憶部と、前記要求としてコミット要求を受信したときに、仮登録したファイル情報をファイル情報DBに格納するファイル情報制御部と、を有し、前記ファイルアクセス制御部、前記仮登録リスト記憶部および前記ファイル情報制御部は、前記要求としてロールバック要求を受信したときに、未完了のトランザクションに対応するファイル情報を削除する。 The transaction processing system of the present invention comprises: a file client that transmits a request in a predetermined operation unit; and a file agent that transmits a result for the request each time the request is received, and the file agent includes the request A communication control unit that generates a directory name using a hash value of a transaction identifier corresponding to the file, a file access control unit that registers a file to be registered in a file storage device when receiving a registration request as the request, and A temporary registration list storage unit that temporarily registers file information to be registered when a registration request is received, and a file information control that stores temporarily registered file information in the file information DB when a commit request is received as the request A file access control unit, the temporary registration List storage unit and the file information control unit, upon receiving the rollback request as the request to delete the file information corresponding to the uncompleted transaction.
本発明のトランザクション処理方法は、所定の操作単位に要求を送信するファイルクライアントと、前記要求を受信するたびに、当該要求に対する結果を送信するファイルエージェントと、を備えるトランザクション処理システムを制御する方法であって、前記ファイルエージェントが、前記要求に対応するトランザクション識別子のハッシュ値を用いてディレクトリ名を生成するステップと、前記要求として登録要求を受信したときに、登録対象のファイルをファイル記憶装置に登録するステップと、前記登録要求を受信したときに、登録対象のファイル情報を仮登録するステップと、前記要求としてコミット要求を受信したときに、仮登録したファイル情報をファイル情報DBに格納するステップと、前記要求としてロールバック要求を受信したときに、未完了のトランザクションに対応するファイル情報を削除するステップと、を含む。 The transaction processing method of the present invention is a method for controlling a transaction processing system comprising: a file client that transmits a request in a predetermined unit of operation; and a file agent that transmits a result for the request each time the request is received. The file agent generates a directory name using a hash value of a transaction identifier corresponding to the request, and registers a file to be registered in the file storage device when receiving a registration request as the request. A step of temporarily registering file information to be registered when the registration request is received, and a step of storing temporarily registered file information in the file information DB when a commit request is received as the request. , A rollback request as the request When signal comprises a step of deleting the file information corresponding to the uncompleted transaction, the.
本発明によれば、NFSに対する問題点を解消し、性能を改善することができる。 According to the present invention, problems with NFS can be solved and performance can be improved.
以下、添付図面を参照して、本発明に係るトランザクション処理システムおよびトランザクション処理方法の好適な実施形態について説明する。 DESCRIPTION OF EMBODIMENTS Hereinafter, preferred embodiments of a transaction processing system and a transaction processing method according to the present invention will be described with reference to the accompanying drawings.
本実施形態では、NFSを、図1に示すようなトランザクション処理システム(T101)に適用可能なファイルプロトコルに置き換える。 In this embodiment, NFS is replaced with a file protocol applicable to the transaction processing system (T101) as shown in FIG.
図1に示すように、ファイルプロトコルは、ファイルクライアント1と、ファイルエージェント2とを有する。ファイルクライアント1は、アプリケーションからの指示に従って動作する。ファイルエージェント2はファイルクライアント1の要求に従って動作する。
As shown in FIG. 1, the file protocol includes a file client 1 and a
ファイルクライアント1は、通信制御部10と、ファイル登録部11と、ファイル取得部12と、コミット部13と、ロールバック部14と、リスト取得部15とを有する。
The file client 1 includes a
ファイル登録部11は、通信制御部10を用いてファイルエージェント2にファイルの登録を要求する。
The
ファイル取得部12は、通信制御部10を用いてファイルエージェント2にファイルの取得を要求する。
The
コミット部13は、は通信制御部10を用いてファイルエージェント2にトランザクション識別子を指定してコミットを要求する。
The
ロールバック部14は、通信制御部10を用いてファイルエージェント2にトランザクション識別子を指定してロールバックを要求する。
The
リスト取得部15は、通信制御部10を用いてファイルエージェント2にリスト取得を要求する。
The
ファイルエージェント2は、通信制御部20と、ファイル情報制御部21と、ファイルアクセス制御部22と、キャッシュ制御部23とを有する。
The
ファイル情報制御部21は、通信制御部20の指示に従って仮登録リスト記憶部25とファイル情報DB31にアクセスする。
The file
ファイルアクセス制御部22は、通信制御部20の指示に従ってファイル記憶装置32にアクセスする。
The file
キャッシュ制御部23は、通信制御部20の指示に従ってキャッシュ記憶部26にアクセスする。
The
仮登録リスト記憶部25およびファイル情報DB31は、図2に示すテーブル構造を有する。図2に示すファイル情報テーブルは、データ項目として、例えば、宛先、出力元、出力トランザクション識別子、ファイル名、入力トランザクション識別子、およびパスを有する。宛先、出力元、出力トランザクション識別子、ファイル名および入力トランザクション識別子がファイル情報であり、パスはファイル情報から生成される。
The temporary registration
仮登録リスト記憶部25は、アプリケーションがコミットを要求するまでに登録されるファイルの情報を記憶する。記憶したファイル情報は、コミットによりファイル情報DB31に記憶され、ロールバックにより仮登録リスト記憶部25から削除される。
The temporary registration
キャッシュ記憶部26は、ファイルの内容を記憶する。
The
ファイルクライアント1とファイルエージェント2は、それぞれ通信制御部10と通信制御部20でネットワークを介して相互に通信を行う。
The file client 1 and the
図3を参照して、ファイルエージェント2の通信制御部20の動作について説明する。
The operation of the
最初に、通信制御部20は、ファイルクライアント1から要求を受信し(ステップS101)、受信した要求の種類を判定する(ステップS102)。
First, the
上記ステップS102の要求判定で要求が“登録要求”であると判定された場合には、後述する登録要求処理Bを実行してから、処理を上記ステップS101に移行する。 If it is determined in step S102 that the request is a “registration request”, a registration request process B described later is executed, and then the process proceeds to step S101.
上記ステップS102の要求判定で要求が“取得要求”であると判定された場合には、後述する取得要求処理Cを実行してから、処理を上記ステップS101に移行する。 If it is determined in the request determination in step S102 that the request is an “acquisition request”, an acquisition request process C described later is executed, and then the process proceeds to step S101.
上記ステップS102の要求判定で要求が“コミット要求”であると判定された場合には、後述するコミット要求処理Dを実行してから、処理を上記ステップS101に移行する。 If it is determined in the request determination in step S102 that the request is a “commit request”, a commit request process D described later is executed, and then the process proceeds to step S101.
上記ステップS102の要求判定で要求が“ロールバック要求”であると判定された場合には、後述するロールバック要求処理Eを実行してから、処理を上記ステップS101に移行する。 If it is determined in the request determination in step S102 that the request is a “rollback request”, a rollback request process E described later is executed, and then the process proceeds to step S101.
上記ステップS102の要求判定で要求が“リスト要求”であると判定された場合には、後述するリスト要求処理Fを実行してから、処理を上記ステップS101に移行する。 If it is determined in the request determination in step S102 that the request is “list request”, a list request process F described later is executed, and then the process proceeds to step S101.
図4を参照して、登録要求処理Bの処理手順について説明する。 With reference to FIG. 4, the processing procedure of the registration request processing B will be described.
最初に、通信制御部20は、ファイルアクセス制御部22にファイル登録要求を発行する(ステップS201)。これにより、ファイルアクセス制御部22は、ファイル登録要求を受信し、ファイル記憶装置32内の指定されたパスにファイルを作成して登録する。
First, the
ここで、通信制御部20は、ファイルパスを指定する際に、トランザクション識別子の文字列に基づくハッシュ値を取得し、トランザクション識別子の代わりにハッシュ値をディレクトリ名とする。従来は、トランザクション識別子単位にディレクトリが設けられ、そのディレクトリの中にファイルを格納していた。これに対し、本発明では、ハッシュ値が同一となるトランザクション識別子単位にディレクトリを設け、そのディレクトリの中にファイルを格納することで、ディレクトリ数を節減することができる。
Here, when specifying the file path, the
続いて、通信制御部20は、キャッシュ制御部23にキャッシュ登録要求を発行する(ステップS202)。
Subsequently, the
続いて、通信制御部20は、ファイルアクセス制御部22によるファイル登録の結果を判定する(ステップS203)。
Subsequently, the
この判定結果が、ファイル登録成功である場合、通信制御部20は、ファイル情報制御部21に対して、ファイルクライアント1から取得したファイル情報と、生成したファイルパスとを合わせてファイル情報仮登録要求を発行し(ステップS205)、仮登録が完了するまで待機する。続いて、通信制御部20は、キャッシュ登録の結果を取得するまで待機し(ステップS206)、ファイルクライアント1に応答を送信する(ステップS207)。
If the determination result is that the file registration is successful, the
一方、上記ステップS203の判定結果が、ファイル登録失敗である場合に、通信制御部20は、キャッシュ登録の結果を取得するまで待機し(ステップS206)、ファイルクライアント1に応答を送信する(ステップS207)。
On the other hand, if the determination result in step S203 is that the file registration has failed, the
図5を参照して、取得要求処理Cの処理手順について説明する。 With reference to FIG. 5, the processing procedure of the acquisition request processing C will be described.
最初に、通信制御部20は、ファイル情報制御部21に対して、取得対象ファイルのファイル情報に入力トランザクション識別子を登録するように要求する(ステップS301)。
First, the
続いて、通信制御部20は、上記ステップS301の要求に対する結果を判定する(ステップS302)。
Subsequently, the
この判定結果が、登録失敗、すなわち該当レコードが存在しない場合、通信制御部20は、ファイルが存在しない旨の応答をファイルクライアント1に送信する(ステップS306)。
If the determination result is registration failure, that is, the corresponding record does not exist, the
一方、上記ステップS302の判定結果が、登録成功である場合、通信制御部20は、キャッシュ制御部23にキャッシュ取得要求を発行する(ステップS303)。
On the other hand, if the determination result in step S302 is that registration is successful, the
続いて、通信制御部20は、キャッシュ取得要求に対する結果を判定する(ステップS304)。
Subsequently, the
この判定結果が、取得成功である場合、通信制御部20は、取得対象ファイルの内容としてキャッシュの内容を含む応答をファイルクライアント1に送信する(ステップS306)。
If the determination result is acquisition success, the
一方、上記ステップS304の判定結果が、取得失敗、つまりキャッシュが存在しなかった場合、通信制御部20は、ファイルアクセス制御部22に対してファイル取得要求を発行し(ステップS305)、その結果取得されたファイルの内容を含む応答をファイルクライアント1に送信する(ステップS306)。
On the other hand, if the determination result in step S304 is an acquisition failure, that is, the cache does not exist, the
図6を参照して、コミット要求処理Dの処理手順について説明する。 With reference to FIG. 6, the procedure of the commit request process D will be described.
最初に、通信制御部20は、ファイルクライアント1で指定された入力トランザクション識別子を有するファイル情報の一覧をファイル情報制御部21から取得する(ステップS401)。
First, the
続いて、通信制御部20は、ファイルアクセス制御部22に対して、取得した一覧の全てのファイルを削除するように要求する(ステップS402)。
Subsequently, the
続いて、通信制御部20は、ファイル情報制御部21に対して、ファイルクライアント1で指定された入力トランザクション識別子を有するレコードをファイル情報DB31から全て削除するように要求する(ステップS403)。
Subsequently, the
続いて、通信制御部20は、ファイル情報制御部21に対して、仮登録リスト記憶部25に記憶されているファイル情報のうち、ファイルクライアント1で指定されたトランザクション識別子を有するファイル情報をファイル情報DB31に登録するように要求する(ステップS404)。
Subsequently, the
続いて、通信制御部20は、応答をファイルクライアント1に送信する(ステップS405)。
Subsequently, the
図7を参照して、ロールバック要求処理Eの処理手順について説明する。 With reference to FIG. 7, the processing procedure of the rollback request processing E will be described.
最初に、通信制御部20は、ファイル情報制御部21に対して、ファイルクライアント1で指定された入力トランザクション識別子を有するファイル情報をファイル情報DB31から削除するように要求する(ステップS501)。
First, the
続いて、通信制御部20は、ファイルアクセス制御部22に対して、仮登録リスト記憶部25にある指定されたトランザクション識別子を有するファイルを、ファイル記憶装置32から削除するように要求する(ステップS502)。
Subsequently, the
続いて、通信制御部20は、ファイル情報制御部21に対して、ファイルクライアント1で指定されたトランザクション識別子を有するファイル情報を仮登録リスト記憶部25から削除するように要求する(ステップS503)。
Subsequently, the
続いて、通信制御部20は、応答をファイルクライアント1に送信する(ステップS504)。
Subsequently, the
図8を参照して、リスト要求処理Fの処理手順について説明する。 With reference to FIG. 8, the processing procedure of the list request processing F will be described.
最初に、通信制御部20は、ファイル情報制御部21に対して、ファイルクライアント1で指定された条件を満たすファイル情報をファイル情報DB31から取得するように要求する(ステップS601)。
First, the
続いて、通信制御部20は、取得したファイル情報を含む応答をファイルクライアント1に送信する(ステップS602)。
Subsequently, the
ここで、ファイルエージェント2が障害により再起動したとき、障害発生時にファイル情報DB31が、図9に示す状態で更新されていた場合には、ファイル情報DB31をロールバックする。その後、ファイルエージェント2の異常を検出したファイルクライアント1は、再度同じ処理、または、状況に応じてコミット部13やロールバック部14を機能させることで復旧を行う。
Here, when the
次に、図10を参照して、上述したファイルプロトコルをトランザクション処理システムに適用した場合について説明する。 Next, a case where the above-described file protocol is applied to a transaction processing system will be described with reference to FIG.
本トランザクション処理システムは、外部入力装置4からデータを入力し、最終的にデータベースDB−B8およびDB−C9を更新するシステムである。 This transaction processing system is a system for inputting data from the external input device 4 and finally updating the databases DB-B8 and DB-C9.
アプリケーションA7は、外部入力装置4からデータを入力し、決められたルールに従ってアプリケーションB7またはアプリケーションC7宛にデータを出力する。アプリケーションB7は、アプリケーションA7からのデータを入力し、決められたルールに従って、データベースDB−B8を更新するか、またはアプリケーションC7宛にデータを出力する。アプリケーションC7は、アプリケーションA7またはアプリケーションB7からのデータを入力し、データベースDB−C9を更新する。 The application A7 inputs data from the external input device 4, and outputs the data to the application B7 or the application C7 according to the determined rule. The application B7 inputs the data from the application A7, updates the database DB-B8 according to the determined rule, or outputs the data to the application C7. The application C7 inputs data from the application A7 or the application B7, and updates the database DB-C9.
アプリケーションA7は、ファイルクライアントA1を複数有する。アプリケーションB7は、ファイルクライアントB1を複数有する。アプリケーションC7は、ファイルクライアントC1を複数有する。 The application A7 has a plurality of file clients A1. The application B7 has a plurality of file clients B1. The application C7 has a plurality of file clients C1.
ファイルサーバ6は、複数のファイルエージェントA2、B2、C2を有する。各ファイルエージェントA2、B2、C2は、ファイル記憶装置32を共有する。
The file server 6 has a plurality of file agents A2, B2, and C2. Each
ファイルエージェントA2は、複数存在し、アプリケーションA7のファイルクライアントA1と通信を行う。ファイル情報DBA31は、複数のファイルエージェントA2が共有する。
A plurality of file agents A2 exist and communicate with the file client A1 of the application A7. The
ファイルエージェントB2は、複数存在し、アプリケーションB7のファイルクライアントB1と通信を行う。ファイル情報DBB31は、複数のファイルエージェントB2が共有する。
A plurality of file agents B2 exist and communicate with the file client B1 of the application B7. The
ファイルエージェントC2は、複数存在し、アプリケーションC7のファイルクライアントC1と通信を行う。ファイル情報DBC31は、複数のファイルエージェントC2が共有する。 A plurality of file agents C2 exist and communicate with the file client C1 of the application C7. The file information DBC31 is shared by a plurality of file agents C2.
最初に、アプリケーションA7が、データを出力する際、ファイルクライアントA1のファイル登録部11を実行する。ファイルクライアントA1は、複数存在するので、複数のファイルを並行して出力することができる。
First, the application A7 executes the
続いて、ファイルエージェントB2は、アプリケーションA7からアプリケーションB7宛のファイル登録要求を受信し、ファイル記憶装置32にファイルを作成する。
Subsequently, the file agent B2 receives a file registration request addressed to the application B7 from the application A7, and creates a file in the
続いて、ファイルエージェントC2は、アプリケーションA7からアプリケーションC7宛のファイル登録要求を受信し、ファイル記憶装置32にファイルを作成する。
Subsequently, the file agent C2 receives a file registration request addressed to the application C7 from the application A7, and creates a file in the
続いて、アプリケーションA7は、1つのトランザクションにおいて全てのファイルを出力したら、ファイルクライアントA1のコミット部13を実行する。
Subsequently, when all the files are output in one transaction, the application A7 executes the commit
続いて、ファイルエージェントB2は、アプリケーションA7からのコミット要求を受信し、ファイル情報DBB31にファイル情報を格納する。 Subsequently, the file agent B2 receives the commit request from the application A7, and stores the file information in the file information DBB31.
続いて、ファイルエージェントC2は、アプリケーションA7からのコミット要求を受信し、ファイル情報DBC31にファイル情報を格納する。 Subsequently, the file agent C2 receives the commit request from the application A7, and stores the file information in the file information DBC31.
続いて、アプリケーションA7は、登録したファイルの情報をアプリケーションB7とアプリケーションC7にネットワークを介して通知する。 Subsequently, the application A7 notifies the registered file information to the application B7 and the application C7 via the network.
続いて、アプリケーションB7は、アプリケーションA7から受信したファイル情報を元にファイルを入力するため、ファイルクライアントB1のファイル取得部12を実行する。ファイルクライアントB1は、複数存在するので、複数のファイルを並行して入力することができる。
Subsequently, the application B7 executes the
続いて、ファイルエージェントB2は、アプリケーションB7からのファイル取得要求を受信し、ファイル記憶装置32あるいはキャッシュ記憶部26からファイルを取得する。
Subsequently, the file agent B2 receives a file acquisition request from the application B7, and acquires a file from the
続いて、アプリケーションB7は、取得したファイルのデータについて、データベースDB−B8を更新し、アプリケーションC7へデータを出力する。 Subsequently, the application B7 updates the database DB-B8 with respect to the acquired file data, and outputs the data to the application C7.
続いて、ファイルエージェントC2は、アプリケーションB7からアプリケーションC7宛のファイル登録要求を受け、ファイル記憶装置32にファイルを作成する。
Subsequently, the file agent C2 receives a file registration request addressed to the application C7 from the application B7, and creates a file in the
続いて、アプリケーションB7は、1つのトランザクションにおいて全てのファイルを出力したら、ファイルクライアントB1のコミット部13を実行する。
Subsequently, when all the files are output in one transaction, the application B7 executes the commit
続いて、ファイルエージェントC2は、アプリケーションB7からのコミット要求を受け、入力したファイルを削除し、ファイル情報DBC31にファイル情報を格納する。 Subsequently, the file agent C2 receives the commit request from the application B7, deletes the input file, and stores the file information in the file information DBC31.
続いて、アプリケーションB7は、登録したファイルの情報をアプリケーションC7にネットワークを介して通知する。 Subsequently, the application B7 notifies the registered file information to the application C7 via the network.
続いて、アプリケーションC7は、アプリケーションA7とアプリケーションB7から受信したファイル情報を元にファイルを入力するため、ファイルクライアントC1のファイル取得部12を実行する。ファイルクライアントC1は、複数存在するので、複数のファイルを並行して入力することができる。
Subsequently, the application C7 executes the
続いて、ファイルエージェントC2は、アプリケーションB7からのファイル取得要求を受信し、ファイル記憶装置32あるいはキャッシュ記憶部26からファイルを取得する。
Subsequently, the file agent C2 receives a file acquisition request from the application B7 and acquires a file from the
続いて、アプリケーションC7は、取得したファイルからデータを処理し、データベースDB−C9を更新する。 Subsequently, the application C7 processes data from the acquired file and updates the database DB-C9.
続いて、アプリケーションC7は、1つのトランザクションにおいて全てのファイルを入力したら、ファイルクライアントC1のコミット部13を実行する。
Subsequently, when all the files are input in one transaction, the application C7 executes the commit
ファイルエージェントC2は、アプリケーションC7からのコミット要求を受け、入力したファイルを削除する。 The file agent C2 receives the commit request from the application C7 and deletes the input file.
以上のようにして、各アプリケーション間でデータの受け渡しを行う。 As described above, data is exchanged between the applications.
障害時の動作については、以下の(1)〜(3)のようにして復旧を行う。 Regarding the operation at the time of failure, recovery is performed as in the following (1) to (3).
(1)アプリケーションB7がトランザクション中でファイル登録後、コミット前にAPサーバB5が障害になった場合。 (1) When the application B7 is in a transaction and the AP server B5 becomes a failure before committing after file registration.
APサーバB5が、復旧後、ロールバック部14を実行し、ファイルエージェントB2およびファイルエージェントC2にロールバックを要求する。
After the recovery, the AP server B5 executes the
ファイルエージェントB2は、ファイル情報DBB31から入力トランザクション識別子を削除する。 The file agent B2 deletes the input transaction identifier from the file information DBB31.
ファイルエージェントC2は、ファイル記憶装置32から該当するトランザクション識別子のファイルを削除し、ファイルエージェントC2の仮登録リスト記憶部25から出力トランザクション識別子に該当するファイル情報を削除する。
The file agent C2 deletes the file with the corresponding transaction identifier from the
その後、アプリケーションB7は、ファイルクライアントB1のリスト取得部15を実行し、ファイルエージェントB2が持っているファイル情報のリストを取得して、トランザクションを再開する。
Thereafter, the application B7 executes the
(2)アプリケーションB7がトランザクション中でファイル登録後、コミット中にAPサーバB5が障害になった場合。 (2) When the application server B7 is in a transaction, the file registration is performed, and the AP server B5 becomes a failure during the commit.
APサーバB5は、復旧してアプリケーションB7が再起動し、ファイルエージェントA2、ファイルエージェントB2およびファイルエージェントC2に対してリスト取得を行う。 The AP server B5 recovers and the application B7 is restarted, and the list is acquired for the file agent A2, the file agent B2, and the file agent C2.
取得したファイル情報から、障害発生時に行っていたコミットが成功しているかどうかを判断(出力の場合は、トランザクション識別子のファイルが存在する場合に成功とし、入力の場合は、入力トランザクション識別子のファイルが存在していない場合に成功とする。)し、失敗しているものについては再度コミットを要求する。 From the acquired file information, determine whether the commit that was being performed at the time of the failure was successful (in the case of output, if the transaction identifier file exists, it is determined to be successful; in the case of input, the input transaction identifier file is If it does not exist, it is considered as successful.) If it fails, the commit is requested again.
(3)アプリケーションB7がトランザクション中でファイル登録後、コミット中にファイルサーバ6が障害になった場合。 (3) When the file server 6 becomes a failure during the commit after the file registration in the application B7 during the transaction.
APサーバB5のファイルクライアントB1は、コミットの応答を得ることができないため、ファイルエージェントの障害と判断し、通信パスの再確立後、再度コミット要求を行う。 Since the file client B1 of the AP server B5 cannot obtain a commit response, the file client B1 determines that the file agent has failed and makes a commit request again after re-establishing the communication path.
ファイルエージェントB2は、通常と同じコミット処理を行い、応答を返す。 The file agent B2 performs the same commit process as usual and returns a response.
上述したように、本実施形態におけるトランザクション処理システムによれば、以下の(1)〜(4)の効果を奏する。 As described above, the transaction processing system according to this embodiment has the following effects (1) to (4).
(1)ファイルサーバ障害でアプリケーションをハングアップさせずに書き込みを保証することができる。 (1) Writing can be guaranteed without causing the application to hang up due to a file server failure.
これは、NFSを使用しないためである。ファイルエージェント2において、ファイルアクセス制御部22がファイル記憶装置32への書き込みを完了し、仮登録リスト記憶部25にファイル情報が登録された時点で、データがファイルに保存されたことが確定する。ファイル記憶装置32は、ファイルアクセス制御部22からの書き込み要求について、書き込み完了時に書き込みが保証できるものである必要がある。
This is because NFS is not used. In the
(2)サーバ異常により入力側の処理が止まってしまったときに、出力側の処理を止めるまでの期間の長さの上限を引き上げることができる。 (2) When the processing on the input side stops due to a server abnormality, the upper limit of the length of the period until the processing on the output side is stopped can be increased.
これは、ファイル情報DB31により、従来のファイル格納箇所の制限(同一トランザクションのファイルは一つのディレクトリに格納しなければならない)にとらわれる必要がなくなるためである。
This is because the
(3)ファイル滞留時のサーバ再起動の性能を改善することができる。 (3) It is possible to improve the server restart performance when a file stays.
これは、ファイル情報DB31によって、ディスクアクセスなしにファイル一覧を取得することができるため、特に多数のファイルが存在する場合に、ファイル一覧取得の速度を改善することができるためである。
This is because the
(4)トランザクションの速度性能を改善することができる。 (4) Transaction speed performance can be improved.
これは、トランザクション性能のボトルネックの一つがファイルアクセスであることから、ファイルアクセスの性能を改善することで、トランザクション性能を改善することができるためである。まず、open、read/write、closeを1回の要求/応答で行うため、NFSに比べて通信回数を減らすことができる。また、トランザクションの概念のファイルプロトコルとして含めることができるため、リネームや入力コンテナ削除など、トランザクション単位に複数のファイルをファイル名指定なしで処理することができる。さらに、最適なファイルキャッシュを提供することが可能となり、物理ディスクへのアクセスを減らすことができる。最適なファイルキャッシュとは、最後に書き込んだファイルではなく、サーバ単位に最も古いものをメモリに残しておくことである。 This is because one of the bottlenecks of transaction performance is file access, and therefore transaction performance can be improved by improving file access performance. First, since open, read / write, and close are performed with a single request / response, the number of communications can be reduced compared to NFS. In addition, since it can be included as a file protocol of the concept of transaction, a plurality of files can be processed without specifying a file name for each transaction, such as renaming and deleting input containers. In addition, an optimal file cache can be provided, and access to the physical disk can be reduced. The optimal file cache is to leave the oldest file in the server, not the last file written, in memory.
[変形例]
なお、上述した実施形態は、単なる例示に過ぎず、実施形態に明示していない種々の変形や技術の適用を排除するものではない。すなわち、本発明は、その趣旨を逸脱しない範囲で様々な形態に変形して実施することができる。
[Modification]
Note that the above-described embodiment is merely an example, and does not exclude various modifications and technical applications that are not explicitly described in the embodiment. That is, the present invention can be implemented by being modified into various forms without departing from the spirit of the present invention.
例えば、上記の実施形態の一部または全部は、以下の付記のようにも記載され得るが、本発明を以下に限定するものではない。 For example, some or all of the above-described embodiments can be described as in the following supplementary notes, but the present invention is not limited to the following.
(付記1) 所定の操作単位に要求を送信するファイルクライアントと、前記要求を受信するたびに、当該要求に対する結果を送信するファイルエージェントと、を備え、前記ファイルエージェントは、前記要求に対応するトランザクション識別子のハッシュ値を用いてディレクトリ名を生成する通信制御部と、前記要求として登録要求を受信したときに、登録対象のファイルをファイル記憶装置に登録するファイルアクセス制御部と、前記登録要求を受信したときに、登録対象のファイル情報を仮登録する仮登録リスト記憶部と、前記要求としてコミット要求を受信したときに、仮登録したファイル情報をファイル情報DBに格納するファイル情報制御部と、を有し、前記ファイルアクセス制御部、前記仮登録リスト記憶部および前記ファイル情報制御部は、前記要求としてロールバック要求を受信したときに、未完了のトランザクションに対応するファイル情報を削除する、ことを特徴とするトランザクション処理システム。 (Supplementary note 1) A file client that transmits a request in a predetermined unit of operation and a file agent that transmits a result for the request each time the request is received, the file agent including a transaction corresponding to the request A communication control unit that generates a directory name using a hash value of an identifier, a file access control unit that registers a file to be registered in a file storage device when receiving a registration request as the request, and the registration request A temporary registration list storage unit that temporarily registers file information to be registered, and a file information control unit that stores the temporarily registered file information in the file information DB when a commit request is received as the request. The file access control unit, the temporary registration list storage unit, and the file Le information control unit, the transaction processing system when it receives a rollback request as the request to delete the file information corresponding to the uncompleted transaction, characterized in that.
(付記2) 所定の操作単位に要求を送信するファイルクライアントと、前記要求を受信するたびに、当該要求に対する結果を送信するファイルエージェントと、を備えるトランザクション処理システムを制御する方法であって、前記ファイルエージェントが、前記要求に対応するトランザクション識別子のハッシュ値を用いてディレクトリ名を生成するステップと、前記要求として登録要求を受信したときに、登録対象のファイルをファイル記憶装置に登録するステップと、前記登録要求を受信したときに、登録対象のファイル情報を仮登録するステップと、前記要求としてコミット要求を受信したときに、仮登録したファイル情報をファイル情報DBに格納するステップと、前記要求としてロールバック要求を受信したときに、未完了のトランザクションに対応するファイル情報を削除するステップと、を含むことを特徴とするトランザクション処理方法。 (Appendix 2) A method for controlling a transaction processing system comprising: a file client that transmits a request in a predetermined unit of operation; and a file agent that transmits a result for the request each time the request is received, A step of generating a directory name using a hash value of a transaction identifier corresponding to the request; and a step of registering a file to be registered in a file storage device when receiving a registration request as the request; A step of temporarily registering file information to be registered when the registration request is received; a step of storing temporarily registered file information in a file information DB when a commit request is received as the request; Incomplete when a rollback request is received Transaction processing method characterized by comprising the step of deleting the file information corresponding to the transaction, the.
1…ファイルクライアント、2…ファイルエージェント、4…外部入力装置、5…APサーバ、6…ファイルサーバ、7…アプリケーション、8、9…データベース、10…通信制御部、11…ファイル登録部、12…ファイル取得部、13…コミット部、14…ロールバック部、15…リスト取得部、20…通信制御部、21…ファイル情報制御部、22…ファイルアクセス制御部、23…キャッシュ制御部、25…仮登録リスト記憶部、26…キャッシュ記憶部、31…ファイル情報DB、32…ファイル記憶装置。
DESCRIPTION OF SYMBOLS 1 ... File client, 2 ... File agent, 4 ... External input device, 5 ... AP server, 6 ... File server, 7 ... Application, 8, 9 ... Database, 10 ... Communication control part, 11 ... File registration part, 12 ...
Claims (2)
前記要求を受信するたびに、当該要求に対する結果を送信するファイルエージェントと、を備え、
前記ファイルエージェントは、
前記要求に対応するトランザクション識別子のハッシュ値を用いてディレクトリ名を生成する通信制御部と、
前記要求として登録要求を受信したときに、登録対象のファイルをファイル記憶装置に登録するファイルアクセス制御部と、
前記登録要求を受信したときに、登録対象のファイル情報を仮登録する仮登録リスト記憶部と、
前記要求としてコミット要求を受信したときに、仮登録したファイル情報をファイル情報DBに格納するファイル情報制御部と、を有し、
前記ファイルアクセス制御部、前記仮登録リスト記憶部および前記ファイル情報制御部は、前記要求としてロールバック要求を受信したときに、未完了のトランザクションに対応するファイル情報を削除する、
ことを特徴とするトランザクション処理システム。 A file client that sends a request to a given unit of operation;
A file agent that transmits a result for the request each time the request is received, and
The file agent is
A communication control unit that generates a directory name using a hash value of a transaction identifier corresponding to the request;
A file access control unit that registers a file to be registered in the file storage device when a registration request is received as the request;
A temporary registration list storage unit that temporarily registers file information to be registered when the registration request is received;
A file information control unit that stores temporarily registered file information in the file information DB when a commit request is received as the request;
The file access control unit, the temporary registration list storage unit, and the file information control unit delete file information corresponding to an incomplete transaction when receiving a rollback request as the request.
A transaction processing system characterized by that.
前記ファイルエージェントが、
前記要求に対応するトランザクション識別子のハッシュ値を用いてディレクトリ名を生成するステップと、
前記要求として登録要求を受信したときに、登録対象のファイルをファイル記憶装置に登録するステップと、
前記登録要求を受信したときに、登録対象のファイル情報を仮登録するステップと、
前記要求としてコミット要求を受信したときに、仮登録したファイル情報をファイル情報DBに格納するステップと、
前記要求としてロールバック要求を受信したときに、未完了のトランザクションに対応するファイル情報を削除するステップと、
を含むことを特徴とするトランザクション処理方法。 A method for controlling a transaction processing system comprising: a file client that transmits a request to a predetermined unit of operation; and a file agent that transmits a result for the request each time the request is received,
The file agent is
Generating a directory name using a hash value of a transaction identifier corresponding to the request;
Registering a file to be registered in a file storage device when a registration request is received as the request;
Temporarily registering file information to be registered when the registration request is received;
Storing the provisionally registered file information in the file information DB when a commit request is received as the request;
Deleting a file information corresponding to an incomplete transaction when a rollback request is received as the request;
A transaction processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011060401A JP2012194951A (en) | 2011-03-18 | 2011-03-18 | Transaction processing system and transaction processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011060401A JP2012194951A (en) | 2011-03-18 | 2011-03-18 | Transaction processing system and transaction processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2012194951A true JP2012194951A (en) | 2012-10-11 |
Family
ID=47086743
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011060401A Withdrawn JP2012194951A (en) | 2011-03-18 | 2011-03-18 | Transaction processing system and transaction processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2012194951A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2021028963A1 (en) * | 2019-08-09 | 2021-02-18 |
-
2011
- 2011-03-18 JP JP2011060401A patent/JP2012194951A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2021028963A1 (en) * | 2019-08-09 | 2021-02-18 | ||
JP7298694B2 (en) | 2019-08-09 | 2023-06-27 | 日本電気株式会社 | Abnormality detection device, control method, and program |
US11983064B2 (en) | 2019-08-09 | 2024-05-14 | Nec Corporation | Abnormality detection apparatus, control method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11481139B1 (en) | Methods and systems to interface between a multi-site distributed storage system and an external mediator to efficiently process events related to continuity | |
US7480654B2 (en) | Achieving cache consistency while allowing concurrent changes to metadata | |
US9710186B2 (en) | Performing online data migration with concurrent active user access to the data | |
US10817498B2 (en) | Distributed transactions in cloud storage with hierarchical namespace | |
US11966307B2 (en) | Re-aligning data replication configuration of primary and secondary data serving entities of a cross-site storage solution after a failover event | |
US20190370362A1 (en) | Multi-protocol cloud storage for big data and analytics | |
US20090319736A1 (en) | Method and apparatus for integrated nas and cas data backup | |
JP5952960B2 (en) | Computer system, computer system management method and program | |
US10440106B2 (en) | Hosted file sync with stateless sync nodes | |
US11297031B2 (en) | Hierarchical namespace service with distributed name resolution caching and synchronization | |
EP3452919A1 (en) | Splitting and moving ranges in a distributed system | |
WO2012045245A1 (en) | Method and system for maintaining data consistency | |
JPWO2011108695A1 (en) | Parallel data processing system, parallel data processing method and program | |
US9619391B2 (en) | In-memory caching with on-demand migration | |
US11544232B2 (en) | Efficient transaction log and database processing | |
CN103501319A (en) | Low-delay distributed storage system for small files | |
US20190220402A1 (en) | Data recovery method, data recovery system, and computer program product | |
JP6196389B2 (en) | Distributed disaster recovery file synchronization server system | |
WO2022048358A1 (en) | Data processing method and device, and storage medium | |
KR20200102293A (en) | Blockchain software capable of operation corresponding sql query, blockchain system, and method of thereof | |
CN104702508A (en) | Method and system for dynamically updating table items | |
JP2005063374A (en) | Data management method, data management device, program for the same, and recording medium | |
JP2012194951A (en) | Transaction processing system and transaction processing method | |
US20230169093A1 (en) | Fast database scaling utilizing a decoupled storage and compute architecture | |
US11494099B2 (en) | Method, device, and computer program product for managing storage system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20140603 |