JP2016134116A - Information processing apparatus, information processing system, information processing method, and computer program - Google Patents

Information processing apparatus, information processing system, information processing method, and computer program Download PDF

Info

Publication number
JP2016134116A
JP2016134116A JP2015010053A JP2015010053A JP2016134116A JP 2016134116 A JP2016134116 A JP 2016134116A JP 2015010053 A JP2015010053 A JP 2015010053A JP 2015010053 A JP2015010053 A JP 2015010053A JP 2016134116 A JP2016134116 A JP 2016134116A
Authority
JP
Japan
Prior art keywords
index
record
update
message
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2015010053A
Other languages
Japanese (ja)
Other versions
JP6464771B2 (en
Inventor
一郎 新井
Ichiro Arai
一郎 新井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2015010053A priority Critical patent/JP6464771B2/en
Publication of JP2016134116A publication Critical patent/JP2016134116A/en
Application granted granted Critical
Publication of JP6464771B2 publication Critical patent/JP6464771B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a technology for more sufficiently supporting result consistency between a record and an index in a distributed storage system.SOLUTION: An information processing apparatus includes: a processing request input part 11 for receiving a request for processing about a record comprising a key and a value; a message generation part 13 for generating an index update message representing an update instruction corresponding to the requested processing about index data comprising an index key and a key list; a record update part 12 for generating a record corresponding to the requested processing, adding the index update message to the generated record, and storing the record with the index update message added thereto in a distribution storage system 40; and an index data update part 14 for storing index data with the index update message reflected thereon in the distributed storage system 40 by executing the index update message included in the record stored in the distribution storage system 40.SELECTED DRAWING: Figure 1

Description

本発明は、分散ストレージシステムに格納されるデータおよび索引を管理する技術に関する。   The present invention relates to a technique for managing data and indexes stored in a distributed storage system.

データを分散して格納する分散ストレージシステムが知られている。分散ストレージシステムとしては、例えば、キーおよび値からなるデータを分散して格納する分散キーバリューストア(分散KVS:Key-Value Store)がある。分散KVSは、キーおよび値のペア(以下、KVペアと記載する)について、キーのハッシュ値等に基づきその格納先となるサーバを分散させる。分散KVSでは、KVペアは、各サーバに略均一に分散配置される。   Distributed storage systems that store data in a distributed manner are known. As a distributed storage system, for example, there is a distributed key-value store (distributed KVS: Key-Value Store) that stores data consisting of keys and values in a distributed manner. The distributed KVS distributes the server that stores the key and value pairs (hereinafter referred to as KV pairs) based on the hash value of the key. In the distributed KVS, KV pairs are distributed almost uniformly on each server.

分散KVSでは、1つのKVペアに対する1つのデータ操作については、アトミック性がサポートされている。データ操作には、例えば、作成、更新、削除、または、参照などがある。一方、分散KVSでは、1つのKVペアに対する一連のデータ操作については、アトミック性がサポートされない。例えば「GETしたKVペアを更新してPUTする」といった一連のデータ操作が複数のアプリケーションからそれぞれ要求される場合、各一連のデータ操作については、アトミック性がサポートされない。そこで、分散KVSでは、CAS(Compare And Swap)機能と呼ばれる排他制御技術が採用される。CAS機能により、同一のKVペアに対する一連のデータ操作は、アトミックに実行可能となる。ただし、CASによる排他制御は、楽観的排他制御のため実行が失敗する場合がある。実行が失敗した一連のデータ操作を要求したアプリケーションは、再度その一連のデータ操作について実行を要求する。   In distributed KVS, atomicity is supported for one data operation on one KV pair. Examples of data operations include creation, update, deletion, or reference. On the other hand, in the distributed KVS, atomicity is not supported for a series of data operations for one KV pair. For example, when a series of data operations such as “update a GET KV pair and PUT” is requested from a plurality of applications, atomicity is not supported for each series of data operations. Therefore, in the distributed KVS, an exclusive control technique called a CAS (Compare And Swap) function is adopted. With the CAS function, a series of data operations on the same KV pair can be executed atomically. However, execution of exclusive control by CAS may fail due to optimistic exclusive control. An application that requested a series of data operations that failed to execute again requests execution of the series of data operations.

このような分散KVS上のデータは、結果整合性(Eventually Consistency)であることが許容されるケースがある。例えば、キーおよび値からなるデータと、それに対する索引との間は、結果整合性であることが許容される。以下に、具体例をあげて説明する。   There is a case where such data on the distributed KVS is allowed to be eventually consistent. For example, eventual consistency is allowed between data consisting of keys and values and an index for the data. A specific example will be described below.

例えば、図19に示すような「商品マスタ」および「受注履歴」を想定する。ここでは、「商品マスタ」および「受注履歴」に含まれる各行の情報を、レコードと呼ぶものとする。図19では、主キーに下線を引き、外部キーに破線の下線を引いている。この場合、分散KVSでは、商品マスタおよび受注履歴は、図20に示すKVペアとして格納される。以降、「商品マスタ」および「受注履歴」の各レコードに対応するKVペアを、「レコードKVペア」とも呼ぶものとする。なお、図20において、「キー→値」は、KVペアを表す。また、{値1,値2,・・・}は、レコードKVペアの値を表す。また、これらのレコードKVペアは、下記の処理1〜3により作成されるものとする。
・処理1:「商品マスタ」に、商品情報に関するレコード(「商品ID」、「在庫数」、「価格」)を登録しておく。
・処理2:商品への受注があると、「受注履歴」に、受注情報に関するレコード(「受注ID」、「商品ID」、「受注日時」)を登録する。
・処理3:受注による商品の引当により、商品マスタの当該商品の在庫数を1つ減らす。
For example, a “product master” and “order history” as shown in FIG. 19 are assumed. Here, information on each line included in the “product master” and the “order history” is referred to as a record. In FIG. 19, the primary key is underlined and the external key is underlined by a broken line. In this case, in the distributed KVS, the product master and the order history are stored as a KV pair shown in FIG. Hereinafter, the KV pair corresponding to each record of “product master” and “order history” is also referred to as “record KV pair”. In FIG. 20, “key → value” represents a KV pair. {Value 1, value 2,...} Represents the value of the record KV pair. These record KV pairs are created by the following processes 1 to 3.
Process 1: Records relating to product information (“product ID”, “stock quantity”, “price”) are registered in the “product master”.
Process 2: When there is an order for a product, a record (“order ID”, “product ID”, “order date”) related to order information is registered in “order history”.
・ Process 3: Reduce the inventory quantity of the product in the product master by 1 by allocating the product by order.

ここで、「受注履歴」の「受注日時」列に、索引を作成することを考える。この場合、分散KVSでは、索引は、図21に示す索引KVペアとして格納される。なお、図21において、[キー1,キー2,・・・]は、索引KVペアの値を表す。索引KVペアの値は、索引KVペアのキーを値に含むレコードKVペアのキーのリストを表す。このとき、レコードKVペアの更新および索引KVペアの更新を別トランザクションで行ったとする。障害等が発生しなければ、一時的にレコードと索引の間に不整合が発生しても、結果的に、索引KVペアは正しく生成される。つまり、レコードおよび索引は結果整合性を満たす。   Now, consider creating an index in the “Order Date / Time” column of “Order History”. In this case, in the distributed KVS, the index is stored as an index KV pair shown in FIG. In FIG. 21, [key 1, key 2,...] Represents the value of the index KV pair. The value of the index KV pair represents a list of keys of the record KV pair that includes the key of the index KV pair in the value. At this time, it is assumed that the update of the record KV pair and the update of the index KV pair are performed in separate transactions. If no failure or the like occurs, even if a mismatch occurs temporarily between the record and the index, the index KV pair is correctly generated as a result. That is, records and indexes satisfy eventual consistency.

しかし、レコードKVペアの更新と索引KVペアの更新との間に障害が発生した場合、索引KVペアのデータは失われる。そして、レコードおよび索引間の結果整合性が満たされなくなる。このように、レコードおよび索引間の整合性が満たされないままでは、レコードKVペアに含まれる値を索引とする参照・更新・削除が不可能となるケースが出てくる。もし、アクセスしたいKVペアのキーが不明であれば、そのKVペアへのデータアクセスが失われる。この場合、全サーバの全件スキャンによる索引の再構築が必要となる。しかしながら、全件スキャンによる索引の再構築は、大量データを扱う分散KVSでは好ましくない。   However, if a failure occurs between the update of the record KV pair and the update of the index KV pair, the data of the index KV pair is lost. As a result, the eventual consistency between records and indexes is not satisfied. As described above, there are cases where reference, update, and deletion using the values included in the record KV pair as indexes cannot be performed unless the consistency between the records and the indexes is satisfied. If the key of the KV pair to be accessed is unknown, data access to that KV pair is lost. In this case, it is necessary to rebuild the index by scanning all cases of all servers. However, index reconstruction by full scan is not preferable in distributed KVS that handles large amounts of data.

このような理由により、多くの分散ストレージシステムでは、各サーバが、自身に格納されるデータについて索引を作成して保持する。これにより、システムは、整合性の担保を容易にする。また、各サーバが、自身に格納されるデータについて索引を作成・保持することは、レコードおよび索引間について「結果整合性」よりも強い「整合性」を担保することになる。   For this reason, in many distributed storage systems, each server creates and holds an index for data stored in itself. Thereby, the system facilitates ensuring consistency. In addition, each server creating and maintaining an index for data stored in itself secures “consistency” stronger than “eventual consistency” between records and indexes.

しかしながら、分散ストレージシステムにおいて、各サーバが、自身に格納されるレコードについて索引を作成する場合、以下の問題がある。この場合、索引を用いた検索において、全ての各サーバが、自身の索引を用いて該当データが存在するかどうか確認する必要がある。したがって、索引を用いた検索処理が多い場合、サーバ台数が増えるにつれて索引の確認処理も増大する。このため、台数を増やしたスケールアウトで性能改善できないという問題があった。   However, in a distributed storage system, when each server creates an index for records stored in itself, there are the following problems. In this case, in the search using the index, all the servers need to check whether the corresponding data exists using their own index. Therefore, when there are many search processes using indexes, the index confirmation process also increases as the number of servers increases. For this reason, there was a problem that performance could not be improved by increasing the number of scales.

索引を用いた検索処理が多い場合でも、台数を増やすことで性能をスケールアウトするためには、レコードKVペアだけでなく、索引KVペアも複数のサーバに分散配置する必要がある。この場合、各サーバは、検索対象の索引を保持する場合にのみ処理を行えばよい。レコードKVペアおよび索引KVペアの分散配置の例を、図22に示す。図22では、分散KVSは、4つのサーバ900a〜900dによって構成されている。サーバ900a〜900dは、それぞれレコードKVペアおよび索引KVペアを分散して格納している。この場合、アプリケーションは、例えば、「2014−01−01」(2014年1月1日)に受注した受注履歴のレコードを参照するために、サーバ900a、900b、および、900cの3つのサーバにアクセスするだけでよい。すなわち、この場合、「2014−01−01」をキーとする索引KVペアは、サーバ900aから取得可能である。そして、それによって得られた「受注1」および「受注2」をキーとするレコードKVペアは、サーバ900bおよび900cから取得可能である。このように、索引KVペアを分散配置することにより、分散KVSを構成するサーバ台数が多いほど、1つの検索処理でアクセスされるサーバ台数の割合は少なくて済む。   Even when there are many search processes using indexes, in order to scale out performance by increasing the number, it is necessary to distribute not only record KV pairs but also index KV pairs to a plurality of servers. In this case, each server only needs to perform processing when holding the index to be searched. An example of a distributed arrangement of record KV pairs and index KV pairs is shown in FIG. In FIG. 22, the distributed KVS is configured by four servers 900a to 900d. The servers 900a to 900d store record KV pairs and index KV pairs in a distributed manner. In this case, the application accesses, for example, the three servers 900a, 900b, and 900c to refer to the record of the order history received on “2014-01-01” (January 1, 2014). Just do it. That is, in this case, an index KV pair with “2014-01-01” as a key can be acquired from the server 900a. Then, the record KV pair using “order 1” and “order 2” obtained as a key can be acquired from the servers 900b and 900c. As described above, by distributing the index KV pairs in a distributed manner, as the number of servers constituting the distributed KVS increases, the ratio of the number of servers accessed in one search process can be reduced.

このような索引KVペアの分散配置を実現するためには、レコードKVペアの更新と索引KVペアの更新との間に不整合を発生させないようにする必要がある。複数のKVペアについて不整合を発生させずに更新する技術の一例が、特許文献1に記載されている。   In order to realize such a distributed arrangement of index KV pairs, it is necessary to prevent inconsistency between the update of the record KV pair and the update of the index KV pair. An example of a technique for updating a plurality of KV pairs without causing inconsistency is described in Patent Document 1.

特許文献1に記載された関連技術は、整合性を保持する対象となるKVペア群に、各KVペアのキーのうちいずれか1つを代表キーとして設定する。そして、この関連技術は、各KVペアに対する更新情報を、代表キーに対応する代表ログに書き込む。また、この関連技術は、代表ログ以外の従属ログには、処理中であることを表す情報を付加する。代表ログは、トランザクションのWAL(Write Ahead Log)の役割を持つことになる。そして、この関連技術は、代表ログに書き込まれた更新情報を、各KVペアに反映させる。これにより、この関連技術は、複数のKVペア間に不整合を発生させずに更新することを可能としている。例えば、上述した図19〜図21の例では、前述の処理2および処理3をアトミックに実行する必要がある。つまり、図20では、item1をキーとする商品マスタのKVペアと、受注1をキーとする受注履歴のKVペアとは整合性を保つ必要がある。そこで、この関連技術は、これらのKVペアの代表キーとして、例えばitem1を設定する。これにより、処理2および処理3はアトミックに実行され、商品マスタのKVペアと、受注履歴のKVペアとは整合性を保つ。   In the related technique described in Patent Document 1, any one of the keys of each KV pair is set as a representative key in a KV pair group that is a target for maintaining consistency. Then, this related technique writes update information for each KV pair in the representative log corresponding to the representative key. In this related technology, information indicating that processing is in progress is added to the subordinate log other than the representative log. The representative log has a WAL (Write Ahead Log) role of the transaction. This related technique reflects the update information written in the representative log in each KV pair. As a result, this related technology makes it possible to perform update without causing inconsistency between a plurality of KV pairs. For example, in the example of FIGS. 19 to 21 described above, it is necessary to execute the above-described processing 2 and processing 3 atomically. That is, in FIG. 20, it is necessary to maintain consistency between the KV pair of the product master using item1 as a key and the KV pair of the order history using order1 as a key. Therefore, this related technology sets, for example, item1 as a representative key of these KV pairs. Thereby, the process 2 and the process 3 are executed atomically, and the KV pair of the product master and the KV pair of the order history are kept consistent.

この関連技術を用いて、レコードKVペアおよび対応する索引KVペアに代表キーを設定することにより、レコードおよび索引間の整合性を保つことが考えられる。   It is conceivable to maintain consistency between records and indexes by setting a representative key for the record KV pair and the corresponding index KV pair using this related technique.

特開2012‐238061号公報JP 2012-238061 A

しかしながら、特許文献1に記載された関連技術を用いても、レコードおよび索引間の整合性を保てない場合がある。   However, even if the related technique described in Patent Document 1 is used, there is a case where consistency between records and indexes cannot be maintained.

その理由について、図19〜図21に示した例を用いて説明する。この具体例に関連技術を適用する場合、整合性を保つ対象となるレコードKVペアと索引KVペアとに同一の代表キーを設定する必要がある。ここで、「2014−01−01」をキーとする索引KVペアに、代表キー「item1」を設定したとする。この場合、この関連技術は、この索引KVペアの更新を、「受注1」をキーとするレコードKVペアの作成と同一トランザクションで実行できる。「受注1」には、同一の代表キー「item1」が設定されているからである。しかしながら、この場合、この関連技術は、この索引KVペアの更新を、「受注2」をキーとするレコードKVペアの作成と同一トランザクションで実行することはできない。「受注2」には、異なる代表キー「item2」が設定されているからである。   The reason will be described using the examples shown in FIGS. When the related technique is applied to this specific example, it is necessary to set the same representative key for the record KV pair and the index KV pair that are targets for maintaining consistency. Here, it is assumed that the representative key “item1” is set to the index KV pair having “2014-01-01” as a key. In this case, this related technique can update the index KV pair in the same transaction as the creation of the record KV pair with “Order 1” as a key. This is because “order 1” is set with the same representative key “item1”. However, in this case, this related technology cannot update the index KV pair in the same transaction as the creation of the record KV pair with “Order 2” as a key. This is because “order 2” is set with a different representative key “item2”.

そこで、「2014−01−01」をキーとする索引KVペアと、「受注1」および「受注2」をキーとする各レコードKVペアとに、代表キー「2014−01−01」を設定したとする。この場合、この関連技術は、受注履歴の各レコードKVペアの更新と、索引KVペアの更新とを同一トランザクションで実行可能となる。しかし、この場合、この関連技術は、受注履歴のKVペアおよび対応する商品マスタのKVペア間で代表キーが異なっているため、これらの更新を同一トランザクションで実行できない。   Therefore, the representative key “2014-01-01” is set to the index KV pair having “2014-01-01” as a key and the record KV pairs having “order 1” and “order 2” as keys. And In this case, according to this related technique, the update of each record KV pair in the order history and the update of the index KV pair can be executed in the same transaction. However, in this case, in this related technique, since the representative key is different between the KV pair of the order history and the KV pair of the corresponding product master, these updates cannot be executed in the same transaction.

もし、整合性を保つ必要のあるレコードKVペアおよび索引KVペアで同一の代表キーを設定することが可能であれば、関連技術を用いれば不整合は発生しない。しかし、上述したように、この関連技術は、処理によっては、対象のKVペア群の代表キーを一致させることができず、同一トランザクションで処理できない。この場合、レコードKVペアの更新と、索引KVペアの更新とが、別のトランザクションで実行されることになる。このとき、レコードKVペアの更新トランザクションと、索引KVペアの更新トランザクションとの間で障害が発生した場合、索引データの消失につながる。そして、レコードKVペアおよび索引KVペア間に不整合が発生したままの状態となる。つまり、このような場合、分散KVSは、結果整合性を満たさない。   If the same representative key can be set for the record KV pair and the index KV pair that need to maintain consistency, no inconsistency will occur if the related technique is used. However, as described above, this related technique cannot match the representative key of the target KV pair group depending on the process, and cannot process the same transaction. In this case, the update of the record KV pair and the update of the index KV pair are executed in different transactions. At this time, if a failure occurs between the update transaction of the record KV pair and the update transaction of the index KV pair, the index data is lost. Then, the inconsistency remains between the record KV pair and the index KV pair. That is, in such a case, the distributed KVS does not satisfy the eventual consistency.

このように、特許文献1に記載された関連技術では、レコードおよび索引間の結果整合性を保てない場合があるという課題があった。   As described above, the related technique described in Patent Document 1 has a problem that it may not be possible to maintain the result consistency between records and indexes.

本発明は、上述の課題を解決するためになされたもので、分散ストレージシステムにおけるレコードおよび索引間の結果整合性をより十分にサポートする技術を提供することを目的とする。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a technique that more fully supports eventual consistency between records and indexes in a distributed storage system.

本発明の情報処理装置は、キーおよび値からなるレコードに関する処理の要求が入力される処理要求入力部と、前記レコードに含まれる値のうち索引作成対象である索引キーと、前記レコードのキーを含むキーリストとからなる索引データに関して、要求された前記処理に応じた更新指示を表す索引更新メッセージを生成するメッセージ生成部と、要求された前記処理に応じたレコードを生成し、生成したレコードに、前記メッセージ生成部により生成された索引更新メッセージを付加し、前記索引更新メッセージが付加されたレコードを分散ストレージシステムに格納するレコード更新部と、前記分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、前記索引更新メッセージが反映された索引データを前記分散ストレージシステムに格納する索引データ更新部と、を備える。   An information processing apparatus according to the present invention includes: a processing request input unit that receives a processing request related to a record including a key and a value; an index key that is an index creation target among values included in the record; and a key of the record A message generation unit that generates an index update message that represents an update instruction according to the requested process, and a record that corresponds to the requested process is generated with respect to the index data including the key list, and the generated record A record update unit for adding the index update message generated by the message generation unit and storing the record to which the index update message is added in a distributed storage system; and an index included in the record stored in the distributed storage system By executing the update message, the search reflecting the index update message is performed. Comprising the index data updating unit that stores data in the distributed storage system, the.

また、本発明の情報処理システムは、上述の情報処理装置と、前記分散ストレージシステムと、を備える。   An information processing system according to the present invention includes the information processing apparatus described above and the distributed storage system.

また、本発明の情報処理方法は、キーおよび値からなるレコードに関する処理の要求が入力されると、前記レコードに含まれる値のうち索引作成対象である索引キーと、前記レコードのキーを含むキーリストとからなる索引データに関して、要求された前記処理に応じた更新指示を表す索引更新メッセージを生成し、要求された前記処理に応じたレコードを生成し、生成したレコードに、前記索引更新メッセージを付加し、前記索引更新メッセージが付加されたレコードを分散ストレージシステムに格納し、前記分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、前記索引更新メッセージが反映された索引データを前記分散ストレージシステムに格納する。   Further, in the information processing method of the present invention, when a processing request relating to a record including a key and a value is input, an index key that is an index creation target among values included in the record, and a key including the key of the record An index update message representing an update instruction corresponding to the requested process is generated for the index data consisting of a list, a record corresponding to the requested process is generated, and the index update message is added to the generated record. And adding the index update message to the distributed storage system, and executing the index update message included in the record stored in the distributed storage system to reflect the index update message. Data is stored in the distributed storage system.

また、本発明のコンピュータ・プログラムは、キーおよび値からなるレコードに関する処理の要求が入力される処理要求入力ステップと、前記レコードに含まれる値のうち索引作成対象である索引キーと、前記レコードのキーを含むキーリストとからなる索引データに関して、要求された前記処理に応じた更新指示を表す索引更新メッセージを生成するメッセージ生成ステップと、要求された前記処理に応じたレコードを生成し、生成したレコードに、前記メッセージ生成ステップで生成された索引更新メッセージを付加し、前記索引更新メッセージが付加されたレコードを分散ストレージシステムに格納するレコード更新ステップと、前記分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、前記索引更新メッセージが反映された索引データを前記分散ストレージシステムに格納する索引データ更新ステップと、をコンピュータ装置に実行させる。   The computer program of the present invention includes a processing request input step in which a processing request relating to a record including a key and a value is input, an index key to be indexed among values included in the record, A message generation step for generating an index update message indicating an update instruction corresponding to the requested process, and a record corresponding to the requested process are generated and generated with respect to the index data including a key list including keys. Included in the record stored in the distributed storage system and the record update step of adding the index update message generated in the message generation step to the record and storing the record with the index update message in the distributed storage system By executing the index update message The index update message to execute the index data updating step of storing the index data reflected in the distributed storage system, to the computer device.

本発明は、分散ストレージシステムにおけるレコードおよび索引間の結果整合性をより十分にサポートする技術を提供することができる。   The present invention can provide a technology that more fully supports eventual consistency between records and indexes in a distributed storage system.

本発明の第1の実施の形態としての情報処理システムの機能ブロック図である。It is a functional block diagram of an information processing system as a 1st embodiment of the present invention. 本発明の第1の実施の形態としての情報処理システムのハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of the information processing system as the 1st Embodiment of this invention. 本発明の第1の実施の形態としての情報処理システムのレコード処理動作を示すフローチャートである。It is a flowchart which shows the record processing operation | movement of the information processing system as the 1st Embodiment of this invention. 本発明の第1の実施の形態としての情報処理システムの索引データ更新動作を示すフローチャートである。It is a flowchart which shows the index data update operation | movement of the information processing system as the 1st Embodiment of this invention. 本発明の第2の実施の形態としての情報処理システムの機能ブロック図である。It is a functional block diagram of an information processing system as a 2nd embodiment of the present invention. 本発明の第2の実施の形態において入力される処理要求と、生成される索引更新メッセージと、実行される処理との対応関係の一例を説明する図である。It is a figure explaining an example of the correspondence of the processing request inputted in the 2nd embodiment of the present invention, the index update message generated, and the processing performed. 本発明の第2の実施の形態としての情報処理システムのレコード参照動作を説明するフローチャートである。It is a flowchart explaining the record reference operation | movement of the information processing system as the 2nd Embodiment of this invention. 本発明の第2の実施の形態としての情報処理システムのレコード処理動作を説明するフローチャートである。It is a flowchart explaining the record processing operation | movement of the information processing system as the 2nd Embodiment of this invention. 本発明の第2の実施の形態としての情報処理システムによって処理されるレコードの具体的な例を示す図である。It is a figure which shows the specific example of the record processed by the information processing system as the 2nd Embodiment of this invention. 本発明の第2の実施の形態において、図9に示すレコードに対して入力される処理要求と、生成される索引更新メッセージと、実行される処理との対応関係の一例を説明する図である。FIG. 10 is a diagram illustrating an example of a correspondence relationship between a process request input to the record illustrated in FIG. 9, a generated index update message, and a process to be executed in the second embodiment of the present invention. . 本発明の第2の実施の形態としての情報処理システムの索引データ更新動作を説明するフローチャートである。It is a flowchart explaining the index data update operation | movement of the information processing system as the 2nd Embodiment of this invention. 本発明の第2の実施の形態において、索引更新前に分散KVSに格納されている情報の一例を模式的に説明する図である。In the 2nd Embodiment of this invention, it is a figure which illustrates typically an example of the information stored in distribution KVS before index update. 本発明の第2の実施の形態において、索引更新後に分散KVSに格納されている情報の一例を模式的に説明する図である。In the 2nd Embodiment of this invention, it is a figure which illustrates typically an example of the information stored in distribution KVS after index update. 本発明の第3の実施の形態としての情報処理システムの機能ブロック図である。It is a functional block diagram of the information processing system as the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるマージルールの一例を示す図である。It is a figure which shows an example of the merge rule in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるマージルールの他の一例を示す図である。It is a figure which shows another example of the merge rule in the 3rd Embodiment of this invention. 本発明の第3の実施の形態としての情報処理システムのメッセージ抽出動作を説明するフローチャートである。It is a flowchart explaining the message extraction operation | movement of the information processing system as the 3rd Embodiment of this invention. 本発明の第3の実施の形態としての情報処理システムの索引データ更新動作を説明するフローチャートである。It is a flowchart explaining the index data update operation | movement of the information processing system as the 3rd Embodiment of this invention. 関連技術において分散KVSへの格納対象となる情報の一例を示す図である。It is a figure which shows an example of the information used as the storing object to distributed KVS in related technology. 関連技術において図19に示す情報を表すKVペアの一例を示す図である。It is a figure which shows an example of the KV pair showing the information shown in FIG. 19 in related technology. 関連技術において図20に示すKVペアに対する索引の一例を示す図である。It is a figure which shows an example of the index with respect to the KV pair shown in FIG. 20 in related technology. 関連技術において、分散配置された索引KVペアの一例を模式的に説明する図である。In related technology, it is a figure which illustrates typically an example of the index KV pair arranged in a distributed manner.

以下、本発明の実施の形態について、図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

(第1の実施の形態)
本発明の第1の実施の形態としての情報処理システム1の構成を図1に示す。図1において、情報処理システム1は、情報処理装置10と、分散ストレージシステム40とを含む。情報処理装置10は、分散ストレージシステム40と通信可能に接続される。また、情報処理装置10は、処理要求入力部11と、レコード更新部12と、メッセージ生成部13と、索引データ更新部14とを含む。分散ストレージシステム40は、複数のサーバ400によって構成される。各サーバ400は、レコード記憶部401を有する。
(First embodiment)
FIG. 1 shows the configuration of an information processing system 1 as a first embodiment of the present invention. In FIG. 1, the information processing system 1 includes an information processing apparatus 10 and a distributed storage system 40. The information processing apparatus 10 is communicably connected to the distributed storage system 40. The information processing apparatus 10 includes a processing request input unit 11, a record update unit 12, a message generation unit 13, and an index data update unit 14. The distributed storage system 40 includes a plurality of servers 400. Each server 400 includes a record storage unit 401.

ここで、情報処理システム1を構成する各装置について、そのハードウェア構成の一例を図2に示す。情報処理装置10は、CPU(Central Processing Unit)1001と、RAM(Random Access Memory)1002と、ROM(Read Only Memory)1003と、ハードディスク等の記憶装置1004とを含むコンピュータ装置によって構成可能である。また、情報処理装置10を構成するコンピュータ装置は、さらに、ネットワークインタフェース1005と、入力装置1006と、出力装置1007とを含む。また、分散ストレージシステム40に含まれる各サーバ400は、CPU4001と、RAM4002と、ROM4003と、ハードディスク等の記憶装置4004と、ネットワークインタフェース4005とを含むコンピュータ装置によって構成可能である。   Here, FIG. 2 shows an example of the hardware configuration of each device constituting the information processing system 1. The information processing apparatus 10 can be configured by a computer device including a CPU (Central Processing Unit) 1001, a RAM (Random Access Memory) 1002, a ROM (Read Only Memory) 1003, and a storage device 1004 such as a hard disk. Further, the computer device constituting the information processing apparatus 10 further includes a network interface 1005, an input device 1006, and an output device 1007. Each server 400 included in the distributed storage system 40 can be configured by a computer device including a CPU 4001, a RAM 4002, a ROM 4003, a storage device 4004 such as a hard disk, and a network interface 4005.

この場合、処理要求入力部11は、入力装置1006と、ROM1003または記憶装置1004に記憶されたコンピュータ・プログラムをRAM1002に読み込んで実行するCPU1001とによって構成される。また、レコード更新部12および索引データ更新部14は、ネットワークインタフェース1005と、ROM1003または記憶装置1004に記憶されたコンピュータ・プログラムをRAM1002に読み込んで実行するCPU1001とによって構成される。また、メッセージ生成部13は、ROM1003または記憶装置1004に記憶されたコンピュータ・プログラムをRAM1002に読み込んで実行するCPU1001によって構成される。また、分散ストレージシステム40は、各サーバ400において、CPU4001が、ROM4003または記憶装置4004に記憶されたコンピュータ・プログラムをRAM4002に読み込んで実行することによりその機能を実現する。また、レコード記憶部401は、記憶装置4004によって構成される。   In this case, the processing request input unit 11 includes an input device 1006 and a CPU 1001 that reads a computer program stored in the ROM 1003 or the storage device 1004 into the RAM 1002 and executes it. The record update unit 12 and the index data update unit 14 include a network interface 1005 and a CPU 1001 that reads a computer program stored in the ROM 1003 or the storage device 1004 into the RAM 1002 and executes it. The message generation unit 13 is configured by a CPU 1001 that reads a computer program stored in the ROM 1003 or the storage device 1004 into the RAM 1002 and executes it. The distributed storage system 40 realizes its function in each server 400 by the CPU 4001 reading the computer program stored in the ROM 4003 or the storage device 4004 into the RAM 4002 and executing it. The record storage unit 401 is configured by a storage device 4004.

なお、情報処理装置10は、サーバ400のいずれかと同一のコンピュータ装置上に実現されていてもよい。また、情報処理システム1の各装置および各機能ブロックのハードウェア構成は、上述の構成に限定されない。   Note that the information processing apparatus 10 may be realized on the same computer apparatus as any of the servers 400. The hardware configuration of each device and each functional block of the information processing system 1 is not limited to the above-described configuration.

分散ストレージシステム40は、キーおよび値からなるレコードを、複数のサーバ400のレコード記憶部401に分散して格納する。分散ストレージシステム40は、情報処理装置10からの要求に応じて、処理対象のレコードについて格納先のサーバ400を特定する。そして、分散ストレージシステム40は、特定したサーバ400において、要求された処理を実行する。   The distributed storage system 40 stores records consisting of keys and values in a distributed manner in the record storage units 401 of the plurality of servers 400. In response to a request from the information processing apparatus 10, the distributed storage system 40 specifies the storage destination server 400 for the record to be processed. Then, the distributed storage system 40 executes the requested process in the identified server 400.

次に、情報処理装置10の各機能ブロックの詳細について説明する。   Next, details of each functional block of the information processing apparatus 10 will be described.

処理要求入力部11は、キーおよび値からなるレコードに関する処理の要求を入力として取得する。ここで、レコードに関する処理とは、例えば、レコードの新規生成、更新、または、削除などの処理であってもよい。例えば、処理要求入力部11は、処理の要求内容を表す情報を、入力装置1006等から取得してもよい。   The processing request input unit 11 acquires a processing request related to a record including a key and a value as an input. Here, the process related to the record may be, for example, a process such as new generation, update, or deletion of the record. For example, the processing request input unit 11 may acquire information indicating the processing request content from the input device 1006 or the like.

レコード更新部12は、処理要求入力部11に入力された処理の要求に応じたレコードを生成する。ここで、分散ストレージシステム40では、レコードの処理に応じて、関連する索引データの更新が必要となる場合がある。そこで、レコード更新部12は、索引データの更新が必要な場合、後述のメッセージ生成部13を用いて、レコードの処理に応じた索引データの更新指示を表す索引更新メッセージを生成する。そして、レコード更新部12は、生成したレコードに索引更新メッセージを付加し、分散ストレージシステム40に格納する。   The record update unit 12 generates a record corresponding to the processing request input to the processing request input unit 11. Here, in the distributed storage system 40, there is a case where related index data needs to be updated in accordance with the record processing. Accordingly, when the index update unit 12 needs to update the index data, the record update unit 12 generates an index update message representing an index data update instruction according to the record processing, using a message generation unit 13 described later. Then, the record update unit 12 adds an index update message to the generated record and stores it in the distributed storage system 40.

メッセージ生成部13は、レコードの処理内容に応じた索引更新メッセージを生成する。前述のように、索引更新メッセージは、索引データの更新指示を表す。ここで、索引データは、索引キーおよびキーリストからなる。索引キーには、レコードに含まれる値のうち索引作成対象の値が設定される。キーリストは、その索引キーを値に含むレコードのキーのリストである。   The message generation unit 13 generates an index update message corresponding to the processing content of the record. As described above, the index update message represents an index data update instruction. Here, the index data includes an index key and a key list. Of the values included in the record, the index creation target value is set in the index key. The key list is a list of keys of records that include the index key as a value.

索引データ更新部14は、分散ストレージシステム40に格納されるレコードに含まれる索引更新メッセージを実行する。そして、索引データ更新部14は、索引更新メッセージが反映された索引データを、分散ストレージシステム40に格納する。このように、索引データ更新部14は、レコード更新部12によるレコードの処理とは非同期に、索引データの更新を実行する。索引データ更新部14は、所定のタイミング毎に動作してもよい。または、索引データ更新部14は、レコード更新部12によりレコードの処理が行われるタイミングで動作してもよい。   The index data update unit 14 executes an index update message included in a record stored in the distributed storage system 40. Then, the index data update unit 14 stores the index data in which the index update message is reflected in the distributed storage system 40. In this way, the index data update unit 14 updates the index data asynchronously with the record processing by the record update unit 12. The index data update unit 14 may operate at every predetermined timing. Alternatively, the index data update unit 14 may operate at the timing when the record update unit 12 processes the record.

以上のように構成された情報処理システム1の動作について図面を参照して説明する。   The operation of the information processing system 1 configured as described above will be described with reference to the drawings.

まず、情報処理システム1のレコード処理動作の概略を図3に示す。   First, an outline of the record processing operation of the information processing system 1 is shown in FIG.

図3では、まず、処理要求入力部11は、レコードに関する処理の要求を入力として取得する(ステップA1)。   In FIG. 3, the process request input unit 11 first acquires a process request relating to a record as an input (step A1).

次に、レコード更新部12は、ステップA1で要求された処理に応じたレコードを生成する(ステップA2)。   Next, the record update unit 12 generates a record corresponding to the process requested in Step A1 (Step A2).

次に、レコード更新部12は、ステップA1で要求された処理に応じた索引更新メッセージを、メッセージ生成部13を用いて生成する(ステップA3)。   Next, the record update unit 12 generates an index update message corresponding to the process requested in step A1 using the message generation unit 13 (step A3).

次に、レコード更新部12は、ステップA2で生成したレコードに、ステップA3で生成した索引更新メッセージを付加する(ステップA4)。   Next, the record update unit 12 adds the index update message generated in step A3 to the record generated in step A2 (step A4).

次に、レコード更新部12は、索引更新メッセージを付加したレコードを、分散ストレージシステム40に格納する(ステップA5)。   Next, the record update unit 12 stores the record added with the index update message in the distributed storage system 40 (step A5).

以上で、情報処理システム1は、レコード処理動作を終了する。   Thus, the information processing system 1 ends the record processing operation.

次に、情報処理システム1の索引データ更新動作を図4に示す。   Next, the index data update operation of the information processing system 1 is shown in FIG.

図4では、まず、索引データ更新部14は、分散ストレージシステム40に格納されたレコードに含まれる索引更新メッセージを取得する(ステップB1)。   In FIG. 4, first, the index data update unit 14 acquires an index update message included in a record stored in the distributed storage system 40 (step B1).

次に、索引データ更新部14は、索引更新メッセージを実行する。そして、索引データ更新部14は、索引更新メッセージが反映された索引データを、分散ストレージシステム40に格納する(ステップB2)。   Next, the index data update unit 14 executes an index update message. Then, the index data update unit 14 stores the index data in which the index update message is reflected in the distributed storage system 40 (step B2).

以上で、情報処理システム1は、索引データ更新動作を終了する。   Thus, the information processing system 1 ends the index data update operation.

なお、情報処理システム1は、図4に示した索引データ更新動作を、定められたタイミング毎に(例えば、所定間隔で)実行してもよい。または、情報処理システム1は、この索引データ更新動作を、図3に示したレコード処理動作の度に続けて実行してもよい。   Note that the information processing system 1 may execute the index data update operation illustrated in FIG. 4 at predetermined timings (for example, at predetermined intervals). Alternatively, the information processing system 1 may perform this index data update operation every time the record processing operation shown in FIG. 3 is performed.

次に、本発明の第1の実施の形態の効果について述べる。   Next, effects of the first exemplary embodiment of the present invention will be described.

本発明の第1の実施の形態としての情報処理システムは、分散ストレージシステムにおけるレコードおよび索引間の結果整合性をより十分にサポートすることができる。   The information processing system as the first exemplary embodiment of the present invention can more fully support eventual consistency between records and indexes in a distributed storage system.

その理由は、処理要求部に、キーおよび値からなるレコードに関する処理の要求が入力されると、メッセージ生成部が、要求された処理に応じたレコードの生成に伴う索引データの更新指示を表す索引更新メッセージを生成するからである。そして、レコード更新部が、要求された処理に応じたレコードを生成し、生成したレコードに索引更新メッセージを付加し、索引更新メッセージが付加されたレコードを分散ストレージシステムに格納するからである。また、索引データ更新部が、分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、索引更新メッセージが反映された索引データを分散ストレージシステムに格納するからである。   The reason for this is that when a processing request relating to a record consisting of a key and a value is input to the processing request section, the message generation section uses an index that indicates an index data update instruction that accompanies the generation of the record according to the requested processing. This is because an update message is generated. This is because the record update unit generates a record corresponding to the requested processing, adds an index update message to the generated record, and stores the record to which the index update message is added in the distributed storage system. Further, the index data update unit stores the index data reflecting the index update message in the distributed storage system by executing the index update message included in the record stored in the distributed storage system.

このように、本実施の形態は、レコードに、そのレコードの処理に伴う索引データの更新指示を含めて分散ストレージシステムに格納する。そして、本実施の形態は、レコードの処理とは非同期に、レコードに含めた更新指示内容にしたがって索引データの更新処理を実行する。これにより、本実施の形態は、レコードの処理後、索引データの更新が完了する前に障害が発生した場合であっても、索引データの更新指示を表す情報を失うことがなく、レコードおよび索引データ間の結果整合性を満たすことができる。   As described above, according to the present embodiment, the record is stored in the distributed storage system including the index data update instruction accompanying the processing of the record. In this embodiment, index data update processing is executed in accordance with the contents of the update instruction included in the record asynchronously with the record processing. Thus, in the present embodiment, even if a failure occurs after the record processing and before the update of the index data is completed, the information indicating the index data update instruction is not lost, and the record and the index Eventual consistency between data can be satisfied.

(第2の実施の形態)
次に、本発明の第2の実施の形態について図面を参照して詳細に説明する。本実施の形態では、本発明の分散ストレージシステムに、分散KVS(Key-Value Store)を適用した例について説明する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described in detail with reference to the drawings. In the present embodiment, an example in which distributed KVS (Key-Value Store) is applied to the distributed storage system of the present invention will be described.

まず、本発明の第2の実施の形態としての情報処理システム2の構成を図5に示す。図5において、情報処理システム2は、情報処理装置20と、分散KVS50とを含む。情報処理装置20は、分散KVS50と通信可能に接続される。また、情報処理装置20は、処理要求入力部21と、レコード更新部22と、メッセージ生成部23と、索引データ更新部24と、レコード参照部25とを含む。また、索引データ更新部24は、メッセージ抽出部241を含む。また、分散KVS50は、複数のサーバ500によって構成される。各サーバ500は、レコード記憶部501を有する。分散KVS50は、図示のサーバ500に加えて、レコードに対するトランザクションを処理するトランザクション処理装置(図示せず)や、分散KVS50の構成を管理する構成管理装置(図示せず)等を含んでいてもよい。   First, FIG. 5 shows a configuration of an information processing system 2 as a second embodiment of the present invention. In FIG. 5, the information processing system 2 includes an information processing device 20 and a distributed KVS 50. The information processing apparatus 20 is communicably connected to the distributed KVS 50. The information processing apparatus 20 includes a processing request input unit 21, a record update unit 22, a message generation unit 23, an index data update unit 24, and a record reference unit 25. The index data update unit 24 includes a message extraction unit 241. The distributed KVS 50 includes a plurality of servers 500. Each server 500 has a record storage unit 501. The distributed KVS 50 may include, in addition to the illustrated server 500, a transaction processing device (not shown) that processes transactions for records, a configuration management device (not shown) that manages the configuration of the distributed KVS 50, and the like. .

ここで、情報処理システム2の各装置および各機能ブロックは、図2を用いて説明した本発明の第1の実施の形態の各装置および各機能ブロックと同一のハードウェア要素によって構成可能である。なお、情報処理システム2の各装置および各機能ブロックのハードウェア構成は、上述の構成に限定されない。   Here, each device and each functional block of the information processing system 2 can be configured by the same hardware elements as each device and each functional block of the first embodiment of the present invention described with reference to FIG. . Note that the hardware configuration of each device and each functional block of the information processing system 2 is not limited to the above-described configuration.

また、上述のトランザクション処理装置や構成管理装置は、サーバ500と同様のハードウェア要素を備えるコンピュータ装置によって構成されていてもよい。あるいは、これらの各装置の一部または全部は、いずれかのサーバ500と同一のコンピュータ装置上に実現されていてもよい。また、情報処理装置20は、分散KVS50を構成する各装置のいずれかと同一のコンピュータ装置上に実現されていてもよい。また、分散KVS50は、各サーバ500において、CPU4001が、ROM4003または記憶装置4004に記憶されたコンピュータ・プログラムをRAM4002に読み込んで実行することによりその機能を実現する。   Further, the transaction processing device and the configuration management device described above may be configured by a computer device that includes the same hardware elements as the server 500. Alternatively, some or all of these devices may be realized on the same computer device as any server 500. Further, the information processing apparatus 20 may be realized on the same computer apparatus as any one of the apparatuses constituting the distributed KVS 50. In each server 500, the distributed KVS 50 realizes its function when the CPU 4001 reads the computer program stored in the ROM 4003 or the storage device 4004 into the RAM 4002 and executes it.

分散KVS50は、キーおよび値からなるKV(Key-Value)ペアを、複数のサーバ500のレコード記憶部501に分散して格納する。分散KVS50が格納するKVペアには、レコードKVペアと、索引KVペアとがある。レコードKVペアは、格納対象のレコードを表す。また、索引KVペアは、レコードKVペアに対する索引データを表す。以下、レコードKVペアを、単にレコードともいう。また、索引KVペアを、単に索引、または、索引データともいう。分散KVS50は、情報処理装置20からの要求に応じて、処理対象のKVペアについて格納先のサーバ500を特定する。例えば、分散KVS50は、処理対象のKVペアのキーのハッシュ値に応じて、格納先のサーバ500を特定してもよい。そして、分散KVS50は、特定したサーバ500においてそのレコードの処理を実行する。   The distributed KVS 50 distributes and stores KV (Key-Value) pairs composed of keys and values in the record storage units 501 of the plurality of servers 500. The KV pairs stored in the distributed KVS 50 include a record KV pair and an index KV pair. The record KV pair represents a record to be stored. The index KV pair represents index data for the record KV pair. Hereinafter, the record KV pair is also simply referred to as a record. The index KV pair is also simply referred to as an index or index data. The distributed KVS 50 specifies the storage destination server 500 for the KV pair to be processed in response to a request from the information processing apparatus 20. For example, the distributed KVS 50 may specify the storage destination server 500 according to the hash value of the key of the KV pair to be processed. Then, the distributed KVS 50 executes the processing of the record in the identified server 500.

なお、分散KVS50は、KVペアに関して、以下の機能を有するものとする。
・PUT処理:KVペアを分散KVS50へ格納する処理。以下、キーKおよび値VのKVペアを分散KVS50へ格納する処理を、「PUT(K,V)」とも記載する。
・GET処理:キーを指定してKVペアを分散KVS50から取得する処理。以下、キーKを持つKVペアを分散KVS50から取得して値Vを得ることを「GET(K)→V」とも記載する。
・DELETE処理:キーを指定して分散KVS50からKVペアを削除する処理。以下、キーKを持つKVペアを分散KVS50から削除することを「Delete(K)」とも記載する。
・抽出処理:分散KVS50の各サーバ500に格納されたKVペアを全件スキャンにより抽出する処理。
The distributed KVS 50 has the following functions with respect to the KV pair.
PUT process: A process of storing a KV pair in the distributed KVS 50. Hereinafter, the process of storing the KV pair of the key K and the value V in the distributed KVS 50 is also referred to as “PUT (K, V)”.
GET process: A process of acquiring a KV pair from the distributed KVS 50 by specifying a key. Hereinafter, obtaining a value V by obtaining a KV pair having the key K from the distributed KVS 50 is also referred to as “GET (K) → V”.
DELETE processing: processing for deleting a KV pair from the distributed KVS 50 by specifying a key. Hereinafter, deleting the KV pair having the key K from the distributed KVS 50 is also referred to as “Delete (K)”.
Extraction processing: processing for extracting the KV pairs stored in each server 500 of the distributed KVS 50 by scanning all cases.

次に、情報処理装置20の各機能ブロックの詳細について説明する。   Next, details of each functional block of the information processing apparatus 20 will be described.

処理要求入力部21は、レコードKVペアに関する処理の要求を入力として取得する。ここで、要求される処理は、例えば、レコードの新規生成処理、既存のレコードの更新処理、または、既存のレコードの削除処理などであってもよい。例えば、新規生成処理の要求であれば、処理要求入力部21は、新規生成するレコードKVペアのキーおよび値を入力として取得する。また、更新処理の要求であれば、処理要求入力部21は、更新対象のレコードKVペアのキーおよび更新される値を入力として取得する。また、削除処理の要求であれば、処理要求入力部21は、削除対象のレコードKVペアのキーを入力として取得する。   The process request input unit 21 acquires a process request related to the record KV pair as an input. Here, the requested process may be, for example, a new record generation process, an existing record update process, or an existing record deletion process. For example, if it is a request | requirement of a new production | generation process, the process request input part 21 will acquire as input the key and value of the record KV pair which are newly produced | generated. If the request is for an update process, the process request input unit 21 acquires the key of the record KV pair to be updated and the value to be updated as inputs. If the request is for a deletion process, the process request input unit 21 acquires the key of the record KV pair to be deleted as an input.

レコード更新部22は、処理要求入力部21に入力された処理の要求に応じたレコードKVペアを生成する。ここで、分散KVS50では、レコードKVペアの処理(新規作成・更新・削除など)に応じて、関連する索引KVペアの更新が必要となる場合がある。そこで、レコード更新部22は、索引KVペアの更新が必要な場合、後述のメッセージ生成部23を用いて、レコードKVペアの処理に応じた索引データの更新指示を表す索引更新メッセージを生成する。そして、レコード更新部22は、生成したレコードKVペアに、索引更新メッセージを付加し、分散KVS50に格納(PUT)する。   The record update unit 22 generates a record KV pair according to the processing request input to the processing request input unit 21. Here, in the distributed KVS 50, there is a case where an associated index KV pair needs to be updated in accordance with the process (new creation / update / deletion) of the record KV pair. Therefore, when the index update unit 22 needs to update the index KV pair, the record update unit 22 uses the message generation unit 23 described later to generate an index update message indicating an index data update instruction in accordance with the record KV pair processing. Then, the record update unit 22 adds an index update message to the generated record KV pair and stores (PUT) it in the distributed KVS 50.

例えば、要求された処理が新規作成または更新であれば、レコード更新部22は、該当するキーおよび値を含むレコードKVペアを生成する。また、要求された処理が削除であれば、レコード更新部22は、該当するレコードKVペアを削除することを表すレコードを生成してもよい。そのようなレコードとは、例えば、削除対象のレコードKVペアのキーと、空の値とを含むレコードであってもよい。   For example, if the requested process is new creation or update, the record update unit 22 generates a record KV pair including the corresponding key and value. Further, if the requested process is deletion, the record update unit 22 may generate a record indicating that the corresponding record KV pair is deleted. Such a record may be, for example, a record including a key of a record KV pair to be deleted and an empty value.

また、例えば、要求された処理が新規作成の場合、レコード更新部22は、該当するキーと、該当する値のうち索引作成対象となる値とを、後述のメッセージ生成部23に渡すことにより、索引更新メッセージを生成する。また、例えば、要求された処理が更新または削除であれば、レコード更新部22は、該当するキーのレコードKVペアを分散KVS50から取得(GET)する。そして、この場合、レコード更新部22は、該当するキーと、取得したレコードKVペアに含まれる索引作成対象の値と、更新の場合はその更新後の値とを、後述のメッセージ生成部23に渡すことにより、索引更新メッセージを生成する。   For example, when the requested process is newly created, the record update unit 22 passes the corresponding key and the value to be indexed among the corresponding values to the message generation unit 23 described later, Generate index update messages. For example, if the requested process is update or delete, the record update unit 22 acquires (GET) the record KV pair of the corresponding key from the distributed KVS 50. In this case, the record update unit 22 sends the corresponding key, the index creation target value included in the acquired record KV pair, and the updated value in the case of update to the message generation unit 23 described later. By passing, an index update message is generated.

メッセージ生成部23は、前述の処理要求に対応する索引KVペアの更新指示を、索引更新メッセージとして生成する。ここで、索引KVペアは、索引キーをキーとし、キーリストを値とするKVペアである。索引キーには、レコードKVペアに含まれる値のうち索引作成対象の値が設定される。キーリストは、索引キーを値に含むレコードKVペアのキーのリストである。メッセージ生成部23は、レコードKVペアの処理に応じた索引KVペアの更新指示を、索引更新メッセージとして生成する。   The message generator 23 generates an index KV pair update instruction corresponding to the processing request as an index update message. Here, the index KV pair is a KV pair having an index key as a key and a key list as a value. Of the values included in the record KV pair, the index creation target value is set in the index key. The key list is a list of keys of a record KV pair that includes an index key as a value. The message generation unit 23 generates an index KV pair update instruction corresponding to the record KV pair processing as an index update message.

例えば、要求される処理が新規作成であれば、メッセージ生成部23は、新規作成されるレコードKVペアに含まれる索引作成対象の値を索引キーとする索引KVペアに、新規作成されるレコードKVペアのキーを追加する索引更新メッセージを生成する。また、例えば、要求される処理が削除であれば、メッセージ生成部23は、削除対象のレコードKVペアに含まれる索引作成対象の値を索引キーとする索引KVペアのキーリストから、削除対象のレコードのキーを削除する索引更新メッセージを生成する。また、例えば、要求される処理が更新であれば、メッセージ生成部23は、2つの更新指示を含む索引更新メッセージを生成する。1つ目の更新指示は、更新対象のレコードKVペアに含まれる索引作成対象の値を索引キーとする索引KVペアのキーリストから、更新対象のレコードのキーを削除する処理である。2つ目の更新指示は、更新後のレコードKVペアに含まれる索引作成対象の値を索引キーとする索引KVペアのキーリストに、更新対象のレコードのキーを追加する処理である。   For example, if the requested process is newly created, the message generator 23 creates a newly created record KV in an index KV pair with the index creation target value included in the newly created record KV pair as an index key. Generate an index update message that adds a pair of keys. Also, for example, if the requested process is to be deleted, the message generator 23 deletes from the key list of the index KV pair whose index key is the index creation target value included in the record KV pair to be deleted. Generate an index update message that deletes the key of the record. Further, for example, if the requested process is update, the message generator 23 generates an index update message including two update instructions. The first update instruction is a process for deleting the key of the record to be updated from the key list of the index KV pair using the index creation target value included in the record KV pair to be updated as the index key. The second update instruction is a process of adding the key of the record to be updated to the key list of the index KV pair having the index creation target value included in the updated record KV pair as an index key.

索引更新メッセージは、更新処理の種類、宛先KVペアを特定する情報、および、追加または削除するキーをそれぞれ表す情報を含む。ここで、更新処理の種類とは、キーリストに対するキーの追加であるか削除であるかを表す情報である。ここでは、キーの追加を「Add」と表し、キーの削除を「Remove」と表すとする。また、宛先KVペアとは、操作対象となる索引KVペアを特定する情報である。ここでは、索引KVペアの索引キーが、宛先KVペアを特定する情報として適用される。また、追加または削除するキーは、宛先KVペアのキーリストに対して追加または削除するレコードKVペアのキーを表す。このような索引更新メッセージの具体例を以下に示す。ここでは、以下のレコードKVペアがあるとする。
受注1→{item1,2014−01−01}
受注2→{item2,2014−01−01}
受注3→{item3,2014−01−01}
なお、「キー→値」は、KVペアを表す。また、{値1,値2,・・・}は、レコードKVペアの値を表す。このとき、「受注1」をキーとするレコードKVペアの値の2つ目の要素に索引が設定されることを想定する。この場合、このレコードKVペアの新規生成に伴う索引更新メッセージは、
「Add 受注1 to 2014−01−01」
と表される。
The index update message includes information indicating the type of update processing, information specifying the destination KV pair, and the key to be added or deleted. Here, the type of update processing is information indicating whether a key is added to or deleted from the key list. Here, it is assumed that the addition of a key is represented as “Add” and the deletion of the key is represented as “Remove”. The destination KV pair is information for specifying an index KV pair to be operated. Here, the index key of the index KV pair is applied as information for specifying the destination KV pair. The key to be added or deleted represents the key of the record KV pair to be added to or deleted from the key list of the destination KV pair. A specific example of such an index update message is shown below. Here, it is assumed that there is the following record KV pair.
Order 1 → {item 1,204-14-01-01}
Order 2 → {item2, 2014-01-01}
Order 3 → {item3, 2014-01-01}
Note that “key → value” represents a KV pair. {Value 1, value 2,...} Represents the value of the record KV pair. At this time, it is assumed that an index is set for the second element of the value of the record KV pair with “Order 1” as a key. In this case, the index update message accompanying the new generation of this record KV pair is:
"Add order 1 to 2014-01-01"
It is expressed.

また、「受注2」とキーとするレコードKVペアの値の2つ目の要素に索引が設定されているとする。この場合、このレコードKVペアの削除に伴う索引更新メッセージは、
「Remove 受注2 from 2014−01−01」
と表される。
Further, it is assumed that an index is set for the second element of the value of the record KV pair having “Order 2” as a key. In this case, the index update message accompanying deletion of this record KV pair is
"Remove order 2 from 2014-01-01"
It is expressed.

また、「受注3」をキーとするレコードKVペアの値の2つ目の要素に索引が設定されているとする。そして、このレコードKVペアの値の2つ目の要素が、「2014−01−01」から「2014−01−02」に更新されるとする。この場合、このレコードKVペアの更新に伴う索引更新メッセージは、
「Remove 受注3 from 2014−01−01」
「Add 受注3 to 2014−01−02」
と表される。
Further, it is assumed that an index is set for the second element of the value of the record KV pair with “Order 3” as a key. Then, it is assumed that the second element of the value of this record KV pair is updated from “2014-01-01” to “2014-01-02”. In this case, the index update message accompanying the update of this record KV pair is:
"Remove order 3 from 2014-01-01"
"Add orders 3 to 2014-01-02"
It is expressed.

また、要求される処理が、分散KVS50に既に格納されているレコードKVペアに対する処理(例えば、更新や削除)である場合について説明する。この場合、レコード更新部22は、分散KVS50に格納されているレコードに既に付加されている索引更新メッセージをまず取得する。そして、レコード更新部22は、今回要求された処理に応じて生成したレコードKVペアに、既に付加されていた索引更新メッセージと、今回の処理に応じて生成された索引更新メッセージとを付加する。   A case will be described in which the requested process is a process (for example, update or deletion) for a record KV pair already stored in the distributed KVS 50. In this case, the record update unit 22 first acquires an index update message that has already been added to the record stored in the distributed KVS 50. Then, the record update unit 22 adds the index update message already added to the record KV pair generated according to the process requested this time and the index update message generated according to the current process.

ここで、レコードKVペアに対して要求される処理と、生成される索引更新メッセージと、レコード更新部22によって実行される処理との対応関係の一例を、図6に示す。図6では、「&」記号は、レコードKVペアの値と索引更新メッセージとの区切り、または、複数の索引更新メッセージ間の区切りを表す。また、「・・・」は、レコードKVペアの値に含まれる要素の省略を表す。また、「K」は、レコードKVペアのキーを表す。また、「IK」は、レコードKVペアの値のうち、索引作成対象の要素を表す。また、「IK0」は、更新前のレコードKVペアにおける索引作成対象の要素を表す。また、「PreviousMessages」は、分散KVS50からGETされたレコードKVペアに既に含まれている索引更新メッセージを表す。   Here, FIG. 6 shows an example of a correspondence relationship between the process requested for the record KV pair, the generated index update message, and the process executed by the record update unit 22. In FIG. 6, the “&” symbol represents a delimiter between the value of the record KV pair and the index update message, or a delimiter between a plurality of index update messages. "..." represents omission of an element included in the value of the record KV pair. “K” represents a key of the record KV pair. “IK” represents an index creation target element among the values of the record KV pair. “IK0” represents an index creation target element in the record KV pair before update. “PreviousMessages” represents an index update message that is already included in the record KV pair GET from the distributed KVS 50.

図6において、例えば、2行目は、キーがKのレコードKVペアにおいて、値に含まれるIK0をIKに更新する処理要求「PUT(K,{...,IK,...})」に関して説明している。この場合、この更新処理要求に対応する索引更新メッセージの1つは、更新前の索引キーIK0を持つ索引KVペアからキーKを削除する指示「Remove K from IK0」である。また、この更新処理要求に対応する索引更新メッセージのもう1つは、更新後の索引キーIKを持つ索引KVペアにキーKを追加する指示「Add K to IK」である。そして、この更新処理要求に対応して、レコード更新部22により実際に実行される処理は、まず、キーKを持つレコードKVペアに含まれる前回までの更新指示メッセージ「PreviousMessages」を取得(GET)する処理を含む。さらに、実際に実行される処理は、更新後のレコードKVペアに、「PreviousMessages」および今回の2つの更新指示メッセージを付加して格納(PUT)する処理を含む。   In FIG. 6, for example, the second line is a processing request “PUT (K, {..., IK,...})” For updating IK 0 included in the value to IK in the record KV pair with the key K. It explains about. In this case, one of the index update messages corresponding to the update processing request is an instruction “Remove K from IK0” for deleting the key K from the index KV pair having the index key IK0 before the update. Another index update message corresponding to this update processing request is an instruction “Add K to IK” for adding a key K to an index KV pair having an updated index key IK. In response to this update process request, the process actually executed by the record update unit 22 first obtains the previous update instruction message “PreviousMessages” included in the record KV pair having the key K (GET). Processing to include. Further, the process actually executed includes a process of adding (PUT) the “PreviousMessages” and the current two update instruction messages to the updated record KV pair.

また、3行目は、キーがKのレコードKVペアを削除する処理要求「Delete(K)」について説明している。この場合、この削除処理要求に対応する索引更新メッセージは、索引キーIKを持つ索引KVペアからキーKを削除する指示「Remove K from IK」を含む。また、この削除処理要求に対応して、レコード更新部22により実際に実行される処理は、まず、キーKを持つレコードKVペアに含まれる前回までの更新指示メッセージ「PreviousMessages」を取得する処理を含む。さらに、実際に実行される処理は、削除を表すレコードKVペアに、「PreviousMessages」および今回の更新指示メッセージを付加する処理を含んでいる。なお、ここでは、削除を表すレコードKVペアは、キーKおよび空の値のペアによって表されている。   The third line describes the processing request “Delete (K)” for deleting the record KV pair with the key K. In this case, the index update message corresponding to the deletion processing request includes an instruction “Remove K from IK” for deleting the key K from the index KV pair having the index key IK. Further, the processing actually executed by the record update unit 22 in response to the deletion processing request is to first acquire the update instruction message “PreviousMessages” included in the record KV pair having the key K. Including. Further, the process actually executed includes a process of adding “PreviousMessages” and the current update instruction message to the record KV pair representing the deletion. Here, the record KV pair representing deletion is represented by a key K and an empty value pair.

また、1行目は、キーがKで値がVのレコードKVペアを新規作成する処理要求「PUT(K,{...,IK,...})」に関して説明している。この場合、この新規作成処理要求に対応する索引更新メッセージは、索引キーIKを持つ索引KVペアにキーKを追加する指示「Add K to IK」を含む。また、この場合、このキーKを有するレコードKVペアは分散KVS50に格納されていない。そのため、レコード更新部22は、既に付加されている索引更新メッセージを取得する処理を行う必要がない。その結果、実際に行われる処理は、新規作成されるレコードKVペアに、今回の索引更新メッセージを付加して格納する処理となっている。   The first line describes the processing request “PUT (K, {..., IK,...})” For creating a new record KV pair with the key K and the value V. In this case, the index update message corresponding to the new creation processing request includes an instruction “Add K to IK” for adding the key K to the index KV pair having the index key IK. In this case, the record KV pair having this key K is not stored in the distributed KVS 50. Therefore, the record update unit 22 does not need to perform processing for acquiring an index update message that has already been added. As a result, the processing actually performed is processing for adding the current index update message to the newly created record KV pair and storing it.

なお、図6において、レコード更新部22は、更新処理や削除処理では、対象のレコードKVペアに対するGET操作とPUT操作とをアトミックに実行する必要がある。このため、レコード更新部22は、CAS機能を用いてもよい。   In FIG. 6, the record update unit 22 needs to atomically execute a GET operation and a PUT operation for the target record KV pair in the update process and the delete process. For this reason, the record update unit 22 may use a CAS function.

メッセージ抽出部241は、各サーバ500のレコード記憶部501に格納されたレコードから、索引更新メッセージを抽出する。例えば、メッセージ抽出部241は、分散KVS50の全件スキャン機能を利用して、索引更新メッセージを抽出してもよい。   The message extraction unit 241 extracts an index update message from the records stored in the record storage unit 501 of each server 500. For example, the message extraction unit 241 may extract the index update message using the all-case scanning function of the distributed KVS 50.

索引データ更新部24は、メッセージ抽出部241によって抽出された索引更新メッセージを実行することにより、索引更新メッセージが反映された索引データを分散KVS50に格納する。なお、索引更新メッセージの「反映」とは、索引更新メッセージの示す索引KVペアを分散KVS50から取得(GET)し、得られた索引KVペアの値(キーリスト)を更新し、更新した索引KVペアを分散KVS50に格納(PUT)することをいう。   The index data update unit 24 stores the index data that reflects the index update message in the distributed KVS 50 by executing the index update message extracted by the message extraction unit 241. The “reflecting” of the index update message means that the index KV pair indicated by the index update message is acquired (GET) from the distributed KVS 50, the value (key list) of the obtained index KV pair is updated, and the updated index KV The pair is stored (PUT) in the distributed KVS 50.

また、索引データ更新部24は、反映済の索引更新メッセージを、そのレコードKVペアから削除してもよい。なお、このとき、索引データ更新部24は、レコードKVペアの更新について、排他制御を行うことが望ましい。そのため、索引データ更新部24は、CAS機能を利用してもよい。これにより、例えば、索引データ更新部24は、「索引更新メッセージ反映前のレコードKVペアの読み取り」と、「反映済みの索引更新メッセージを削除したレコードKVペアの書き込み」とをアトミックに実行することが可能となる。   Further, the index data update unit 24 may delete the reflected index update message from the record KV pair. At this time, the index data update unit 24 desirably performs exclusive control on the update of the record KV pair. Therefore, the index data update unit 24 may use the CAS function. Thereby, for example, the index data update unit 24 atomically executes “reading of record KV pair before reflecting index update message” and “writing of record KV pair from which reflected index update message is deleted”. Is possible.

レコード参照部25は、処理要求入力部21に、レコードKVペアの参照要求が入力された場合、次のように動作するよう構成される。具体的には、レコード参照部25は、分散KVS50から、要求対象のレコードKVペアを取得する。そして、取得したレコードKVペアに索引更新メッセージが含まれる場合、レコード参照部25は、索引更新メッセージを含まない部分を出力する。つまり、レコード参照部25は、索引更新メッセージをフィルタリングしてレコードの内容を出力する。   The record reference unit 25 is configured to operate as follows when a record KV pair reference request is input to the processing request input unit 21. Specifically, the record reference unit 25 acquires the record KV pair to be requested from the distributed KVS 50. When the acquired record KV pair includes an index update message, the record reference unit 25 outputs a portion that does not include the index update message. That is, the record reference unit 25 filters the index update message and outputs the contents of the record.

以上のように構成された情報処理システム2の動作について図面を参照して説明する。   The operation of the information processing system 2 configured as described above will be described with reference to the drawings.

まず、情報処理システム2のレコード参照動作を図7に示す。   First, the record reference operation of the information processing system 2 is shown in FIG.

図7では、まず、処理要求入力部21は、レコードKVペアの参照要求を入力として取得する(ステップC1)。   In FIG. 7, the process request input unit 21 first acquires a record KV pair reference request as an input (step C1).

次に、レコード参照部25は、分散KVS50から、要求対象のレコードKVペアを取得する(ステップC2)。   Next, the record reference unit 25 acquires the record KV pair to be requested from the distributed KVS 50 (step C2).

そして、取得したレコードKVペアの値に索引更新メッセージが含まれていない場合(ステップC3でNo)、レコード参照部25は、レコードを出力する(ステップC5)。   Then, when the index update message is not included in the acquired value of the record KV pair (No in Step C3), the record reference unit 25 outputs a record (Step C5).

一方、取得したレコードKVペアの値に索引更新メッセージが含まれる場合(ステップC3でYes)、レコード参照部25は、値に含まれる索引更新メッセージをフィルタリングする(ステップC4)。   On the other hand, when the index update message is included in the value of the acquired record KV pair (Yes in step C3), the record reference unit 25 filters the index update message included in the value (step C4).

そして、レコード参照部25は、フィルタリング後のレコードを出力する(ステップC5)。   And the record reference part 25 outputs the record after filtering (step C5).

以上で、情報処理システム2は、レコード参照動作を終了する。   Thus, the information processing system 2 ends the record reference operation.

例えば、利用者は、レコード参照動作により出力されたレコードを参照することにより、レコードに対する新規作成、更新、または、削除の処理要求を入力可能である。   For example, the user can input a new creation, update, or deletion processing request for a record by referring to the record output by the record reference operation.

次に、情報処理システム2のレコード処理動作を図8に示す。   Next, the record processing operation of the information processing system 2 is shown in FIG.

図8では、まず、処理要求入力部21は、レコードKVペアに関する処理の要求を入力として取得する(ステップA11)。   In FIG. 8, the process request input unit 21 first acquires a process request related to the record KV pair as an input (step A11).

次に、情報処理システム2は、ステップA11で要求された処理の内容に応じて、処理を分岐させる。   Next, the information processing system 2 branches the process according to the content of the process requested in step A11.

ここで、ステップA11で要求された処理が、レコードKVペアの新規作成処理の場合(ステップA12で「新規作成」)について説明する。   Here, the case where the process requested in step A11 is a record KV pair new creation process ("new creation" in step A12) will be described.

この場合、レコード更新部22は、処理要求入力部21に入力されたキーおよび値を用いて、新規作成するレコードKVペアを生成する(ステップA13)。   In this case, the record update unit 22 generates a newly created record KV pair using the key and value input to the processing request input unit 21 (step A13).

次に、レコード更新部22は、メッセージ生成部23を用いて、処理要求入力部21に入力された値のうち索引作成対象の値を索引キーとする索引データに、入力されたキーを追加する索引更新メッセージを生成する(ステップA14)。   Next, the record update unit 22 uses the message generation unit 23 to add the input key to the index data having the index creation target value among the values input to the processing request input unit 21 as an index key. An index update message is generated (step A14).

次に、レコード更新部22は、生成したレコードKVペアに、生成した索引更新メッセージを付加し(ステップA15)、分散KVS50に格納する(ステップA16)。   Next, the record update unit 22 adds the generated index update message to the generated record KV pair (step A15) and stores it in the distributed KVS 50 (step A16).

一方、ステップA11で要求された処理が、レコードKVペアの更新処理の場合(ステップA12で「更新」)について説明する。   On the other hand, the case where the process requested in step A11 is a record KV pair update process ("update" in step A12) will be described.

この場合、レコード更新部22は、分散KVS50から、処理要求入力部21に入力された更新対象のキーを持つレコードKVペアを取得する(ステップA17)。   In this case, the record update unit 22 acquires a record KV pair having the update target key input to the processing request input unit 21 from the distributed KVS 50 (step A17).

次に、レコード更新部22は、ステップA17で取得したレコードKVペアに、既に付加されている索引更新メッセージがあれば取得する(ステップA18)。   Next, the record update unit 22 acquires an index update message that has already been added to the record KV pair acquired in step A17 (step A18).

次に、メッセージ生成部23は、ステップA17で取得したレコードKVペアに含まれる索引作成対象の値を索引キーとする索引KVペアから、更新対象のキーを削除する索引更新メッセージを生成する(ステップA19)。   Next, the message generation unit 23 generates an index update message for deleting the update target key from the index KV pair having the index creation target value included in the record KV pair acquired in Step A17 as an index key (Step S17). A19).

次に、情報処理システム2は、新規作成処理の場合と同様に、ステップA13〜A16の処理を実行する。ただし、更新の場合、ステップA15において、レコード更新部22は、生成したレコードKVペアに、ステップA18で取得したそれまでの索引更新メッセージと、ステップA19およびステップA14でそれぞれ生成した索引更新メッセージとを付加する。   Next, the information processing system 2 executes steps A13 to A16 as in the case of the new creation process. However, in the case of update, in step A15, the record update unit 22 adds the index update message so far acquired in step A18 and the index update message generated in step A19 and step A14 to the generated record KV pair. Append.

また、ステップA11で要求された処理がレコードKVペアの削除処理の場合(ステップA12で「削除」)について説明する。   Further, a case where the process requested in step A11 is a record KV pair deletion process (“delete” in step A12) will be described.

この場合、レコード更新部22は、分散KVS50から、処理要求入力部21に入力された削除対象のキーを持つレコードKVペアを取得する(ステップA20)。   In this case, the record update unit 22 acquires a record KV pair having the deletion target key input to the processing request input unit 21 from the distributed KVS 50 (step A20).

次に、レコード更新部22は、ステップA20で取得したレコードKVペアに、既に付加されている索引更新メッセージがあれば取得する(ステップA21)。   Next, the record update unit 22 acquires an index update message that has already been added to the record KV pair acquired in step A20 (step A21).

次に、メッセージ生成部23は、ステップA20で取得したレコードKVペアに含まれる索引作成対象の値を索引キーとする索引KVペアから、削除対象のキーを削除する索引更新メッセージを生成する(ステップA22)。   Next, the message generation unit 23 generates an index update message for deleting the deletion target key from the index KV pair having the index creation target value included in the record KV pair acquired in step A20 as an index key (step S20). A22).

次に、レコード更新部22は、削除対象のキーを用いて、該当するレコードKVペアの削除を表すレコードKVペアを生成する(ステップA23)。例えば、レコード更新部22は、前述のように、該当するキーと、空の値とからなるレコードKVペアを生成してもよい。   Next, the record update unit 22 generates a record KV pair representing deletion of the corresponding record KV pair using the key to be deleted (step A23). For example, as described above, the record update unit 22 may generate a record KV pair including a corresponding key and an empty value.

次に、情報処理システム2は、ステップA15〜A16の処理を実行する。ただし、削除の場合、ステップA15において、レコード更新部22は、ステップA23で生成したレコードKVペアに、ステップA21で取得したそれまでの索引更新メッセージと、ステップA22で生成した索引更新メッセージとを付加する。   Next, the information processing system 2 executes the processes of steps A15 to A16. However, in the case of deletion, in step A15, the record update unit 22 adds the index update message so far acquired in step A21 and the index update message generated in step A22 to the record KV pair generated in step A23. To do.

以上で、情報処理システム2は、レコード処理動作を終了する。   Thus, the information processing system 2 ends the record processing operation.

このようなレコード処理動作の具体例について説明する。ここでは、図9の受注履歴表に相当するレコードKVペアを想定する。この受注履歴表では、「受注ID」列がキーであり、「商品ID」および「受注日時」列が値である。また、「受注日時」列が、索引作成対象であるとする。   A specific example of such a record processing operation will be described. Here, a record KV pair corresponding to the order history table of FIG. 9 is assumed. In this order history table, the “order ID” column is a key, and the “product ID” and “order date” columns are values. Further, it is assumed that the “order date and time” column is an index creation target.

<新規作成処理の具体例>
処理要求入力部21に、図9の1行目の受注履歴を表すレコードKVペアの新規作成要求が入力されたとする。この新規作成要求は、図10の1行目「処理要求」に示すように、「PUT(受注1,{item1,2014−01−01})」と表される(ステップA11、A12で「新規作成」)。
<Specific example of new creation processing>
Assume that a new creation request for a record KV pair representing the order history of the first line in FIG. 9 is input to the processing request input unit 21. This new creation request is expressed as “PUT (order 1, {item 1,014-14-01})” as indicated by the “processing request” in the first line of FIG. 10 (“new” in steps A11 and A12) Create ").

この場合、レコード更新部22は、まず、新規作成するレコードKVペア(受注1,{item1、2014−01−01})を生成する(ステップA13)。   In this case, the record update unit 22 first generates a newly created record KV pair (order 1, {item 1, 2414-01-01}) (step A13).

また、この場合、2014−01−01を索引キーとする索引KVペアのキーリストに、このレコードKVペアのキー「受注1」を追加する必要がある。そこで、レコード更新部22は、メッセージ生成部23を用いて、索引KVペアへの追加指示を表す索引更新メッセージを生成する。この索引更新メッセージは、図10の1行目「索引更新メッセージ」に示すように、「Add 受注1 to 2014−01−01」と表される(ステップA14)。   In this case, it is necessary to add the key “order 1” of this record KV pair to the key list of the index KV pair whose index key is 2014-01-01. Therefore, the record update unit 22 uses the message generation unit 23 to generate an index update message representing an instruction to add to the index KV pair. This index update message is represented as “Add order 1 to 2014-01-01” as shown in the “index update message” on the first line in FIG. 10 (step A14).

そして、レコード更新部22は、ステップA13で生成したレコードKVペアに、ステップA14で生成した索引更新メッセージを追加して、分散KVS50に格納する処理を実行する。具体的には、レコード更新部22は、図10の1行目「実行される処理」に示す「PUT(受注1,{item1、2014−01−01}&Add 受注1 to 2014−01−01)」を実行する。   Then, the record update unit 22 executes a process of adding the index update message generated in step A14 to the record KV pair generated in step A13 and storing it in the distributed KVS 50. Specifically, the record updater 22 displays “PUT (Order 1, {item 1, 2414-01-01} & Add Order 1 to 2014-01-01)” shown in “Process to be executed” on the first line in FIG. ”Is executed.

<更新処理の具体例>
また、処理要求入力部21に、図9の1行目の受注履歴を表すレコードKVペアの更新処理要求が入力されたとする(ステップA11)。この更新処理要求は、図10の2行目「処理要求」に示すように、「PUT(受注1,{item1,2014−01−01})」と表される(ステップA11、A12で「更新」)。
<Specific examples of update processing>
Further, it is assumed that an update processing request for a record KV pair representing the order history of the first row in FIG. This update processing request is represented as “PUT (order 1, {item 1,014-14-01})” as shown in the second line “processing request” in FIG. 10 (“update” in steps A11 and A12). ").

ここでは、「受注1」をキーとするレコードKVペアについて、過去に、「受注日時」が「2014−01−01」から「2014−01−02」に更新される処理が既に実行されているとする。そして、ここでは、同じレコードKVペアについて、再度、「受注日時」を「2014−01−02」から「2014−01−01」に更新する処理要求が入力されたものとする。   Here, for the record KV pair with “Order 1” as a key, processing for updating “Order Date / Time” from “2014-01-01” to “2014-01-02” has been executed in the past. And Here, it is assumed that a processing request for updating the “order date / time” from “2014-01-02” to “2014-01-01” is input again for the same record KV pair.

この場合、レコード更新部22は、まず、「受注1」をキーとするレコードKVペアを、分散KVS50から取得する。ここでは、実行される処理は、「GET(受注1)」である(ステップA17)。そして、このGET処理により、「{item1、2014−01−02}&Remove 受注1 from 2014−01−01&Add 受注1 to 2014−01−02」が得られる。得られたこのレコードKVペアに付加されている「&」以降の2つの索引更新メッセージは、このレコードKVペアの前回の更新処理に伴い付加されていたものである(ステップA18)。   In this case, the record update unit 22 first acquires a record KV pair with “Order 1” as a key from the distributed KVS 50. Here, the process to be executed is “GET (Order 1)” (Step A17). Then, by this GET process, “{item 1, 1414-01-02} & Remove order 1 from 2014-01-01 & Add order 1 to 2014-01-02” is obtained. The two index update messages after “&” added to the obtained record KV pair are those added with the previous update processing of the record KV pair (step A18).

そして、今回の更新処理に伴い、「2014−01−02」を索引キーとする索引KVペアのキーリストから、このレコードKVペアのキー「受注1」を削除する必要がある。そこで、レコード更新部22は、メッセージ生成部23を用いて、図10の2行目「索引更新メッセージ」に示す1つ目の索引更新メッセージ「Remove 受注1 from 2014−01−02」を生成する(ステップA19)。   With this update process, it is necessary to delete the key “order 1” of this record KV pair from the key list of the index KV pair having “2014-01-02” as an index key. Therefore, the record update unit 22 uses the message generation unit 23 to generate the first index update message “Remove order 1 from 2014-01-02” shown in the second row “Index update message” in FIG. (Step A19).

次に、レコード更新部22は、更新後のレコードKVペア(受注1,{item1、2014−01−01})を生成する(ステップA13)。   Next, the record update unit 22 generates an updated record KV pair (order 1, {item 1, 1414-01-01}) (step A13).

また、さらに、2014−01−01を索引キーとする索引KVペアのキーリストに、このレコードKVペアのキー「受注1」を追加する必要がある。そこで、レコード更新部22は、メッセージ生成部23を用いて、図10の2行目「索引更新メッセージ」に示す2つ目の索引更新メッセージ「Add 受注1 to 2014−01−01」を生成する(ステップA14)。   Furthermore, it is necessary to add the key “order 1” of this record KV pair to the key list of the index KV pair whose index key is 2014-01-01. Therefore, the record update unit 22 uses the message generation unit 23 to generate the second index update message “Add order 1 to 2014-01-01” shown in the second line “index update message” in FIG. (Step A14).

そして、レコード更新部22は、ステップA13で生成したレコードKVペアに、ステップA18で取得された前回の2つの索引更新メッセージと、ステップA19およびA14でそれぞれ生成した今回の2つの索引更新メッセージとを付加する(ステップA15)。   Then, the record update unit 22 adds the previous two index update messages acquired in step A18 and the current two index update messages respectively generated in steps A19 and A14 to the record KV pair generated in step A13. Add (step A15).

そして、レコード更新部22は、これらの索引更新メッセージを付加したレコードKVペアを、分散KVS50に格納する(ステップA15、A16)。   Then, the record update unit 22 stores the record KV pair to which these index update messages are added in the distributed KVS 50 (steps A15 and A16).

その結果、この更新処理に伴いレコード更新部22により実行される処理は、図10の2行目「実行される処理」に示す通りとなる。   As a result, the process executed by the record update unit 22 in accordance with this update process is as shown in the “executed process” on the second line in FIG.

<削除処理の具体例>
また、処理要求入力部21に、図9の1行目に示すレコードKVペアの削除処理要求が入力されたとする。この削除処理要求は、図10の3行目「処理要求」に示すように、「DELETE(受注1)」と表される(ステップA11、A12で「削除」)。
<Specific example of deletion processing>
Further, it is assumed that a record KV pair deletion processing request shown in the first line of FIG. 9 is input to the processing request input unit 21. This deletion processing request is represented as “DELETE (order 1)” as shown in the “processing request” on the third line in FIG. 10 (“deletion” in steps A11 and A12).

この場合、レコード更新部22は、まず、「受注1」をキーとするレコードKVペアを、分散KVS50から取得する。ここでは、実行される処理は、「GET(受注1)」である(ステップA20)。そして、このGET処理により、{item1、2014−01−01}が得られたものとする。なお、ここでは、「受注1」をキーとするレコードKVペアは、それまでの索引更新メッセージを含んでいないものとする。これは、このレコードKVペアに、以前に付加されていた索引更新メッセージが反映済であるためとする。   In this case, the record update unit 22 first acquires a record KV pair with “Order 1” as a key from the distributed KVS 50. Here, the process to be executed is “GET (order 1)” (step A20). It is assumed that {item 1,204-14-01} is obtained by this GET process. Here, it is assumed that the record KV pair with “Order 1” as a key does not include the index update message so far. This is because the index update message previously added to this record KV pair is already reflected.

そして、今回の削除処理に伴い、「2014−01−01」を索引キーとする索引KVペアのキーリストから、このレコードKVペアのキー「受注1」を削除する必要がある。そこで、レコード更新部22は、メッセージ生成部23を用いて、図10の3行目「索引更新メッセージ」に示す索引更新メッセージ「Remove 受注1 from 2014−01−01」を生成する(ステップA22)
次に、レコード更新部22は、このレコードKVペアを削除することを表すレコードKVペアとして、キー「受注1」および空の値を含む(受注1,)を生成する(ステップA23)。
With this deletion process, it is necessary to delete the key “order 1” of this record KV pair from the key list of the index KV pair having “2014-01-01” as an index key. Therefore, the record update unit 22 uses the message generation unit 23 to generate the index update message “Remove order 1 from 2014-01-01” shown in the third line “Index update message” in FIG. 10 (step A22).
Next, the record updater 22 generates a key “order 1” and an empty value (order 1,) as a record KV pair indicating that this record KV pair is to be deleted (step A23).

次に、レコード更新部22は、ステップA23で生成したレコードKVペアに、ステップA22で生成した索引更新メッセージを追加して(ステップA15)、分散KVS50に格納する処理を実行する(ステップA16)。   Next, the record update unit 22 adds the index update message generated in step A22 to the record KV pair generated in step A23 (step A15), and executes the process of storing in the distributed KVS 50 (step A16).

その結果、レコード更新部22により実行される処理は、図10の3行目「実行される処理」に示す通りとなる。   As a result, the processing executed by the record update unit 22 is as shown in the third row “executed processing” in FIG.

以上で、レコード処理動作の具体例の説明を終了する。   This is the end of the description of the specific example of the record processing operation.

次に、情報処理システム2の索引データ更新動作を図11に示す。   Next, the index data update operation of the information processing system 2 is shown in FIG.

図11では、まず、メッセージ抽出部241は、分散KVS50に格納されたレコードから、索引更新メッセージを抽出する(ステップB11)。   In FIG. 11, the message extraction unit 241 first extracts an index update message from the records stored in the distributed KVS 50 (step B11).

例えば、前述のように、メッセージ抽出部241は、分散KVS50に含まれる各サーバ500のレコード記憶部501に格納された全レコードを確認(全件スキャン)することにより、含まれる索引更新メッセージを抽出してもよい。   For example, as described above, the message extraction unit 241 extracts the index update message included by confirming all the records stored in the record storage unit 501 of each server 500 included in the distributed KVS 50 (scan all cases). May be.

次に、索引データ更新部24は、ステップB11で抽出された各索引更新メッセージについて、以下のステップB12〜B19を実行する。   Next, the index data update unit 24 executes the following steps B12 to B19 for each index update message extracted in step B11.

ここで、この索引更新メッセージが、索引KVペアへのキーの追加である場合(ステップB12で「追加」)について説明する。   Here, a case where this index update message is addition of a key to the index KV pair (“add” in step B12) will be described.

この場合、索引データ更新部24は、該当する索引キーを持つ索引KVペアが分散KVS50に格納されているか否かを判断する(ステップB13)。具体的には、索引データ更新部24は、そのような索引KVペアについて、分散KVS50からの取得を試みればよい。   In this case, the index data update unit 24 determines whether or not an index KV pair having the corresponding index key is stored in the distributed KVS 50 (step B13). Specifically, the index data update unit 24 may try to acquire such an index KV pair from the distributed KVS 50.

ここで、該当する索引キーを持つKVペアがまだ無い場合(ステップB13でNo)、索引KVペアを新規作成する必要がある。この場合、索引データ更新部24は、索引更新メッセージに基づき索引KVペアを生成し(ステップB14)、分散KVS50に格納する(ステップB15)。   Here, if there is no KV pair having the corresponding index key (No in Step B13), it is necessary to create a new index KV pair. In this case, the index data update unit 24 generates an index KV pair based on the index update message (step B14) and stores it in the distributed KVS 50 (step B15).

一方、該当する索引キーを持つKVペアが既にある場合(ステップB13でYes)、索引データ更新部24は、その索引KVペアを取得する(ステップB16)。   On the other hand, when there is already a KV pair having the corresponding index key (Yes in Step B13), the index data update unit 24 acquires the index KV pair (Step B16).

そして、索引データ更新部24は、その索引KVペアの値であるキーリストに、該当するキーを追加して(ステップB17)、分散KVS50に格納する(ステップB15)。   Then, the index data update unit 24 adds the corresponding key to the key list that is the value of the index KV pair (step B17) and stores it in the distributed KVS 50 (step B15).

また、この索引更新メッセージが、索引KVペアからのキーの削除である場合(ステップB12で「削除」)について説明する。   A case where the index update message is deletion of a key from the index KV pair (“deletion” in step B12) will be described.

この場合、索引データ更新部24は、該当する索引キーを持つ索引KVペアを分散KVS50から取得する(ステップB18)。   In this case, the index data update unit 24 acquires an index KV pair having the corresponding index key from the distributed KVS 50 (step B18).

次に、索引データ更新部24は、ステップB18で得られた索引KVペアの値であるキーリストから、該当するキーを削除して(ステップB19)、分散KVS50に格納する(ステップB15)。   Next, the index data update unit 24 deletes the corresponding key from the key list that is the value of the index KV pair obtained in step B18 (step B19), and stores it in the distributed KVS 50 (step B15).

各索引更新メッセージについて上述の処理を完了すると、情報処理システム2は、索引データ更新動作を終了する。   When the above-described processing is completed for each index update message, the information processing system 2 ends the index data update operation.

次に、索引データ更新動作の具体例を図12および図13を用いて説明する。   Next, a specific example of the index data update operation will be described with reference to FIGS.

図12に示すように、この具体例では、分散KVS50は、4つのサーバ500(500a、500b、500c、および、500d)から構成される。また、サーバ500bおよび500cには、反映前の索引更新メッセージを含むレコードKVペアが格納されている。また、図12の状態では、分散KVS50には、いずれの索引KVペアもまだ格納されていないものとする。   As shown in FIG. 12, in this specific example, the distributed KVS 50 includes four servers 500 (500a, 500b, 500c, and 500d). The servers 500b and 500c store a record KV pair including an index update message before reflection. In the state of FIG. 12, it is assumed that no index KV pair has been stored in the distributed KVS 50 yet.

このとき、メッセージ抽出部241は、4つのサーバ500をスキャンし、サーバ500bおよび500cから索引更新メッセージを抽出する(ステップB11)。   At this time, the message extraction unit 241 scans the four servers 500 and extracts index update messages from the servers 500b and 500c (step B11).

まず、サーバ500bから抽出される索引更新メッセージ「Add 受注1 to 2014−01−01」について説明する。   First, the index update message “Add order 1 to 2014-01-01” extracted from the server 500b will be described.

この場合、この索引更新メッセージは「追加」である(ステップB12で「追加」)。そこで、索引データ更新部24は、索引更新メッセージ中の宛先KVペアのキー「2014−01−01」をもとに、更新対象の索引KVペアの取得を試みる。しかしながら、索引KVペアはまだ格納されておらず、取得されない(ステップB13でNo)。   In this case, the index update message is “add” (“add” in step B12). Therefore, the index data update unit 24 tries to acquire the update target index KV pair based on the key “2014-01-01” of the destination KV pair in the index update message. However, the index KV pair is not yet stored and is not acquired (No in step B13).

そこで、索引データ更新部24は、新規に索引KVペア「2014−01−01→[受注1]」を作成し、分散KVS50に格納する(ステップB14、B15)。このように、新規作成される索引ペアの索引キーには、索引更新メッセージの宛先KVペアの示す値「2014−01−01」が適用される。また、キーリストには、索引更新メッセージに含まれる追加のキー「受注1」が適用される。なお、[キー1,キー2,・・・]は、索引KVペアの値(キーリスト)を表す。   Therefore, the index data update unit 24 newly creates an index KV pair “2014-01-01 → [order 1]” and stores it in the distributed KVS 50 (steps B14 and B15). Thus, the value “2014-01-01” indicated by the destination KV pair of the index update message is applied to the index key of the newly created index pair. In addition, an additional key “order 1” included in the index update message is applied to the key list. Note that [key 1, key 2,...] Represents an index KV pair value (key list).

なお、このとき、索引データ更新部24は、反映が完了したこの索引更新メッセージを、この索引更新メッセージを含んでいたサーバ500bのレコードKVペアから削除してもよい。   At this time, the index data update unit 24 may delete the index update message that has been reflected from the record KV pair of the server 500b that includes the index update message.

次に、サーバ500cから抽出される索引更新メッセージ「Add 受注2 to 2014−01−01」について説明する。   Next, the index update message “Add order 2 to 2014-01-01” extracted from the server 500c will be described.

この場合も、この索引更新メッセージは「追加」である(ステップB12で「追加」)。そこで、索引データ更新部24は、索引更新メッセージ中の宛先KVペアのキー「2014−01−01」をもとに、更新対象の索引KVペアの取得を試みる。ここでは、「2014−01−01」を索引キーとする索引KVペア「2014−01−01→[受注1]」が既に格納されているので、取得は成功する(ステップB13でYes、ステップB16)。   Also in this case, this index update message is “add” (“add” in step B12). Therefore, the index data update unit 24 tries to acquire the update target index KV pair based on the key “2014-01-01” of the destination KV pair in the index update message. Here, since the index KV pair “2014-01-01 → [Order 1]” with “2014-01-01” as the index key has already been stored, the acquisition is successful (Yes in Step B13, Step B16). ).

次に、索引データ更新部24は、取得した索引KVペアの値であるキーリスト[受注1]に、索引更新メッセージに含まれる追加のキー「受注2」を追加して[受注1,受注2]とする。そして、索引データ更新部24は、索引KVペア「2014−01−01→[受注1,受注2]」を、分散KVS50に格納する(ステップB17、B15)。   Next, the index data update unit 24 adds an additional key “order 2” included in the index update message to the key list [order 1] which is the value of the acquired index KV pair [order 1, order 2 ]. Then, the index data update unit 24 stores the index KV pair “2014-01-01 → [order 1, order 2]” in the distributed KVS 50 (steps B17, B15).

なお、このとき、索引データ更新部24は、反映が完了したこの索引更新メッセージを、この索引更新メッセージを含んでいたサーバ500cのレコードKVペアから削除してもよい。   At this time, the index data update unit 24 may delete the index update message that has been reflected from the record KV pair of the server 500c that includes the index update message.

また、上述の「2014−01−01」をキーとする索引KVペアがサーバ500aに格納されたとする。すると、これらの索引更新メッセージ反映後の分散KVS50に格納されるKVペアは、図13に示す通りとなる。   Further, it is assumed that the index KV pair having “2014-01-01” as a key is stored in the server 500a. Then, the KV pairs stored in the distributed KVS 50 after reflecting these index update messages are as shown in FIG.

なお、本実施の形態において、情報処理装置20は、複数の索引データ更新部24を含んでもよい。この場合、複数の索引データ更新部24は、並列に動作してもよい。また、この場合、複数の索引データ更新部24は、CAS機能によりKVペア更新の排他制御を行えばよい。例えば、上記の具体例において、サーバ500bの索引更新メッセージを処理する索引データ更新部24_1と、サーバ500cの索引更新メッセージを処理する索引データ更新部24_2とが並列して動作したとする。そして、どちらの索引データ更新部24も、分散KVS50には、索引キー「2014−01−01」を持つ索引KVペアがないと判断したとする(ステップB13でNo)。そして、索引データ更新部24_1が、後続のステップB14、B15の処理(この索引KVペアを新規生成してPUTする処理)を索引データ更新部24_2よりも先に完了したことを想定する。この場合、索引データ更新部24_2の後続のステップB14、B15の処理は、失敗することになる。これは、CAS機能により、既に同じバージョンのKVペアが存在しているためである。このようにして、競合の発生により更新処理が失敗した場合、索引データ更新部24_2は、図11のステップB12からの動作を再度実行すればよい。   In the present embodiment, the information processing apparatus 20 may include a plurality of index data update units 24. In this case, the plurality of index data update units 24 may operate in parallel. In this case, the plurality of index data update units 24 may perform exclusive control of KV pair update by the CAS function. For example, in the above specific example, it is assumed that the index data update unit 24_1 that processes the index update message of the server 500b and the index data update unit 24_2 that processes the index update message of the server 500c operate in parallel. Then, it is assumed that both index data update units 24 determine that there is no index KV pair having the index key “2014-01-01” in the distributed KVS 50 (No in Step B13). Then, it is assumed that the index data update unit 24_1 has completed the processes of subsequent steps B14 and B15 (a process of newly generating this index KV pair and performing PUT) before the index data update unit 24_2. In this case, the subsequent steps B14 and B15 of the index data update unit 24_2 will fail. This is because the KV pair of the same version already exists by the CAS function. In this way, when the update process fails due to the occurrence of a conflict, the index data update unit 24_2 may execute the operation from step B12 in FIG. 11 again.

以上で、索引データ更新動作の具体例の説明を終了する。   This is the end of the description of the specific example of the index data update operation.

次に、本発明の第2の実施の形態の効果について述べる。   Next, the effect of the second exemplary embodiment of the present invention will be described.

<結果整合性・データ永続性の担保>
本発明の第2の実施の形態としての情報処理システムは、分散KVSにおけるレコードKVペアおよび索引KVペア間の結果整合性・データ永続性をより十分にサポートすることができる。
<Ensuring eventual consistency and data persistence>
The information processing system as the second exemplary embodiment of the present invention can more fully support eventual consistency and data persistence between record KV pairs and index KV pairs in distributed KVS.

その理由は、本発明の第1の実施の形態と同様の構成に加えて、レコードに関して要求される処理が、分散KVSに既に格納されているレコードに対する処理であるとき、レコード更新部が、次のように動作するよう構成されるからである。すなわち、レコード更新部は、分散KVSからレコードを取得し、取得したレコードに既に付加されている他の索引更新メッセージに加えて、今回の処理に応じた索引更新メッセージを付加するからである。   The reason is that, in addition to the configuration similar to that of the first embodiment of the present invention, when the processing required for the record is processing for a record already stored in the distributed KVS, the record update unit This is because it is configured to operate as follows. That is, the record update unit acquires a record from the distributed KVS and adds an index update message corresponding to the current process in addition to another index update message already added to the acquired record.

具体的には、レコードに関して要求される処理が、レコードの新規作成処理であるとき、メッセージ生成部は、索引キーを含む索引データのキーリストに、新規作成対象のレコードのキーを追加する索引更新メッセージを生成する。そして、レコード更新部が、新規作成したレコードに、索引更新メッセージを加えて、分散KVSに格納するからである。   Specifically, when the processing requested for a record is a new record creation process, the message generator updates the index to add the key of the record to be newly created to the index data key list including the index key. Generate a message. This is because the record update unit adds the index update message to the newly created record and stores it in the distributed KVS.

また、レコードに関して要求される処理が、分散KVSに既に格納されているレコードの削除処理であるとき、メッセージ生成部は、索引キーを含む索引データのキーリストから削除対象のレコードのキーを削除する索引更新メッセージを生成する。そして、レコード更新部が、削除対象のレコードを削除することを表すレコードに、既に付加されていた他の索引更新メッセージと、今回生成した索引更新メッセージとを加えて、分散KVSに格納するからである。   In addition, when the processing required for the record is a deletion processing for a record already stored in the distributed KVS, the message generation unit deletes the key of the record to be deleted from the index data key list including the index key. Generate index update messages. Then, the record update unit adds another index update message that has already been added to the record indicating that the record to be deleted and the index update message generated this time are added, and stores them in the distributed KVS. is there.

また、レコードに関して要求される処理が、分散KVSに既に格納されているレコードの更新処理であるとき、メッセージ生成部は、次の2つの索引更新メッセージを生成する。1つ目の索引更新メッセージは、索引作成対象の更新前の値を索引キーとして含む索引データのキーリストから、更新対象のレコードのキーを削除する指示を表す。また、2つ目の索引更新メッセージは、更新後の値を索引キーとして含む索引データのキーリストに、更新対象のレコードのキーを追加する指示を表す。そして、レコード更新部が、更新したレコードに、既に付加されていた他の索引更新メッセージと、今回生成した2つの索引更新メッセージとを加えて、分散KVSに格納するからである。   Further, when the process requested for the record is an update process for a record already stored in the distributed KVS, the message generation unit generates the following two index update messages. The first index update message represents an instruction to delete the key of the record to be updated from the key list of the index data that includes the pre-update value of the index creation target as the index key. The second index update message represents an instruction to add the key of the record to be updated to the index data key list including the updated value as the index key. This is because the record update unit adds another index update message that has already been added to the updated record and the two index update messages generated this time, and stores them in the distributed KVS.

このように、本実施の形態は、あるレコードKVペアについて、新規作成・更新・削除等の処理と非同期に行う索引データの更新指示を、該当するレコードKVペアに既に含まれている更新指示に追記して含めていく。これにより、レコードKVペアの更新から、索引KVペアの更新完了までに障害が発生した場合でも、レコードおよび索引の結果整合性を保持することができる。つまり、本実施の形態は、索引データの耐障害性を高めている。そして、本実施の形態は、整合性の担保により、結果的に、データ永続性も担保することができる。   As described above, in this embodiment, for a certain record KV pair, an index data update instruction that is performed asynchronously with processing such as new creation / update / deletion is changed to an update instruction already included in the corresponding record KV pair. Add and include. As a result, even if a failure occurs between the update of the record KV pair and the completion of the update of the index KV pair, the eventual consistency of the record and the index can be maintained. That is, this embodiment improves the fault tolerance of the index data. And this embodiment can also ensure data permanence as a result of ensuring consistency.

また、本実施の形態は、レコードKVペアに付加されている索引更新メッセージのうち、どの索引更新メッセージが反映済みであるかを記憶しなくても、索引KVペアの更新についての耐障害性を有し、レコードおよび索引の結果整合性を保持することができる。   Further, the present embodiment provides fault tolerance for updating an index KV pair without storing which index update message has been reflected among the index update messages added to the record KV pair. And can maintain eventual consistency of records and indexes.

その理由について説明する。あるレコードについて付加されている索引更新メッセージを実行中に障害が起きたとする。障害復旧後、索引データ更新部は、既に反映済の索引更新メッセージがどれであるかを判断することは難しい。しかしながら、このような場合、索引データ更新部は、レコードに付加されている索引更新メッセージを全て反映すればよい。このために、再実行されることになる索引更新メッセージがあったとしてもよい。なぜなら、本実施の形態において、各レコードKVペアに付加される索引更新メッセージは、冪等性を持つためである。   The reason will be described. Suppose a failure occurs while executing an index update message attached to a record. After the failure recovery, it is difficult for the index data update unit to determine which index update message has already been reflected. However, in such a case, the index data update unit may reflect all the index update messages added to the record. For this reason, there may be an index update message to be re-executed. This is because, in this embodiment, the index update message added to each record KV pair has idempotency.

例えば、あるレコードKVペアに、次の3つの索引更新メッセージが付加されていたとする。
a)Add 受注1 to 2014−01−01
b)Remove 受注1 from 2014−01−01
c)Add 受注1 to 2014−01−01
このとき、索引データ更新部により、下記(1)〜(3)のようにa)から順にc)まで実行された時点で、障害が発生したとする。
(1)a)を実行:Add 受注1 to 2014−01−01
(2)b)を実行:Remove 受注1 from 2014−01−01
(3)c)を実行:Add 受注1 to 2014−01−01
そして、障害復旧後、このレコードKVペアに依然として索引更新メッセージa)〜c)が付加されたままであるため、索引データ更新部が、下記(4)〜(6)のように再度a)から順にc)まで実行したとする。
(4)a)を実行:Add 受注1 to 2014−01−01
(5)b)を実行:Remove 受注1 from 2014−01−01
(6)c)を実行:Add 受注1 to 2014−01−01
ここで、上記(3)および(4)の索引更新メッセージでは、同一の宛先KVペアに対して、同一の値を追加(Add)する指示が記載されている。しかしながら、(3)の次に(4)が実行されたとしても、既に登録されている値を同じ値で上書きしようとするだけであるため、問題は発生しない。同様に、もし、b)のようなRemoveを含む同一の索引更新メッセージが2度以上続けて実行されたとしても、既に削除済みの値を削除しようとするだけであるため、問題は発生しない。つまり、本実施の形態では、索引更新メッセージは、「Addされた索引をRemoveした後に索引更新のAddを実行する」という順に実行される。したがって、本実施の形態は、障害発生後、反映されていない可能性のあるRemoveメッセージをすべて再反映するため、不整合が発生している索引KVペアのキーリストから、不整合が発生しているキーをすべて削除することになる。そして、そのようなRemoveメッセージの後にAddメッセージを実行することで、本実施の形態は、レコードKVペアと整合性のとれた最新の索引更新メッセージを実行可能となる。
For example, assume that the following three index update messages are added to a certain record KV pair.
a) Add orders 1 to 2014-01-01
b) Remove order 1 from 2014-01-01
c) Add orders 1 to 2014-01-01
At this time, it is assumed that a failure has occurred when the index data update unit executes the processing from a) to c) in the order (1) to (3) below.
(1) Execute a): Add order 1 to 2014-01-01
(2) Execute b): Remove order 1 from 2014-01-01
(3) Execute c): Add order 1 to 2014-01-01
After the failure recovery, since the index update messages a) to c) are still added to the record KV pair, the index data update unit again starts again from a) as in the following (4) to (6). Suppose that c) is executed.
(4) Execute a): Add order 1 to 2014-01-01
(5) Execute b): Remove order 1 from 2014-01-01
(6) Execute c): Add order received 1 to 2014-01-01
Here, in the index update messages (3) and (4) above, an instruction to add (Add) the same value to the same destination KV pair is described. However, even if (4) is executed after (3), there is no problem because the existing value is only overwritten with the same value. Similarly, even if the same index update message including Remove as shown in b) is executed twice or more in succession, no problem arises because only the already deleted value is deleted. In other words, in the present embodiment, the index update message is executed in the order of “execute index update add after removing added index”. Therefore, since this embodiment re-reflects all remove messages that may not be reflected after a failure occurs, inconsistency occurs from the key list of the index KV pair where inconsistency has occurred. Will delete all existing keys. Then, by executing the Add message after such a Remove message, the present embodiment can execute the latest index update message that is consistent with the record KV pair.

このように、本実施の形態は、任意のタイミングで障害が発生しても、レコードKVペアおよび索引KVペアの結果整合性・データ永続性を確実に担保することができる。   As described above, according to the present embodiment, even if a failure occurs at an arbitrary timing, the eventual consistency and data persistence of the record KV pair and the index KV pair can be reliably ensured.

<スケールアウトによる性能改善>
さらに、本実施の形態は、分散KVSに対する検索処理時および更新処理時のスケールアウトを可能とする。
<Performance improvement by scale-out>
Furthermore, this embodiment enables scale-out at the time of search processing and update processing for distributed KVS.

その理由について述べる。本実施の形態は、レコードKVペアと索引KVペアとの結果整合性を満たしながら、索引KVペアを分散ストレージシステムに分散配置することを可能としている。これに対して、索引KVペアが分散配置されず、各サーバが、自装置に格納されるデータに対する索引データを保持している場合を考える。この場合、索引を使用した検索要求があると、全てのサーバが、自身の保持する索引を使用してデータ検索を行う必要がある。そのため、検索処理が多い場合、サーバの追加を行っても処理がスケールアウトしないという問題がある。本実施の形態では、索引KVペアを分散配置するため、索引を使用した検索実行時には、索引KVペアを保持するサーバおよびレコードKVペアを保持するサーバが処理を行えばよい。このため、本実施の形態を用いれば、分散KVSに対する検索処理の負荷が高くなった場合には、サーバを追加することで、スケールアウトによる性能改善が可能となる。   The reason is described. In the present embodiment, it is possible to distribute the index KV pairs in the distributed storage system while satisfying the eventual consistency between the record KV pair and the index KV pair. On the other hand, consider a case where index KV pairs are not distributed and each server holds index data for data stored in its own device. In this case, if there is a search request using an index, all servers need to search for data using the index held by the server. Therefore, when there are many search processes, there is a problem that the process does not scale out even if a server is added. In this embodiment, since index KV pairs are distributedly arranged, a server holding an index KV pair and a server holding a record KV pair may perform processing when executing a search using an index. For this reason, if the load of the search process with respect to distributed KVS becomes high if this Embodiment is used, the performance improvement by a scale-out will be attained by adding a server.

同様に、レコードKVペアの更新についても、本実施の形態は、スケールアウトによる性能改善を可能とする。ここで、分散KVSは、適切なデータ粒度のKVペアを更新・参照することで処理のスケールアウトが可能となっている。本発明の方法においても、データの更新・参照の粒度はKVペアである。したがって、本実施の形態は、レコードKVペアの更新・参照について、分散KVSと同等のスケールアウト特性を持つことになる。   Similarly, for the update of the record KV pair, the present embodiment enables performance improvement by scale-out. Here, the distributed KVS can scale out the processing by updating and referring to a KV pair having an appropriate data granularity. Also in the method of the present invention, the granularity of data update / reference is KV pairs. Therefore, this embodiment has a scale-out characteristic equivalent to the distributed KVS for updating / referencing the record KV pair.

また、仮に、各サーバが自装置に格納されるレコードに関して索引データを保持する場合を考える。この場合、サーバの追加のたびに、レコードの再配置に加えて、索引の再構築処理が必要となってしまう。これに対して、本実施の形態は、索引データを分散配置するため、サーバ追加の際に、索引データの再構築を必要とせず、レコードKVペアおよび索引KVペアの再配置を行えばよい。   Also, suppose that each server holds index data regarding records stored in its own device. In this case, every time a server is added, in addition to the rearrangement of records, an index rebuilding process is required. On the other hand, in this embodiment, since index data is distributedly arranged, it is only necessary to re-arrange the record KV pair and the index KV pair without requiring the reconstruction of the index data when adding a server.

<データ更新の制御に関する処理の効率化>
さらに、本実施の形態は、データ更新の制御に関する処理を効率化する。
<Efficient processing related to data update control>
Furthermore, the present embodiment increases the efficiency of processing related to data update control.

その理由は、本実施の形態は、データ更新の際に、複数のKVペアを同一トランザクションで更新することがない。複数のKVペアを同一トランザクションで実行すると、制御が複雑になることから処理の遅延(TAT:Turn Around Time)が発生する。しかしながら、本実施の形態は、レコードKVペアの処理時も、それに伴う索引KVペアの処理時も、それぞれ、更新対象となるKVペアは1つである。したがって、本実施の形態は、トランザクション制御に伴う処理の遅延を少なくすることができる。   This is because the present embodiment does not update a plurality of KV pairs with the same transaction when updating data. When a plurality of KV pairs are executed in the same transaction, processing becomes complicated (TAT: Turn Around Time) due to complicated control. However, in the present embodiment, there is one KV pair to be updated, both when processing a record KV pair and when processing an associated index KV pair. Therefore, this embodiment can reduce the processing delay associated with transaction control.

なお、本実施の形態において、索引データ更新部は、キーリストが空になった索引KVペアを、分散KVSから削除してもよい。また、索引更新メッセージを削除することにより値が空になったレコードKVペアを、分散KVSから削除してもよい。   In the present embodiment, the index data update unit may delete the index KV pair whose key list is empty from the distributed KVS. Further, a record KV pair whose value is emptied by deleting the index update message may be deleted from the distributed KVS.

また、本実施の形態は、索引更新メッセージを、レコードKVペアの値に含めている。したがって、本実施の形態は、索引更新メッセージを含むレコードKVペアを通常のKVペアであるとみなせば、特許文献1に記載された複数のKVペア群をアトミックに更新する技術と組み合わせて実施することも可能である。   In this embodiment, the index update message is included in the value of the record KV pair. Therefore, in the present embodiment, if a record KV pair including an index update message is regarded as a normal KV pair, it is implemented in combination with a technique for atomically updating a plurality of KV pair groups described in Patent Document 1. It is also possible.

また、本実施の形態は、索引KVペアが肥大化した場合に、「特願2013−203790号公報」に記載の技術を用いて、各索引KVペアを複数のKVペアに分割してもよい。そして、この場合、分割された各索引KVペアを、分散KVS上に分散配置すればよい。   In the present embodiment, when the index KV pair is enlarged, each index KV pair may be divided into a plurality of KV pairs using the technique described in Japanese Patent Application No. 2013-203790. . In this case, the divided index KV pairs may be distributed on the distributed KVS.

(第3の実施の形態)
次に、本発明の第3の実施の形態について図面を参照して詳細に説明する。本実施の形態では、本発明の第2の実施の形態と同様に、本発明の分散ストレージシステムとして、分散KVSを適用した例について説明する。
(Third embodiment)
Next, a third embodiment of the present invention will be described in detail with reference to the drawings. In the present embodiment, an example in which a distributed KVS is applied as a distributed storage system of the present invention will be described as in the second embodiment of the present invention.

まず、本発明の第3の実施の形態としての情報処理システム3の構成を図14に示す。図14において、情報処理システム3は、情報処理装置30と、分散KVS60とを含む。情報処理装置30は、分散KVS60と通信可能に接続される。また、情報処理装置30は、本発明の第2の実施の形態としての情報処理装置20に対して、索引データ更新部24に替えて索引データ更新部34を備え、さらに、メッセージ記憶部36と、メッセージマージ部37とを備える点が異なる。なお、メッセージ記憶部36は、本発明のメッセージマージ部の一部の一実施形態を構成する。分散KVS60は、複数のサーバ600によって構成される。各サーバ600は、本発明の第2の実施の形態としてのサーバ500と同一のレコード記憶部501に加えて、メッセージ抽出部602を有する。   First, FIG. 14 shows the configuration of an information processing system 3 as a third embodiment of the present invention. In FIG. 14, the information processing system 3 includes an information processing device 30 and a distributed KVS 60. The information processing apparatus 30 is communicably connected to the distributed KVS 60. Further, the information processing device 30 includes an index data update unit 34 instead of the index data update unit 24 with respect to the information processing device 20 as the second embodiment of the present invention, and further includes a message storage unit 36 and The message merging unit 37 is different. The message storage unit 36 constitutes one embodiment of a part of the message merge unit of the present invention. The distributed KVS 60 is composed of a plurality of servers 600. Each server 600 includes a message extraction unit 602 in addition to the same record storage unit 501 as the server 500 according to the second embodiment of the present invention.

ここで、情報処理システム3の各装置および各機能ブロックは、図2を用いて説明した本発明の第1の実施の形態の各装置および各機能ブロックと同一のハードウェア要素によって構成可能である。なお、情報処理システム3の各装置および各機能ブロックのハードウェア構成は、上述の構成に限定されない。   Here, each device and each functional block of the information processing system 3 can be configured by the same hardware elements as each device and each functional block of the first embodiment of the present invention described with reference to FIG. . Note that the hardware configuration of each device and each functional block of the information processing system 3 is not limited to the above-described configuration.

分散KVS60は、本発明の第2の実施の形態における分散KVS50と同様に、キーおよび値からなるKVペアを、複数のサーバ600のレコード記憶部501に分散して格納する。   Similar to the distributed KVS 50 in the second embodiment of the present invention, the distributed KVS 60 distributes and stores KV pairs composed of keys and values in the record storage units 501 of the plurality of servers 600.

各サーバ600のメッセージ抽出部602は、自装置に格納されるレコードKVペアから、索引更新メッセージを抽出する。そして、メッセージ抽出部602は、抽出した索引更新メッセージを、情報処理装置30のメッセージ記憶部36に送信する。   The message extraction unit 602 of each server 600 extracts the index update message from the record KV pair stored in its own device. Then, the message extraction unit 602 transmits the extracted index update message to the message storage unit 36 of the information processing device 30.

具体的には、メッセージ抽出部602は、所定のタイミングで、自装置に格納されるレコードKVペアから索引更新メッセージを抽出する。所定のタイミングとは、例えば、所定間隔毎であってもよい。また、所定のタイミングとは、自装置に対してレコードKVペアが格納されるタイミングであってもよい。   Specifically, the message extraction unit 602 extracts an index update message from a record KV pair stored in the own device at a predetermined timing. The predetermined timing may be, for example, every predetermined interval. The predetermined timing may be a timing at which the record KV pair is stored in the own device.

例えば、所定間隔毎に、メッセージ抽出部602が動作する場合について説明する。この場合、メッセージ抽出部602は、自装置のレコード記憶部501に既に格納されているレコードKVペアのうち、まだ索引更新メッセージの抽出が済んでいないレコードKVペア(未抽出のレコードKVペア)から、索引更新メッセージを抽出する。例えば、メッセージ抽出部602は、自装置のトランザクションログを参照することにより、ある時点(例えば、前回抽出を行った時点)以降に自装置に格納(PUT)された未抽出のレコードKVペアを特定可能である。あるいは、メッセージ抽出部602は、自装置に対するレコードKVペアの格納(PUT)時刻に関するローカルな索引を有することにより、ある時点以降に自装置に格納(PUT)された未抽出のレコードKVペアを特定可能である。メッセージ抽出部602は、このようにして特定した未抽出のレコードKVペアから、索引更新メッセージを抽出すればよい。この場合、メッセージ抽出部602は、索引更新メッセージを抽出後のレコードKVペアから、索引更新メッセージを除いたレコードKVペアを再構築して、レコード記憶部501に格納してもよい。   For example, a case where the message extraction unit 602 operates at predetermined intervals will be described. In this case, the message extraction unit 602 starts from the record KV pair (unextracted record KV pair) from which the index update message has not been extracted yet among the record KV pairs already stored in the record storage unit 501 of the own device. Extract index update messages. For example, the message extraction unit 602 identifies an unextracted record KV pair stored (PUT) in the own device after a certain time (for example, the time of previous extraction) by referring to the transaction log of the own device. Is possible. Alternatively, the message extraction unit 602 has a local index related to the storage (PUT) time of the record KV pair for the own device, thereby identifying the unextracted record KV pair stored (PUT) in the own device after a certain time point. Is possible. The message extraction unit 602 may extract an index update message from the unextracted record KV pair specified in this way. In this case, the message extraction unit 602 may reconstruct the record KV pair obtained by removing the index update message from the record KV pair after extracting the index update message, and store it in the record storage unit 501.

あるいは、自装置に対してレコードKVペアが格納されるタイミングで、メッセージ抽出部602が動作する場合について説明する。この場合、メッセージ抽出部602は、自装置にレコードKVペアが格納(PUT)されるタイミングで、そのレコードKVペアから索引更新メッセージを抽出してもよい。この場合、メッセージ抽出部602は、格納対象のレコードKVペアから索引更新メッセージを抽出後、索引更新メッセージを除いたレコードKVペアを再構築してレコード記憶部501に格納するようにしてもよい。この場合、レコード記憶部501に格納されるレコードKVペアは、全て索引更新メッセージが抽出され除かれた後のものとなる。したがって、この場合、レコード参照部25からの参照要求により分散KVS60から応答するレコードKVペアに、索引更新メッセージが含まれることがなくなる。その結果、情報処理装置30および分散KVS60間のネットワーク負荷が軽減される。   Or the case where the message extraction part 602 operate | moves at the timing when the record KV pair is stored with respect to an own apparatus is demonstrated. In this case, the message extraction unit 602 may extract the index update message from the record KV pair at the timing when the record KV pair is stored (PUT) in the own device. In this case, the message extraction unit 602 may extract the index update message from the record KV pair to be stored, and then reconstruct the record KV pair excluding the index update message and store it in the record storage unit 501. In this case, the record KV pairs stored in the record storage unit 501 are all after the index update message is extracted and removed. Therefore, in this case, the index update message is not included in the record KV pair that responds from the distributed KVS 60 in response to the reference request from the record reference unit 25. As a result, the network load between the information processing apparatus 30 and the distributed KVS 60 is reduced.

情報処理装置30のメッセージ記憶部36は、分散KVS60の各サーバ600から送信される索引更新メッセージを記憶する。なお、メッセージ記憶部36は、同一のレコードKVペアに付加されていた索引更新メッセージについては、付加された順序を保持して記憶するものとする。また、メッセージ記憶部36は、抽出された索引更新メッセージを、該索引更新メッセージが付加されていたレコードKVペアを特定する情報(キー等)と共に記憶してもよい。   The message storage unit 36 of the information processing apparatus 30 stores the index update message transmitted from each server 600 of the distributed KVS 60. Note that the message storage unit 36 stores and stores the index update messages added to the same record KV pair in the order of addition. Further, the message storage unit 36 may store the extracted index update message together with information (such as a key) that identifies the record KV pair to which the index update message has been added.

メッセージマージ部37は、メッセージ記憶部36に記憶されている索引更新メッセージをマージする。マージとは、複数の索引更新メッセージを、より少ない数の索引更新メッセージに簡略化することをいうものとする。メッセージマージ部37は、マージ後の索引更新メッセージが、マージ前の索引更新メッセージと同等の結果をもたらすようマージを行う。   The message merge unit 37 merges the index update messages stored in the message storage unit 36. Merging refers to simplifying multiple index update messages into a smaller number of index update messages. The message merging unit 37 performs merging so that the index update message after merging yields the same result as the index update message before merging.

例えば、メッセージマージ部37は、1つのレコードKVペアに付加されていた複数の索引更新メッセージをマージしてもよい。また、メッセージマージ部37は、複数のレコードにそれぞれ付加されていた索引更新メッセージをマージしてもよい。具体的には、メッセージマージ部37は、複数のレコードKVペアにそれぞれ付加されていた索引更新メッセージのうち、同一の索引KVペアに関する索引更新メッセージをマージしてもよい。ここで、メッセージ記憶部36には、複数のレコードKVペアから抽出された索引更新メッセージが記憶されている。そこで、メッセージマージ部37は、メッセージ記憶部36に記憶された索引更新メッセージのうち、同一の索引KVペアに関する索引更新メッセージを抽出し、そのうち、マージ可能なものをマージすればよい。   For example, the message merge unit 37 may merge a plurality of index update messages added to one record KV pair. Further, the message merge unit 37 may merge the index update messages added to the plurality of records, respectively. Specifically, the message merge unit 37 may merge index update messages related to the same index KV pair among index update messages added to the plurality of record KV pairs. Here, the message storage unit 36 stores index update messages extracted from a plurality of record KV pairs. Therefore, the message merge unit 37 may extract index update messages related to the same index KV pair from among the index update messages stored in the message storage unit 36 and merge those that can be merged.

例えば、メッセージマージ部37は、以下のようなマージルールにしたがって、索引更新メッセージをマージする。   For example, the message merge unit 37 merges the index update messages according to the following merge rule.

<1つのレコードKVペアに含まれる複数の索引更新メッセージのマージルール>
同一のレコードKVペアに含まれる複数の索引更新メッセージのマージルールを、図15に示す。図15において、各行は、それぞれマージルールを表す。また、「...1」、「...2」、および、「...3」は、その位置に、0個以上の索引更新メッセージが配置されていることを表す。
<Merge rule of multiple index update messages included in one record KV pair>
FIG. 15 shows a merge rule for a plurality of index update messages included in the same record KV pair. In FIG. 15, each row represents a merge rule. Further, “... 1”, “... 2”, and “... 3” indicate that zero or more index update messages are arranged at the positions.

ここで、索引更新メッセージには、以下の種類がある。
・登録メッセージ:ある索引KVペアに、あるレコードのキーを追加(Add)する索引更新メッセージ
・削除メッセージ:ある索引KVペアから、あるレコードのキーを削除(Delete)する索引更新メッセージ
図15において、1行目のマージルールは、同一の索引KVペアに対する同一キーの登録メッセージが複数回出現する場合に、それらを1つの登録メッセージにマージするルールを表している。これは、ある索引KVペアに対して、同一キーの登録メッセージを何度反映しても、そのキーが1つ登録された状態にしかならないからである。
Here, there are the following types of index update messages.
Registration message: Index update message for adding (Add) a key of a record to a certain index KV pair Deletion message: Index update message for deleting (Delete) a key of a record from a certain index KV pair In FIG. The merge rule in the first line represents a rule for merging them into one registration message when registration messages with the same key for the same index KV pair appear multiple times. This is because no matter how many times the registration message of the same key is reflected for a certain index KV pair, only one key is registered.

また、2行目のマージルールは、同一の索引KVペアに対する同一キーの削除メッセージが複数回出現する場合に、それらを1つの削除メッセージにマージするルールを表している。これは、ある索引KVペアに対して、同一キーの削除メッセージを何度反映しても、そのキーが削除された状態にしかならないからである。   The merge rule in the second row represents a rule for merging them into one deletion message when a deletion message of the same key for the same index KV pair appears multiple times. This is because no matter how many times the deletion message of the same key is reflected for a certain index KV pair, the key is only deleted.

また、3行目のマージルールは、同一の索引KVペアに対する同一キーの登録メッセージおよび削除メッセージがこの順に出現する場合、その両方の索引更新メッセージを省略するルールを表す。すなわち、このマージルールは、「一度登録した索引データを取り下げる」という処理を、「そもそも何の処理もなかった」という処理に置き換えるルールを表している。   Further, the merge rule in the third row represents a rule that omits both index update messages when a registration message and a deletion message of the same key for the same index KV pair appear in this order. That is, this merge rule represents a rule that replaces the process of “withdrawing index data once registered” with the process of “no processing at all”.

また、4行目のマージルールは、同一の索引KVペアに対する同一キーの削除メッセージおよび登録メッセージがこの順に出現する場合、1つの登録メッセージにマージするルールを表す。   The merge rule on the fourth line represents a rule for merging into one registration message when a deletion message and registration message of the same key for the same index KV pair appear in this order.

これらのマージルールからわかるように、同一の索引KVペアに対する同一キーについての索引更新メッセージの反映では、それらの出現回数や出現順序に関わらず、最終的には、そのキーが「登録」された状態または「削除」された状態にしかならない。そして、その状態は、そのような索引更新メッセージのうち最後に実行された索引更新メッセージにより作り出されるものである。したがって、これらの1〜4行目のマージルールは、同一の索引KVペアに対して同一キーについて複数回出現する登録メッセージおよび削除メッセージを、そのうち最後に出現した索引更新メッセージ1つに簡略化すればよいことを表している。   As can be seen from these merge rules, in the reflection of the index update message for the same key for the same index KV pair, the key is finally “registered” regardless of the number of appearances and the order of appearance. It can only be in a state or "deleted" state. The state is created by the index update message executed last among such index update messages. Therefore, these merge rules in the first to fourth lines simplify a registration message and a deletion message that appear multiple times for the same key for the same index KV pair into one index update message that appears last. It represents what should be done.

<複数のレコードKVペアに含まれる索引更新メッセージのマージルール>
また、複数のレコードKVペアにそれぞれ付加されていた索引更新メッセージのマージルールを、図16に示す。図16において、各行は、それぞれマージルールを表す。また、「...1」、「...2」、および、「...3」は、その位置に、0個以上の索引更新メッセージが配置されていることを表す。図16において、1、2行目の各マージルールは、同一の索引KVペアに対する異なるキーに関する複数の登録メッセージを、1度に複数のキーを登録する1つの登録メッセージにマージすることを表している。また、3、4行目の各マージルールは、同一の索引KVペアに対する異なるキーに関する複数の削除メッセージを、1度に複数のキーを削除する1つの削除メッセージにマージすることを表している。
<Merge rule for index update messages included in multiple record KV pairs>
In addition, FIG. 16 shows merge rules for index update messages respectively added to a plurality of record KV pairs. In FIG. 16, each row represents a merge rule. Further, “... 1”, “... 2”, and “... 3” indicate that zero or more index update messages are arranged at the positions. In FIG. 16, each merge rule in the first and second lines indicates that a plurality of registration messages related to different keys for the same index KV pair are merged into one registration message for registering a plurality of keys at a time. Yes. Each merge rule in the third and fourth lines represents that a plurality of deletion messages related to different keys for the same index KV pair are merged into one deletion message for deleting a plurality of keys at a time.

索引データ更新部34は、メッセージマージ部37によりマージされた索引更新メッセージを実行する。これにより、索引データ更新部34は、マージされた索引更新メッセージが反映された索引データを、分散KVS60に格納する。   The index data update unit 34 executes the index update message merged by the message merge unit 37. Thereby, the index data update unit 34 stores the index data in which the merged index update message is reflected in the distributed KVS 60.

以上のように構成された情報処理システム3の動作について図面を参照して説明する。なお、情報処理システム3のレコード参照動作およびレコード処理動作については、図7および図8を用いて説明した本発明の第2の実施の形態と同様であるため、本実施の形態における説明を省略する。   The operation of the information processing system 3 configured as described above will be described with reference to the drawings. Note that the record reference operation and the record processing operation of the information processing system 3 are the same as those in the second embodiment of the present invention described with reference to FIGS. To do.

まず、情報処理システム3のメッセージ抽出動作を、図17に示す。   First, the message extraction operation of the information processing system 3 is shown in FIG.

図17では、まず、サーバ600において、メッセージ抽出部602は、自装置に格納されるレコードKVペアのうち、まだメッセージ抽出処理が完了していない未抽出のレコードKVペアから、索引更新メッセージを抽出する(ステップB31)。   In FIG. 17, first, in the server 600, the message extraction unit 602 extracts an index update message from unrecorded record KV pairs for which message extraction processing has not yet been completed, among record KV pairs stored in its own device. (Step B31).

次に、メッセージ抽出部602は、抽出した索引更新メッセージを、情報処理装置30のメッセージ記憶部36に送信する(ステップB32)。これにより、情報処理装置30のメッセージ記憶部36には、各サーバ600から抽出された索引更新メッセージが記憶される。   Next, the message extraction unit 602 transmits the extracted index update message to the message storage unit 36 of the information processing apparatus 30 (step B32). As a result, the index update message extracted from each server 600 is stored in the message storage unit 36 of the information processing apparatus 30.

以上の動作を、各サーバ600のメッセージ抽出部602は、所定のタイミングで実行する。例えば、前述のように、各メッセージ抽出部602は、所定間隔毎に、または、自装置にレコードKVペアが格納されるタイミング等で、上述の動作を行ってもよい。また、前述のように、各メッセージ抽出部602は、索引更新メッセージ抽出後、抽出した索引更新メッセージを除いたレコードKVペアを再構築して、分散KVS60に格納してもよい。   The message extraction unit 602 of each server 600 executes the above operation at a predetermined timing. For example, as described above, each message extraction unit 602 may perform the above-described operation at a predetermined interval or at a timing when the record KV pair is stored in the own device. Further, as described above, each message extraction unit 602 may reconstruct the record KV pair excluding the extracted index update message after extracting the index update message, and store it in the distributed KVS 60.

次に、情報処理システム3の索引データ更新動作を、図18に示す。   Next, the index data update operation of the information processing system 3 is shown in FIG.

図18では、まず、メッセージマージ部37は、メッセージ記憶部36に記憶されている索引更新メッセージをマージする(ステップB41)。   In FIG. 18, first, the message merge unit 37 merges the index update messages stored in the message storage unit 36 (step B41).

例えば、メッセージマージ部37は、同一のレコードKVペアから抽出された複数の索引更新メッセージを、図15に示したマージルールを用いてマージする。この場合、同一の索引KVペアに対して冪等性を有する複数回の索引更新メッセージが簡略化される。また、例えば、メッセージマージ部37は、複数のレコードKVペアから抽出された索引更新メッセージを、図16に示したマージルールを用いてマージする。この場合、同一の索引KVペアに対する異なるキーに関する複数の索引更新メッセージが、複数キーについて1度に更新を行う1つの索引更新メッセージにマージされる。   For example, the message merge unit 37 merges a plurality of index update messages extracted from the same record KV pair using the merge rule shown in FIG. In this case, multiple index update messages having idempotency for the same index KV pair are simplified. For example, the message merge unit 37 merges index update messages extracted from a plurality of record KV pairs using the merge rule shown in FIG. In this case, a plurality of index update messages related to different keys for the same index KV pair are merged into one index update message for updating the plurality of keys at a time.

次に、索引データ更新部34は、ステップB41でマージされた索引更新メッセージを実行する(ステップB42)。なお、このステップにおいて、索引データ更新部34は、マージ後の各索引更新メッセージについて、図11を参照して説明した本発明の第2の実施の形態におけるB12〜B19と同様に動作すればよい。   Next, the index data update unit 34 executes the index update message merged in step B41 (step B42). In this step, the index data update unit 34 may operate for each index update message after merging in the same manner as B12 to B19 in the second embodiment of the present invention described with reference to FIG. .

以上で、情報処理システム3は、索引データ更新動作を終了する。   Thus, the information processing system 3 ends the index data update operation.

なお、このような索引データ更新動作を、情報処理装置30は、定められたタイミング毎に実行する。例えば、情報処理装置30は、メッセージ記憶部36に新たに索引更新メッセージが追加される度に、ステップB41からの動作を開始してもよい。あるいは、情報処理装置30は、所定間隔毎に、ステップB41からの動作を開始してもよい。また、メッセージマージ部37は、ステップB41を実行後、マージ前の索引更新メッセージをメッセージ記憶部36から削除してもよい。そして、メッセージマージ部37は、マージ後の索引更新メッセージをメッセージ記憶部36に記憶しておけばよい。また、索引データ更新部34は、メッセージマージ部37の動作と異なるタイミングで、メッセージ記憶部36に記憶されたマージ後の索引更新メッセージについて、ステップB42の動作を実行してもよい。また、索引データ更新部34は、反映済の索引更新メッセージを、メッセージ記憶部36から削除してもよい。   Note that the information processing apparatus 30 executes such an index data update operation at every predetermined timing. For example, the information processing apparatus 30 may start the operation from step B41 each time an index update message is newly added to the message storage unit 36. Alternatively, the information processing apparatus 30 may start the operation from step B41 at predetermined intervals. Further, the message merge unit 37 may delete the index update message before merging from the message storage unit 36 after executing Step B41. The message merging unit 37 may store the merged index update message in the message storage unit 36. Further, the index data update unit 34 may execute the operation of step B42 on the merged index update message stored in the message storage unit 36 at a timing different from the operation of the message merge unit 37. In addition, the index data update unit 34 may delete the reflected index update message from the message storage unit 36.

以上の動作を、具体例を用いて、本発明の第2の実施の形態と比較しながら説明する。   The above operation will be described using a specific example while comparing with the second embodiment of the present invention.

例えば、メッセージ記憶部36に、以下の2つの索引更新メッセージAおよびBが記憶されていたとする。
A)&Add 受注1 to 2014−01−01
B)&Add 受注2 to 2014−01−01
なお、索引更新メッセージAは、「受注1」をキーとするレコードKVペアに付加されていたものである。また、索引更新メッセージBは、「受注2」をキーとするレコードKVペアに付加されていたものである。
For example, assume that the following two index update messages A and B are stored in the message storage unit 36.
A) & Add orders 1 to 2014-01-01
B) & Add orders 2 to 2014-01-01
The index update message A is added to the record KV pair with “Order 1” as a key. Further, the index update message B is added to the record KV pair with “Order 2” as a key.

このとき、本発明の第2の実施の形態では、索引データ更新部24は、1つの索引KVペアに対して、以下4回のデータ操作(GET/PUT2回ずつ)を実行していた。
GET(2014−01−01)→[ ]
PUT(2014−01−01,[受注1])
GET(2014−01−01)→[受注1]
PUT(2014−01−01,[受注1,受注2])
なお、[キー1,キー2,・・・]は、索引KVペアの値(キーリスト)を表す。
At this time, in the second embodiment of the present invention, the index data update unit 24 performs the following four data operations (GET / PUT twice) for one index KV pair.
GET (2014-01-01) → []
PUT (2014-01-01, [Order 1])
GET (2014-01-01)-> [Order 1]
PUT (2014-01-01, [Order 1, Order 2])
Note that [key 1, key 2,...] Represents an index KV pair value (key list).

これに対して、本実施の形態では、メッセージマージ部37が、上述の2つの索引更新メッセージAおよびBを、以下の1つの索引更新メッセージCにマージする。つまり、同一の宛先KVペアに対する複数の索引更新メッセージが、1つの索引更新メッセージにマージされる。
C)&Add 受注1,受注2 to 2014−01−01
すると、本実施の形態では、索引データ更新部34は、1つの索引KVペアに対して、以下の2回のデータ操作(GET/PUT1回ずつ)を実行すればよい。
GET(2014−01−01)→[ ]
PUT(2014−01−01,[受注1,受注2])
このように、メッセージマージ部37を設けることにより、本実施の形態は、索引KVペアに対するデータ操作回数を削減する。
On the other hand, in the present embodiment, the message merge unit 37 merges the above-described two index update messages A and B into the following one index update message C. That is, a plurality of index update messages for the same destination KV pair are merged into one index update message.
C) & Add Order 1, Order 2 to 2014-01-01
Then, in the present embodiment, the index data update unit 34 may perform the following two data operations (one GET / PUT each) for one index KV pair.
GET (2014-01-01) → []
PUT (2014-01-01, [Order 1, Order 2])
In this manner, by providing the message merge unit 37, the present embodiment reduces the number of data operations for the index KV pair.

次に、本発明の第3の実施の形態の効果について述べる。   Next, effects of the third exemplary embodiment of the present invention will be described.

本発明の第3の実施の形態としての情報処理システムは、分散KVSにおけるレコードKVペアおよび索引KVペア間の結果整合性をより十分にサポートしながら、索引データ更新の負荷をより軽減することができる。   The information processing system according to the third exemplary embodiment of the present invention can further reduce the load of index data update while more fully supporting eventual consistency between record KV pairs and index KV pairs in distributed KVS. it can.

その理由は、本発明の第2の実施の形態と同様の構成に加えて、情報処理装置のメッセージマージ部が、メッセージ記憶部に記憶された索引更新メッセージをマージし、索引データ更新部が、マージされた索引更新メッセージを実行するからである。   The reason is that, in addition to the configuration similar to the second embodiment of the present invention, the message merge unit of the information processing apparatus merges the index update messages stored in the message storage unit, and the index data update unit This is because the merged index update message is executed.

ここで、レコードおよび索引について結果整合性を保持する場合、索引KVペアの更新において、多少の遅延は許容される。そこで、索引データ更新部は、レコード更新の度に索引更新メッセージを実行せずに、非同期に(例えば、レコード更新からある程度の間隔をあけて)、複数の索引更新メッセージを実行する。このとき、本実施の形態は、複数の索引更新メッセージのうちマージ可能なものをマージしてから実行することで、索引KVペアのデータ操作回数を削減し、索引更新の負荷を削減することができる。   Here, when maintaining eventual consistency for records and indexes, some delay is allowed in updating the index KV pair. Therefore, the index data update unit executes a plurality of index update messages asynchronously (for example, with a certain interval from the record update) without executing the index update message every time the record is updated. At this time, the present embodiment can reduce the number of index KV pair data operations and reduce the load of index update by executing merged ones of a plurality of index update messages. it can.

また、他の理由は、分散KVSの各サーバに配置されたメッセージ抽出部が、レコードKVペアに付加された索引更新メッセージを抽出して情報処理装置のメッセージ記憶部に記憶するからである。   Another reason is that the message extraction unit arranged in each server of the distributed KVS extracts the index update message added to the record KV pair and stores it in the message storage unit of the information processing apparatus.

このように、各サーバにメッセージ抽出部を配置することにより、本実施の形態は、索引更新メッセージの抽出の際に、未抽出のレコードKVペアを、本発明の第2の実施の形態のように全件スキャンにより特定する必要がない。本実施の形態では、各サーバに配置されたメッセージ抽出部が、自装置に格納されるレコードKVペアから索引更新メッセージを抽出すればよい。そのため、本実施の形態は、索引更新メッセージの抽出のために全件スキャンを行う必要がなく、索引データ更新処理を効率化できる。   As described above, by arranging the message extraction unit in each server, in the present embodiment, when the index update message is extracted, the unextracted record KV pair is changed as in the second embodiment of the present invention. There is no need to specify all cases by scanning. In the present embodiment, the message extraction unit arranged in each server may extract the index update message from the record KV pair stored in its own device. For this reason, the present embodiment does not need to scan all cases to extract the index update message, and can improve the efficiency of the index data update process.

ただし、もし、分散KVS自体の機能として、メッセージ抽出対象となる未抽出のレコードKVペアを特定する効率的な処理を実現する機能が存在する場合、メッセージ抽出部を、各サーバに配置しなくてもよい。そのような分散KVSの機能とは、例えば、ある時点以降に更新されたレコードKVペアのみを抽出する機能であってもよい。その場合、本実施の形態は、そのような機能により実現したメッセージ抽出部を、情報処理装置に配置しても実施可能である。   However, if there is a function that realizes an efficient process for specifying an unextracted record KV pair as a message extraction target as a function of the distributed KVS itself, the message extraction unit need not be arranged in each server. Also good. Such a distributed KVS function may be, for example, a function of extracting only record KV pairs updated after a certain point in time. In this case, the present embodiment can be implemented even if a message extraction unit realized by such a function is arranged in the information processing apparatus.

なお、上述した本発明の各実施の形態は、複数のメッセージ抽出部、複数のメッセージ記憶部、複数のメッセージマージ部、または、複数の索引データ更新部を備えるように構成してもよい。この場合、複数の各機能ブロックは、分散KVSで扱われる索引データの件数や、分散KVSを構成するサーバ台数等に応じて、複数のコンピュータ装置にそれぞれ分散させてもよい。   Each embodiment of the present invention described above may be configured to include a plurality of message extraction units, a plurality of message storage units, a plurality of message merge units, or a plurality of index data update units. In this case, the plurality of functional blocks may be distributed to a plurality of computer devices according to the number of index data handled by the distributed KVS, the number of servers constituting the distributed KVS, and the like.

また、上述した本発明の各実施の形態において、メッセージ抽出部は、索引更新メッセージが抽出されていないレコードKVペア一覧(未抽出一覧)を参照するように構成してもよい。この場合、レコード更新部が、レコードKVペアの格納処理に伴って未抽出一覧を更新するよう構成してもよい。また、レコード更新部が、分散KVSで使用されているトランザクションログ、そのタイムスタンプ、または、MVCC(MultiVersion Concurrency Control)のバージョン等から未抽出一覧を作成・更新してもよい。   In each embodiment of the present invention described above, the message extraction unit may be configured to refer to a record KV pair list (unextracted list) from which no index update message has been extracted. In this case, the record update unit may be configured to update the unextracted list in accordance with the storage process of the record KV pair. Further, the record update unit may create / update the unextracted list from the transaction log used in the distributed KVS, its time stamp, or the version of MVCC (MultiVersion Concurrency Control).

また、上述した本発明の各実施の形態において、本発明の分散ストレージシステムに分散KVSを適用した例を中心に説明した。この他、各実施の形態における分散ストレージシステムは、1つのデータに対する1つのデータ操作について原子性を保証するシステムであれば、分散KVSに限らず、他のシステムであってもよい。   Further, in each of the above-described embodiments of the present invention, an example in which distributed KVS is applied to the distributed storage system of the present invention has been mainly described. In addition, the distributed storage system in each embodiment is not limited to the distributed KVS as long as it is a system that guarantees atomicity for one data operation on one data, and may be another system.

また、上述した本発明の各実施の形態において、1つのレコードに対して1つの索引を作成する例を中心に説明した。この他、各実施の形態は、1つのレコードに対して複数の索引を作成する場合にも適用可能である。その場合、レコード更新部は、1つのレコードに、複数の索引データのそれぞれに関する索引更新メッセージを付加すればよい。   Further, in each of the above-described embodiments of the present invention, the description has been focused on an example in which one index is created for one record. In addition, each embodiment can be applied to a case where a plurality of indexes are created for one record. In that case, the record update unit may add an index update message related to each of the plurality of index data to one record.

また、上述した本発明の各実施の形態において、索引データが、ハッシュインデックスを表す例を中心に説明したが、その他のインデックスを表す情報であってもよい。例えば、索引データは、Bツリーインデックスを表す情報であってもよい。   Further, in each of the above-described embodiments of the present invention, the index data has been mainly described as an example representing a hash index, but may be information representing another index. For example, the index data may be information representing a B-tree index.

また、上述した本発明の各実施の形態において、情報処理システムを構成する各装置の各機能ブロックが、記憶装置またはROMに記憶されたコンピュータ・プログラムを実行するCPUによって実現される例を中心に説明した。この他、各機能ブロックの一部、全部、または、それらの組み合わせが専用のハードウェアにより実現されていてもよい。   In each of the above-described embodiments of the present invention, each functional block of each device constituting the information processing system is mainly implemented by a CPU that executes a computer program stored in a storage device or ROM. explained. In addition, a part, all, or a combination of each functional block may be realized by dedicated hardware.

また、上述した本発明の各実施の形態において、情報処理装置の機能ブロックは、複数の装置に分散されて実現されてもよい。   Moreover, in each embodiment of the present invention described above, the functional blocks of the information processing apparatus may be distributed and realized in a plurality of apparatuses.

また、上述した本発明の各実施の形態において、各フローチャートを参照して説明した情報処理装置の動作を、本発明のコンピュータ・プログラムとしてコンピュータの記憶装置(記憶媒体)に格納しておいてもよい。そして、係るコンピュータ・プログラムを当該CPUが読み出して実行するようにしてもよい。そして、このような場合において、本発明は、係るコンピュータ・プログラムのコードあるいは記憶媒体によって構成される。   In each embodiment of the present invention described above, the operation of the information processing apparatus described with reference to each flowchart may be stored in a computer storage device (storage medium) as a computer program of the present invention. Good. Then, the computer program may be read and executed by the CPU. In such a case, the present invention is constituted by the code of the computer program or a storage medium.

また、上述した各実施の形態は、適宜組み合わせて実施されることが可能である。   Moreover, each embodiment mentioned above can be implemented in combination as appropriate.

また、本発明は、上述した各実施の形態に限定されず、様々な態様で実施されることが可能である。   The present invention is not limited to the above-described embodiments, and can be implemented in various modes.

また、上述した各実施の形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)
キーおよび値からなるレコードに関する処理の要求が入力される処理要求入力部と、
前記レコードに含まれる値のうち索引作成対象である索引キーと、前記レコードのキーを含むキーリストとからなる索引データに関して、要求された前記処理に応じた更新指示を表す索引更新メッセージを生成するメッセージ生成部と、
要求された前記処理に応じたレコードを生成し、生成したレコードに、前記メッセージ生成部により生成された索引更新メッセージを付加し、前記索引更新メッセージが付加されたレコードを分散ストレージシステムに格納するレコード更新部と、
前記分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、前記索引更新メッセージが反映された索引データを前記分散ストレージシステムに格納する索引データ更新部と、
を備えた情報処理装置。
(付記2)
前記レコードに関して要求される処理が、前記分散ストレージシステムに既に格納されているレコードに対する処理であるとき、前記レコード更新部は、前記分散ストレージシステムから前記レコードを取得し、取得したレコードに既に付加されている他の前記索引更新メッセージに加えて、今回の処理に応じた索引更新メッセージを付加することを特徴とする付記1に記載の情報処理装置。
(付記3)
複数の前記索引更新メッセージをマージするメッセージマージ部をさらに備え、
前記索引データ更新部は、前記メッセージマージ部によりマージされた索引更新メッセージを実行することを特徴とする付記1または付記2に記載の情報処理装置。
(付記4)
前記メッセージマージ部は、1つのレコードに付加されている複数の索引更新メッセージをマージすることを特徴とする付記3に記載の情報処理装置。
(付記5)
前記メッセージマージ部は、複数のレコードにそれぞれ付加されている索引更新メッセージをマージすることを特徴とする付記3または付記4に記載の情報処理装置。
(付記6)
前記レコードに関して要求される処理が、レコードの新規作成処理であるとき、
前記メッセージ生成部は、前記索引キーを含む索引データのキーリストに、新規作成対象のレコードのキーを追加する索引更新メッセージを生成することを特徴とする付記1から付記5のいずれか1つに記載の情報処理装置。
(付記7)
前記レコードに関して要求される処理が、前記分散ストレージシステムに既に格納されているレコードの削除処理であるとき、
前記メッセージ生成部は、前記索引キーを含む索引データのキーリストから、削除対象のレコードのキーを削除する索引更新メッセージを生成することを特徴とする付記1から付記6のいずれか1つに記載の情報処理装置。
(付記8)
前記レコードに関して要求される処理が、前記分散ストレージシステムに既に格納されているレコードの更新処理であるとき、
前記メッセージ生成部は、前記索引作成対象の更新前の値を索引キーとして含む索引データのキーリストから、更新対象のレコードのキーを削除するとともに、前記索引作成対象の更新後の値を索引キーとして含む索引データのキーリストに、更新対象のレコードのキーを追加する索引更新メッセージを生成することを特徴とする付記1から付記7のいずれか1つに記載の情報処理装置。
(付記9)
前記処理要求入力部に、前記レコードKVペアに対する参照要求が入力された場合、前記分散ストレージシステムから要求対象のレコードKVペアを取得し、取得したレコードKVペアの前記索引更新メッセージを含まない部分を出力するレコード参照部をさらに備えたことを特徴とする付記1から付記8のいずれか1つに記載の情報処理装置。
(付記10)
付記1から付記9のいずれか1つに記載の情報処理装置と、
前記分散ストレージシステムと、
を備えた情報処理システム。
(付記11)
前記分散ストレージシステムを構成する各サーバは、自身に格納されたレコードから前記索引更新メッセージを抽出するメッセージ抽出部を備え、
前記索引データ更新部は、前記メッセージ抽出部によって抽出された索引更新メッセージを実行することを特徴とする付記10に記載の情報処理システム。
(付記12)
キーおよび値からなるレコードに関する処理の要求が入力されると、
前記レコードに含まれる値のうち索引作成対象である索引キーと、前記レコードのキーを含むキーリストとからなる索引データに関して、要求された前記処理に応じた更新指示を表す索引更新メッセージを生成し、
要求された前記処理に応じたレコードを生成し、
生成したレコードに、前記索引更新メッセージを付加し、
前記索引更新メッセージが付加されたレコードを分散ストレージシステムに格納し、
前記分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、前記索引更新メッセージが反映された索引データを前記分散ストレージシステムに格納する情報処理方法。
(付記13)
キーおよび値からなるレコードに関する処理の要求が入力される処理要求入力ステップと、
前記レコードに含まれる値のうち索引作成対象である索引キーと、前記レコードのキーを含むキーリストとからなる索引データに関して、要求された前記処理に応じた更新指示を表す索引更新メッセージを生成するメッセージ生成ステップと、
要求された前記処理に応じたレコードを生成し、生成したレコードに、前記メッセージ生成ステップで生成された索引更新メッセージを付加し、前記索引更新メッセージが付加されたレコードを分散ストレージシステムに格納するレコード更新ステップと、
前記分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、前記索引更新メッセージが反映された索引データを前記分散ストレージシステムに格納する索引データ更新ステップと、
をコンピュータ装置に実行させるコンピュータ・プログラム。
A part or all of each of the above-described embodiments can be described as in the following supplementary notes, but is not limited thereto.
(Appendix 1)
A processing request input unit for inputting a processing request related to a record including a key and a value;
An index update message representing an update instruction corresponding to the requested process is generated for index data including an index key to be indexed among values included in the record and a key list including the key of the record. A message generator;
A record that generates a record corresponding to the requested processing, adds the index update message generated by the message generation unit to the generated record, and stores the record with the index update message in the distributed storage system An update section;
An index data update unit for storing the index data in which the index update message is reflected in the distributed storage system by executing an index update message included in the record stored in the distributed storage system;
An information processing apparatus comprising:
(Appendix 2)
When processing required for the record is processing for a record already stored in the distributed storage system, the record update unit acquires the record from the distributed storage system and is already added to the acquired record. The information processing apparatus according to appendix 1, wherein an index update message corresponding to the current process is added in addition to the other index update message.
(Appendix 3)
A message merge unit that merges a plurality of the index update messages;
The information processing apparatus according to appendix 1 or appendix 2, wherein the index data update unit executes the index update message merged by the message merge unit.
(Appendix 4)
The information processing apparatus according to appendix 3, wherein the message merging unit merges a plurality of index update messages added to one record.
(Appendix 5)
The information processing apparatus according to appendix 3 or appendix 4, wherein the message merge unit merges index update messages respectively added to a plurality of records.
(Appendix 6)
When the process requested for the record is a new record creation process,
The message generation unit generates an index update message for adding a key of a record to be newly created to a key list of index data including the index key, according to any one of appendix 1 to appendix 5 The information processing apparatus described.
(Appendix 7)
When the process requested for the record is a process for deleting a record already stored in the distributed storage system,
The message generation unit generates an index update message for deleting a key of a record to be deleted from a key list of index data including the index key, according to any one of appendix 1 to appendix 6, Information processing device.
(Appendix 8)
When the process requested for the record is an update process for a record already stored in the distributed storage system,
The message generation unit deletes the key of the record to be updated from the key list of the index data including the value before update of the index creation target as an index key, and sets the updated value of the index creation target to the index key. The information processing apparatus according to any one of appendix 1 to appendix 7, wherein an index update message for adding a key of a record to be updated is added to a key list of index data included as
(Appendix 9)
When a reference request for the record KV pair is input to the processing request input unit, a record KV pair to be requested is acquired from the distributed storage system, and a portion of the acquired record KV pair that does not include the index update message The information processing apparatus according to any one of appendix 1 to appendix 8, further comprising a record reference unit for outputting.
(Appendix 10)
The information processing apparatus according to any one of appendix 1 to appendix 9,
The distributed storage system;
Information processing system with
(Appendix 11)
Each server constituting the distributed storage system includes a message extraction unit that extracts the index update message from a record stored in the server.
The information processing system according to appendix 10, wherein the index data update unit executes the index update message extracted by the message extraction unit.
(Appendix 12)
When a processing request is entered for a key and value record,
An index update message representing an update instruction corresponding to the requested processing is generated with respect to index data including an index key to be indexed among values included in the record and a key list including the key of the record. ,
Generate a record according to the requested process,
Add the index update message to the generated record,
Storing the record to which the index update message is added in a distributed storage system;
An information processing method for storing index data reflecting the index update message in the distributed storage system by executing an index update message included in a record stored in the distributed storage system.
(Appendix 13)
A process request input step in which a process request for a record consisting of a key and a value is input;
An index update message representing an update instruction corresponding to the requested process is generated for index data including an index key to be indexed among values included in the record and a key list including the key of the record. Message generation step;
A record that generates a record corresponding to the requested processing, adds the index update message generated in the message generation step to the generated record, and stores the record with the index update message in a distributed storage system An update step;
An index data update step of storing index data reflecting the index update message in the distributed storage system by executing an index update message included in a record stored in the distributed storage system;
Is a computer program that causes a computer device to execute.

1、2、3 情報処理システム
10、20、30 情報処理装置
11、21 処理要求入力部
12、22 レコード更新部
13、23 メッセージ生成部
14、24、34 索引データ更新部
25 レコード参照部
36 メッセージ記憶部
37 メッセージマージ部
40 分散ストレージシステム
50、60 分散KVS
241、602 メッセージ抽出部
400、500、600、900 サーバ
401、501 レコード記憶部
1001、4001 CPU
1002、4002 RAM
1003、4003 ROM
1004、4004 記憶装置
1005、4005 ネットワークインタフェース
1006 入力装置
1007 出力装置
1, 2, 3 Information processing system 10, 20, 30 Information processing device 11, 21 Processing request input unit 12, 22 Record update unit 13, 23 Message generation unit 14, 24, 34 Index data update unit 25 Record reference unit 36 Message Storage unit 37 Message merge unit 40 Distributed storage system 50, 60 Distributed KVS
241, 602 Message extraction unit 400, 500, 600, 900 Server 401, 501 Record storage unit 1001, 4001 CPU
1002, 4002 RAM
1003, 4003 ROM
1004, 4004 Storage device 1005, 4005 Network interface 1006 Input device 1007 Output device

Claims (10)

キーおよび値からなるレコードに関する処理の要求が入力される処理要求入力部と、
前記レコードに含まれる値のうち索引作成対象である索引キーと、前記レコードのキーを含むキーリストとからなる索引データに関して、要求された前記処理に応じた更新指示を表す索引更新メッセージを生成するメッセージ生成部と、
要求された前記処理に応じたレコードを生成し、生成したレコードに、前記メッセージ生成部により生成された索引更新メッセージを付加し、前記索引更新メッセージが付加されたレコードを分散ストレージシステムに格納するレコード更新部と、
前記分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、前記索引更新メッセージが反映された索引データを前記分散ストレージシステムに格納する索引データ更新部と、
を備えた情報処理装置。
A processing request input unit for inputting a processing request related to a record including a key and a value;
An index update message representing an update instruction corresponding to the requested process is generated for index data including an index key to be indexed among values included in the record and a key list including the key of the record. A message generator;
A record that generates a record corresponding to the requested processing, adds the index update message generated by the message generation unit to the generated record, and stores the record with the index update message in the distributed storage system Update section,
An index data update unit for storing the index data in which the index update message is reflected in the distributed storage system by executing an index update message included in the record stored in the distributed storage system;
An information processing apparatus comprising:
前記レコードに関して要求される処理が、前記分散ストレージシステムに既に格納されているレコードに対する処理であるとき、前記レコード更新部は、前記分散ストレージシステムから前記レコードを取得し、取得したレコードに既に付加されている他の前記索引更新メッセージに加えて、今回の処理に応じた索引更新メッセージを付加することを特徴とする請求項1に記載の情報処理装置。   When processing required for the record is processing for a record already stored in the distributed storage system, the record update unit acquires the record from the distributed storage system and is already added to the acquired record. The information processing apparatus according to claim 1, wherein an index update message corresponding to the current process is added in addition to the other index update message. 複数の前記索引更新メッセージをマージするメッセージマージ部をさらに備え、
前記索引データ更新部は、前記メッセージマージ部によりマージされた索引更新メッセージを実行することを特徴とする請求項1または請求項2に記載の情報処理装置。
A message merge unit that merges a plurality of the index update messages;
The information processing apparatus according to claim 1, wherein the index data update unit executes the index update message merged by the message merge unit.
前記レコードに関して要求される処理が、レコードの新規作成処理であるとき、
前記メッセージ生成部は、前記索引キーを含む索引データのキーリストに、新規作成対象のレコードのキーを追加する索引更新メッセージを生成することを特徴とする請求項1から請求項3のいずれか1項に記載の情報処理装置。
When the process requested for the record is a new record creation process,
The said message generation part produces | generates the index update message which adds the key of the record of newly created object to the key list | wrist of the index data containing the said index key, The any one of Claim 1 to 3 characterized by the above-mentioned. The information processing apparatus according to item.
前記レコードに関して要求される処理が、前記分散ストレージシステムに既に格納されているレコードの削除処理であるとき、
前記メッセージ生成部は、前記索引キーを含む索引データのキーリストから、削除対象のレコードのキーを削除する索引更新メッセージを生成することを特徴とする請求項1から請求項4のいずれか1項に記載の情報処理装置。
When the process requested for the record is a process for deleting a record already stored in the distributed storage system,
The said message production | generation part produces | generates the index update message which deletes the key of the record of deletion object from the key list | wrist of the index data containing the said index key, The any one of Claims 1-4 characterized by the above-mentioned. The information processing apparatus described in 1.
前記レコードに関して要求される処理が、前記分散ストレージシステムに既に格納されているレコードの更新処理であるとき、
前記メッセージ生成部は、前記索引作成対象の更新前の値を索引キーとして含む索引データのキーリストから、更新対象のレコードのキーを削除するとともに、前記索引作成対象の更新後の値を索引キーとして含む索引データのキーリストに、更新対象のレコードのキーを追加する索引更新メッセージを生成することを特徴とする請求項1から請求項5のいずれか1項に記載の情報処理装置。
When the process requested for the record is an update process for a record already stored in the distributed storage system,
The message generation unit deletes the key of the record to be updated from the key list of the index data including the value before update of the index creation target as an index key, and sets the updated value of the index creation target to the index key. 6. The information processing apparatus according to claim 1, wherein an index update message for adding a key of a record to be updated is generated to a key list of index data included.
請求項1から請求項6のいずれか1項に記載の情報処理装置と、
前記分散ストレージシステムと、
を備えた情報処理システム。
The information processing apparatus according to any one of claims 1 to 6,
The distributed storage system;
Information processing system with
前記分散ストレージシステムを構成する各サーバは、自身に格納されたレコードから前記索引更新メッセージを抽出するメッセージ抽出部を備え、
前記索引データ更新部は、前記メッセージ抽出部によって抽出された索引更新メッセージを実行することを特徴とする請求項7に記載の情報処理システム。
Each server constituting the distributed storage system includes a message extraction unit that extracts the index update message from a record stored in the server.
The information processing system according to claim 7, wherein the index data update unit executes the index update message extracted by the message extraction unit.
キーおよび値からなるレコードに関する処理の要求が入力されると、
前記レコードに含まれる値のうち索引作成対象である索引キーと、前記レコードのキーを含むキーリストとからなる索引データに関して、要求された前記処理に応じた更新指示を表す索引更新メッセージを生成し、
要求された前記処理に応じたレコードを生成し、
生成したレコードに、前記索引更新メッセージを付加し、
前記索引更新メッセージが付加されたレコードを分散ストレージシステムに格納し、
前記分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、前記索引更新メッセージが反映された索引データを前記分散ストレージシステムに格納する情報処理方法。
When a processing request is entered for a key and value record,
An index update message representing an update instruction corresponding to the requested processing is generated with respect to index data including an index key to be indexed among values included in the record and a key list including the key of the record. ,
Generate a record according to the requested process,
Add the index update message to the generated record,
Storing the record to which the index update message is added in a distributed storage system;
An information processing method for storing index data reflecting the index update message in the distributed storage system by executing an index update message included in a record stored in the distributed storage system.
キーおよび値からなるレコードに関する処理の要求が入力される処理要求入力ステップと、
前記レコードに含まれる値のうち索引作成対象である索引キーと、前記レコードのキーを含むキーリストとからなる索引データに関して、要求された前記処理に応じた更新指示を表す索引更新メッセージを生成するメッセージ生成ステップと、
要求された前記処理に応じたレコードを生成し、生成したレコードに、前記メッセージ生成ステップで生成された索引更新メッセージを付加し、前記索引更新メッセージが付加されたレコードを分散ストレージシステムに格納するレコード更新ステップと、
前記分散ストレージシステムに格納されたレコードに含まれる索引更新メッセージを実行することにより、前記索引更新メッセージが反映された索引データを前記分散ストレージシステムに格納する索引データ更新ステップと、
をコンピュータ装置に実行させるコンピュータ・プログラム。
A process request input step in which a process request for a record consisting of a key and a value is input;
An index update message representing an update instruction corresponding to the requested process is generated for index data including an index key to be indexed among values included in the record and a key list including the key of the record. Message generation step;
A record that generates a record corresponding to the requested processing, adds the index update message generated in the message generation step to the generated record, and stores the record with the index update message in a distributed storage system An update step;
An index data update step of storing index data reflecting the index update message in the distributed storage system by executing an index update message included in a record stored in the distributed storage system;
Is a computer program that causes a computer device to execute.
JP2015010053A 2015-01-22 2015-01-22 Information processing apparatus, information processing system, information processing method, and computer program Active JP6464771B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015010053A JP6464771B2 (en) 2015-01-22 2015-01-22 Information processing apparatus, information processing system, information processing method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015010053A JP6464771B2 (en) 2015-01-22 2015-01-22 Information processing apparatus, information processing system, information processing method, and computer program

Publications (2)

Publication Number Publication Date
JP2016134116A true JP2016134116A (en) 2016-07-25
JP6464771B2 JP6464771B2 (en) 2019-02-06

Family

ID=56464428

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015010053A Active JP6464771B2 (en) 2015-01-22 2015-01-22 Information processing apparatus, information processing system, information processing method, and computer program

Country Status (1)

Country Link
JP (1) JP6464771B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014189851A1 (en) * 2013-05-20 2014-11-27 Amazon Technologies, Inc. Index update pipeline

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014189851A1 (en) * 2013-05-20 2014-11-27 Amazon Technologies, Inc. Index update pipeline

Also Published As

Publication number Publication date
JP6464771B2 (en) 2019-02-06

Similar Documents

Publication Publication Date Title
US11768739B2 (en) Manifest-based snapshots in distributed computing environments
KR102307371B1 (en) Data replication and data failover within the database system
US9953051B2 (en) Multi-version concurrency control method in database and database system
CN105144080B (en) System for metadata management
US8832159B2 (en) Systems and methods for asynchronous schema changes
US9928283B2 (en) Tracing data through a transformation process using tracer codes
CN112997167A (en) Task scheduling in a database system
CN102395967A (en) Asynchronous distributed object uploading for replicated content addressable storage clusters
US10007548B2 (en) Transaction system
US8832022B2 (en) Transaction processing device, transaction processing method and transaction processing program
US9384202B1 (en) Gateway module to access different types of databases
JP2017027326A (en) Storage system and program for the same
JP4951138B2 (en) How to manage the database
AU2020200649B2 (en) Apparatus and method for managing storage of primary database and replica database
CN105659214B (en) The checkpointing of data cell set
JP6464771B2 (en) Information processing apparatus, information processing system, information processing method, and computer program
US10409651B2 (en) Incremental workflow execution
US20220360458A1 (en) Control method, information processing apparatus, and non-transitory computer-readable storage medium for storing control program
US10942912B1 (en) Chain logging using key-value data storage
GB2602704A (en) Tracking change data capture log history
US10229128B2 (en) Method and apparatus for the generation, organization, storage and retrieval of time stamped blocks of data
WO2023276212A1 (en) Software component update system, and software component update method
US20230195747A1 (en) Performant dropping of snapshots by linking converter streams
JPWO2013132628A1 (en) How to manage the database
JP2016184432A (en) Database management method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180828

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180925

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181026

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181224

R150 Certificate of patent or registration of utility model

Ref document number: 6464771

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150