JP7031919B1 - Transaction processing system and method - Google Patents
Transaction processing system and method Download PDFInfo
- Publication number
- JP7031919B1 JP7031919B1 JP2021144577A JP2021144577A JP7031919B1 JP 7031919 B1 JP7031919 B1 JP 7031919B1 JP 2021144577 A JP2021144577 A JP 2021144577A JP 2021144577 A JP2021144577 A JP 2021144577A JP 7031919 B1 JP7031919 B1 JP 7031919B1
- Authority
- JP
- Japan
- Prior art keywords
- sub
- transaction
- data source
- read
- occ
- 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.)
- Active
Links
Images
Abstract
【課題】複数のトランザクションについて、複数のスナップショットの整合性を維持するトランザクション処理システム及び方法を提供する。【解決手段】トランザクション処理システム20は、複数のサブアプリケーション部と、複数のデータソースクライアントシステムに備えられた複数のCC-OCCのトランザクションマネージャとを含む。各トランザクションについて、当該トランザクションを構成するM個(Mは2以上の整数)のサブトランザクションの処理において二つ以上のサブアプリケーション部からオブジェクトのリード要求及び/又はライト要求を受けるCC-OCCがN個(Nは2以上の整数)の場合、N個の和集合がペアワイズディスジョイントである。N個の和集合の各々について、当該和集合は、当該トランザクションに対応しCC-OCCが管理するスナップショットにおけるリードセットとライトセットとの和集合である。【選択図】図3PROBLEM TO BE SOLVED: To provide a transaction processing system and a method for maintaining the integrity of a plurality of snapshots for a plurality of transactions. A transaction processing system 20 includes a plurality of sub-application units and a plurality of CC-OCC transaction managers provided in a plurality of data source client systems. For each transaction, N CC-OCCs receive object read requests and / or write requests from two or more sub-application units in the processing of the M sub-transactions that make up the transaction (M is an integer of 2 or more). In the case of (N is an integer of 2 or more), the union of N pieces is a pairwise transaction. For each of the N unions, the union is the union of the readset and writeset in the snapshot managed by CC-OCC corresponding to the transaction. [Selection diagram] Fig. 3
Description
本発明は、概して、トランザクションの処理に関する。 The present invention generally relates to the processing of transactions.
一般に、サービスを実現するビジネスロジックの実行において、トランザクションが処理される。トランザクションは、一般的に、アトミックに処理されるオペレーションの集合であり、例えば、複数のCRUD(Create、Read、Update又はDelete)要求から成る。トランザクション処理では、複数のオブジェクトに対してACID(Atomicity、Consistency、Isolation及びDurability)性を保証しつつCRUD要求を処理する必要がある。 Generally, transactions are processed in the execution of business logic that realizes a service. A transaction is generally a collection of operations that are processed atomically and, for example, consists of multiple CRUD (Create, Read, Update or Delete) requests. In transaction processing, it is necessary to process CRUD requests while guaranteeing ACID (Atomicity, Consistency, Isolation and Durability) properties for a plurality of objects.
トランザクション処理では、複数のオブジェクト(例えば、複数のレコード)を有するデータソースサーバシステムに対し、データソースサーバシステムに対するクライアントシステムであるデータソースクライアントシステムにより、オブジェクトのリード及び/又はライトが行われる。 In transaction processing, a data source server system having a plurality of objects (for example, a plurality of records) is read and / or written by the data source client system, which is a client system for the data source server system.
トランザクション処理として、OCC(Optimistic Concurrency Control)を含むトランザクション処理が知られている(例えば非特許文献1)。OCCでは、コミット時にスナップショットを基にバリデーションが行われる。スナップショットは、トランザクション毎に存在する。各トランザクションについて、スナップショットは、0以上のリードオブジェクトの集合であるリードセット、及び、0以上のライトオブジェクトの集合であるライトセットを含む。各トランザクションについて、リードオブジェクトは、当該トランザクションの処理においてリードされたオブジェクトである。各トランザクションについて、ライトセットは、当該トランザクションの処理においてライトされるオブジェクトである。 As transaction processing, transaction processing including OCC (Optimistic Concurrency Control) is known (for example, Non-Patent Document 1). In OCC, validation is performed based on the snapshot at the time of commit. Snapshots exist for each transaction. For each transaction, the snapshot contains a readset, which is a set of zero or more read objects, and a writeset, which is a set of zero or more write objects. For each transaction, the lead object is the object that was read in the processing of that transaction. For each transaction, a write set is an object that is lighted in the processing of that transaction.
ビジネスロジックは、一般に、アプリケーション部により実行される。アプリケーション部は、ソフトウェア(典型的にはアプリケーションプログラム)(又は、当該ソフトウェアが実行されることにより実現される機能)である。アプリケーション部は、トランザクションの処理において、Tx(トランザクション)マネージャに、オブジェクトのリード及び/又はライトの要求を送信する。 Business logic is generally executed by the application department. The application unit is software (typically an application program) (or a function realized by executing the software). The application unit sends a request for reading and / or writing an object to the Tx (transaction) manager in the processing of the transaction.
ビジネスロジック(例えばサービス)を複数のサブビジネスロジック(例えば複数のマイクロサービス)に分割すること、言い換えれば、複数のサブビジネスロジックから一つのビジネスロジックを構成することが知られている。この場合、複数のサブビジネスロジックを実行する複数のサブアプリケーション部が設計される。 It is known to divide a business logic (for example, a service) into a plurality of sub-business logics (for example, a plurality of microservices), in other words, to construct one business logic from a plurality of sub-business logics. In this case, a plurality of sub-application parts that execute a plurality of sub-business logics are designed.
このように複数のサブアプリケーション部を含んだアーキテクチャが採用される場合、一つのトランザクションを構成する複数のサブトランザクションが処理されることになる。 When an architecture including a plurality of sub-application parts is adopted in this way, a plurality of sub-transactions constituting one transaction are processed.
また、複数のデータソースクライアントシステムに複数のTxマネージャが備えられるにあたり、トランザクション機能をもたないデータソースクライアントシステムにおいてトランザクション機能を実現する等の理由から、各Txマネージャを、client-coordinatedなTxマネージャとすることが考えられる。以下、OCCを行うclient-coordinatedなTxマネージャを、「CC-OCC」と表記する。複数のCC-OCCの各々は、トランザクション毎にスナップショットを管理する。なお、本明細書において、Txマネージャを「Client-coordinatedなTxマネージャとする」とは、一般的にデータソースサーバシステムに配置されるTxマネージャをデータソースサーバシステムではなくデータソースクライアントシステムに配置し、且つ、データソースクライアントシステムに配置されたTxマネージャ同士で通信等により情報交換を行わないということである。また、CC-OCCが「スナップショットを管理する」とは、当該CC-OCCを有するデータソースクライアントシステム(例えば、データソースクライアントシステムのメモリ)にスナップショットを格納することを意味し、当該スナップショットは、当該CC-OCCの中にあっても外にあってもよい。 Further, when a plurality of Tx managers are provided in a plurality of data source client systems, each Tx manager is used as a client-coordinated Tx manager for the reason that the transaction function is realized in the data source client system having no transaction function. Is conceivable. Hereinafter, the client-coordinated Tx manager that performs OCC is referred to as "CC-OCC". Each of the plurality of CC-OCCs manages snapshots for each transaction. In addition, in this specification, "the Tx manager is a Client-coordinated Tx manager" means that the Tx manager generally arranged in the data source server system is arranged not in the data source server system but in the data source client system. Moreover, information is not exchanged between Tx managers arranged in the data source client system by communication or the like. Further, CC-OCC "manages snapshots" means that the snapshot is stored in the data source client system having the CC-OCC (for example, the memory of the data source client system), and the snapshot. May be inside or outside the CC-OCC.
複数のサブアプリケーション部と、複数のデータソースクライアントシステムに備えられた複数のCC-OCCとを含むアーキテクチャにおいて、複数のトランザクションを並列に処理するにあたり、複数のスナップショットの整合性を維持することは、困難である。以下、その一例を、図1A~図2Bを参照して説明する。なお、その説明において、前提及び用語(以下、便宜上、「用語集」と言う)は下記とする。また、サブアプリケーション部は、データソースクライアントシステムの中に備えられても外に備えられてもよい。
・サービスは、「ファミリーアカウントに属する複数のメンバアカウントにおける複数のポイントの合計が所定値を超えている場合に、それら複数のメンバアカウントの各々に所定のポイントを付与」というサービスである。
・メンバアカウントA及びBが、或るファミリーアカウントに属する複数のメンバアカウントである。メンバアカウントC及びDが、別のファミリーアカウントに属する複数のメンバアカウントである。
・複数のメンバアカウントにおけるポイントは、サーバシステム15(データソースシステムの一例)におけるDB(データベース)521A及び521Bに記録されている(なお、DB521は一つでも三つ以上でもよい)。
・レコードX(X=A、B、C又はD)は、メンバアカウントXにおけるポイントが記録される一つのレコードである。
・リードXが、レコードXのリードである。
・ライトXが、レコードXのライトである。
・リードレコードX:リードXによりリードされたレコードXであり、スナップショットにおけるリードセットに含まれるレコードである。
・ライトレコードX:ライトXによりライトされるレコードXであり、スナップショットにおけるライトセットに含まれるレコードである。
・Tx1が、リードA~D及びライトA~Dで構成されている。Tx1におけるライトA及びBの各々は、同一ファミリーアカウントに属するメンバアカウントA及びB(リードA及びBによりリードされたレコードA及びB)に記録されているポイントの合計が所定値を超えている場合に所定ポイントを加算するために行われる(Tx1におけるライトC及びDの各々についても同様)。
・DBは、データベースの略であり、データソースの一例である。
In an architecture that includes multiple sub-application parts and multiple CC-OCCs in multiple data source client systems, maintaining the integrity of multiple snapshots when processing multiple transactions in parallel is not possible. ,Have difficulty. Hereinafter, an example thereof will be described with reference to FIGS. 1A to 2B. In the explanation, the premise and terms (hereinafter referred to as "glossary" for convenience) are as follows. Further, the sub-application part may be provided inside or outside the data source client system.
-The service is a service that "when the total of a plurality of points in a plurality of member accounts belonging to a family account exceeds a predetermined value, a predetermined point is given to each of the plurality of member accounts".
-Member accounts A and B are a plurality of member accounts belonging to a certain family account. Member accounts C and D are a plurality of member accounts belonging to different family accounts.
-Points in a plurality of member accounts are recorded in DBs (databases) 521A and 521B in a server system 15 (an example of a data source system) (note that DB 521 may be one or three or more).
-Record X (X = A, B, C or D) is one record in which points in the member account X are recorded.
-Lead X is the lead of record X.
-Light X is the light of record X.
-Read record X: A record X read by the lead X, which is a record included in the read set in the snapshot.
-Light record X: A record X that is lighted by the light X and is a record included in the light set in the snapshot.
Tx1 is composed of leads A to D and writes A to D. For each of write A and B in Tx1, when the total of points recorded in member accounts A and B (records A and B read by leads A and B) belonging to the same family account exceeds a predetermined value. It is performed to add a predetermined point to (the same applies to each of the lights C and D in Tx1).
-DB is an abbreviation for database and is an example of a data source.
図1Aが例示するように、DBクライアントシステム531が、アプリケーション部518及びTxマネージャ519を有し、Txマネージャ519が、DB521A及び521Bにアクセスするようになっている。DBクライアントシステム531における一つのアプリケーション部518が一つのビジネスロジックを実行するアーキテクチャでは、OCCを行うTxマネージャ519が管理するスナップショット5の整合性を維持することは容易である。例えば、図1Bが示すように、Tx1のライトBの前にTx2のリードB及びライトBが行われた場合、Txマネージャ519が、スナップショット5の整合性が崩れたことを検知でき、故に、Tx1をアボートできる。
As illustrated in FIG. 1A, the
しかし、図2Aが例示するように、DBクライアントシステム531A及び531Bにサブアプリケーション部418A及び418BとCC-OCC419A及び419Bとが備えられるアーキテクチャでは、CC-OCC419Aが管理するスナップショット5AとCC-OCC419Bが管理するスナップショット5Bの整合性を維持することは困難である。例えば、図2Aが例示のアーキテクチャにおいて、トランザクションの分離レベルは、Snapshot IsolationのWrite-skew anomaly, Read-only anomalyに加えてRead-skew anomalyがおきる分離レベルであるとする。また、図2Bが示すように、Tx1が、二つのサブトランザクション(Tx1Sub1及びTx1Sub2)に分割されたとする。Tx1Sub1が、リードA~D、ライトA及びライトCで構成され、Tx1Sub2が、リードA~D、ライトB及びライトDで構成されているとする。サブアプリケーション部418AがまずTx1Sub1を処理し、その後、サブアプリケーション部418BがTx2を処理し次にTx1Sub2を処理するとする。この場合、Tx2のライトBによりレコードBが更新されるため、Tx1Sub2のリードBによりリードされたレコードBがTx1Sub1のリードBによりリードされたレコードBよりも新しいというリードスキューが生じる。しかし、Client coordinatedが採用されたアーキテクチャでは、CC-OCC421AもCC-OCC421Bも、リードスキューが生じたことを検知できず、故に、スナップショット5A及び5B間でレコードBが不整合であるにも関わらず、Tx1Sub1及びTx1Sub2のいずれもコミットされてしまう。
However, as illustrated in FIG. 2A, in an architecture in which the
トランザクション処理システムが、サービスを実現するビジネスロジックを構成する複数のサブビジネスロジックを実行する複数のサブアプリケーション部と、複数のCC-OCCとを備える。複数のCC-OCCは、複数のデータソースクライアントシステムに備えられる。複数のデータソースクライアントシステムは、複数のオブジェクトを有するデータソースサーバシステムに対する複数のクライアントシステムである。データソースサーバシステムと複数のデータソースクライアントシステムは、一つ又は複数の計算機システムである。各オブジェクトは、対象の状態を表すデータである。 The transaction processing system includes a plurality of sub-application units that execute a plurality of sub-business logics constituting the business logic that realizes the service, and a plurality of CC-OCCs. A plurality of CC-OCCs are provided in a plurality of data source client systems. A plurality of data source client systems is a plurality of client systems for a data source server system having a plurality of objects. A data source server system and a plurality of data source client systems are one or more computer systems. Each object is data representing the state of the target.
複数のサブアプリケーション部の各々は、サブビジネスロジックの実行において、リード及び/又はライトされるオブジェクトのリード要求及び/又はライト要求を、当該サブアプリケーション部を有するデータソースクライアントシステムにおける、当該オブジェクトの担当CC-OCCに送信する。 Each of the plurality of sub-application parts is in charge of the read request and / or write request of the object to be read and / or written in the execution of the sub-business logic, in the data source client system having the sub-application part. Send to CC-OCC.
複数のCC-OCCの各々は、OCC(Optimistic Concurrency Control)を行うようになっているCC(Client Coordinated)のトランザクションマネージャである。複数のCC-OCCの各々は、トランザクション毎にスナップショットを管理するようになっている。 Each of the plurality of CC-OCCs is a CC (Client Coordinated) transaction manager that performs OCC (Optimistic Concurrency Control). Each of the plurality of CC-OCCs manages snapshots for each transaction.
各トランザクションについて、当該トランザクションのスナップショットは、0以上のリードオブジェクトの集合であるリードセットと、0以上のライトオブジェクトの集合であるライトセットとを含む。リードオブジェクトは、オブジェクトのリード要求に応答してリードされたオブジェクトである。ライトオブジェクトは、オブジェクトのライト要求に応答してライトされるオブジェクトである。 For each transaction, a snapshot of that transaction includes a readset, which is a set of zero or more read objects, and a writeset, which is a set of zero or more write objects. A read object is an object that has been read in response to an object's read request. A light object is an object that is lit in response to the object's light request.
各トランザクションについて、当該トランザクションを構成するM個(Mは2以上の整数)のサブトランザクションの処理において二つ以上のサブアプリケーション部からオブジェクトのリード要求及び/又はライト要求を受けるCC-OCCがN個(Nは2以上の整数)のCC-OCCの場合、N個の和集合がペアワイズディスジョイントである。N個の和集合の各々について、当該和集合は、当該トランザクションに対応しCC-OCCが管理するスナップショットにおけるリードセットとライトセットとの和集合である。M個のサブトランザクションの各々について、当該サブトランザクションは、サブビジネスロジックの実行において処理され、サブアプリケーション部からCC-OCCへのオブジェクトのリード要求及び/又はライト要求を含む。 For each transaction, N CC-OCCs receive object read requests and / or write requests from two or more sub-application units in the processing of the M sub-transactions that make up the transaction (M is an integer of 2 or more). In the case of CC-OCC (N is an integer of 2 or more), the union of N is a pairwise transaction. For each of the N unions, the union is the union of the readset and writeset in the snapshot managed by CC-OCC corresponding to the transaction. For each of the M sub-transactions, the sub-transaction is processed in the execution of the sub-business logic and includes a read request and / or a write request for the object from the sub-application part to the CC-OCC.
複数のサブアプリケーション部と、複数のデータソースクライアントシステムに備えられた複数のCC-OCCとを含むアーキテクチャにおいて、各トランザクションについて、複数のCC-OCCが管理する複数のスナップショットの整合性を維持することができる。 Maintain the integrity of multiple snapshots managed by multiple CC-OCCs for each transaction in an architecture that includes multiple sub-application parts and multiple CC-OCCs in multiple data source client systems. be able to.
以下の説明では、「インターフェース装置」は、一つ以上のインターフェースを含む。一つ以上のインターフェースは、一つ以上の同種の通信インターフェースデバイス(例えば一つ以上のNIC(Network Interface Card))であってもよいし二つ以上の異種の通信インターフェースデバイス(例えばNICとHBA(Host Bus Adapter))であってもよい。 In the following description, an "interface device" includes one or more interfaces. The one or more interfaces may be one or more homogeneous communication interface devices (eg, one or more NICs (Network Interface Cards)) or two or more heterogeneous communication interface devices (eg, NICs and HBAs). It may be Host Bus Adapter)).
また、以下の説明では、「記憶装置」は、一つ以上のメモリを含む。記憶装置に関して少なくとも一つのメモリは、揮発性メモリでよい。記憶装置は、主に、プロセッサによる処理の際に使用される。記憶装置は、メモリの他に、一つ以上の不揮発性の記憶デバイス(例えば、HDD(Hard Disk Drive)又はSSD(Solid State Drive))を含んでもよい。 Also, in the following description, the "storage device" includes one or more memories. At least one memory with respect to the storage device may be a volatile memory. The storage device is mainly used for processing by the processor. In addition to the memory, the storage device may include one or more non-volatile storage devices (for example, HDD (Hard Disk Drive) or SSD (Solid State Drive)).
また、以下の説明では、「プロセッサ」は、一つ以上のプロセッサを含む。少なくとも一つのプロセッサは、典型的には、CPU(Central Processing Unit)のようなマイクロプロセッサである。一つ以上のプロセッサの各々は、シングルコアでもよいしマルチコアでもよい。プロセッサは、処理の一部または全部を行うハードウェア回路を含んでもよい。 Also, in the following description, "processor" includes one or more processors. The at least one processor is typically a microprocessor such as a CPU (Central Processing Unit). Each of the one or more processors may be single-core or multi-core. The processor may include hardware circuits that perform some or all of the processing.
また、以下の説明では、「プログラム」を主語として処理を説明する場合があるが、プログラムは、プロセッサによって実行されることで、定められた処理を、適宜に記憶装置(例えばメモリ)及び/又はインターフェース装置(例えば通信ポート)等を用いながら行うため、処理の主語がプロセッサとされてもよい。プログラムを主語として説明された処理は、プロセッサあるいはそのプロセッサを有する装置が行う処理としてもよい。また、プロセッサは、処理の一部又は全部を行うハードウェア回路(例えばFPGA(Field-Programmable Gate Array)又はASIC(Application Specific Integrated Circuit))を含んでもよい。プログラムは、プログラムソースから計算機のような装置にインストールされてもよい。プログラムソースは、例えば、プログラム配布サーバまたは計算機が読み取り可能な記録媒体(例えば非一時的な記録媒体)であってもよい。また、以下の説明において、二つ以上のプログラムが一つのプログラムとして実現されてもよいし、一つのプログラムが二つ以上のプログラムとして実現されてもよい。 Further, in the following description, the process may be described with "program" as the subject, but the program is executed by the processor to appropriately perform the specified process in the storage device (for example, memory) and / or. Since it is performed while using an interface device (for example, a communication port), the subject of processing may be a processor. The process described with the program as the subject may be a process performed by a processor or a device having the processor. Further, the processor may include a hardware circuit (for example, FPGA (Field-Programmable Gate Array) or ASIC (Application Specific Integrated Circuit)) that performs a part or all of the processing. The program may be installed from the program source into a device such as a calculator. The program source may be, for example, a program distribution server or a computer-readable recording medium (eg, a non-temporary recording medium). Further, in the following description, two or more programs may be realized as one program, or one program may be realized as two or more programs.
また、以下の説明では、「yyy部」の表現にて機能を説明することがあるが、機能は、一つ以上のコンピュータプログラムがプロセッサによって実行されることで実現されてもよいし、一つ以上のハードウェア回路(例えばFPGA又はASIC)によって実現されてもよいし、それらの組合せによって実現されてもよい。プログラムがプロセッサによって実行されることで機能が実現される場合、定められた処理が、適宜に記憶装置及び/又はインターフェース装置等を用いながら行われるため、機能はプロセッサの少なくとも一部とされてもよい。機能を主語として説明された処理は、プロセッサあるいはそのプロセッサを有する装置が行う処理としてもよい。 Further, in the following description, the function may be described by the expression of "yy part", but the function may be realized by executing one or more computer programs by the processor, or one. It may be realized by the above hardware circuit (for example, FPGA or ASIC), or may be realized by a combination thereof. When the function is realized by executing the program by the processor, the specified processing is appropriately performed by using the storage device and / or the interface device, so that the function may be at least a part of the processor. good. The process described with the function as the subject may be a process performed by a processor or a device having the processor.
また、以下の説明では、同種の要素を区別しないで説明する場合には、参照符号のうちの共通符号を使用し、同種の要素を区別する場合は、参照符号を使用することがある。 Further, in the following description, the common code among the reference codes may be used when the same type of elements are not distinguished, and the reference code may be used when the same type of elements are distinguished.
また、以下の説明では、「レコード」とは、アプリケーションプログラムのようなプログラムから見た1つの論理的な電子データの塊であり、具体的には、対象の状態を表すデータであるオブジェクトの一例である。レコードとしてのデータは、例えば、キーバリューペア又はタプルがある。 Further, in the following description, a "record" is a block of logical electronic data seen from a program such as an application program, and specifically, an example of an object which is data representing a target state. Is. The data as a record may be, for example, a key-value pair or a tuple.
また、「対象」とは、任意の有体物又は無体物である。例えば、「対象」として、アカウントを採用し、対象の状態として、アカウントにおけるポイントを採用することができる。 Further, the "object" is an arbitrary tangible or intangible object. For example, an account can be adopted as the "target" and points in the account can be adopted as the target state.
また、「リード及び/又はライト」は、リード及びライトの一方又は両方を意味し、「リードライトアクセス」と総称されてもよい。同様に、「リード要求及び/又はライト要求」は、リード要求及びライト要求の一方又は両方を意味し、「リードライトアクセス要求」と総称されてもよい。 Further, "read and / or write" means one or both of read and write, and may be generically referred to as "read / write access". Similarly, "read request and / or write request" means one or both of read request and write request, and may be collectively referred to as "read / write access request".
以下、本発明の一実施形態を説明する。なお、以下の説明では、図1A~図2Bの説明において使用された上述の用語集が採用される。 Hereinafter, an embodiment of the present invention will be described. In the following description, the above-mentioned glossary used in the description of FIGS. 1A to 2B is adopted.
図3は、実施形態の概要の例を示す。 FIG. 3 shows an example of an outline of an embodiment.
一つ以上のDB521(例えばDB521A及び521B)を有するDBサーバシステム15に対し、複数のDBクライアントシステム13(例えば、DBクライアントシステム13A及び13B)が存在する。一つ以上のDB521が、データソースの一例であり、DBサーバシステム15が、データソースサーバシステムの一例であり、DBクライアントシステム13が、データソースクライアントシステムの一例である。
For the
トランザクション処理システム20が、複数のサブアプリケーション部18と複数のCC-OCC19とを備える。複数のサブアプリケーション部18と複数のCC-OCC19とのうち少なくとも複数のCC-OCC19が複数のDBクライアントシステム13に備えられる。
The
ビジネスロジックを構成する複数のサブビジネスロジックが、複数のサブアプリケーション部18により実行される。任意の観点で複数のサブビジネスロジックが決められてよい。例えば、ビジネスロジックが、注文処理と決済処理で構成されている場合、複数のサブビジネスロジックは、注文処理としてのサブビジネスロジックと決済処理としてのサブビジネスロジックといったように機能が異なるサブビジネスロジックでもよいし、注文処理も決済処理も行うがアクセス可能なレコード範囲が異なるサブビジネスロジックでもよい。複数のサブビジネスロジックは予め定義されていてもよいし(例えば、サブアプリケーション部18に予めサブビジネスロジックが定義されていてもよいし)、ビジネスロジックから動的に複数のサブビジネスロジックが(例えば後述のコーディネータ16により)生成されてもよい。
A plurality of sub-business logics constituting the business logic are executed by the plurality of
CC-OCC19は、client-coordinatedのTxマネージャであるため、CC-OCC19間での通信は行われない。そこで、各サブアプリケーション部18に、サブアプリケーション部18間で通信する機能が備えられる。説明を簡単にするために、一つのサブアプリケーション部18に一つのCC-OCC19が存在し、それらのサブアプリケーション部18及びCC-OCC19が一つのDBクライアントシステム13に備えられるとする。サブアプリケーション部18のCC-OCC19の符号を「19S」とする。CC-OCC19Sが、トランザクションの処理(トランザクションを構成する複数のサブトランザクションの処理)においてレコードのリード要求及び/又はライト要求を受け付けるCC-OCCである。各トランザクションについて、CC-OCC19Sが、スナップショット10(リードセット及びライトセット)を管理(例えば、DBクライアントシステム13のメモリに格納)する。リードセットは、0以上のリードレコードの集合である。リードレコードは、メモリ上のリードされたレコードである。ライトセットは、0以上のライトレコードの集合である。ライトレコードは、メモリ上のライトされるレコードである。
Since CC-OCC19 is a client-coordinated Tx manager, communication between CC-OCC19 is not performed. Therefore, each
また、トランザクションのコーディネータ16が備えられる。コーディネータ16は、トランザクションの開始や、準備処理、コミット処理及びロールバック処理等のコーディネーションを行う。コーディネータ16は、後述するように、サブビジネスロジックの実行要求をサブアプリケーション部18に送信してもよい(サブアプリケーション部18へのサブビジネスロジックの実行要求の送信は別のサブアプリケーション部18により行われてもよい)。コーディネータ16は、トランザクション毎に存在してもよいし、複数のトランザクションに共通でもよい。コーディネータ16は、少なくとも一つのサブアプリケーション部18の中に存在してもよいし外に存在してもよい。コーディネータ16は、DBクライアントシステム13に存在してもよいし、DBクライアントシステム13の外に存在してもよい。説明を簡単にするために、複数のトランザクションに共通の一つのコーディネータ16がサブアプリケーション部18の外に存在するとし、一つのコーディネータ16に一つのCC-OCC19が存在するとする。コーディネータ16のCC-OCC19の符号を「19C」とする。コーディネータ16及びCC-OCC19CがDBクライアントシステム13Aに存在するとする。
In addition, a
トランザクションは、複数のオペレーションから構成され、Txマネージャ(本実施形態ではCC-OCC19S)によってアトミックに処理される。トランザクションが、複数のサブトランザクションから構成される、言い換えれば、トランザクションが複数のサブトランザクションに分割される。サブトランザクションは、サブアプリケーション部18からCC-OCC19Sへのレコードのリード要求及び/又はライト要求を含む。当該レコードのリード要求及び/又はライト要求を受けたCC-OCCが、当該レコードをDB521からリード及び/又はDB521にライトする。
A transaction is composed of a plurality of operations and is processed atomically by a Tx manager (CC-OCC19S in this embodiment). A transaction consists of multiple sub-transactions, in other words, the transaction is divided into multiple sub-transactions. The sub-transaction includes a record read request and / or a write request from the
ビジネスロジックを構成する複数のサブビジネスロジックの実行において、トランザクションを構成する複数のサブトランザクションが処理される。当該複数のサブトランザクションが、M個(Mは2以上の整数)のサブトランザクションであるとする。また、当該複数のサブトランザクションの処理において二つ以上のサブアプリケーション部18からレコードのリード要求及び/又はライト要求を受けるCC-OCC19Sが、N個(Nは2以上の整数)のCC-OCC19Sであるとする。説明の簡単のために、本実施形態では、M=Nとし、故に、サブトランザクションとCC-OCC19Sが1:1で対応するとする。サブビジネスロジックがコーディネータ16によりサブアプリケーション部18に送信され、当該サブアプリケーション部18により当該サブトランザクションが処理される。
In the execution of multiple sub-business logics that make up business logic, multiple sub-transactions that make up a transaction are processed. It is assumed that the plurality of sub-transactions are M sub-transactions (M is an integer of 2 or more). Further, the CC-OCC19S that receives a record read request and / or a write request from two or more
本実施形態では、トランザクション毎に、下記の不変式が満たされる。
不変式において、Nは、サブトランザクションの数である。iは、サブトランザクションの通し番号(例えばID)である。RSiは、サブトランザクションiのリードセットである。WSiは、サブトランザクションiのライトセットである。 In the invariant, N is the number of sub-transactions. i is a serial number (for example, ID) of the sub-transaction. RS i is a read set of sub-transaction i. WS i is a write set of sub-transactions i.
従って、この不変式は、「トランザクションを構成するサブトランザクション毎のリードセットとライトセットとの和集合が、当該トランザクションを構成する全サブトランザクションについてペアワイズディスジョイント(互いに素)である」ことを意味する。例えば、サービス及びトランザクションとして図2Bを参照して説明したサービス及びTx1があるとする。この場合、本実施形態ではサブトランザクションとCC-OCC19Sが1:1であるため、図3に示すように、Tx1を構成するサブトランザクションは二つとなる。そして、二つのサブトランザクションに対応した二つの和集合(RSiとWSiの和集合(i=1,2))がペアワイズディスジョイントでなければならない。このため、Tx1は、Tx1Sub1(リードA、リードB、ライトA及びライトB)とTx1Sub2(リードC、リードD、ライトC及びライトD)に分割される。Tx1Sub1がCC-OCC19SAに割り当てられ、Tx1Sub2がCC-OCC19SBに割り当てられる。これにより、不変式、すなわち、CC-OCC19SAのスナップショット10Aにおける和集合(RS1とWS1の和集合)と、CC-OCC19SBのスナップショット10Bにおける和集合(RS2とWS2の和集合)とがペアワイズディスジョイントであること、が維持される。なお、不変式を維持する方法は、このようなトランザクション分割とサブトランザクション割当てとに限られない。不変式を維持する方法の例については後述する。
Therefore, this invariant means that "the union of the read set and write set for each sub-transaction that constitutes a transaction is relatively disjoint for all the sub-transactions that make up the transaction." .. For example, suppose there is a service and Tx1 described with reference to FIG. 2B as a service and a transaction. In this case, since the sub-transaction and CC-OCC19S are 1: 1 in the present embodiment, as shown in FIG. 3, there are two sub-transactions constituting Tx1. Then, the union corresponding to the two subtransactions (the union of RS i and WS i (i = 1, 2)) must be a pairwise disjoint. Therefore, Tx1 is divided into Tx1 Sub1 (lead A, read B, write A and write B) and Tx1 Sub2 (lead C, read D, write C and write D). Tx1 Sub1 is assigned to CC-OCC19SA and Tx1 Sub2 is assigned to CC-OCC19SB. As a result, the invariant, that is, the union in
また、この不変式は、上述したようにトランザクション毎に満たされればよい。言い換えれば、トランザクション間では、リードセットとライトセットとの和集合がペアワイズディスジョイントである必要は無い。例えば、Tx1について、リードレコードA又はライトレコードAが、CC-OCC19SAのスナップショット10Aに含まれている場合、レコードAは、CC-OCC19SBのスナップショット10Bに含まれてはならないが、Tx1と別のTxであるTx2については、レコードAが、CC-OCC19SBのスナップショット10Bに含まれてもよい(この場合、Tx2については、レコードAは、CC-OCC19SAのスナップショット10Aに含まれてはならない)。
Further, this invariant may be satisfied for each transaction as described above. In other words, the union of readsets and writesets does not have to be pairwise disjoint between transactions. For example, for Tx1, if read record A or write record A is included in
以上の不変式がトランザクション毎に満たされるので、複数のサブアプリケーション部18と複数のDBクライアントシステム13に備えられた複数のCC-OCC19Sとを含むアーキテクチャにおいて、各トランザクションについて、複数のCC-OCC19Sが管理する複数のスナップショット10の整合性を維持することができる。
Since the above invariant expression is satisfied for each transaction, in an architecture including a plurality of
以下、本実施形態を詳細に説明する。 Hereinafter, the present embodiment will be described in detail.
図4は、本実施形態に係るシステム全体の構成の一例を示す。 FIG. 4 shows an example of the configuration of the entire system according to the present embodiment.
複数のDBクライアントシステム13A、13B、…と、DBサーバシステム15が、通信ネットワーク19を介して通信可能に接続される。
The plurality of
DBクライアントシステム13の構成として、任意の構成が採用されてよい。
Any configuration may be adopted as the configuration of the
例えば、DBクライアントシステム13Aは、サブアプリケーション部18A、CC-OCC19SA、コーディネータ16及びCC-OCC19Cの他に、ユーザプログラム124を有するクライアントシステムであってよい。また、DBクライアントシステム13Bは、ユーザプログラム124を実行するユーザシステム12に通信ネットワーク14を介して接続されたDBクライアントシステムであってよい。ユーザシステム12は、ユーザの計算機(例えば、パーソナルコンピュータ)でよい。ユーザプログラム124は、Webブラウザでもよいしアプリケーションプログラムでもよい。通信ネットワーク14は通信ネットワーク19と一体でもよい。
For example, the
DBクライアントシステム13は、DBサーバシステム15に対してクライアントシステムであるが、ユーザシステム12に対してはサーバシステムでもよい。DBクライアントシステム13が、システム全体におけるクライアントシステム(エンドクライアント)でもよい。
The
また、サブアプリケーション部18が、DBクライアントシステム13の外部のシステム(例えばユーザシステム12)に存在してもよい。また、サブアプリケーション部18は、サーバアプリケーションとして機能してもよいし、デスクトップアプリケーションとして機能してもよい。また、サブアプリケーション部18は、ネットワークを介してDBクライアントシステム13又はユーザシステム12といったシステムに提供されてもよい。
Further, the
DBサーバシステム15は、複数(又は一つ)のDB21と、CC-OCC19Sからの要求に応答してDB21に対してデータの入出力を行うDBマネージャ20とを有する。
The
DBサーバシステム15と複数のDBクライアントシステム13は、一つ又は複数の計算機システムである。例えば、DBサーバシステム15とDBクライアントシステム13は別々の計算機システムでもよいし一つの共通の計算機システムでもよい。
The
図5は、DBクライアントシステム13及びDBサーバシステム15の構成の一例を示す。
FIG. 5 shows an example of the configuration of the
DBクライアントシステム13は、一つ又は複数のDBクライアント計算機130を含む。DBクライアントシステム13が含むDBクライアント計算機130は一つでもよいため、一つのDBクライアント計算機130が一つのDBクライアントシステム13でもよい。
The
DBクライアント計算機130は、インターフェース装置131、記憶装置132(メモリを含む)及びそれらに接続されたプロセッサ133を有する。
The
インターフェース装置131は、通信ネットワーク19に接続される。
The interface device 131 is connected to the
記憶装置132は、サブサービスプログラム180及びCC-OCCプログラム190(及びコーディネータプログラム160)を記憶する。これらがプロセッサ133により実行されることで、サブアプリケーション部18及びCC-OCC19(及びコーディネータ16)が実現される。また、記憶装置132は、後述のマッピングテーブル201を記憶する。
The
DBサーバシステム15は、一つ又は複数のDBサーバ計算機150を含む。DBサーバシステム15が含むDBサーバ計算機150は一つでもよいため、一つのDBサーバ計算機150がDBサーバシステム15でもよい。
The
DBサーバ計算機150は、インターフェース装置151、記憶装置152及びそれらに接続されたプロセッサ153を有する。
The DB server computer 150 includes an interface device 151, a
インターフェース装置151は、通信ネットワーク19に接続される。
The interface device 151 is connected to the
記憶装置152は、DBマネージャプログラム200を記憶する。これがプロセッサ153により実行されることで、DBマネージャ200が実現される。また、記憶装置152は、DB521を記憶する。
The
図6は、マッピングテーブル201の構成例を示す。 FIG. 6 shows a configuration example of the mapping table 201.
マッピングテーブル201は、各DBクライアントシステム13に格納され、サブアプリケーション部18により参照されるテーブルである。マッピングテーブル201は、サブアプリケーション部18毎に存在してもよいし、CC-OCC19S毎に存在してもよい。また、各DBクライアントシステム13において、マッピングテーブル201は、トランザクション別に存在してもよいし、全てのトランザクションに共通でもよい。また、マッピングテーブル201は、予め用意されていてもよいし、例えばコーディネータ16により動的に生成されてもよい。本実施形態では、マッピングテーブル201は、サブアプリケーション部18毎に、トランザクション別に予め用意されているとする。
The mapping table 201 is a table stored in each
マッピングテーブル201は、いずれのサブアプリケーション部18のいずれのCC-OCC19Sがいずれのレコードをリード及び/又はライトするか、すなわち、レコードと担当CC-OCC19Sとサブアプリケーション部18との対応関係を表す。各レコードについて、「担当CC-OCC19S」とは、当該レコードのリード及び/又はライトを担当する(当該レコードのリード及び/又はライトが許可されている)CC-OCC19Sである。例えば、マッピングテーブル201は、CC-OCC19S毎に、当該CC-OCC19SのIDと、当該CC-OCC19Sにレコードのリード要求及び/又はライト要求を送信可能なサブアプリケーション部18のIDと、当該CC-OCC19Sが担当CC-OCC19Sとしてリード及びライトが可能なレコードのIDを表す。
The mapping table 201 represents which CC-OCC19S of which
上述したように、本実施形態では、各トランザクションについて、サブトランザクションとCC-OCC19Sが1:1で対応し、一つのサブアプリケーション部18につき一つのCC-OCC19Sがある。そして、マッピングテーブル201において、サブアプリケーション部18間(CC-OCC19S間)でレコードIDが非重複である。これにより、上述の不変式が維持される。なお、既に説明したが、トランザクションが異なれば、サブアプリケーション部18間(CC-OCC19S間)でレコードIDが重複してもよい。例えば、レコードID“001”のレコードを、或るトランザクションではサブアプリケーション部18A(CC-OCC19SA)がリード及び/又はライトし、別のトランザクションではサブアプリケーション部18B(CC-OCC19SB)がリード及び/又はライトしてよい。
As described above, in the present embodiment, the sub-transaction and the CC-OCC19S correspond 1: 1 for each transaction, and there is one CC-OCC19S for each
以下、図7~図11を参照して、Tx1の処理の例を説明する。Tx1は、トランザクションの一例であり、Tx1を構成するTx1Sub1及びTx1Sub2は、トランザクションを構成する複数のサブトランザクションの一例である。BL1は、ビジネスロジックの一例であり、BL1を構成するBL1Sub1及びBL1Sub2は、ビジネスロジックを構成する複数のサブビジネスロジックの一例である。以下、説明を簡単にするために、サブビジネスロジックとサブトランザクションが1:1の関係にあるとする。 Hereinafter, an example of Tx1 processing will be described with reference to FIGS. 7 to 11. Tx1 is an example of a transaction, and Tx1 Sub1 and Tx1 Sub2 constituting Tx1 are examples of a plurality of sub-transactions constituting the transaction. BL1 is an example of business logic, and BL1 Sub1 and BL1 Sub2 constituting BL1 are examples of a plurality of sub-business logics constituting business logic. Hereinafter, for the sake of simplicity, it is assumed that the sub-business logic and the sub-transaction have a 1: 1 relationship.
図7が示すように、コーディネータ16がCC-OCC19CにTx1を開始させる(S701)。
As shown in FIG. 7, the
BL1Sub1が開始する。具体的には、コーディネータ16が、BL1Sub1の実行を、サブアプリケーション部18Aに要求する(S702)。BL1Sub1は、予めサブアプリケーション部18Aに定義されていてもよいし、コーディネータ16により動的に生成されS702で送信された要求に関連付けられてもよい。
BL1 Sub1 starts. Specifically, the
サブアプリケーション部18Aが、BL1Sub1の実行要求を受信する(S703)。BL1Sub1において指定されている全リードレコード(リードがされる全レコード)について、S704~S711が行われる。一つのリードレコードを例に取る。
The
サブアプリケーション部18Aが、サブアプリケーション部18Aのマッピングテーブル201(Tx1に対応したマッピングテーブル201)を参照し(S704)、リードレコードのIDに自分のIDが対応しているか否か(リードレコードの担当CC-OCC19Sにアクセス可能なサブアプリケーション部18がサブアプリケーション部18Aであるか否か)を判断する(S705)。S705の判断結果が真の場合、サブアプリケーション部18Aが、リードレコードのリードをCC-OCC19SAに要求し、CC-OCC19SAが、当該要求に応答してレコードをリードし、リードされたレコードを、DBクライアントシステム13Aのメモリに格納する(S706)。当該リードレコードは、CC-OCC19SAが管理するスナップショット(Tx1のスナップショット)におけるRS1に含まれる。
The
S705の判断結果が偽の場合、サブアプリケーション部18Aが、リードレコードのIDに対応したサブアプリケーション部18B(マッピングテーブル201から特定されたサブアプリケーション部18であって、リードレコードの担当CC-OCC19Sにアクセス可能なサブアプリケーション部18B)に、当該リードレコードのリードを要求する(S707)。サブアプリケーション部18Bが、当該要求を受信し(S708)、リードレコードのリードをCC-OCC19SBに要求する。その際、サブアプリケーション部18Bは、サブアプリケーション部18Bのマッピングテーブル201(Tx1に対応したマッピングテーブル201)を参照し、リードレコードの担当CC-OCC19SがCC-OCC19SBであることを特定し、特定されたCC-OCC19SBに、リードレコードのリードを要求してよい。CC-OCC19SBが、当該要求に応答してレコードをリードし、リードされたレコードを、DBクライアントシステム13Bのメモリに格納する(S709)。当該リードレコードは、CC-OCC19SBが管理するスナップショット(Tx1のスナップショット)におけるRS1に含まれる。サブアプリケーション部18Bが、結果を、要求元であるサブアプリケーション部18Aに返し(S710)、サブアプリケーション部18Aが、当該結果を受信する(S711)。
If the determination result of S705 is false, the
BL1Sub1の全リードレコードについてS704~S711が終了した後、図8が示すように、BL1Sub1において指定されている全ライトレコード(ライトがされる全レコード)について、図8のS801~S808が行われる。一つのライトレコードを例に取る。 After S704 to S711 are completed for all read records of BL1 Sub1 , as shown in FIG. 8, S801 to S808 of FIG. 8 are rows for all write records (all records to be written) specified in BL1 Sub1 . Will be. Take one light record as an example.
サブアプリケーション部18Aが、サブアプリケーション部18Aのマッピングテーブル201(Tx1に対応したマッピングテーブル201)を参照し(S801)、ライトレコードのIDに自分のIDが対応しているか否か(ライトレコードの担当CC-OCC19Sにアクセス可能なサブアプリケーション部18がサブアプリケーション部18Aであるか否か)を判断する(S802)。S802の判断結果が真の場合、サブアプリケーション部18Aが、ライトレコードのライトをCC-OCC19SAに要求し、CC-OCC19SAが、当該要求に応答してライトレコードを、DBクライアントシステム13Aのメモリに格納する(S803)。当該ライトレコードは、CC-OCC19SAが管理するスナップショット(Tx1のスナップショット)におけるWS1に含まれる。
The
S802の判断結果が偽の場合、サブアプリケーション部18Aが、ライトレコードのIDに対応したサブアプリケーション部18Bにライトを要求する(S804)。サブアプリケーション部18Bが、当該要求を受信し(S805)、ライトレコードのライトをCC-OCC19SBに要求する。その際、サブアプリケーション部18Bは、サブアプリケーション部18Bのマッピングテーブル201(Tx1に対応したマッピングテーブル201)を参照し、ライトレコードの担当CC-OCC19SがCC-OCC19SBであることを特定し、特定されたCC-OCC19SBに、ライトレコードのライトを要求してよい。CC-OCC19SBが、当該要求に応答して、ライトレコードを、DBクライアントシステム13Bのメモリに格納する(S806)。当該ライトレコードは、CC-OCC19SBが管理するスナップショット(Tx1のスナップショット)におけるWS1に含まれる。サブアプリケーション部18Bが、結果を、要求元であるサブアプリケーション部18Aに返し(S807)、サブアプリケーション部18Aが、当該結果を受信する(S808)。
If the determination result of S802 is false, the
BL1Sub1の全ライトレコードについてS801~S808が終了した後、サブアプリケーション部18Aが、BL1Sub1の結果をコーディネータ16に返す(S809)。コーディネータ16が、当該結果を受信する(S810)。
After S801 to S808 are completed for all the write records of BL1 Sub1 , the
次にBL1Sub2が開始する。具体的には、図9が示すように、コーディネータ16が、BL1Sub2の実行を、サブアプリケーション部18Bに要求する(S901)。BL1Sub2は、予めサブアプリケーション部18Bに定義されていてもよいし、コーディネータ16により動的に生成されS901で送信された要求に関連付けられてもよい。
Next, BL1 Sub2 starts. Specifically, as shown in FIG. 9, the
サブアプリケーション部18Bが、BL1Sub2の実行要求を受信する(S902)。BL1Sub2において指定されている全リードレコード(リードがされる全レコード)について、S903~S910が行われる。一つのリードレコードを例に取る。
The
サブアプリケーション部18Bが、サブアプリケーション部18Bのマッピングテーブル201(Tx1に対応したマッピングテーブル201)を参照し(S903)、リードレコードのIDに自分のIDが対応しているか否か(リードレコードの担当CC-OCC19Sにアクセス可能なサブアプリケーション部18がサブアプリケーション部18Bであるか否か)を判断する(S904)。S904の判断結果が真の場合、サブアプリケーション部18Bが、リードレコードのリードをCC-OCC19SBに要求し、CC-OCC19SBが、当該要求に応答してレコードをリードし、リードされたレコードを、DBクライアントシステム13Bのメモリに格納する(S905)。当該リードレコードは、CC-OCC19SBが管理するスナップショット(Tx1のスナップショット)におけるRS2に含まれる。
The
S904の判断結果が偽の場合、サブアプリケーション部18Bが、リードレコードのIDに対応したサブアプリケーション部18A(マッピングテーブル201から特定されたサブアプリケーション部18であって、リードレコードの担当CC-OCC19Sにアクセス可能なサブアプリケーション部18A)にリードを要求する(S906)。サブアプリケーション部18Aが、当該要求を受信し(S907)、リードレコードのリードをCC-OCC19SAに要求する。CC-OCC19SAが、当該要求に応答してレコードをリードし、リードされたレコードを、DBクライアントシステム13Aのメモリに格納する(S908)。当該リードレコードは、CC-OCC19SAが管理するスナップショット(Tx1のスナップショット)におけるRS2に含まれる。サブアプリケーション部18Aが、結果を、要求元であるサブアプリケーション部18Bに返し(S809)、サブアプリケーション部18Bが、当該結果を受信する(S910)。
When the determination result of S904 is false, the
BL1Sub2の全リードレコードについてS903~S910が終了した後、図10が示すように、BL1Sub2において指定されている全ライトレコード(ライトがされる全レコード)について、図10のS1001~S1008が行われる。一つのライトレコードを例に取る。 After S903 to S910 are completed for all read records of BL1 Sub2 , as shown in FIG. 10, S1001 to S1008 of FIG. 10 are rows for all write records (all records to be written) specified in BL1 Sub2 . Will be. Take one light record as an example.
サブアプリケーション部18Bが、サブアプリケーション部18Bのマッピングテーブル201を参照し(S1001)、ライトレコードのIDに自分のIDが対応しているか否か(ライトレコードの担当CC-OCC19Sにアクセス可能なサブアプリケーション部18がサブアプリケーション部18Bであるか否か)を判断する(S1002)。S1002の判断結果が真の場合、サブアプリケーション部18Bが、ライトレコードのライトをCC-OCC19SBに要求し、CC-OCC19SBが、当該要求に応答してライトレコードを、DBクライアントシステム13Bのメモリに格納する(S1003)。当該ライトレコードは、CC-OCC19SBが管理するスナップショット(Tx1のスナップショット)におけるWS2に含まれる。
The
S1002の判断結果が偽の場合、サブアプリケーション部18Bが、ライトレコードのIDに対応したサブアプリケーション部18Aにライトを要求する(S1004)。サブアプリケーション部18Aが、当該要求を受信し(S1005)、ライトレコードのライトをCC-OCC19SAに要求する。CC-OCC19SAが、当該要求に応答して、ライトレコードを、DBクライアントシステム13Aのメモリに格納する(S1006)。当該ライトレコードは、CC-OCC19SAが管理するスナップショット(Tx1のスナップショット)におけるWS2に含まれる。サブアプリケーション部18Aが、結果を、要求元であるサブアプリケーション部18Bに返し(S1007)、サブアプリケーション部18Bが、当該結果を受信する(S1008)。
If the determination result of S1002 is false, the
BL1Sub2の全ライトレコードについてS1001~S1008が終了した後、サブアプリケーション部18Bが、BL1Sub2の結果をコーディネータ16に返す(S1009)。コーディネータ16が、当該結果を受信する(S1010)。
After S1001 to S1008 are completed for all the write records of BL1 Sub2 , the
次に、図11が示すように、コーディネータ16が、BL1Sub1の実行要求の送信先であるサブアプリケーション部18Aに対し、2フェーズコミットにおける準備要求を送信する(S1101)。サブアプリケーション部18Aが、当該要求を受け(S1102)、準備をCC-OCC19SAに要求し、CC-OCC19SAが、準備処理を行う(S1103)。サブアプリケーション部18Aが、準備処理が成功か否かを判断する(S1004)。S1104の判断結果が真の場合、サブアプリケーション部18Aは、“OK”という結果(応答)をコーディネータ16に返す(S1105)。S1104の判断結果が偽の場合、サブアプリケーション部18Aは、“NG”という結果をコーディネータ16に返す(S1106)。コーディネータ16が、結果をサブアプリケーション部18から受信する(S1107)。
Next, as shown in FIG. 11, the
BL1Sub2についても、BL1Sub1のS1101~S1107と同様の処理が行われる(S1108~S1114)。 For BL1 Sub2 , the same processing as S1101 to S1107 of BL1 Sub1 is performed (S1108 to S1114).
準備の要求先の全てのサブアプリケーション部18から準備要求の結果をコーディネータ16が受信した場合、図12が示すように、コーディネータ16が、全ての結果が“OK”か否かを判断する(S1201)。S1201の判断結果が真の場合、コーディネータ16が、Tx1のコミット処理を行う(S1202)。具体的には、コーディネータ16が、Tx1に関し全てのサブビジネスロジックの送信先のサブアプリケーション部18(準備要求の送信先の全てのサブアプリケーション部)に、コミット要求を送信する。これにより、各サブアプリケーション部18が、当該コミット要求を受け、当該コミット要求に応答して、コミットをCC-OCC19Sに要求し、CC-OCC19Sが、DB521に対しコミットを行う。S1201の判断結果が偽の場合、コーディネータ16が、ロールバック処理を行う(S1203)。
When the
以上の図7~図12に例示の流れにおいて、下記のうちの少なくとも一つが採用されてよい。
・BL1Sub1及びBL1Sub2の各々の割当先は、自動で(例えばコーディネータ16により)、又は、手動で決定されてよい。例えば、サブビジネスロジックとサブアプリケーション部との対応関係を表すテーブルが用意されてよく、当該テーブルを基に、コーディネータ16により、サブビジネスロジックの割当先が特定されて、当該割当先のサブアプリケーション部に当該サブビジネスロジックが送信されてよい。
・BL1Sub1の処理(S702~S810)及びBL1Sub2の処理(S901~S1010)は並列に行われてよい。
・BL1Sub1の準備(S1101~S1107)及びBL1Sub2の準備(S1108~S1114)は並列に行われてよい。
In the flow illustrated in FIGS. 7 to 12 above, at least one of the following may be adopted.
-The allocation destinations of BL1 Sub1 and BL1 Sub2 may be determined automatically (for example, by the coordinator 16) or manually. For example, a table showing the correspondence between the sub-business logic and the sub-application unit may be prepared, and based on the table, the
-The processing of BL1 Sub1 (S702 to S810) and the processing of BL1 Sub2 (S901 to S1010) may be performed in parallel.
-Preparation of BL1 Sub1 (S1101 to S1107) and preparation of BL1 Sub2 (S1108 to S1114) may be performed in parallel.
以上が、本実施形態の説明である。 The above is the description of this embodiment.
本実施形態では、トランザクション毎に、サブトランザクションとCC-OCC19Sが1:1で対応するため、上述の不変式において、Nは、サブトランザクションの数であり、iは、サブトランザクションの通し番号(例えばID)である。しかし、少なくとも一つのトランザクションについて、必ずしも、サブトランザクションとCC-OCC19Sが1:1で対応しなくてもよい。このため、上述の不変式において、Nは、CC-OCC19Sの数であり、iは、CC-OCC19Sの通し番号(例えばID)である。 In this embodiment, since the sub-transaction and CC-OCC19S correspond 1: 1 for each transaction, in the above-mentioned invariant, N is the number of sub-transactions and i is the serial number of the sub-transaction (for example, ID). ). However, for at least one transaction, the sub-transaction and CC-OCC19S do not necessarily have a 1: 1 correspondence. Therefore, in the above-mentioned invariant formula, N is the number of CC-OCC19S, and i is the serial number (for example, ID) of CC-OCC19S.
また、サブトランザクションとサブビジネスロジックが1:1で対応し、サブビジネスロジックとサブアプリケーション部18が1:1で対応し、サブアプリケーション部18とCC-OCC19Sが1:1で対応し、且つ、トランザクション毎に、サブビジネスロジック間でリード及び/又はライトされるレコードが非重複であれば、上述の不変式が満たされる。
Further, the sub-transaction and the sub-business logic correspond 1: 1, the sub-business logic and the
本実施形態では、一つのトランザクションに関し、サブビジネスロジック間でリード及び/又はライトされるレコードが重複していても、上述の不変式(すなわち、CC-OCC19S間でレコードが非重複とされること)が満たされる。なぜなら、サブビジネスロジックにおいて指定されているレコードの担当CC-OCC19Sにアクセス可能なサブアプリケーション部18が、当該サブビジネスロジックを受けたサブアプリケーション部18でなければ、当該レコードのリード及び/又はライトが、当該サブビジネスロジックを受けたサブアプリケーション部18から、当該レコードの担当CC-OCC19Sにアクセス可能なサブアプリケーション部18に依頼され、当該依頼を受けたサブアプリケーション部18により、当該レコードのリード及び/又はライトの要求が担当CC-OCC19Sに送信されるからである。
In the present embodiment, even if the records to be read and / or written are duplicated between the sub-business logics for one transaction, the records are not duplicated between the above-mentioned invariants (that is, CC-OCC19S). ) Is satisfied. This is because if the
なお、必ずしも、サブアプリケーション部18とCC-OCC19Sが1:1でなくてもよい。例えば、図13Aが例示するように、一つのサブアプリケーション部18に二つ以上のCC-OCC19Sが存在してもよいし、図13Bが例示するように、一つのCC-OCC19Sに二つ以上のサブアプリケーション部18が存在してもよい。この場合、各サブアプリケーション部18が、マッピングテーブル201を基に、いずれのレコードをいずれのCC-OCC19Sが担当し当該CC-OCC19Sにいずれのサブアプリケーション部18がアクセス可能かを把握するようになっていてよい。これにより、トランザクション毎に、上述の不変式を満たすことができる。
The
また、必ずしもサブアプリケーション部18間で通信が可能になっていなくてもよい。この場合、例えば、トランザクション毎に、サブビジネスロジック間でレコードが非重複であり、各サブビジネスロジックの割当先のサブアプリケーション部18が、当該サブビジネスロジックにおいて指定されているレコードの担当CC-OCC19Sにアクセス可能なサブアプリケーション部18であれば、コーディネータ16が、各サブビジネスロジックを、当該サブビジネスロジックの割当先のサブアプリケーション部18(CC-OCC19S)に送信することで、上述の不変式を満たすことが期待される。
Further, it is not always necessary that communication is possible between the
また、各トランザクションについて、サブビジネスロジックを実行した各サブアプリケーション部18への準備要求の送信は、採用されるアイソレーションレベルの実装によって、図11に例示の通りの1段階でもよいし、図示しない多段階でもよい。例えば、準備要求が2段階の場合、1段階目の準備要求は、レコードの状態を“Prepared”(未確定を意味する状態の一例)に変更する要求でよく、2段階目の準備要求は、DB521からレコードをリードして当該レコードがメモリ上のレコードと一致するか否かをチェックすることであるバリデーションの要求でよい。コーディネータ16は、各サブアプリケーション部18から全ての準備要求に対してOKを受けた場合に、コミット処理(図12のS1202)を実行してよい。
Further, for each transaction, the transmission of the preparation request to each
以上、一実施形態を説明したが、これらは本発明の説明のための例示であって、本発明の範囲をこれらの実施形態にのみ限定する趣旨ではない。本発明は、他の種々の形態でも実行することが可能である。 Although one embodiment has been described above, these are examples for explaining the present invention, and the scope of the present invention is not limited to these embodiments. The present invention can also be practiced in various other forms.
20:トランザクション処理システム 20: Transaction processing system
Claims (6)
複数のCC-OCCと
を備え、
前記複数のCC-OCCは、複数のデータソースクライアントシステムに備えられ、
前記複数のデータソースクライアントシステムは、複数のオブジェクトを有するデータソースサーバシステムに対する複数のクライアントシステムであり、
前記データソースサーバシステムと前記複数のデータソースクライアントシステムは、一つ又は複数の計算機システムであり、
各オブジェクトは、対象の状態を表すデータであり、
前記複数のサブアプリケーション部の各々について、当該サブアプリケーション部は、
サブビジネスロジックの実行において、リード及び/又はライトされるオブジェクトのリード要求及び/又はライト要求を、当該オブジェクトの担当CC-OCCに送信し、
前記複数のCC-OCCの各々は、OCC(Optimistic Concurrency Control)を行うようになっておりCC(Client Coordinated)のトランザクションマネージャであり、
前記OCCは、コミット時にスナップショットを基にバリデーションを行うことを含み、
前記複数のCC-OCCの各々は、トランザクション毎にスナップショットを管理するようになっており、
各トランザクションについて、当該トランザクションのスナップショットは、0以上のリードオブジェクトの集合であるリードセットと、0以上のライトオブジェクトの集合であるライトセットとを含み、
リードオブジェクトは、オブジェクトのリード要求に応答してリードされたオブジェクトであり、
ライトオブジェクトは、オブジェクトのライト要求に応答してライトされるオブジェクトであり、
各トランザクションについて、当該トランザクションが分割されてなるM個(Mは2以上の整数)のサブトランザクションの処理において二つ以上のサブアプリケーション部からオブジェクトのリード要求及び/又はライト要求を受けるCC-OCCがN個(Nは2以上の整数)のCC-OCCの場合、
N個の和集合がペアワイズディスジョイントであり、
前記N個の和集合の各々について、当該和集合は、当該トランザクションに対応しCC-OCCが管理するスナップショットにおけるリードセットとライトセットとの和集合であり、
前記M個のサブトランザクションの各々について、当該サブトランザクションは、サブビジネスロジックの実行において処理され、サブアプリケーション部からCC-OCCへのオブジェクトのリード要求及び/又はライト要求を含む、
トランザクション処理システム。 Multiple sub-application departments that execute multiple sub-business logics that make up business logic,
Equipped with multiple CC-OCC,
The plurality of CC-OCCs are provided in a plurality of data source client systems.
The plurality of data source client systems are a plurality of client systems for a data source server system having a plurality of objects.
The data source server system and the plurality of data source client systems are one or more computer systems.
Each object is data that represents the state of the target,
For each of the plurality of sub-application units, the sub-application unit is
In the execution of the sub-business logic, the read request and / or write request of the object to be read and / or written is sent to the CC-OCC in charge of the object.
Each of the plurality of CC-OCCs is configured to perform OCC (Optimistic Concurrency Control) and is a transaction manager of CC (Client Coordinated).
The OCC includes performing validation based on the snapshot at the time of commit.
Each of the plurality of CC-OCCs manages snapshots for each transaction.
For each transaction, a snapshot of that transaction contains a readset, which is a collection of 0 or more read objects, and a writeset, which is a collection of 0 or more write objects.
A read object is an object that has been read in response to an object's read request.
A light object is an object that is lit in response to an object's light request.
For each transaction, the CC-OCC that receives object read requests and / or write requests from two or more sub-application units in the processing of M sub-transactions (M is an integer of 2 or more) that the transaction is divided into. In the case of N CC-OCCs (N is an integer of 2 or more)
The union of N pieces is a pairwise disjoint,
For each of the N unions, the union is the union of the readset and writeset in the snapshot managed by CC-OCC corresponding to the transaction.
For each of the M sub-transactions, the sub-transaction is processed in the execution of the sub-business logic and includes an object read request and / or a write request from the sub-application part to the CC-OCC.
Transaction processing system.
複数のCC-OCCと
を備え、
前記複数のCC-OCCは、複数のデータソースクライアントシステムに備えられ、
前記複数のデータソースクライアントシステムは、複数のオブジェクトを有するデータソースサーバシステムに対する複数のクライアントシステムであり、
前記データソースサーバシステムと前記複数のデータソースクライアントシステムは、一つ又は複数の計算機システムであり、
各オブジェクトは、対象の状態を表すデータであり、
前記複数のCC-OCCの各々は、OCC(Optimistic Concurrency Control)を行うようになっておりCC(Client Coordinated)のトランザクションマネージャであり、
前記OCCは、コミット時にスナップショットを基にバリデーションを行うことを含み、
前記複数のCC-OCCの各々は、トランザクション毎にスナップショットを管理するようになっており、
各トランザクションについて、当該トランザクションのスナップショットは、0以上のリードオブジェクトの集合であるリードセットと、0以上のライトオブジェクトの集合であるライトセットとを含み、
リードオブジェクトは、オブジェクトのリード要求に応答してリードされたオブジェクトであり、
ライトオブジェクトは、オブジェクトのライト要求に応答してライトされるオブジェクトであり、
各トランザクションについて、当該トランザクションが分割されてなるM個(Mは2以上の整数)のサブトランザクションの処理において二つ以上のサブアプリケーション部からオブジェクトのリード要求及び/又はライト要求を受けるCC-OCCがN個(Nは2以上の整数)のCC-OCCの場合、
N個の和集合がペアワイズディスジョイントであり、
前記N個の和集合の各々について、当該和集合は、当該トランザクションに対応しCC-OCCが管理するスナップショットにおけるリードセットとライトセットとの和集合であり、
前記M個のサブトランザクションの各々について、当該サブトランザクションは、サブビジネスロジックの実行において処理され、サブアプリケーション部からCC-OCCへのオブジェクトのリード要求及び/又はライト要求を含み、
前記複数のサブアプリケーション部の各々について、当該サブアプリケーション部は、
サブビジネスロジックの実行において、当該サブアプリケーション部が担当サブアプリケーション部であるか否かの判断である担当判断を行い、
担当サブアプリケーション部は、リード及び/又はライトされるオブジェクトの担当CC-OCCに対してオブジェクトのリード要求及び/又はライト要求を送信可能なサブアプリケーション部であり、
当該担当判断の結果が真の場合、当該オブジェクトのリード要求及び/又はライト要求を、当該サブアプリケーション部を有するデータソースクライアントシステムにおける、当該オブジェクトの担当CC-OCCに送信し、
当該担当判断の結果が偽の場合、当該オブジェクトの担当CC-OCCを有するデータソースクライアントシステムにおけるサブアプリケーション部に、当該オブジェクトのリード及び/又はライトを依頼する、
トランザクション処理システム。 Multiple sub-application departments that execute multiple sub-business logics that make up business logic,
Equipped with multiple CC-OCC,
The plurality of CC-OCCs are provided in a plurality of data source client systems.
The plurality of data source client systems are a plurality of client systems for a data source server system having a plurality of objects.
The data source server system and the plurality of data source client systems are one or more computer systems.
Each object is data that represents the state of the target,
Each of the plurality of CC-OCCs is configured to perform OCC (Optimistic Concurrency Control) and is a transaction manager of CC (Client Coordinated).
The OCC includes performing validation based on the snapshot at the time of commit.
Each of the plurality of CC-OCCs manages snapshots for each transaction.
For each transaction, a snapshot of that transaction contains a readset, which is a collection of 0 or more read objects, and a writeset, which is a collection of 0 or more write objects.
A read object is an object that has been read in response to an object's read request.
A light object is an object that is lit in response to an object's light request.
For each transaction, the CC-OCC that receives object read requests and / or write requests from two or more sub-application units in the processing of M sub-transactions (M is an integer of 2 or more) that the transaction is divided into. In the case of N CC-OCCs (N is an integer of 2 or more)
The union of N pieces is a pairwise disjoint,
For each of the N unions, the union is the union of the readset and writeset in the snapshot managed by CC-OCC corresponding to the transaction.
For each of the M sub-transactions, the sub-transaction is processed in the execution of the sub-business logic and includes an object read request and / or a write request from the sub-application part to the CC-OCC.
For each of the plurality of sub-application units, the sub-application unit is
In the execution of the sub-business logic, the person in charge makes a judgment as to whether or not the sub-application department is in charge of the sub-application department.
The responsible sub-application unit is a sub-application unit capable of transmitting an object read request and / or a write request to the responsible CC-OCC of the object to be read and / or written.
If the result of the charge determination is true, the read request and / or write request of the object is transmitted to the CC-OCC in charge of the object in the data source client system having the sub-application part.
If the result of the judgment in charge is false, the sub-application part in the data source client system having the CC-OCC in charge of the object is requested to read and / or write the object.
Transaction processing system.
前記複数のサブアプリケーション部の各々が、当該サブアプリケーション部を有するデータソースクライアントシステムにおけるマッピング情報を基に、前記担当判断を行う、
請求項2に記載のトランザクション処理システム。 Mapping information indicating which object is in charge of which sub-application part or which CC-OCC is stored in each of the plurality of data source client systems.
Each of the plurality of sub-application units makes the above-mentioned charge determination based on the mapping information in the data source client system having the sub-application unit.
The transaction processing system according to claim 2.
前記コーディネータが、
トランザクションを開始し、
開始されたトランザクションに関する複数のサブビジネスロジックの各々について、当該サブビジネスロジックの実行をサブアプリケーション部に要求し、
前記複数のサブビジネスロジックの各々について、当該サブビジネスロジックの所定の応答を、当該サブビジネスロジックを実行したサブアプリケーション部から受けた場合、複数のサブアプリケーション部の各々に、一つ以上の準備要求を送信し、
各サブアプリケーション部から、当該サブアプリケーション部に送信された全ての準備要求について所定の応答を受けた場合、前記複数のサブアプリケーション部の各々に、コミット要求を送信する、
請求項1乃至3のうちのいずれかに記載のトランザクション処理システム。 Further, a coordinator provided inside or outside at least one of the plurality of sub-application units is provided.
The coordinator
Start a transaction and
Request the sub-application department to execute the sub-business logic for each of the multiple sub-business logics related to the started transaction.
When a predetermined response of the sub-business logic is received from the sub-application unit that executes the sub-business logic for each of the plurality of sub-business logics, one or more preparation requests are made to each of the plurality of sub-application units. And send
When a predetermined response is received from each sub-application unit for all the preparation requests sent to the sub-application unit, a commit request is transmitted to each of the plurality of sub-application units.
The transaction processing system according to any one of claims 1 to 3.
前記サブビジネスロジックの実行において、リード及び/又はライトされるオブジェクトのリード要求及び/又はライト要求を、当該オブジェクトの担当CC-OCCに送信するステップと
を有し、
ビジネスロジックを構成する複数のサブビジネスロジックを実行する複数のサブアプリケーション部が、複数のオブジェクトを有するデータソースサーバシステムに対する複数のデータソースクライアントシステムに備えられており、
前記データソースクライアントシステムは、前記複数のデータソースクライアントシステムのうちのいずれかであり、
前記サブアプリケーション部は、前記複数のサブアプリケーション部のうちのいずれかであり、
前記データソースサーバシステムと前記複数のデータソースクライアントシステムは、一つ又は複数の計算機システムであり、
各オブジェクトは、対象の状態を表すデータであり、
前記複数のデータソースクライアントシステムが、複数のCC-OCCを有し、
前記複数のCC-OCCの各々は、OCC(Optimistic Concurrency Control)を行うようになっているCC(Client Coordinated)のトランザクションマネージャであり、
前記OCCは、コミット時にスナップショットを基にバリデーションを行うことを含み、
前記複数のCC-OCCの各々は、当該CC-OCCを有するデータソースクライアントシステムにトランザクション毎にスナップショットを管理するようになっており、
各トランザクションについて、当該トランザクションのスナップショットは、0以上のリードオブジェクトの集合であるリードセットと、0以上のライトオブジェクトの集合であるライトセットとを含み、
リードオブジェクトは、オブジェクトのリード要求に応答してリードされたオブジェクトであり、
ライトオブジェクトは、オブジェクトのライト要求に応答してライトされるオブジェクトであり、
各トランザクションについて、当該トランザクションが分割されてなるM個(Mは2以上の整数)のサブトランザクションの処理において二つ以上のサブアプリケーション部からオブジェクトのリード要求及び/又はライト要求を受けるCC-OCCがN個(Nは2以上の整数)のCC-OCCの場合、
N個の和集合がペアワイズディスジョイントであり、
前記N個の和集合の各々について、当該和集合は、当該トランザクションに対応しCC-OCCが管理するスナップショットにおけるリードセットとライトセットとの和集合であり、
前記M個のサブトランザクションの各々について、当該サブトランザクションは、サブビジネスロジックの実行において処理され、サブアプリケーション部からCC-OCCへのオブジェクトのリード要求及び/又はライト要求を含む、
方法。 The steps to execute the sub-business logic by the sub-application part in the data source client system,
In executing the sub-business logic, it has a step of transmitting a read request and / or a write request of the object to be read and / or written to the CC-OCC in charge of the object.
Multiple sub-applications that execute multiple sub-business logics that make up the business logic are provided in multiple data source client systems for a data source server system with multiple objects.
The data source client system is one of the plurality of data source client systems.
The sub-application unit is one of the plurality of sub-application units.
The data source server system and the plurality of data source client systems are one or more computer systems.
Each object is data that represents the state of the target,
The plurality of data source client systems have a plurality of CC-OCCs, and the plurality of data source client systems have a plurality of CC-OCCs.
Each of the plurality of CC-OCCs is a CC (Client Coordinated) transaction manager that performs OCC (Optimistic Concurrency Control).
The OCC includes performing validation based on the snapshot at the time of commit.
Each of the plurality of CC-OCCs manages snapshots for each transaction in the data source client system having the CC-OCC.
For each transaction, a snapshot of that transaction contains a readset, which is a collection of 0 or more read objects, and a writeset, which is a collection of 0 or more write objects.
A read object is an object that has been read in response to an object's read request.
A light object is an object that is lit in response to an object's light request.
For each transaction, the CC-OCC that receives object read requests and / or write requests from two or more sub-application units in the processing of M sub-transactions (M is an integer of 2 or more) that the transaction is divided into. In the case of N CC-OCCs (N is an integer of 2 or more)
The union of N pieces is a pairwise disjoint,
For each of the N unions, the union is the union of the readset and writeset in the snapshot managed by CC-OCC corresponding to the transaction.
For each of the M sub-transactions, the sub-transaction is processed in the execution of the sub-business logic and includes an object read request and / or a write request from the sub-application part to the CC-OCC.
Method.
当該担当判断の結果が真の場合、前記サブアプリケーション部により、オブジェクトのリード要求及び/又はライト要求を、当該サブアプリケーション部を有するデータソースクライアントシステムにおける、当該オブジェクトの担当CC-OCCに送信するステップと、
当該担当判断の結果が偽の場合、前記サブアプリケーション部により、当該オブジェクトの担当CC-OCCを有する別のデータソースクライアントシステムにおける別のサブアプリケーション部に、当該オブジェクトのリード及び/又はライトを依頼するステップと
を有し、
ビジネスロジックを構成する複数のサブビジネスロジックを実行する複数のサブアプリケーション部が、複数のオブジェクトを有するデータソースサーバシステムに対する複数のデータソースクライアントシステムに備えられており、
前記データソースクライアントシステムは、前記複数のデータソースクライアントシステムのうちのいずれかであり、
前記別のデータソースクライアントシステムは、前記複数のデータソースクライアントシステムのうちのいずれかであって、前記データソースクライアントシステムと別のデータソースクライアントシステムであり、
前記サブアプリケーション部は、前記複数のサブアプリケーション部のうちのいずれかであり、
前記別のサブアプリケーション部は、前記複数のサブアプリケーション部のうちのいずれかであって、前記サブアプリケーション部と別のサブアプリケーション部であり、
前記データソースサーバシステムと前記複数のデータソースクライアントシステムは、一つ又は複数の計算機システムであり、
各オブジェクトは、対象の状態を表すデータであり、
前記複数のデータソースクライアントシステムが、複数のCC-OCCを有し、
前記複数のCC-OCCの各々は、OCC(Optimistic Concurrency Control)を行うようになっているCC(Client Coordinated)のトランザクションマネージャであり、
前記OCCは、コミット時にスナップショットを基にバリデーションを行うことを含み、
前記複数のCC-OCCの各々は、当該CC-OCCを有するデータソースクライアントシステムにトランザクション毎にスナップショットを管理するようになっており、
各トランザクションについて、当該トランザクションのスナップショットは、0以上のリードオブジェクトの集合であるリードセットと、0以上のライトオブジェクトの集合であるライトセットとを含み、
リードオブジェクトは、オブジェクトのリード要求に応答してリードされたオブジェクトであり、
ライトオブジェクトは、オブジェクトのライト要求に応答してライトされるオブジェクトであり、
各トランザクションについて、当該トランザクションが分割されてなるM個(Mは2以上の整数)のサブトランザクションの処理において二つ以上のサブアプリケーション部からオブジェクトのリード要求及び/又はライト要求を受けるCC-OCCがN個(Nは2以上の整数)のCC-OCCの場合、
N個の和集合がペアワイズディスジョイントであり、
前記N個の和集合の各々について、当該和集合は、当該トランザクションに対応しCC-OCCが管理するスナップショットにおけるリードセットとライトセットとの和集合であり、
前記M個のサブトランザクションの各々について、当該サブトランザクションは、サブビジネスロジックの実行において処理され、サブアプリケーション部からCC-OCCへのオブジェクトのリード要求及び/又はライト要求を含む、
方法。 In the execution of the sub-business logic, the sub-application department in the data source client system determines whether or not the sub-application department is the responsible sub-application department.
If the result of the judgment in charge is true, the sub-application unit transmits a read request and / or a write request for the object to the CC-OCC in charge of the object in the data source client system having the sub-application unit. Steps and
If the result of the charge determination is false, the sub-application department requests another sub-application department in another data source client system having the CC-OCC in charge of the object to read and / or write the object. Have steps and
Multiple sub-applications that execute multiple sub-business logics that make up the business logic are provided in multiple data source client systems for a data source server system with multiple objects.
The data source client system is one of the plurality of data source client systems.
The other data source client system is one of the plurality of data source client systems and is a data source client system different from the data source client system.
The sub-application unit is one of the plurality of sub-application units.
The other sub-application unit is one of the plurality of sub-application units, and is a sub-application unit different from the sub-application unit.
The data source server system and the plurality of data source client systems are one or more computer systems.
Each object is data that represents the state of the target,
The plurality of data source client systems have a plurality of CC-OCCs, and the plurality of data source client systems have a plurality of CC-OCCs.
Each of the plurality of CC-OCCs is a CC (Client Coordinated) transaction manager that performs OCC (Optimistic Concurrency Control).
The OCC includes performing validation based on the snapshot at the time of commit.
Each of the plurality of CC-OCCs manages snapshots for each transaction in the data source client system having the CC-OCC.
For each transaction, a snapshot of that transaction contains a readset, which is a collection of 0 or more read objects, and a writeset, which is a collection of 0 or more write objects.
A read object is an object that has been read in response to an object's read request.
A light object is an object that is lit in response to an object's light request.
For each transaction, the CC-OCC that receives object read requests and / or write requests from two or more sub-application units in the processing of M sub-transactions (M is an integer of 2 or more) that the transaction is divided into. In the case of N CC-OCCs (N is an integer of 2 or more)
The union of N pieces is a pairwise disjoint,
For each of the N unions, the union is the union of the readset and writeset in the snapshot managed by CC-OCC corresponding to the transaction.
For each of the M sub-transactions, the sub-transaction is processed in the execution of the sub-business logic and includes an object read request and / or a write request from the sub-application part to the CC-OCC.
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021144577A JP7031919B1 (en) | 2021-09-03 | 2021-09-06 | Transaction processing system and method |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021144133 | 2021-09-03 | ||
JP2021144577A JP7031919B1 (en) | 2021-09-03 | 2021-09-06 | Transaction processing system and method |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021144133 Division | 2021-09-03 | 2021-09-03 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP7031919B1 true JP7031919B1 (en) | 2022-03-08 |
JP2023037537A JP2023037537A (en) | 2023-03-15 |
Family
ID=87654721
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021144577A Active JP7031919B1 (en) | 2021-09-03 | 2021-09-06 | Transaction processing system and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7031919B1 (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5920857A (en) * | 1997-08-04 | 1999-07-06 | Naphtali Rishe | Efficient optimistic concurrency control and lazy queries for B-trees and other database structures |
JP2007188518A (en) * | 2007-02-27 | 2007-07-26 | Oracle Internatl Corp | Partitioning of ownership of database between different database servers for controlling access to database |
WO2010098034A1 (en) * | 2009-02-24 | 2010-09-02 | 日本電気株式会社 | Distributed database management system and distributed database management method |
US20100241629A1 (en) * | 2009-03-17 | 2010-09-23 | Nec Laboratories America, Inc. | System and Methods for Database Distribution and Querying over Key-based Scalable Storage |
US20130332435A1 (en) * | 2012-06-12 | 2013-12-12 | Microsoft Corporation | Partitioning optimistic concurrency control and logging |
US20160055230A1 (en) * | 2014-08-21 | 2016-02-25 | Codership Oy | Method for avoiding conflicts in database cluster |
US20160371353A1 (en) * | 2013-06-28 | 2016-12-22 | Qatar Foundation | A method and system for processing data |
US20180329936A1 (en) * | 2015-08-21 | 2018-11-15 | Amazon Technologies, Inc. | Customer-related partitioning of journal-based storage systems |
JP2019125100A (en) * | 2018-01-15 | 2019-07-25 | 富士通株式会社 | Information processing device, control method, and control program |
WO2021019089A1 (en) * | 2019-07-31 | 2021-02-04 | Sindice Limited T/A Siren | Semantic caching of semi-join operators in shared-nothing and log-structured databases |
-
2021
- 2021-09-06 JP JP2021144577A patent/JP7031919B1/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5920857A (en) * | 1997-08-04 | 1999-07-06 | Naphtali Rishe | Efficient optimistic concurrency control and lazy queries for B-trees and other database structures |
JP2007188518A (en) * | 2007-02-27 | 2007-07-26 | Oracle Internatl Corp | Partitioning of ownership of database between different database servers for controlling access to database |
WO2010098034A1 (en) * | 2009-02-24 | 2010-09-02 | 日本電気株式会社 | Distributed database management system and distributed database management method |
US20100241629A1 (en) * | 2009-03-17 | 2010-09-23 | Nec Laboratories America, Inc. | System and Methods for Database Distribution and Querying over Key-based Scalable Storage |
US20130332435A1 (en) * | 2012-06-12 | 2013-12-12 | Microsoft Corporation | Partitioning optimistic concurrency control and logging |
US20160371353A1 (en) * | 2013-06-28 | 2016-12-22 | Qatar Foundation | A method and system for processing data |
US20160055230A1 (en) * | 2014-08-21 | 2016-02-25 | Codership Oy | Method for avoiding conflicts in database cluster |
US20180329936A1 (en) * | 2015-08-21 | 2018-11-15 | Amazon Technologies, Inc. | Customer-related partitioning of journal-based storage systems |
JP2019125100A (en) * | 2018-01-15 | 2019-07-25 | 富士通株式会社 | Information processing device, control method, and control program |
WO2021019089A1 (en) * | 2019-07-31 | 2021-02-04 | Sindice Limited T/A Siren | Semantic caching of semi-join operators in shared-nothing and log-structured databases |
Also Published As
Publication number | Publication date |
---|---|
JP2023037537A (en) | 2023-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10116766B2 (en) | Asynchronous and idempotent distributed lock interfaces | |
US8548945B2 (en) | Database caching utilizing asynchronous log-based replication | |
US7328226B1 (en) | Coordinated distributed log-based snapshots in a multi-host environment | |
TW409215B (en) | Parallel file system and method for multiple node file access | |
WO2018001135A1 (en) | Method for processing database transaction, client and server | |
CN109086388B (en) | Block chain data storage method, device, equipment and medium | |
US9208090B2 (en) | Transactional memory proxy | |
KR100450400B1 (en) | A High Avaliability Structure of MMDBMS for Diskless Environment and data synchronization control method thereof | |
US9553951B1 (en) | Semaphores in distributed computing environments | |
US7769713B1 (en) | Coordinated distributed logging in a multi-host environment | |
US20170364273A1 (en) | Consensus protocol enhancements for supporting flexible durability options | |
US11080262B1 (en) | Optimistic atomic multi-page write operations in decoupled multi-writer databases | |
US20130085988A1 (en) | Recording medium, node, and distributed database system | |
US20230014427A1 (en) | Global secondary index method for distributed database, electronic device and storage medium | |
US9386073B2 (en) | Techniques for performing processing for database | |
JP7031919B1 (en) | Transaction processing system and method | |
WO2023033153A1 (en) | Transaction processing system and method | |
US10191959B1 (en) | Versioned read-only snapshots of shared state in distributed computing environments | |
US11422715B1 (en) | Direct read in clustered file systems | |
US11669516B2 (en) | Fault tolerance for transaction mirroring | |
US10754710B1 (en) | Transactional watch mechanism | |
US10685046B2 (en) | Data processing system and data processing method | |
US11422733B2 (en) | Incremental replication between foreign system dataset stores | |
WO2022001629A1 (en) | Database system, and method and apparatus for managing transactions | |
US11914571B1 (en) | Optimistic concurrency for a multi-writer database |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210908 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210908 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20210908 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211005 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211203 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211221 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211222 |
|
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: 20220118 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220216 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7031919 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |