JP6156380B2 - Distributed system, data processing method for information processing apparatus, and program - Google Patents
Distributed system, data processing method for information processing apparatus, and program Download PDFInfo
- Publication number
- JP6156380B2 JP6156380B2 JP2014533110A JP2014533110A JP6156380B2 JP 6156380 B2 JP6156380 B2 JP 6156380B2 JP 2014533110 A JP2014533110 A JP 2014533110A JP 2014533110 A JP2014533110 A JP 2014533110A JP 6156380 B2 JP6156380 B2 JP 6156380B2
- Authority
- JP
- Japan
- Prior art keywords
- access
- read access
- server
- read
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2216/00—Indexing scheme relating to additional aspects of information retrieval not explicitly covered by G06F16/00 and subgroups
- G06F2216/03—Data mining
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、分散システム、情報処理装置のデータ処理方法およびプログラムに関する。 The present invention relates to a distributed system, a data processing method for an information processing apparatus, and a program.
近年、大規模なデータを対象にした機械学習やデータマイニング等の分析が行われるようになってきている。大規模なデータを扱うためのフレームワークとして、MapReduce(マップリデュース)がGoogle(グーグル)社によって提案され、そのオープンソース実装であるHadoop(ハドゥープ)の利用がデータ分析に用いられるようになってきている。 In recent years, analysis such as machine learning and data mining for large-scale data has been performed. MapReduce was proposed by Google as a framework for handling large-scale data, and the use of Hadoop, which is an open source implementation, has come to be used for data analysis. Yes.
MapReduceは、次のように動作する。まず、MapReduceの入力として分散ファイルシステム上のファイルを用いる場合を想定する。この場合、ファイルは分割され、その断片が複数のマシン上に存在する。MapReduceでは、まずこの各ファイル断片に対して分散して「map」関数を実行する。「map」関数の出力はKey-Value(キーバリュー)のペアである。システムは複数のマシンから生成されるKey-Valueペアをキー(Key)でグループ化する。そのため、同じキーを持つKey-Valueペアが同じマシンに転送されるよう、通信が行われる。そして、これを入力として「reduce」関数を実行する。これを図25に示す。 MapReduce operates as follows. First, it is assumed that a file on the distributed file system is used as an input of MapReduce. In this case, the file is split and its fragments exist on multiple machines. In MapReduce, the “map” function is executed by distributing the file fragments. The output of the “map” function is a key-value pair. The system groups key-value pairs generated from multiple machines by key. Therefore, communication is performed so that a key-value pair having the same key is transferred to the same machine. Then, using this as an input, the “reduce” function is executed. This is shown in FIG.
MapReduceを用いることで、様々なアルゴリズムが記述できることが知られているが、場合によっては低速になることも知られている。低速になるケースの一例に、map関数、あるいはreduce関数から、複数のマシンで共有されるデータにランダムアクセスする必要があるような場合がある。 It is known that various algorithms can be described by using MapReduce, but it is also known that the speed may be reduced in some cases. As an example of a case where the speed is low, there is a case where it is necessary to randomly access data shared by a plurality of machines from a map function or a reduce function.
このような共有データへのランダムアクセス処理が必要となる例として、機械学習における「モデル」の更新がある。モデルは学習結果を表すデータで、入力データ(教師データ)により更新される。そして、もっともらしいモデルデータが得られるまで、入力データによってモデルデータの更新を何度も行う。ここで、モデルデータが更新される場所はランダムである。 As an example in which such random access processing to shared data is necessary, there is an update of a “model” in machine learning. The model is data representing a learning result and is updated by input data (teacher data). The model data is updated many times with the input data until plausible model data is obtained. Here, the place where the model data is updated is random.
MapReduceでは複数のマシンで共有されるデータ構造を直接はサポートしない。MapReduceが利用する分散ファイルシステムを使うことも考えられるが、ランダムアクセスは非常に低速であり、実用的ではない。 MapReduce does not directly support data structures shared by multiple machines. Although it is conceivable to use a distributed file system used by MapReduce, random access is very slow and impractical.
この問題の解決を目指したシステムの一例が、非特許文献1に記載されている。このシステムでは、複数のマシンで共有されるデータとして、汎用の分散型メモリキャッシュシステムであるmemcachedを用い、Hadoopと組み合わせて用いることでこの課題を解決しようとしている。ここで、memcachedはメモリ上にKey-Valueペアを保存し、キーからバリューを引けるようにしたデータストアである。複数のマシン上でmemcachedを動作させ、各マシンが担当するキーの範囲を決めておくことで、複数のマシン上に分散したオンメモリのデータストアを実現する。
An example of a system aimed at solving this problem is described in
非特許文献1では、map関数やreduce関数から、これら複数のマシン上のmemcachedにアクセスすることで、前記の課題を解決しようとしている。これを図26に示す。
また、特許文献1には、MapReduceを実装したオープンソースソフトウェアであるHadoop等を用いて実現される分散処理システムの例が記載されている。In
非特許文献1ではmemcachedを用いているが、以降、一般的な呼称として「分散テーブル」と呼ぶものとする。
非特許文献1に示されている方式では、分散テーブル上のデータにアクセスする際のレイテンシが大きいという課題があった。ネットワークを経由して他のマシン上のバリューを取得する場合、たとえば1msといったような長い時間がかかる。この場合、1秒間に1000回しかデータにアクセスできず、このデータアクセスが全体の実行におけるボトルネックとなる。
The method disclosed in
これを改善するためには、できるだけ複数のデータを一度に読み書きすればよい。すなわち、たとえばKey1とKey2に対応するバリューを取得したい場合、Key1とKey2が同じマシンの担当になっているのであれば、Key1のバリューを取得した後に、Key2のバリューを取得しに行くのではなく、Key1とKey2の両方のバリューを当該マシンに一度に要求する。こうすれば、2つのデータに対するアクセスが一度に行なえるため、レイテンシの影響を削減できる。 In order to improve this, it is only necessary to read and write as many data as possible at one time. That is, for example, if you want to get the value corresponding to Key1 and Key2, if Key1 and Key2 are in charge of the same machine, instead of getting the value of Key2 after getting the value of Key1 , Request the value of both Key1 and Key2 to the machine at once. In this way, access to two pieces of data can be performed at a time, so the influence of latency can be reduced.
このような改善手法は非特許文献1においても示唆されているが、これをどのように実現すれば良いかについては述べられていない。
すなわち、上述した非特許文献1に記載のシステムにおいては、プログラム上同じ場所に現れる複数のアクセスを1つにまとめることは容易であるが、プログラム上別の場所に現れる、あるいはMapReduceプログラムにおいて、(同一マシン上で動作する)複数のmap関数にまたがるアクセスを1つにまとめるのは容易ではないという問題点があった。Such an improvement technique is also suggested in Non-Patent
That is, in the system described in Non-Patent
本発明の目的は、上述した課題である分散テーブルへのアクセス時のレイテンシの影響による処理の遅延を解決する分散システム、情報処理装置のデータ処理方法およびプログラムを提供することにある。 An object of the present invention is to provide a distributed system, a data processing method for an information processing apparatus, and a program that solve the processing delay due to the influence of latency when accessing a distributed table, which is the above-described problem.
本発明の分散システムは、
複数のサーバがそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、前記キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付ける受付手段と、
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録する登録手段と、
前記アクセス待ちリストに登録された前記待機リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行する発行先のサーバおよび発行タイミングを決定する決定手段と、
前記決定手段が決定した前記発行先の前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取るリードアクセス発行手段と、
前記リードアクセス発行手段が受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除するコールバック実行手段と、を備える。The distributed system of the present invention
Receiving means for receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
Registration means for waiting the read access process received and registering the key and the callback in an access waiting list as standby read access to be issued later to a corresponding server;
For the standby read access registered in the access waiting list, in accordance with a predetermined condition, a determination unit that determines an issue destination server that issues the standby read access and an issue timing;
Read access issuing means for issuing the standby read access to the server of the issue destination determined by the determining means at the determined issue timing and receiving the access result from the server;
Using the access result received by the read access issuing means, the callback of the corresponding standby read access registered in the access waiting list is executed, and the standby read access of the executed callback is waited for the access Callback executing means for deleting from the list.
本発明の情報処理装置のデータ処理方法は、
情報処理装置が、
複数のサーバがそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、前記キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付け、
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録し、
前記アクセス待ちリストに登録された前記リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行するサーバおよび発行タイミングを決定し、
決定した前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取り、
受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除する情報処理装置のデータ処理方法である。The data processing method of the information processing apparatus of the present invention includes:
Information processing device
Receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
Waiting for the accepted read access processing, registering the key and the callback in the access waiting list as standby read access to be issued later to the corresponding server,
For the read access registered in the access waiting list, in accordance with a predetermined condition, determine a server that issues the standby read access and an issue timing,
Issuing the standby read access at the determined issue timing to the determined server, receiving the access result from the server,
Information processing for executing the callback of the corresponding standby read access registered in the access waiting list using the received access result and deleting the standby read access of the executed callback from the access waiting list A data processing method of the apparatus.
本発明のコンピュータプログラムは、
情報処理装置を実現するコンピュータに、
複数のサーバがそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、前記キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付ける手順、
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録する手順、
前記アクセス待ちリストに登録された前記待機リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行するサーバおよび発行タイミングを決定する手順、
決定した前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取る手順、
受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除する手順、を実行させるためのプログラムである。The computer program of the present invention is:
In a computer that implements an information processing device,
A procedure for receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
A procedure for causing the received read access process to wait and registering the key and the callback in an access waiting list as standby read access to be issued later to a corresponding server,
A procedure for determining a server that issues the standby read access and an issue timing for the standby read access registered in the access waiting list according to a predetermined condition;
A procedure of issuing the standby read access to the determined server at the determined issue timing and receiving the access result from the server;
Executing the callback of the corresponding standby read access registered in the access waiting list using the received access result, and deleting the standby read access of the executed callback from the access waiting list; Is a program for executing
なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。 It should be noted that any combination of the above-described constituent elements and a conversion of the expression of the present invention between a method, an apparatus, a system, a recording medium, a computer program, etc. are also effective as an aspect of the present invention.
また、本発明の各種の構成要素は、必ずしも個々に独立した存在である必要はなく、複数の構成要素が一個の部材として形成されていること、一つの構成要素が複数の部材で形成されていること、ある構成要素が他の構成要素の一部であること、ある構成要素の一部と他の構成要素の一部とが重複していること、等でもよい。 The various components of the present invention do not necessarily have to be independent of each other. A plurality of components are formed as a single member, and a single component is formed of a plurality of members. It may be that a certain component is a part of another component, a part of a certain component overlaps with a part of another component, or the like.
また、本発明のデータ処理方法およびコンピュータプログラムには複数の手順を順番に記載してあるが、その記載の順番は複数の手順を実行する順番を限定するものではない。このため、本発明のデータ処理方法およびコンピュータプログラムを実施するときには、その複数の手順の順番は内容的に支障のない範囲で変更することができる。 In addition, although a plurality of procedures are described in order in the data processing method and the computer program of the present invention, the described order does not limit the order in which the plurality of procedures are executed. For this reason, when implementing the data processing method and computer program of this invention, the order of the several procedure can be changed in the range which does not have trouble in content.
さらに、本発明のデータ処理方法およびコンピュータプログラムの複数の手順は個々に相違するタイミングで実行されることに限定されない。このため、ある手順の実行中に他の手順が発生すること、ある手順の実行タイミングと他の手順の実行タイミングとの一部ないし全部が重複していること、等でもよい。 Furthermore, the plurality of procedures of the data processing method and the computer program of the present invention are not limited to being executed at different timings. For this reason, another procedure may occur during the execution of a certain procedure, or some or all of the execution timing of a certain procedure and the execution timing of another procedure may overlap.
本発明によれば、分散テーブルへのアクセス時のレイテンシの影響を削減し、処理の高速化を図る分散システム、情報処理装置のデータ処理方法およびプログラムが提供される。 According to the present invention, there are provided a distributed system, a data processing method for an information processing apparatus, and a program for reducing the influence of latency when accessing a distributed table and increasing the processing speed.
上述した目的、およびその他の目的、特徴および利点は、以下に述べる好適な実施形態、およびそれに付随する以下の図面によってさらに明らかになる。 The above-described object and other objects, features, and advantages will be further clarified by the preferred embodiments described below and the accompanying drawings.
以下、本発明の実施の形態について、図面を用いて説明する。尚、すべての図面において、同様な構成要素には同様の符号を付し、適宜説明を省略する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In all the drawings, the same reference numerals are given to the same components, and the description will be omitted as appropriate.
(第1の実施の形態)
図1は、本発明の実施の形態に係る分散システム1の構成を示す機能ブロック図である。
本発明の実施の形態に係る分散システム1は、複数のサーバ(分散テーブルサーバ10)がそれぞれ有する複数の分散テーブル(不図示)からデータを読み出すリード(read)アクセス処理のキー(Key)、および、キーに基づき読み出した結果(バリュー:Value)を用いて実行する処理を定めるコールバック(Callback)、を受け付ける受付部102と、受け付けたリードアクセス処理を待機させ、該当する分散テーブルサーバ10に後で発行する待機リードアクセスとしてキーとコールバックをアクセス待ちリスト104に登録する登録部106と、アクセス待ちリスト104に登録された待機リードアクセスについて、所定の条件に従い、待機リードアクセスを発行する発行先の分散テーブルサーバ10および発行タイミングを決定する決定部108と、決定部108が決定した発行先の分散テーブルサーバ10に、決定した発行タイミングで、待機リードアクセスを発行し、分散テーブルサーバ10から当該アクセス結果(バリュー)を受け取るリードアクセス発行部110と、リードアクセス発行部110が受け取ったアクセス結果を用いて、アクセス待ちリスト104に登録された該当する待機リードアクセスのコールバックを実行し、実行したコールバックの待機リードアクセスをアクセス待ちリスト104から削除するコールバック実行部112と、を備える。(First embodiment)
FIG. 1 is a functional block diagram showing a configuration of a distributed
The distributed
図1に示すように、本実施形態では、分散システム1は、複数の分散テーブルサーバ10(図1では、3つの分散テーブルサーバS1、S2、およびS3)とネットワーク3を介して接続されるクライアント装置100を備える。
As shown in FIG. 1, in this embodiment, the distributed
本発明の分散システム1は、複数のマシン上に分散して存在するテーブルに対して値を読み書きするシステムであり、特に、読み書きに用いるキーがランダムの場合でも高速にアクセスできる分散テーブルアクセスシステムに好適に適用できる。
The distributed
本発明の分散システム1は、たとえば、大規模なデータを対象とした機械学習やデータマイニング等の分析を行うものに好適に適用できる。本発明の分散システム1は、たとえば、MapReduceのような大規模なデータを扱うシステムにおいて、データ処理部が、ランダムアクセスする共有データが必要な場合に、そのアクセスを高速化するといった用途に適用できる。図5に、データ処理部90が実行するMapReduceプログラムのmap関数やreduce関数から分散テーブルを利用するシステムに、本発明のクライアント装置(図中、「分散テーブルクライアント92」と示す)を適用した例を示す。
The distributed
また、本発明の分散システム1は、Webアプリケーションにおいて、Webサーバやアプリケーション(AP:APplication)サーバがデータベースの内容をキャッシュするために分散テーブルを利用するといった用途にも適用可能である。図6に、WebサーバまたはAPサーバ(図中、「Webサーバ/APサーバ94」と示す)がデータベース96の内容をキャッシュするために分散テーブルを利用する場合などに、本発明のクライアント装置(図中、「分散テーブルクライアント98」と示す)を適用した例を示す。
本発明のクライアント装置100は、図5または図6の分散テーブルクライアント(92または98)に相当する。The distributed
The
図1に戻り、本実施形態のクライアント装置100は、分散テーブルサーバ10にネットワーク3を介して接続されるサーバコンピュータやパーソナルコンピュータ、またはそれらに相当する情報処理装置(図3のコンピュータ60)により実現することができる。また、クライアント装置100は、仮想サーバなどにより構成されてもよい。なお、図1では、クライアント装置100は1つのみ示されているが、本発明の分散システム1において、図示されない複数のクライアント装置100が分散テーブルサーバ10にアクセスすることができる。
Returning to FIG. 1, the
図1の本実施形態の分散システム1のクライアント装置100の各構成要素は、図3のCPU(Central Processing Unit)62、RAM(Random Access Memory)66、RAM66にロードされた図1の構成要素を実現するプログラム70、そのプログラム70を格納するROM(Read Only Memory)64、ネットワーク3接続用インタフェースを含むI/O(Input/Output)68を有する任意のコンピュータ60のハードウェアとソフトウェアの任意の組合せによって実現される。CPU62は、コンピュータ60の各要素とバス69を介して接続され、各要素とともにコンピュータ60全体を制御する。そして、その実現方法、装置にはいろいろな変形例があることは、当業者には理解されるところである。以下に説明する各機能ブロック図は、ハードウェア単位の構成ではなく、論理的な機能単位のブロックを示している。なお、コンピュータ60は、I/O68を介して図示されない入出力装置と接続することもできる。
また、以下に示す各図において、本発明の本質に関わらない部分の構成については省略してあり、図示されていない。Each component of the
Moreover, in each figure shown below, about the structure of the part which is not related to the essence of this invention, it has abbreviate | omitted and is not illustrated.
本実施形態において、分散システム1は、たとえば、データセンタ等に設置された複数の分散テーブルサーバ10を備えたクラスタまたはグリッドシステムであるとする。
図1において、クライアント装置100は、受付部102と、アクセス待ちリスト104と、登録部106と、決定部108と、リードアクセス発行部110と、コールバック実行部112と、を備える。In the present embodiment, the distributed
In FIG. 1, the
受付部102は、複数の分散テーブルサーバ10がそれぞれ有する複数の分散テーブル(不図示)からデータを読み出すリードアクセス処理のキー、および、キーに基づき読み出した結果(バリュー)を用いて実行する処理を定めるコールバック、を受け付ける。
The accepting
たとえば、分散テーブルへのアクセス処理は、一つのプログラムテキスト上の複数の箇所に現れる。
分散テーブル上のデータアクセスはレイテンシが大きく、性能劣化の原因となる。これを改善するためには、分散テーブルへのアクセス処理では、できるだけ複数のデータを一度に読み書きすればよいが、プログラム上、離れた別の場所に現れる分散テーブルへのアクセスを1つにまとめるのは容易ではない。ここで、プログラムとは、クライアント装置100が実行する分散テーブルへのアクセスを含むプログラム、あるいは、クライアント装置100を介して分散テーブルにアクセスする少なくとも1つの他のコンピュータで実行されるプログラムを含むことができる。For example, the access processing to the distributed table appears at a plurality of locations on one program text.
Data access on the distributed table has a large latency and causes performance degradation. In order to improve this, in the access processing to the distributed table, it is only necessary to read and write as many data as possible at one time. However, the access to the distributed table that appears in different places on the program is combined into one. Is not easy. Here, the program includes a program including access to a distributed table executed by the
本発明では、プログラム上、離れた別の場所に現れる複数の分散テーブルに対するアクセスを1つにまとめるため、コールバックと呼ばれる仕組みを用いる。コールバックとは、何らかの処理を行なった後に、続けて処理を行ないたい場合、この後続の処理をオブジェクトとして登録しておく仕組みである。
本発明では、これらのアクセス処理をまとめてアクセス先であるサーバ毎にまとめて行うことで、高速化を図る。In the present invention, a mechanism called a callback is used in order to consolidate accesses to a plurality of distributed tables appearing at different locations in the program. The callback is a mechanism for registering the subsequent processing as an object when it is desired to continue processing after performing some processing.
In the present invention, these access processes are collectively performed for each server that is an access destination, thereby achieving high speed.
本発明において、リードアクセス処理とは、たとえば、分散テーブルからデータを読み出す処理を行うリード(read)関数等のAPI(Application Program Interface)によって実行される処理を含むことができる。本実施形態では、リード関数に、分散テーブルからデータを読み出すためのキー(Key)と、読み出した結果を用いて処理を実行するコールバック(Callback)を引数として指定する。受付部102は、プログラムを実行時にリード関数が呼び出されたとき、リード関数で引数として指定されているキーとコールバックを受け付ける。
In the present invention, the read access process can include, for example, a process executed by an API (Application Program Interface) such as a read function that performs a process of reading data from a distributed table. In the present embodiment, a key for reading data from the distributed table and a callback for executing processing using the read result are designated as arguments in the read function. The accepting
アクセス待ちリスト104は、図2(a)に示すように、リードアクセス処理の対象となるデータを保持する分散テーブルを有する分散テーブルサーバ10(担当サーバ)と、待機リードアクセスとしてキー(Key)とコールバック(Callback)のセットとを対応付けて保持する。
なお、アクセス待ちリスト104において、分散テーブルサーバ10(担当サーバ)の情報として、予め付与された識別情報、またはネットワーク3上のIP(Internet Protocol)アドレス等を保持することができる。As shown in FIG. 2A, the
In the
本実施形態のクライアント装置100において、キーを担当する分散テーブルサーバ10を探索する方法は、分散システムの汎用の手法を用いて行うことができ、特に限定されない。たとえば、分散テーブルサーバ10を探索する方法は、キーのハッシュ値を取って、サーバ数でmod(除算した結果出た余り)を取ることで、分散テーブルサーバ10を求めたり、予め準備された対応関係を用いて分散テーブルサーバ10を探索してもよい。
In the
本実施形態では、クライアント装置100は、担当するサーバ毎(図2(a))に、待機リードアクセスとしてキーとコールバックのセットを登録する構成としているが、これに限定されるものではない。たとえば、クライアント装置100は、キー毎(図2(b))、または予め属性等によりグループ分けされた複数のキー毎に、コールバックを保持する構成としてもよい。あるいは、クライアント装置100は、サーバ毎、かつ、キー毎(またはキーグループ毎)に分類してコールバックを保持する構成としてもよい。また、キー毎(またはキーグループ毎)にコールバックを保持する構成の場合、リードアクセス発行部110は、アクセスするキー(またはキーグループ)を担当する分散テーブルサーバ10を探して、待機リードアクセスを発行することができる。キー毎(またはキーグループ毎)に分類して保持している構成の場合、リードアクセス発行部110は、サーバの担当キー(またはキーグループ)の変更にも柔軟に対応できる。
In the present embodiment, the
図1に戻り、登録部106は、受け付けたリードアクセス処理を直ぐに実行せずに、待機させ、該当する分散テーブルサーバ10(担当サーバ)に後で発行する待機リードアクセスとしてキーとコールバックをアクセス待ちリスト104に登録してバッファリングする。後述するように、本実施形態において、登録部106は、アクセス待ちリスト104に待機リードアクセスを登録したとき、登録したことを決定部108に通知してもよい。なお、登録部106は、リード関数を実行するリード関数実行部とすることができ、リード関数実行部がアクセス待ちリスト104に登録したことを通知してもよい。
Returning to FIG. 1, the
決定部108は、アクセス待ちリスト104に登録された待機リードアクセスについて、所定の条件に従い、待機リードアクセスを複数まとめて発行する発行先の分散テーブルサーバ10およびその発行タイミングを決定する。たとえば、決定部108は、アクセス待ちリストに登録された待機リードアクセスの件数が一定数以上になったときを、発行タイミングであると決定する。
The
すなわち、決定部108は、分散テーブルサーバ10毎に、アクセス待ちリスト104に登録された待機リードアクセス処理の数が一定数以上になったときに、その分散テーブルサーバ10を発行先として、その分散テーブルサーバ10に対するリードアクセス処理の発行タイミングとする。あるいは、決定部108は、たとえば、キー毎に、アクセス待ちリスト104に登録された待機リードアクセス処理の数が一定数以上になったときに、そのキーを担当する分散テーブルサーバ10をリードアクセス処理の発行先として、その分散テーブルサーバ10に対するリードアクセス処理の発行タイミングを決定してもよい。
That is, for each distributed
以後、この待機処理の発行タイミングの決定方法を第1の方法と呼ぶものとする。この第1の方法では、アクセス待ちリスト104の保持に必要とするメモリ量や担当分散テーブルサーバ10毎の通信速度の違いは考慮されない。したがって、クライアント装置100では、第1の方法を、後述する他の方法と組み合わせた中から、分散システム1のシステム構成を考慮して、最適な方法を選択して採用することが望ましい。
Hereinafter, the determination method of the issuance timing of the standby process is referred to as a first method. In this first method, the memory amount required for holding the
また、リードアクセス処理の発行タイミングは、サーバ毎ではなく、キー毎に、または、予め属性等によりグループ分けされた複数のキー毎に、アクセス待ちリスト104に登録された待機リードアクセス処理の数が一定数以上になったとき、としてもよい。そして、その待機リードアクセス処理の数が一定数以上になったキーを担当する分散テーブルサーバ10をリードアクセス処理の発行先とする。そして、その複数の待機リードアクセスは、その分散テーブルサーバ10、あるいは、その分散テーブルサーバ10の当該キー、または当該キーを含む同じグループの複数のキーに対して発行されてもよい。
The read access processing issuance timing is determined not by the server but by the number of standby read access processes registered in the
リードアクセス発行部110は、決定部108が決定した発行先の分散テーブルサーバ10に、決定した発行タイミングで、待機リードアクセスを複数まとめて発行し、分散テーブルサーバ10から当該アクセス結果(バリュー)を受け取る。すなわち、同一サーバのリードアクセスを複数まとめて発行する。
The read
リードアクセスをまとめて発行せず、その度、実行する場合、1回の処理にかかる時間は、レイテンシ+リードデータサイズ/スループットとなる。この処理時間が、リードアクセス毎にかかることになる。一方、リードアクセスを複数まとめて発行すると、処理時間のうち、レイテンシは1処理分だけで済むこととなり、処理時間を短縮できる。 If the read accesses are not issued all at once and are executed each time, the time required for one process is latency + read data size / throughput. This processing time is required for each read access. On the other hand, if a plurality of read accesses are issued together, the latency of only one processing out of the processing time is required, and the processing time can be shortened.
コールバック実行部112は、リードアクセス発行部110が受け取ったアクセス結果(バリュー)を用いて、アクセス待ちリスト104に登録された該当する待機リードアクセスのコールバックを実行し、実行したコールバックの待機リードアクセスをアクセス待ちリスト104から削除する。
The
本実施の形態のクライアント装置100では、コンピュータプログラム70(図3)に対応する各種の処理動作をコンピュータ60のCPU62(図3)が実行することにより、前述のような各種ユニットが各種機能として実現される。
本実施形態のコンピュータプログラム70は、情報処理装置(クライアント装置100)を実現させるためのコンピュータ60に、複数の分散テーブルサーバ10がそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付ける手順、受け付けたリードアクセス処理を待機させ、該当する分散テーブルサーバ10に後で発行する待機リードアクセスとしてキーとコールバックをアクセス待ちリスト104に登録する手順、アクセス待ちリスト104に登録された待機リードアクセスについて、所定の条件に従い、待機リードアクセスを発行する分散テーブルサーバ10および発行タイミングを決定する手順、決定した分散テーブルサーバ10に、決定した発行タイミングで、待機リードアクセスを発行し、分散テーブルサーバ10から当該アクセス結果を受け取る手順、受け取ったアクセス結果を用いて、アクセス待ちリスト104に登録された該当する待機リードアクセスのコールバックを実行し、実行したコールバックの待機リードアクセスをアクセス待ちリスト104から削除する手順、を実行させるように記述されている。In the
The
本実施形態のコンピュータプログラム70は、コンピュータ60で読み取り可能な記録媒体に記録されてもよい。記録媒体は特に限定されず、様々な形態のものが考えられる。また、プログラム70は、記録媒体からコンピュータ60のメモリ(ROM64またはRAM66)にロードされてもよいし、ネットワークを通じてコンピュータ60にダウンロードされ、メモリにロードされてもよい。
The
上述のような構成において、本実施の形態の分散システム1におけるクライアント装置100によるデータ処理方法を以下に説明する。図4は、本実施形態の分散システム1の動作の一例を示すフローチャートである。以下、図1および図4を用いて説明する。
本発明の実施の形態に係る情報処理装置(図1のクライアント装置100)のデータ処理方法は、クライアント装置100が、複数の分散テーブルサーバ10(図1)がそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付け(ステップS101)、受け付けたリードアクセス処理を待機させ、該当する分散テーブルサーバ10に後で発行する待機リードアクセスとしてキーとコールバックをアクセス待ちリスト104に登録し(ステップS103)、アクセス待ちリスト104に登録されたリードアクセスについて、所定の条件に従い、待機リードアクセスを発行する分散テーブルサーバ10および発行タイミングを決定し(ステップS105)、決定した分散テーブルサーバ10に、決定した発行タイミングで(ステップS107のYES)、待機リードアクセスを発行し、分散テーブルサーバ10から当該アクセス結果を受け取り(ステップS109)、受け取ったアクセス結果を用いて、アクセス待ちリスト104に登録された該当する待機リードアクセスのコールバックを実行し(ステップS111)、実行したコールバックの待機リードアクセスをアクセス待ちリスト104から削除する(ステップS113)。A data processing method by the
In the data processing method of the information processing apparatus (
図7は、本実施形態の分散システム1のクライアント装置100の決定部108のリードアクセスの発行タイミングと発行先サーバの決定処理の手順の例を示すフローチャートである。本実施形態では、決定部108は、上述した第1の方法により決定処理を行う。
まず、決定部108が、登録部106(リード関数)からアクセス待ちリスト104に登録したとの通知を受け取る度に(ステップS121のYES)、本処理が開始する。FIG. 7 is a flowchart illustrating an example of read access issuance timing and issue destination server decision processing procedures of the
First, every time the
そして、決定部108が、アクセス待ちリスト104を参照し、待機リードアクセス処理の数が一定数以上の分散テーブルサーバ10があるか否かを判定する(ステップS123)。一定数以上のサーバがない場合は(ステップS123のNO)、手順は、ステップS121に戻り、決定部108は、次の通知の到来まで待機する(ステップS121のNO)。
一定数以上のサーバがある場合(ステップS123のYES)、決定部108が、当該サーバに対する待機していた複数のリードアクセスをまとめて発行する(ステップS125)。Then, the
When there are more than a certain number of servers (YES in step S123), the
あるいは、登録部106が、アクセス待ちリスト104に登録を行う度に、分散テーブルサーバ10毎に登録数をカウントし、メモリ(RAM66等)に記憶してもよい。そして、決定部108は、メモリを参照し、各カウント値が一定値以上になった分散テーブルサーバ10があるか否かを監視してもよい。
Alternatively, each time the
以上説明したように、本発明の実施の形態に係る分散システム1によれば、クライアント装置100が、任意のプログラムを対象として、プログラム上の任意の場所に現れる分散テーブルサーバ10へのリード関数による複数のリードアクセス処理を、その都度リードアクセス毎に行うのではなく、アクセス待ちリスト104に登録して一定数以上待機させることで、サーバ毎にまとめて実行することができる。そして、この構成により、本発明の実施の形態に係る分散システム1において、プログラム上に複数現れるリードアクセス処理を、その都度処理する場合に比較して、リードアクセス時にかかるレイテンシによるアクセス処理速度への影響を削減することができ、高速化を図ることができる。
As described above, according to the distributed
特に、本発明の実施の形態に係る分散システム1によれば、クライアント装置100は、プログラム上の何処にいつ現れるか分からないような複数のリードアクセス処理に好適に適用することが可能になる。その理由は、クライアント装置100が、リードアクセス処理が現れた時に、その処理を受け付けて、適切に待機させる構成を有しているからである。
In particular, according to the distributed
(第2の実施の形態)
本実施形態の分散システム1は、上記実施形態とは、待機アクセス処理の発行タイミングの決定方法が異なり、システム構成を考慮し、メモリ量やクラスタシステムのノード(分散テーブルサーバ10)間のネットワーク的な距離を考慮して、高速化に最適なノードを選択して待機アクセス処理を実行する点で相違する。
本実施形態の分散システム1の構成は、図1の上記実施形態の分散システム1と同じであり、以下、図1を用いて説明する。(Second Embodiment)
The distributed
The configuration of the distributed
上記実施形態では、クライアント装置100は、分散テーブルへの複数のアクセスを1つにまとめて処理することで、レイテンシの影響を抑えることができ、処理の高速化を図ることができた。本実施形態では、クライアント装置100は、さらに、この複数のアクセスを、どのタイミングでどのサーバに対するものを優先してアクセスするか、メモリ量やマシン間の通信速度の違い等、分散システム1のシステム構成等の条件を考慮して、決定することで、より性能の向上を図るものである。
In the above-described embodiment, the
はじめに、第2の方法として、メモリ量を考慮して発行タイミングと発行先サーバを決定する方法について説明する。
本実施形態において、決定部108は、アクセス待ちリスト104のメモリ量が一定量以上になった場合、発行タイミングになったと判断し、メモリ量が一定量以上になった時点で、アクセス待ちリスト104に登録された待機リードアクセスの件数が多い分散テーブルサーバ10を待機リードアクセスの発行先として選択する。First, as a second method, a method of determining the issue timing and the issue destination server in consideration of the memory amount will be described.
In the present embodiment, the
アクセス待ちリスト104のメモリ量は、キーとコールバックが必要とするメモリ量を加算していくことで求めることができる。ただし、複数のCallbackオブジェクト間で共有されるメモリがある場合は、コールバックが必要とするメモリ量を正確に求めることが難しい可能性もある。その場合は、リード関数の引数に、アクセス待ちリスト104の登録に必要となるメモリ量を、プログラマが指定するようにしてもよい。アクセス待ちリスト104の利用メモリ量は、コールバックの実行が完了して当該オブジェクトで利用しているメモリが解放され次第、減算する。
なお、アクセス待ちリスト104がキー毎に分類されて登録されている場合、アクセス待ちリスト104に登録された待機リードアクセスの件数が多いキーに対応する分散テーブルサーバ10を待機リードアクセスの発行先として選択する。
なお、この第2の方法では、担当サーバごとの通信速度の違いは考慮されない。したがって、クライアント装置100では、第2の方法を、他の方法と組み合わせた中から、分散システム1のシステム構成を考慮して、最適な方法を選択して採用することが望ましい。The memory amount of the
When the
In the second method, the difference in communication speed for each server in charge is not considered. Therefore, it is desirable that the
次に、第3の方法として、マシン間の通信速度の違いを考慮して発行タイミングと発行先サーバを決定する方法について説明する。
本実施形態において、決定部108は、各分散テーブルサーバ10の性能情報に基づいて求まる、キー1つあたりにかかるアクセス結果(バリュー)の取得時間に基づいて、待機リードアクセスの発行先となるサーバを選択する。
第3の方法では、決定部108は、アクセス待ちリスト104のメモリ量が一定量以上になった場合、1つのキーあたりにかかるバリュー取得時間が最も少ない分散テーブルサーバ10を待機リードアクセスの発行先として選択する。すなわち、決定部108は、通信速度が速い分散テーブルサーバ10を発行先として選択する。Next, as a third method, a method for determining an issue timing and an issue destination server in consideration of a difference in communication speed between machines will be described.
In the present embodiment, the
In the third method, when the memory amount of the
具体的には、1つのキーあたりにかかるバリュー取得時間は、分散テーブルサーバ10ごとに、下記の式(1)で求めることができる。
ここで、本実施形態の分散システム1がクラスタシステムであることを考慮すると、ノード(分散テーブルサーバ10)間で、互いのネットワーク的な距離が近いノードと遠いノードが存在する。ここで、ネットワーク的な距離は、キー1つあたりにかかるアクセス結果(バリュー)の取得時間で評価することができ、各ノードから他のノードへの通信レイテンシおよびスループット値から求めることができる。
Here, considering that the distributed
キー1つあたりにかかるアクセス結果(バリュー)の取得時間は、ノード間の距離が同じならば、待機アクセス処理が最も多くたまったノードが、最小となる。
また、待機アクセス処理数が同じならば、ノード間の距離が最も近いノードが、キー1つあたりにかかるアクセス結果(バリュー)の取得時間が最小となる。The acquisition time of the access result (value) per key is the minimum for the node where the standby access processing is the largest if the distance between the nodes is the same.
If the number of standby access processes is the same, the node having the shortest distance between nodes has the shortest acquisition time of the access result (value) per key.
よって、クライアント装置100では、ノード間の距離が同じならば、待機アクセス処理が最も多くたまったノードから、待機アクセス処理を実行し、待機アクセス処理数が同じならば、距離が近いノードから、待機アクセス処理を実行するのが望ましい。すなわち、距離が遠いノードについては、より多くの待機アクセス処理をためてから実行するのが望ましい。本実施形態では、決定部108が、1つのキーあたりにかかるバリュー取得時間が最も少ないノードを、待機リードアクセスの発行先として選択することで、最もレイテンシの影響が小さくなるノードを選択できる。
Therefore, in the
ここで、クライアント装置100は、担当サーバごとの通信速度の違いを考慮するために必要な、各担当分散テーブルサーバ10への通信レイテンシおよびスループット等の情報を、予め得ておく。これらの情報は、測定した結果から得た値やシステムの構成(スイッチ/ルータの段数を含むネットワーク構成等)から算出した値をクライアント装置100にあらかじめ登録しておいてもよい。あるいは、クライアント装置100が、システムの初期化時に必要なデータを測定して、これらの情報を求める算出部(不図示)を備えるようにしてもよい。
Here, the
なお、アクセス待ちリスト104には、同一キーに対するリードアクセスが複数登録される可能性があるが、決定部108は、式(1)において、それらを1つにまとめて1つのキーとしてカウントして、キー数を求める。バリューのバイトサイズがキーによって異なるなど、複数のキーに対応するバリューの総バイト数を求めるのが難しい場合は、決定部108は、式(1)において、近似値を用いればよい。また、通信レイテンシの影響の方がスループットの影響よりも圧倒的に大きな場合は、決定部108は、式(1)において、(複数のキーと対応するバリューの総バイト数)/スループットの項を削除して近似してもよい。
There is a possibility that a plurality of read accesses to the same key may be registered in the
このようにすることで、全ての分散テーブルサーバ10が同じ条件であるならば、クライアント装置100は、第3の方法においても、第2の方法と同様に、最もアクセス待ち数が多いサーバに対してリードアクセスを発行することができる。もし、全ての分散テーブルサーバ10でアクセス待ち数が同じであれば、ネットワーク的に近いサーバが選ばれる。すなわち、ネットワーク的に遠いサーバについては、クライアント装置100は、なるべく多くのリードアクセスをためてから発行することになる。
In this way, if all the distributed
次に、決定部108が発行タイミングと発行先サーバを決定する第4の方法について説明する。
第4の方法では、決定部108は、第3の方法で説明した各分散テーブルサーバ10の「1つのキーあたりにかかるバリュー取得時間」を所定のタイミングで算出し、全分散テーブルサーバ10の中での最小値を求め、最小値に基づいて発行タイミングと発行先サーバを決定する。Next, a fourth method in which the
In the fourth method, the
決定部108が、「1つのキーあたりにかかるバリュー取得時間」を算出するタイミングは、リードアクセスがアクセス待ちリスト104に登録される度、リードアクセスがアクセス待ちリスト104に所定回数登録される度、または、一定時間毎である。決定部108は、算出された最小値が閾値以下になった時を発行タイミングと判断し、最小値となったサーバを発行先とする。ここで、決定部108は、アクセス待ちリスト104への登録の有無や登録回数を、登録部106からの通知に基づいて検出することができる。
決定部108は、「1つのキーあたりにかかるバリュー取得時間」を、上記の第3の方法と同様に、サーバごとに上述した式(1)で求めることができ、詳細な説明は省略する。The timing at which the
The
ここで、決定部108は、リードアクセスがアクセス待ちリスト104に登録されたことを、登録部106(リード関数)からの登録通知により検知できる。この通知(リードアクセス)が所定回数以上来るまで待つ理由は、1つのキーあたりにかかるバリュー取得時間の最小値が閾値以下のサーバがあるかどうかを、リード関数からアクセス待ちリスト104に登録した通知を受け取るたびに計算するのが非効率な場合に、まとめて計算してそのオーバヘッドを削減するためである。
Here, the
この第4の方法では、クライアント装置100は、アクセス待ちリスト104のメモリ量を参照しないため、設定された閾値の大小によって、過小あるいは過大にアクセス待ちリスト104用のメモリを消費する可能性がある。したがって、クライアント装置100では、第4の方法を、他の方法と組み合わせた中から、分散システム1のシステム構成を考慮して、最適な方法を選択して採用することが望ましい。
In the fourth method, since the
また、第5の方法として、以下の方法も考えられる。
決定部108は、ある一定時間(たとえば、10ms)リードアクセスが発行されていない分散テーブルサーバ10をリードアクセスの発行先として選択する。発行タイミングは、一定時間リードアクセスが発行されていないサーバが存在したときとなる。As the fifth method, the following method is also conceivable.
The
この方法で一定時間リードアクセスが発行されていない分散テーブルサーバ10を発行先とする理由は、図6に示したWebサーバ/APサーバ94に本発明の分散システム1を用いるような場合、長時間ユーザを待たせるのは望ましくないためである。ただし、この場合はアクセス待ちリスト104のメモリ量や、1つのキーあたりにかかるバリュー取得時間を参照しないため、この第5の方法は、必ずしも効率のよいサーバの選択にはならない。したがって、クライアント装置100では、第5の方法を、他の方法と組み合わせた中から、分散システム1のシステム構成を考慮して、最適な方法を選択して採用することが望ましい。
The reason why the distributed
さらに、第6の方法では、プログラマがプログラム上で明示的にリードアクセスを発行するサーバおよび発行タイミングを指定する。たとえば、C++で記述した関数の一例では、flush(サーバ名)のような関数を実行することで、この関数が実行されたタイミングで、リードアクセス発行部110が、当該サーバへのリードアクセスを発行する。
Furthermore, in the sixth method, the programmer explicitly designates the server and issue timing for issuing read access on the program. For example, in an example of a function described in C ++, by executing a function such as flush (server name), the read
また、決定部108は、第7の方法として、第1〜第6の方法を少なくとも2つ組み合わせて決定方法として採用してもよい。詳細については、後述する。
Moreover, the
図8〜図16は、本実施形態の分散システム1のクライアント装置100の決定部108の各方法による処理手順の例をそれぞれ示すフローチャートである。
図8の処理手順は、決定部108が上述した第2の方法を用いて決定処理を行う場合の例である。つまり、この処理手順は、メモリ量が一定以上の場合、待機リードアクセスの件数が最も多いサーバにリードアクセスを発行する決定処理の例である。8 to 16 are flowcharts illustrating examples of processing procedures according to the respective methods of the
The processing procedure in FIG. 8 is an example when the
図8の例では、決定部108が、リード関数からアクセス待ちリスト104に登録したとの通知を受け取る度に(ステップS121のYES)、本処理が開始する。通知を受け取り(ステップS121のYES)、かつ、アクセス待ちリスト104のメモリ量が一定量以上になった時(ステップS131のYES)、決定部108が、発行タイミングになったと判断する。
In the example of FIG. 8, each time the
そして、決定部108が、その時点で、アクセス待ちリスト104に登録された待機リードアクセスの件数が最も多い分散テーブルサーバ10を発行先に決定する。そして、リードアクセス発行部110が、発行先に決定された分散テーブルサーバ10に、リードアクセスを発行する(ステップS133)。
一方、メモリ量が一定量以上でない場合(ステップS131のNO)、手順は、ステップS121に戻り、決定部108は、次の通知の到来まで待機する(ステップS121のNO)。Then, the
On the other hand, if the memory amount is not equal to or greater than the predetermined amount (NO in step S131), the procedure returns to step S121, and the
次に、図9の処理手順は、決定部108が上述した第3の方法を用いて決定処理を行う場合の例である。つまり、この処理手順は、メモリ量が一定以上の場合、1つのキーあたりにかかるバリュー取得時間が最も少ないサーバにリードアクセスを発行する決定処理の例である。
図9の例では、リード関数からアクセス待ちリスト104に登録したとの通知を受け取り(ステップS121のYES)、かつ、アクセス待ちリスト104のメモリ量が一定量以上になった時(ステップS131のYES)、決定部108が、発行タイミングになったと判断する。ここまでの図9の処理手順は、図8の例と同じである。Next, the processing procedure of FIG. 9 is an example when the
In the example of FIG. 9, when a notification indicating that it has been registered in the
そして、決定部108が、1つのキーあたりにかかるバリュー取得時間が最も少ない分散テーブルサーバ10を発行先に決定し、リードアクセス発行部110が、決定された発行先の分散テーブルサーバ10に、リードアクセスを発行する(ステップS141)。
Then, the
次に、図10〜図12の処理手順は、決定部108が上述した第4の方法を用いて決定処理を行う場合の例である。各図の手順は、1つのキーあたりにかかるバリュー取得時間を算出(または、バリュー取得時間の最小値と閾値を比較)するタイミングがそれぞれ異なる。
Next, the processing procedure of FIGS. 10 to 12 is an example in the case where the
図10は、アクセス待ちリスト104にリードアクセスが登録される度に、第4の方法による決定処理が行われる例を示す。図11は、アクセス待ちリスト104にリードアクセスが所定回数以上登録された場合に、第4の方法による決定処理が行われる例を示す。図12は、所定の時間間隔で第4の方法による決定処理が行われる例を示す。
まず、図10の例では、決定部108が、リード関数からアクセス待ちリスト104に登録したとの通知を受け取る度に(ステップS121のYES)、本処理が開始する。FIG. 10 shows an example in which the determination process according to the fourth method is performed every time read access is registered in the
First, in the example of FIG. 10, each time the
そして、決定部108が、1つのキーあたりにかかるバリュー取得時間の最小値が閾値以下のサーバがあるかを判別する(ステップS151)。最小値が閾値以下のサーバがない場合は(ステップS151のNO)、手順は、ステップS121に戻り、決定部108は、次の通知の到来まで待機する(ステップS121のNO)。
最小値が閾値以下のサーバがある場合(ステップS151のYES)、決定部108がそのサーバを発行先と決定し、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(ステップS125)。Then, the
When there is a server whose minimum value is equal to or smaller than the threshold (YES in step S151), the
また、図11の例では、決定部108が、リード関数からアクセス待ちリスト104に登録したとの通知を受け取り(ステップS121のYES)、かつ、決定部108が、通知を受け取った回数をカウントしておき、所定回数以上、通知を受け取った場合に(ステップS161のYES)、本処理が開始する。以降の手順は図10と同様である。なお、決定部108が本処理を実行した時、カウントはリセットされる。すなわち、所定回数毎に、本処理が実行されることとなる。
In the example of FIG. 11, the
また、図12の例では、図示されないタイマにより、所定の時間間隔を計測し、決定部108がタイマからの通知(タイマ割り込み)を受け取る度に(ステップS171のYES)、すなわち、一定時間毎に、本処理が開始する。以降の手順は図10と同様である。なお、タイマの時間は、たとえば、10msとすることができ、予め設定された値であってもよいし、条件に応じて変更されてもよい。
また、クライアント装置100において、上記図10または図11と、図12との手順をそれぞれ組み合わせてもよい。In the example of FIG. 12, a predetermined time interval is measured by a timer (not shown), and every time the
Further, in the
さらに、図13の処理手順は、決定部108が上述した第5の方法を用いて決定処理を行う場合の例である。図13の例では、図示されないタイマにより、所定の時間間隔を計測し、決定部108がタイマからの通知(タイマ割り込み)を受け取る度に(ステップS171のYES)、すなわち、一定時間毎に、本処理が開始する。そして、決定部108が、一定時間以上、リードアクセスが発行されていない分散テーブルサーバ10があるか否かを判定する(ステップS181)。リードアクセスが発行されていない分散テーブルサーバ10がない場合は(ステップS181のNO)、手順は、ステップS171に戻り、決定部108は、次の通知の到来まで待機する(ステップS171のNO)。リードアクセスが発行されていない分散テーブルサーバ10がある場合(ステップS181のYES)、決定部108が、そのサーバを発行先に決定し、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(ステップS125)。
Furthermore, the processing procedure of FIG. 13 is an example in the case where the
また、図14の処理手順は、決定部108が上述した第6の方法を用いて決定処理を行う場合の例である。図14の例では、まず、決定部108が、リードアクセスを発行するサーバおよび発行タイミングを指定した関数を呼び出す(ステップS191)。関数で指定されたタイミングになった時(ステップS193のYES)、決定部108が、指定された分散テーブルサーバ10を発行先に決定し、発行先の分散テーブルサーバ10に対して、リードアクセス発行部110がリードアクセスを発行する(ステップS195)。
Further, the processing procedure of FIG. 14 is an example in the case where the
また、第7の方法として、決定部108が第1〜第6の方法を少なくとも2つ組み合わせて決定方法として採用した場合の処理手順を図15と図16に示す。ここで、図15と図16、さらに図14のフローは、後述するように並列的に実行することができる。
第4の方法のように「1つのキーあたりにかかるバリュー取得時間」が閾値以下のサーバがあれば(図15のステップS151のYES)、リードアクセス発行部110が、当該サーバに対してリードアクセスを発行する(図15のステップS125)。As a seventh method, FIGS. 15 and 16 show processing procedures when the
If there is a server whose “value acquisition time per key” is equal to or less than a threshold value as in the fourth method (YES in step S151 in FIG. 15), the read
このようなサーバが無くても(図15のステップS151のNO)、第3の方法のように、アクセス待ちリスト104のメモリ量が一定量以上になった場合(図15のステップS131のYES)、決定部108が「1つのキーあたりにかかるバリュー取得時間」が最も少ないサーバを発行先に選び、リードアクセス発行部110がリードアクセスを発行する(図15のステップS141)。これらの条件が成立しなくても(図15のステップS131のNO、かつステップS151のNO)、第5の方法のようにある一定時間リードアクセスが発行されていないサーバに対して(図16のステップS181のYES)、リードアクセス発行部110がリードアクセスを発行する(図16のステップS125)。また、第6の方法のようにプログラム上で明示的に指定された場合もリードアクセスを発行する(図14のステップS195)。
Even if there is no such server (NO in step S151 in FIG. 15), when the amount of memory in the
また、これらの方法でリードアクセスを発行する場合、リードアクセス発行部110は、この発行をリードアクセス以外の処理や以前発行したリードアクセスと同時並行に、オーバラップして実行してよい。また、第1から第4、および第6、第7の方法でリードアクセスを発行する場合、リードアクセス発行部110によるリードアクセスの発行の実施は、リード関数が実行されることが主な契機になる。この契機となるリード関数の中からリードアクセスの発行を行い、リード関数が終了した時点でリードアクセスの発行が終了しているように実装すれば、オーバラップは行われない。さらに、契機となるリード関数の中からリードアクセスの発行を行う際、別スレッドでリードアクセスの発行を行えば、当該リードアクセスの発行を、リードアクセス以外の処理や他のリードアクセスの発行とオーバラップして実行できる。
Further, when issuing a read access by these methods, the read
リードアクセス発行部110が、第5の方法や、第7の方法で「一定時間」リードアクセスが発行されていないサーバに対して(図16のステップS181のYES)、リードアクセスを発行する場合、あるいは、第4の方法で「一定時間」ごとに「1つのキーあたりにかかるバリュー取得時間」を計算して、閾値を下回るサーバに対して(図15または図16のステップS151のYES)、リードアクセスを発行する場合、これらの「一定時間」ごとに行う判定をそれぞれ独立したスレッドで行い、当該スレッドでリードアクセスの発行をそれぞれ行うことで、オーバラップを実現することができる。このように、クライアント装置100では、非同期にオーバラップしてリードアクセスを実行させることで処理時間を有効活用することができる。
When the read
以上説明したように、本発明の実施の形態に係る分散システム1によれば、上記実施形態と同様な効果を奏するとともに、メモリ量やマシン間の通信速度の違い等を考慮に入れた最適なアクセス方法を提供できる。
その理由は、決定部108が、アクセス待ちリスト104で消費されているメモリが一定量を越えると、1要素当たりの取得時間が最小のサーバを選択して当該サーバに対して複数のキーに対するリードアクセスを発行することで、マシンのメモリをできるだけ活用しながら、その時点で最も適切なサーバを選択できるためである。As described above, according to the distributed
The reason is that, when the memory consumed in the
上記非特許文献1記載の技術では、分散テーブルに対する複数のアクセスをまとめることができたとしても、どのタイミングでどのサーバに対するものを優先して行なうのが最適であるかは明らかではなかった。
すなわち、上記非特許文献1記載の技術では、複数のアクセスをまとめるためには、なんらかの形で処理を遅延させる必要がある。そのために必要となるメモリ量を一定にした上で最も効率のよいアクセス方法を実現する必要がある。In the technique described in
That is, in the technique described in
さらに、実際にシステムが動作する環境を考えると、分散テーブルを構成する各マシンは必ずしも同じ条件ではない。すなわち、マシンの数が多くなると、その接続は多段のツリーとして構成されることが多く、たとえば、同じラック内のマシンの方が別のラック内のマシンよりも通信速度が速いということが起こりうる。 Furthermore, considering the environment where the system actually operates, the machines constituting the distributed table are not necessarily in the same condition. In other words, when the number of machines increases, the connection is often configured as a multi-stage tree. For example, a machine in the same rack may have a higher communication speed than a machine in another rack. .
本発明の実施の形態に係る分散システム1によれば、このような環境を考慮に入れた、最適なアクセス方法を実現することができる。
According to the distributed
(第3の実施の形態)
図17は、本発明の実施の形態に係る分散システム1の構成を示す機能ブロック図である。
本実施形態の分散システム1は、上記実施形態とは、分散テーブルへのリードアクセスだけでなく、ライトアクセス、またはアキュムレートアクセスもアクセス待ちリスト104に登録する点で相違する。(Third embodiment)
FIG. 17 is a functional block diagram showing the configuration of the distributed
The distributed
本発明の実施の形態に係る分散システム1は、複数の分散テーブルサーバ10にネットワーク3(図17には図示していない)を介して接続されるクライアント装置200を備える。なお、本実施形態のクライアント装置(図中、「分散テーブルクライアント」と示す)200は、上記第1の実施の形態または第2の実施の形態のクライアント装置100の決定部108と同様な決定処理手順を含む手順も実行することができる。
The distributed
本実施形態の分散システム1のクライアント装置200は、図1の上記実施形態のクライアント装置100と同じ、アクセス待ちリスト104と、リードアクセス発行部110と、コールバック実行部112と、を備える。さらに、クライアント装置200は、リード(read)関数実行部202と、ライト(write)関数実行部204と、アキュムレート(accumulate)関数実行部206と、ライト/アキュムレート(write/accumulate)アクセス発行部208と、決定部210と、を備える。
The
リード関数実行部202は、プログラムが実行されてリード関数が呼び出されたとき、リード関数のキー(Key)とコールバック(Callback)を、分散テーブル上でそのキーを担当する分散テーブルサーバ10ごとに分類して、アクセス待ちリスト104に登録する。すなわち、リード関数実行部202は、待機リードアクセスとしてキーとコールバックをアクセス待ちリスト104に登録してバッファリングする。本実施形態において、リード関数実行部202と、ライト関数実行部204と、アキュムレート関数実行部206は、上記実施形態の受付部102と登録部106に対応する。
When the program is executed and the read function is called, the read
ライト関数実行部204は、プログラムが実行されてライト関数が呼び出されたとき、ライトアクセスの発行をライト/アキュムレートアクセス発行部208に要求、または、ライトアクセス処理を行う。ライト関数は、分散テーブルのデータに書き込みを行う関数であり、データを書き込むデータのキー(Key)と、書き込むデータ(Value)が引数として指定される。ライトアクセス処理とは、ライト関数で指定された引数のKeyのデータに、引数のValueのデータを書き込む処理である。
When the program is executed and the write function is called, the write
アキュムレート関数実行部206は、プログラムが実行されてアキュムレート関数が呼び出されたとき、アキュムレートアクセスの発行をライト/アキュムレートアクセス発行部208に要求、または、アキュムレートアクセス処理を行う。アキュムレート関数は、引数として指定されたキー(Key)に対応する分散テーブルに元々あった値(データ)と、引数として指定された値(Value)の間で、引数として指定された演算処理を行い、その結果を、Keyのデータ(値)として格納するアクセスである。ここで、指定される演算処理は、結合法則が成り立つものであるとする。加算や乗算、最大値または最小値を求めるものが、演算処理の例となる。アキュムレートアクセス処理とは、アキュムレート関数で指定された引数のKeyのデータと引数で指定されたValueとの間で、引数で指定された演算処理を行い、引数のKeyのデータに演算結果の値を書き込む処理である。
When the program is executed and the accumulation function is called, the accumulation function execution unit 206 requests the write / accumulate
ライト/アキュムレートアクセス発行部208は、ライト関数実行部204またはアキュムレート関数実行部206からの要求または、決定部210によって決定された発行タイミングで、ライトまたはアキュムレートアクセスを、該当する分散テーブルサーバ10に発行する。
The write / accumulate
本実施形態の分散システム1のクライアント装置200において、受付部(ライト関数実行部204)は、分散テーブルのキーに対して値(バリュー)を書き込むライトアクセス処理をさらに受け付ける。そして、リードアクセス発行部110は、アクセス待ちリスト104を参照し、ライトアクセス処理と同じキーに対する待機リードアクセスが存在する場合、ライトアクセス処理の値(バリュー)で待機リードアクセスのコールバックを実行し、アクセス待ちリスト104から当該待機リードアクセスを削除する。
In the
また、受付部(ライト関数実行部204)は、リードアクセス処理より後に受け付けるライトアクセス処理を、先に処理することを禁止する禁止フラグをリードアクセス処理のキーとコールバックとともに受け付ける。そして、登録部(ライト関数実行部204)は、ライト関数実行部204が受け付けた禁止フラグを待機リードアクセスのキーおよびコールバックとともにアクセス待ちリスト104に登録する。さらに、登録部(ライト関数実行部204)は、アクセス待ちリスト104を参照し、ライトアクセス処理と同じキーに対する待機リードアクセスの禁止フラグが登録されている場合、ライトアクセス処理を待機させ、該当するサーバに後で発行する待機ライトアクセスとしてキーと値(バリュー)を前記アクセス待ちリスト104に登録する。
Further, the reception unit (write function execution unit 204) receives a prohibition flag for prohibiting the write access process received after the read access process from being processed first together with the key and callback of the read access process. Then, the registration unit (write function execution unit 204) registers the prohibition flag received by the write
ここで、ライト関数またはアキュムレート関数が、対象とするキーのリードアクセスがアクセス待ちリスト104に登録されていない、または登録されていても追い越して処理してよい場合は、ライト関数実行部204またはアキュムレート関数実行部206は、即時ライト/アキュムレートアクセス発行部208にライトまたはアキュムレートアクセス発行を要求する。追い越せないリードアクセスがアクセス待ちリスト104に登録されている場合は、ライト関数実行部204またはアキュムレート関数実行部206は、ライトまたはアキュムレートアクセス処理を、待機アクセスとして、アクセス待ちリスト104に登録する。
Here, when the write function or the accumulation function is not registered in the
本実施形態において、決定部210は、アクセス待ちリスト104に登録されているリードアクセスと、それを待ち合わせているライトアクセス、アキュムレートアクセスについて、いつ(発行タイミング)、どの分散テーブルサーバ10(発行先)に発行するかを決定する。
In this embodiment, the
本実施形態では、アクセス待ちリスト104で消費されているメモリが一定量を越えると、決定部210が、1要素当たりの取得時間が最小の分散テーブルサーバ10を選択して、リードアクセス発行部110が、当該サーバに対して複数のキーに対するリードアクセスを発行する。そして、コールバック実行部112が、取得したキー(Key)とバリュー(Value)を用いて登録されていたコールバック(Callback)を実行する。その後、ライト/アキュムレートアクセス発行部208が、待ち合わせていたライトアクセス、またはアキュムレートアクセスを該当する分散テーブルサーバ10に発行する。
In this embodiment, when the memory consumed in the
決定部210における、いつ、どのサーバにリードを発行するかの決定には、上記実施形態同様に、他の方法も考えられる。すなわち、決定方法には、一定時間以上リードアクセスが発行されていないサーバについて発行する方法、1要素当たりの取得時間が一定値以下のサーバについて発行する方法、プログラマが明示的に指定する方法、また、これらを組み合わせる方法がある。
Other methods are also conceivable in the
本実施形態のクライアント装置200は、このような構成、および動作を採用することで、プログラム上任意の場所に現れる複数のリードアクセスを一つにまとめて発行し、リードアクセスのレイテンシによる影響を削減することができる。また、本実施形態では、決定部210により、メモリ量やマシン間の通信速度の違い等を考慮に入れた最適なアクセス方法を提供できる。これにより、本発明の目的を達成することができる。
By adopting such a configuration and operation, the
以下、各アクセス処理について具体例を示しながら説明する。
まず、分散テーブルからデータを読む場合(リードアクセス)について説明する。
本発明では、分散テーブルサーバ10に対してアクセスする処理を含むプログラムにおいて、プログラム上、離れた場所に現れる複数の分散テーブルに対するアクセスを1つにまとめるため、コールバック(Callback)と呼ばれる仕組みを用いる。
ここでは、分散テーブルに対するアクセスを行なった後に実行する処理を、コールバックで実現する。
コールバック(Callback)をC++で記述した一例を下記に示す。
class Callback { /* システムが提供 */
public:
virtual void run(string Key, string Value) = 0;
};
class MyCallback : public Callback { /* 個々のプログラムで記述 */
public:
MyCallback(...) {
/* オブジェクト生成時にrun()を実行するために必要なデータを初期化 */
}
virtual void run(string Key, string Value){
/* Keyに対するValueを取得した結果、行う処理を記述 */
}
private:
/* run()を実行するために必要なデータを個々のプログラム毎に保存 */
};Hereinafter, each access process will be described with specific examples.
First, a case where data is read from the distributed table (read access) will be described.
In the present invention, in a program including a process for accessing the distributed
Here, the processing executed after accessing the distributed table is realized by callback.
An example in which a callback is described in C ++ is shown below.
class Callback {/ * Provided by the system * /
public:
virtual void run (string Key, string Value) = 0;
};
class MyCallback: public Callback {/ * Described in individual programs * /
public:
MyCallback (...) {
/ * Initialize data necessary to execute run () when creating an object * /
}
virtual void run (string Key, string Value) {
/ * Describe the processing to be performed as a result of obtaining the value for Key * /
}
private:
/ * Save the data necessary for executing run () for each program * /
};
ここでは、システムがCallbackクラスを提供し、それを継承することで個々のプログラムで利用するコールバック(ここではMyCallback)クラスを生成する例を示した。システムが提供するCallbackクラスは、run()メンバ関数がvirtual関数として提供されているだけの抽象クラスであるとする。
本システム上で実行され、分散テーブルサーバ10にアクセスする個々のプログラムは予め決まっていて、予め上記のMyCallbackクラスの宣言と下記read関数等の記述を個々のプログラムに記述することで、本システムは実現される。Here, an example is shown in which the system provides a Callback class and inherits it to generate a callback (in this case, MyCallback) class for use in individual programs. The Callback class provided by the system is an abstract class whose run () member function is only provided as a virtual function.
Individual programs that are executed on the system and access the distributed
また、分散テーブルに対するリードアクセスを行う際のプログラムインタフェース(read関数)をC++で記述した一例を下記に示す。
read(Key, new MyCallback(...));
個々のプログラムにおいて、分散テーブルにリードアクセスする時、上記プログラムインタフェースのリード(read)関数を呼び出せばよい。An example in which a program interface (read function) for performing read access to a distributed table is described in C ++ is shown below.
read (Key, new MyCallback (...));
In each program, when the read access is made to the distributed table, the read function of the program interface may be called.
このリード(read)関数は、分散テーブルに対して、第1引数のKeyに対するリードアクセスを行い、その結果を引数としてMyCallbackのrunを呼び出すものである。ただし、このリード関数の記述は、リード関数が終了した時点では、分散テーブルに対するアクセスは終了しているとは限らない、という意味になる。 This read function performs read access to the first argument Key for the distributed table, and calls the run of MyCallback using the result as an argument. However, the description of the read function means that the access to the distributed table is not necessarily finished when the read function is finished.
このように定義された意味の元、リード関数は次のように動作する。
リード関数は、引数に与えられたKeyとCallbackオブジェクトを、アクセス待ちリスト104に登録する。このときのアクセス待ちリスト104の例は、上記実施形態で示した図2のようになる。図2(a)の例のアクセス待ちリスト104は、与えられたKeyとCallbackを、Keyを担当する分散テーブルサーバ10ごとにまとめたものである。図2(b)の例のアクセス待ちリスト104は、与えられたKeyとCallbackを、Keyごとにまとめたものである。以下、特に、断らない限り、図2(a)のサーバ毎にまとめたアクセス待ちリスト104を用いるものとして説明する。Based on the meaning defined in this way, the read function operates as follows.
The read function registers the Key and Callback object given as arguments in the
アクセス待ちリスト104に登録されたリードアクセス要求は、ある程度ためられ、決定部210によってその発行タイミングと発行先のサーバが決定される。決定部210の動作については、上記実施形態の決定部108と同様である。
The read access request registered in the
決定部210によって、ある分散テーブルサーバ10へのリードアクセス発行が決定されると、リードアクセス発行部110によって、アクセス待ちリスト104の当該サーバ欄にある少なくとも一つのキーに対するリードアクセスが、当該分散テーブルサーバ10に対して行われる。そして、リードアクセス発行部110は、それぞれのキーに対するバリューを受け取る。
When the
そして、コールバック実行部112によって、キーと受け取ったバリューを用いて、アクセス待ちリスト104の当該サーバ欄に登録されていたコールバックが実行される。上述したC++での例を用いると、コールバック実行部112は、Callbackオブジェクトのrunメンバ関数をKeyとValueを引数に実行する。
The
以上により、クライアント装置200は、プログラム上離れた場所に存在する分散テーブルに対するリードアクセスにおいて、同一サーバに対する複数のアクセスをまとめることで、分散テーブルへのアクセスにおけるレイテンシの影響を削減することができる。
As described above, the
なお、コールバック内部ではさらにリード関数だけでなく、ライト関数またはアキュムレート関数の実行を行うこともでき、アクセス待ちリスト104に、同じキーに対するリード関数とともに、ライト関数またはアキュムレート関数をアクセス待ち処理として複数一緒に登録してもよい。また、同じキーに対するリード関数が複数回プログラムで実行された場合、アクセス待ちリスト104に複数登録されていてもよい。
In addition, in the callback, not only the read function but also the write function or the accumulation function can be executed, and the write function or the accumulation function is processed in the
次に、分散テーブルへの書き込みアクセス(ライトアクセス)がある場合について説明する。
通常、共有されるデータに対し、複数のマシン(たとえば、クライアント装置200やクライアント装置200に接続される他のマシン)からアクセスされる場合には、ロック等の排他制御を行うが、本システムではそのような制御は対象としない。すなわち、本実施形態では、各マシンでの分散テーブルに対する読み込みおよび書き込みアクセスは任意の順番で実行できる場合を対象とする。Next, a case where there is a write access (write access) to the distributed table will be described.
Normally, when the shared data is accessed from a plurality of machines (for example, the
まず、クライアント装置200は、書き込みアクセスを、ライト(write)アクセスとアキュムレート(accumulate)アクセスに分類する。ライトアクセスは、キー(Key)に対応する値を上書きする通常の書き込みである。アキュムレートアクセスは、元々あった値と指定された値の間で演算を行い、その結果を格納するアクセスである。ここで、指定される演算は、結合法則が成り立つものであるとする。加算や乗算、最大値または最小値を求める演算がこの例となる。
First, the
たとえば、加算の場合、Key Xの値にYを加算するアクセスをaccumulate(add,X,Y)などとすると、Key Xの値が1の場合、accumulate(add,X,1), accumulate(add,X,2)が発行されると、Key Xの値は4となる。この結果は、accumulate(add,X,1), accumulate(add,X,2)が実行される順番に依存しない。 For example, in the case of addition, if access that adds Y to the value of Key X is assumed to be accumulate (add, X, Y), etc., if the value of Key X is 1, accumulate (add, X, 1), accumulate (add , X, 2) is issued, the value of Key X becomes 4. This result does not depend on the order in which accumulate (add, X, 1) and accumulate (add, X, 2) are executed.
リードの場合と同様、クライアント装置200が受け付けるライトアクセス、およびアキュムレートアクセスはともに、個々のプログラムに記述されている、ライト関数、およびアキュムレート関数からそれぞれ呼び出されるものとする。リード関数の場合と同様、ライト関数、およびアキュムレート関数ともに、プログラム上において、その実行が終わった段階で、クライアント装置200を介した分散テーブルサーバ10へのライトアクセス、およびアキュムレートアクセスがそれぞれ終了しているとは限らない。
As in the case of reading, both the write access and the accumulative access accepted by the
まず、ライトアクセスについて説明する。ライト(write)関数をC++で記述した一例を下記に示す。
Write(Key, Value);
First, write access will be described. An example in which the write function is described in C ++ is shown below.
Write (Key, Value);
ライトアクセスは、その返り値を利用しないので、処理速度はレイテンシの影響を受けない。そのため、クライアント装置200は、ライトアクセスを基本的には無条件に発行してよい。ただし、プログラムの内容によっては、同じキーに対するリード関数の実行がライト関数の実行の前に行われていた場合、ライトがリードを追い越さないようにしたい場合も考えられる。これは同一マシン内においてであり、前述の通り、複数マシン間でのリードアクセスおよびライトアクセスの順序制御は考慮しない。そこで、本実施形態では、ライトアクセスがリードアクセスを追い越してよい場合と、追い越さない場合に分けて考える。
The write access does not use the return value, so the processing speed is not affected by the latency. Therefore, the
ライトアクセスがリードアクセスを追い越してよい場合、ライト関数実行部204により、ライト関数が実行されると、ライト関数実行部204がまずアクセス待ちリスト104を参照し、同一キーに対するリードがアクセス待ちリスト104に登録されているかどうかを調べる。もし登録されていれば、ライト関数実行部204からの要求に従い、ライト/アキュムレートアクセス発行部208が、ライト要求をそのキーを担当するサーバに発行するとともに、そのキーとライト関数で書き込むバリューを引数にして、登録されていたコールバックを実行する。もし登録されていなければ、ライト関数実行部204からの要求に従い、ライト/アキュムレートアクセス発行部208が、単純にライト要求をそのキーを担当するサーバに発行する。
When the write access may pass the read access, when the write function is executed by the write
つぎに、ライトアクセスがリードアクセスを追い越さないようにしたい場合を考える。本実施形態では、このような場合に対応するために、追い越されたくないリードにフラグ(true)を立てる。個々のプログラムでは、たとえば、先ほどのリード関数の引数を拡張し、以下のようにして、このキーに対するリードアクセスはライトに追い越されたくないことを示しておくことができる。これを以後追い越し不可のリードと呼ぶこととする。
read(Key, new MyCallback(...), true);
Next, consider a case where it is desired that write access does not overtake read access. In this embodiment, in order to cope with such a case, a flag (true) is set for a lead that is not to be overtaken. In each program, for example, the argument of the read function can be expanded to indicate that the read access to this key is not overtaken by the write as follows. This is hereinafter referred to as a lead that cannot be overtaken.
read (Key, new MyCallback (...), true);
このような指示がなされた場合、すなわち、追い越し不可フラグ(true)が指定された場合、登録部106(ライト関数実行部204)は、アクセス待ちリスト104に、その情報(追い越し不可フラグ(true))を保存する。すなわち、登録部106(ライト関数実行部204)は、図18に示すように、待機リードアクセスとしてキー(Key1)とコールバック(Callback1)と、さらに、追い越し不可フラグ(true)をアクセス待ちリスト104に登録する。
When such an instruction is given, that is, when the overtaking impossible flag (true) is designated, the registration unit 106 (write function execution unit 204) puts the information (overtaking impossible flag (true)) in the
そして、追い越し不可のリードアクセスと同じキー(Key1)に対するライト関数が実行された場合を考える。ライト関数実行部204によりライト関数が実行されると、ライト関数実行部204がまずアクセス待ちリスト104を参照する。同一キー(Key1)に対する追い越し不可のリードが存在した場合(フラグtrueが登録されている場合)、ライト関数実行部204(登録部106)が、当該ライトもアクセス待ちリスト104に登録する。この様子を図18に示す。
Consider a case where a write function is executed for the same key (Key1) as a read access that cannot be overtaken. When the write function is executed by the write
次に、ライト(write)がアクセス待ちリスト104に登録されている状態(図18の状態)での各関数の動作を考える。
同一キーに対するリード関数が実行された場合、コールバック実行部112が、待ち合わせているライトのバリューを使ってコールバックを実行する。
同一キーに対するライト関数が実行された場合、ライト/アキュムレートアクセス発行部208が、待ち合わせているライトのバリューを新たに実行されたライト関数のバリューで上書きする。
同一キーに対するアキュムレート関数が実行された場合、ライト/アキュムレートアクセス発行部208が、ライト関数に指定されているバリューを元の値としてアキュムレート関数を実行した結果を計算し、ライト関数のバリューを変更する。たとえば、ライト関数に指定されているバリューが1で、アキュムレート関数が2を加算するものであった場合、ライト/アキュムレートアクセス発行部208が、ライト関数に指定するバリューを3に変更する。Next, consider the operation of each function in a state where the write is registered in the access waiting list 104 (the state shown in FIG. 18).
When the read function for the same key is executed, the
When the write function for the same key is executed, the write / accumulate
When the accumulation function for the same key is executed, the write / accumulate
そして、ライト(write)がアクセス待ちリスト104に登録されている状態(図18の状態)で、リードアクセス発行部110により、アクセス待ちリスト104の当該リードアクセスが発行されれば、その完了を待ち、ライト/アキュムレートアクセス発行部208が、待ち合わせていたライトアクセスを発行する。
If the read access is issued from the
次に、アキュムレートアクセスについて説明する。アキュムレート関数をC++で記述した一例を下記に示す。
accumulate(TYPE, Key, Value);
ここで、第1引数のTYPEには実行する演算(加算ならadd,乗算ならmul等)が指定される。Next, accumulated access will be described. An example in which the accumulation function is described in C ++ is shown below.
accumulate (TYPE, Key, Value);
Here, the TYPE of the first argument specifies an operation to be executed (add for addition, mul for multiplication, etc.).
まず、アキュムレート関数に指定されたキー(Key)について、追い越し不可のリードがアクセス待ちリスト104にない場合について説明する。この場合はアキュムレート関数実行部206からの要求に従い、ライト/アキュムレートアクセス発行部208が、アキュムレート関数を即時発行する。ライト関数の場合と異なり、アクセス待ちリスト104に追い越し不可ではないリードアクセスがあるなしに関わらず、このとき、そのリードアクセスのCallbackは実行しない。これは、現在のそのKeyに対応するValueがわからないと、アキュムレート関数の引数だけではValueが決定しないためである。
First, a case where there is no lead that cannot be overtaken in the
次に、追い越し不可のリードがアクセス待ちリスト104にある場合について説明する。この場合はライト関数の場合と同様、アキュムレート関数実行部206が当該アキュムレートアクセスをアクセス待ちリスト104に登録する。この様子を図19に示す。
Next, a case where a lead that cannot be overtaken is in the
アキュムレートがアクセス待ちリスト104に登録されている状態(図19の状態)での各関数の動作を考える。
同一キーに対するリード関数が実行された場合、リード関数実行部202(登録部106)が、(上述したライトアクセスの場合と異なり)さらにリードアクセスをアクセス待ちリスト104に登録する。この様子を図20に示す。この状態からさらに同一キーに対するリード、ライト、アキュムレートアクセスがあった場合は、これまで述べてきた場合と同様の動作を行う。Consider the operation of each function in a state where the accumulation is registered in the access waiting list 104 (the state shown in FIG. 19).
When the read function for the same key is executed, the read function execution unit 202 (registration unit 106) further registers the read access in the access waiting list 104 (unlike the case of the write access described above). This is shown in FIG. If there is further read, write, or accumulated access to the same key from this state, the same operation as described above is performed.
アキュムレートがアクセス待ちリスト104に登録されている状態で、同一キーに対するライト関数が実行された場合、ライト関数実行部204(登録部106)が、アクセス待ちリスト104のアキュムレートアクセスを当該ライトアクセスに置き換え、上書きする。
When a write function for the same key is executed in a state where the accumulation is registered in the
アキュムレートがアクセス待ちリスト104に登録されている状態で、同一キーに対するアキュムレート関数が実行された場合、アキュムレート関数実行部206(登録部106)が、同じ演算タイプ(たとえば、加算(add)同士など)なら、アキュムレートのValueを合算して更新する。たとえば、accumulate(add, Key1,1)が登録されている状態で、accumulate(add, Key1,2)が実行された場合、アキュムレート関数実行部206(登録部106)が、登録されているアキュムレートアクセスをaccumulate(add, Key1,3)に変更する。異なる演算タイプの場合は、アキュムレート関数実行部206(登録部106)が、アキュムレートアクセスをさらにその後に登録する(不図示)。
When the accumulation function is executed for the same key while the accumulation is registered in the
アキュムレートがアクセス待ちリスト104に登録されている状態(図19の状態)で、リードアクセス発行部110により、アクセス待ちリスト104の当該リードアクセスが発行されれば、その完了を待ち、ライト/アキュムレートアクセス発行部208が、待ち合わせていたアキュムレートアクセスを発行する。ここで、待ち合わせていたアキュムレートアクセスに、さらにリードアクセスが待ち合わせていた場合(図20の状態)、アキュムレート後の値はリードアクセスによって計算できるため、コールバック実行部112が、この値を用いてさらに待ち合わせているリードアクセスのコールバックを実行する。
If the read access is issued from the
たとえば、図20の状態から、リードアクセス発行部110が、リードを発行することでKey1の値が1だと判明したとする。この値を用いて、コールバック実行部112がCallback1を実行する。登録されているアキュムレートのValue2が2だった場合、ライト/アキュムレートアクセス発行部208が、アキュムレートを発行するとともに、コールバック実行部112が、1+2=3を用いてCallback5を実行する。
For example, it is assumed that the value of Key1 is found to be 1 by the read
また、決定部210による発行タイミングと発行先のサーバの決定処理手順については、上述したように第1〜第7の方法が考えられる。ここでは、説明は省略する。
In addition, as described above, the issue timing and issue destination server decision processing procedure by the
次に、図21から図24のフローチャートを参照して本実施の形態の全体の動作について詳細に説明する。
図21は、本実施形態の分散システム1のクライアント装置200のリード関数実行部202の動作の一例を示すフローチャートである。
リード関数実行部202が、まずアクセス待ちリスト104を確認し、アクセス待ちリスト104において、同一キーに対して待つアクセスをアクセス待ちリスト104の後ろから調べる(ステップS201)。すなわち、アクセス待ちリスト104は図18から図20のように、ライトアクセスやアキュムレートアクセス、リードアクセスがその後に登録されている場合があるため、リード関数実行部202は、これを後から調べる。Next, the overall operation of the present embodiment will be described in detail with reference to the flowcharts of FIGS.
FIG. 21 is a flowchart illustrating an example of the operation of the read
The read
ライトアクセスが登録されている場合(ステップS203のYES:図18の状態)、コールバック実行部112が、登録されているバリューを用いて、リード関数の引数のコールバックを実行して(ステップS205)、本処理を終了する。このとき、アクセス待ちリスト104は図18の状態のままとなる。
When write access is registered (YES in step S203: state shown in FIG. 18), the
アキュムレートアクセスが登録されている場合(ステップS207のYES:図19の状態)、リード関数実行部202が、アキュムレートアクセスの後ろに引数に与えられたKeyとCallbackオブジェクトを登録する(ステップS209)。すなわち、図20のような状態になる。その後、リード関数実行部202は、決定部210に、リードアクセスを登録した旨通知する(ステップS213)。なお、決定部210がこの通知を必要としない場合は、このステップは省略できる。
When accumulating access is registered (YES in step S207: state of FIG. 19), the read
ライトアクセス、アキュムレートアクセスが登録されていない場合は(ステップS203のNO、かつ、ステップS207のNO)、リード関数実行部202は、引数に与えられたKeyとCallbackオブジェクトをアクセス待ちリスト104に登録する(ステップS211)。そして、リード関数実行部202は、決定部210に、リードアクセスを登録した旨通知する(ステップS213)。先ほどと同様、決定部210がこの通知を必要としない場合は、このステップは省略できる。また、リードアクセスを登録する際に、必要に応じて、決定部210は、その登録によって必要となるメモリ量をアクセス待ちリスト104の消費メモリ量に加算する。
When the write access and the accumulative access are not registered (NO in step S203 and NO in step S207), the read
前述の通り、リードアクセスのキーとコールバックが必要とするメモリ量を加算していくことでアクセス待ちリスト104の消費メモリ量を求めることができるし、登録毎に加算するメモリ量はプログラマが指定するようにしてもよい。決定部210は、後述のライト/アキュムレートアクセスを登録する際も同様に、メモリ量を加算していく。決定部210は、これらの場合は、ライト/アキュムレートアクセスのキーとバリューが必要とするメモリ量(アキュムレートの場合はさらにTYPE情報に必要なメモリ量)を加算する。
As described above, by adding the read access key and the amount of memory required for the callback, the amount of memory consumed in the
図22は、本実施形態の分散システム1のクライアント装置200のライト関数実行部204の動作一例を示すフローチャートである。
上記リード関数の場合と同様、ライト関数実行部204が、アクセス待ちリスト104において、同一キーに対して待つアクセスをアクセス待ちリスト104の後ろから調べる(ステップS221)。ライトアクセスが登録されている場合(ステップS223のYES:図18の状態)、ライト関数実行部204が、登録されているライトアクセスのバリューを引数に与えられたバリューで上書きする(ステップS225)。そして、ライト関数実行部204は、本処理を終了する。FIG. 22 is a flowchart illustrating an example of the operation of the write
As in the case of the read function, the write
アキュムレートアクセスが登録されている場合(ステップS227のYES:図19の状態)、ライト関数実行部204が、登録されているアキュムレートアクセスを当該ライトアクセスで上書きする(ステップS229)。すなわち、図20の状態になる。そして、ライト関数実行部204は、本処理を終了する。アキュムレートアクセスが登録されていない場合で(ステップS227のNO)、かつ、リードアクセスが登録されていなければ(ステップS231のNO)、ライト関数実行部204は、ライト/アキュムレートアクセス発行部208を用いライトアクセスを発行する(ステップS233)。そして、ライト関数実行部204は、本処理を終了する。
When the accumulated access is registered (YES in step S227: the state in FIG. 19), the write
リードアクセスが登録されている場合(ステップS231のYES)、すなわち、図20の状態、あるいは図2の状態の場合、ライト関数実行部204は、登録されているリードアクセスが追い越し可能かどうかを調べる(ステップS235)。追い越し可能でなければ(ステップS235のNO)、すなわち、フラグtrueが登録されている場合、ライト関数実行部204は、当該ライトアクセスをアクセス待ちリスト104のこのリードアクセスの後ろに登録する(ステップS237)。追い越し可能であった場合(ステップS235のYES)、ライト関数実行部204は、ライト関数の引数のバリューを用いて当該リードアクセスのコールバックをコールバック実行部112によって実行させ、当該リードアクセスをアクセス待ちリスト104から削除する(ステップS239)。さらに、アクセス待ちリスト104の同一キーに対して待つアクセスの1つ前の要素に注目して、ステップS221に戻り、ライト関数実行部204は、上記と同様な処理を繰り返す(ステップS241)。アクセス待ちリスト104の同一キーに対して待つアクセスの全ての要素について処理が終了したら、ライト関数実行部204は、最後に空の要素に対して処理を繰り返した後、本処理を終了する。
When the read access is registered (YES in step S231), that is, in the state of FIG. 20 or FIG. 2, the write
たとえば、図20の状態からKey1を引数に持つライト関数を実行した場合(ステップS231のYES)、アクセス待ちリスト104の末尾にあるリードアクセスは追い越し可能であるため(ステップS235のYES)、ライト関数実行部204は、コールバック実行部112により当該リードアクセスのCallback5を実行させ、当該リードアクセスをアクセス待ちリスト104から取り除く(ステップS239)。すると、アクセス待ちリスト104は、図19の状態になる。そして、ステップS221に戻り、アクセス待ちリスト104の末尾のアキュムレートアクセスに注目して、ライト関数実行部204は、処理を繰り返す(ステップS241)。
For example, when a write function having Key1 as an argument is executed from the state of FIG. 20 (YES in step S231), the read access at the end of the
また、図2の状態からKey1を引数に持つライト関数を実行した場合(ステップS231のYES)、リードアクセスは追い越し可能であるため(ステップS235のYES)、ライト関数実行部204は、コールバック実行部112により当該リードアクセスのコールバックを実行させ、当該アクセス待ちリスト104から削除する(ステップS239)。次に注目する要素がアクセス待ちリスト104にないので、ライト関数実行部204は、空の要素に対して次の繰り返し処理を行う。ここでは、ライトアクセス、アキュムレートアクセス、リードアクセスのいずれも登録されていないため、ライト関数実行部204は、最終的にライト/アキュムレートアクセス発行部208を用いライトアクセスを発行して処理を終了する(ステップS237)。
Further, when the write function having Key1 as an argument is executed from the state of FIG. 2 (YES in step S231), the read access can be overtaken (YES in step S235), so the write
図23は、本実施形態の分散システム1のクライアント装置200のアキュムレート関数実行部206の動作一例を示すフローチャートである。
ライト関数の場合と同様、アキュムレート関数実行部206が、アクセス待ちリスト104において、同一キーに対して待つアクセスをアクセス待ちリスト104の後ろから調べる(ステップS251)。ライトアクセスが登録されている場合(ステップS253のYES:図18の状態)、アキュムレート関数実行部206は、登録されているライトアクセスのバリューを元にアキュムレート演算を実行し、その結果で登録されているライトアクセスのバリューを上書きする(ステップS255)。たとえば、ライト関数に指定されているバリューが1で、アキュムレート関数が2を加算するものであった場合、アキュムレート関数実行部206は、ライト関数に指定するバリューを3に変更する。そして、アキュムレート関数実行部206は、本処理を終了する。FIG. 23 is a flowchart illustrating an example of the operation of the accumulation function execution unit 206 of the
As in the case of the write function, the accumulation function execution unit 206 checks the
アキュムレートアクセスが登録されている場合(ステップS257のYES:図19の状態)、アキュムレート関数実行部206が、まず演算タイプが登録されているものと同じかどうかを調べる(ステップS259)。演算タイプが同じでなければ(ステップS259のNO)、アキュムレート関数実行部206は、アキュムレートアクセスをアクセス待ちリスト104の後ろに登録する(ステップS261)。そして、アキュムレート関数実行部206は、本処理を終了する。演算タイプが同じであれば(ステップS259のYES)、アキュムレート関数実行部206は、登録されているアキュムレートアクセスのバリューと、関数の引数のバリューを元に、アキュムレート演算を行い、その結果で登録されているアキュムレートアクセスのバリューを上書きする(ステップS263)。そして、アキュムレート関数実行部206は、本処理を終了する。 If the accumulation access is registered (YES in step S257: state of FIG. 19), the accumulation function execution unit 206 first checks whether or not the calculation type is the same as that registered (step S259). If the calculation types are not the same (NO in step S259), the accumulation function execution unit 206 registers the accumulation access behind the access waiting list 104 (step S261). Then, the accumulation function execution unit 206 ends this process. If the calculation types are the same (YES in step S259), the accumulation function execution unit 206 performs an accumulation calculation based on the registered accumulation access value and the function argument value, and the result The value of the accumulated access registered in (1) is overwritten (step S263). Then, the accumulation function execution unit 206 ends this process.
たとえば、accumulate(add,Key1,1)が登録されている状態でaccumulate(add, Key1,2)が実行された場合(ステップS257のYES、かつステップS259のYES)、アキュムレート関数実行部206は、登録されているアキュムレートアクセスをaccumulate(add, Key1,3)に変更する(ステップS263)。 For example, when accumulate (add, Key1, 2) is executed in a state where accumulate (add, Key1, 1) is registered (YES in step S257 and YES in step S259), the accumulation function execution unit 206 Then, the registered accumulation access is changed to accumulate (add, Key1, 3) (step S263).
また、リードアクセスが登録されていなければ(ステップS265のNO)、アキュムレート関数実行部206は、ライト/アキュムレートアクセス発行部208を用いアキュムレートアクセスを発行する(ステップS273)。そして、アキュムレート関数実行部206は、本処理を終了する。リードアクセスが登録されている場合(ステップS265のYES)、すなわち、図20の状態、あるいは図2の状態の場合、アキュムレート関数実行部206が、このリードアクセスが追い越し可能かどうかを調べる(ステップS267)。 If read access is not registered (NO in step S265), the accumulation function execution unit 206 issues an accumulation access using the write / accumulate access issuing unit 208 (step S273). Then, the accumulation function execution unit 206 ends this process. When read access is registered (YES in step S265), that is, in the state of FIG. 20 or FIG. 2, the accumulation function execution unit 206 checks whether this read access can be overtaken (step) S267).
追い越し可能でなければ(ステップS267のNO)、アキュムレート関数実行部206は、当該アキュムレートアクセスをこのリードアクセスの後ろに登録する(ステップS261)。そして、アキュムレート関数実行部206は、本処理を終了する。追い越し可能であれば(ステップS267のYES)、アキュムレート関数実行部206は、アクセス待ちリスト104の同一キーに対して待つアクセスの1つ前の要素についてステップS251に戻り、上記と同様な処理を繰り返す(ステップS271)。アクセス待ちリスト104の同一キーに対して待つアクセスの全ての要素について処理が終了したら、アキュムレート関数実行部206は、最後に空の要素に対して処理を繰り返した後、本処理を終了する。
If the overtaking is not possible (NO in step S267), the accumulation function execution unit 206 registers the accumulation access after the read access (step S261). Then, the accumulation function execution unit 206 ends this process. If the overtaking is possible (YES in step S267), the accumulation function execution unit 206 returns to step S251 for the element immediately before the access waiting for the same key in the
たとえば、図20の状態からKey1を引数に持つアキュムレート関数を実行した場合(ステップS265のYES)、アクセス待ちリスト104の末尾にあるリードアクセスは追い越し可能であるため(ステップS267のYES)、アキュムレート関数実行部206は、アクセス待ちリスト104の末尾1つ前のアキュムレートアクセスに注目して処理を繰り返す(ステップS271)。アクセス待ちリスト104の同一キーに対して待つアクセスの全ての要素について処理が終了したら、アキュムレート関数実行部206は、最後に空の要素に対して処理を繰り返した後、本処理を終了する。
For example, when the accumulation function having Key1 as an argument is executed from the state of FIG. 20 (YES in step S265), the read access at the end of the
図2の状態からアキュムレート関数を実行した場合(ステップS265のYES、かつ、ステップS267のNO)、次に注目する要素がアクセス待ちリスト104にないので、アキュムレート関数実行部206は、空の要素に対して次の繰り返し処理を行う。ここでは、ライトアクセス、アキュムレートアクセス、リードアクセスのいずれも登録されていないため(ステップS253のNO、かつ、ステップS257のNO、かつ、ステップS265のNO)、アキュムレート関数実行部206は、最終的にライト/アキュムレートアクセス発行部208を用いてアキュムレートアクセスを発行して処理を終了する(ステップS273)。
When the accumulation function is executed from the state shown in FIG. 2 (YES in step S265 and NO in step S267), the accumulation function executing unit 206 is empty because the next element of interest is not in the
図24は、本実施形態の分散システム1のクライアント装置200のリードアクセス発行部110の動作の一例を示すフローチャートである。ライト/アキュムレートアクセス発行部208は、単純にライトアクセス、アキュムレートアクセスを担当するサーバに発行するだけであるが、リードアクセス発行部110は、対象とするサーバを指定して呼び出され、図24のような動作を行う。
FIG. 24 is a flowchart illustrating an example of the operation of the read
まず、リードアクセス発行部110は、指定されたサーバに対し、アクセス待ちリスト104の先頭から参照し、先頭の待機リードアクセスから順に以下の処理を繰り返し実行する(ステップS281)。リードアクセス発行部110は、複数のリードアクセスについて、それぞれリードアクセスを順に発行、各キーに対応するバリューを受け取る(ステップS283)。決定部210で必要とされる場合は、リードアクセス発行部110は、この発行時刻をアクセス待ちリスト104に記録しておく。
そして、リードアクセス発行部110は、得られたキーとバリューを用い、登録されていたコールバックを実行し、アクセス待ちリスト104から削除する(ステップS285)。アクセス待ちリスト104の後ろに、ステップS283で発行したキーのリードアクセスの発行を待っているライトアクセスが存在した場合(ステップS287のYES)、リードアクセス発行部110は、ライト/アキュムレートアクセス発行部208を用いてライトアクセスを発行する(ステップS289)。First, the read
Then, the read
同様にアキュムレートアクセスが存在した場合(ステップS291のYES)、リードアクセス発行部110は、ライト/アキュムレートアクセス発行部208を用いてアキュムレートアクセスを発行する(ステップS293)。この場合、リードアクセス発行部110は、リードアクセスの発行によって得られたキーとバリューを用い、アキュムレートアクセス後のキーに対応するバリューを計算する(ステップS295)。なお、ライトアクセスもアキュムレートアクセスも存在しない場合(ステップS287のNO、かつ、ステップS291のNO)、リードアクセス発行部110は、ステップS283で受け取ったキーとバリューを用いて計算する。
そして、リードアクセス発行部110は、このキーとバリューの値を用い、後にある当該キーのリード/ライト/アキュムレートアクセスについて(ステップS297のYES)、処理を繰り返し実行する(ステップS298)。存在しない場合(ステップS297のNO)、リードアクセス発行部110は、本処理を終了する。
なお、繰り返し処理において、リードアクセスが後に存在する場合(ステップS299のYES)、ステップS285に戻り、リードアクセスが存在しない場合(ステップS299のNO)、ステップS287に戻ることとなる。Similarly, when there is an accumulating access (YES in step S291), the read
Then, the read
In the iterative process, if read access exists later (YES in step S299), the process returns to step S285, and if no read access exists (NO in step S299), the process returns to step S287.
たとえば、図20の状態から分散テーブルサーバS1に対してリードアクセスを発行したとすると、リードアクセス発行部110は、得られたKey1に対するバリューを用いてアキュムレート処理を実行し、その演算後の値がKey1に対するバリューとして得られたとして、後続のリードアクセスについて繰り返し処理を行う。
For example, if the read access is issued to the distributed table server S1 from the state of FIG. 20, the read
次に、本実施形態のクライアント装置200の決定部210によって決定されるアクセス発行処理の動作について、以下説明する。上記実施形態の決定部108の処理手順を示した図7〜図16を用いて、第1〜第7の方法についてそれぞれ説明する。決定部210は、基本的に上記実施形態の決定部108と同様に動作する。
Next, the operation of the access issue process determined by the
図7に示す第1の方法の決定処理では、まず、決定部210が、リード関数からアクセス待ちリスト104に登録した通知を受け取る(ステップS121)。この通知を受け取ると(ステップS121のYES)、本処理が開始し、決定部210が、アクセス待ちリスト104を参照し、担当するリードアクセスの数が一定数以上のサーバがあるかを調べる(ステップS123)。もしあれば、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(ステップS125)。なお、このリードアクセス発行部110の動作は、実際には、図24を用いて説明した上記動作となるが、以下詳細な説明は省略し、単にリードアクセスを発行するものとして説明する。
In the determination process of the first method shown in FIG. 7, first, the
図8に示す第2の方法の決定処理では、決定部210が、まず、リード関数からアクセス待ちリスト104に登録した通知を受け取る(ステップS121)。この通知を受け取ると(ステップS121のYES)、本処理が開始し、決定部210が、アクセス待ちリスト104で消費されているメモリ量が一定量以上かを調べる(ステップS131)。もし一定量以上であれば(ステップS131のYES)、リードアクセス発行部110が、最もアクセス待ち数が多いサーバに対してリードアクセスを発行する(ステップS133)。
In the determination process of the second method shown in FIG. 8, the
図9に示す第3の方法の決定処理では、決定部210が、まず、リード関数からアクセス待ちリスト104に登録した通知を受け取る(ステップS121)。この通知を受け取ると(ステップS121のYES)、本処理が開始し、決定部210が、アクセス待ちリスト104で消費されているメモリ量が一定量以上かを調べる(ステップS131)。もし一定量以上であれば(ステップS131のYES)、リードアクセス発行部110が、1つのキーあたりにかかるバリュー取得時間が最も少ないサーバに対してリードアクセスを発行する(ステップS141)。1つのキーあたりにかかるバリュー取得時間は、前述の式(1)で求めることができる。
In the determination process of the third method shown in FIG. 9, the
図10〜図12に示す第4の方法の決定処理では、決定部210が、リード関数からアクセス待ちリスト104に登録した通知を受け取る(図10のステップS121のYES)、あるいはリード関数からアクセス待ちリスト104に登録した通知が所定回数以上来る(図11のステップS121のYES、かつ、ステップS161のYES)、あるいはタイマから一定時間ごとに通知をうけとる(図12のステップS171のYES)、のいずれかを契機として、処理を開始する。そして、決定部210が、アクセス待ちリスト104を参照し、1つのキーあたりにかかるバリュー取得時間の最小値が閾値以下のサーバがあるかを調べる(ステップS151)。もしあれば(ステップS151のYES)、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(ステップS125)。
In the determination process of the fourth method shown in FIGS. 10 to 12, the
図13に示す第5の方法の決定処理では、決定部210が、タイマから一定時間ごとに通知を受け取り(ステップS171のYES)、一定時間以上リードアクセスが発行されていないサーバがあるか、アクセス待ちリスト104に記録した前回のリード発行時刻を元に調べる(ステップS181)。もしそのようなサーバがあれば(ステップS181のYES)、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(ステップS125)。
In the determination process of the fifth method shown in FIG. 13, the
図14に示す第6の方法の決定処理では、決定部210が、プログラムから明示的にリードアクセスを発行するサーバを指定した関数を呼び出す(ステップS191)。そして、リードアクセス発行部110が、指定されたタイミングで、指定されたサーバに対して、リードアクセスを発行する(ステップS195)。
In the determination process of the sixth method shown in FIG. 14, the
図15および図16に示す第7の方法の決定処理では、決定部210が、リード関数からアクセス待ちリスト104に登録した通知を受け取る(図15のステップS121)。この通知を受け取ると(図15のステップS121のYES)、決定部210が、アクセス待ちリスト104で消費されているメモリ量が一定量以上かを調べる(図15のステップS131)。もし一定量以上であれば(図15のステップS131のYES)、リードアクセス発行部110が、1つのキーあたりにかかるバリュー取得時間が最も少ないサーバに対してリードアクセスを発行する(図15のステップS141)。そうでなければ(図15のステップS131のNO)、決定部210が、リード関数からアクセス待ちリストに登録した通知が所定回数以上来たかどうかを調べる(図15のステップS161)。なお、本ステップは省略して、成立したものとして次に進んでもよい。
In the determination process of the seventh method shown in FIGS. 15 and 16, the
もし所定回数以上来ていれば(図15のステップS161のYES)、決定部210が、1つのキーあたりにかかるバリュー取得時間の最小値が閾値以下のサーバがあるかを調べる(図15のステップS151)。もしあれば(図15のステップS151のYES)、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(図15のステップS125)。
If the predetermined number of times has been reached (YES in step S161 in FIG. 15), the
また、本方法では、決定部210が、タイマから一定時間ごとに通知を受け取り(図16のステップS171のYES)、一定時間以上リードアクセスが発行されていないサーバがあるか、アクセス待ちリスト104に記録した前回のリード発行時刻を元に調べる(図16のステップS181)。もしそのようなサーバがあれば(図16のステップS181のYES)、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(図16のステップS125)。もしなければ(図16のステップS181のNO)、決定部210が、1つのキーあたりにかかるバリュー取得時間の最小値が閾値以下のサーバがあるかを調べる(図16のステップS151)。もしあれば(図16のステップS151のYES)、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(図16のステップS125)。
Also, in this method, the
また、本方法では、図14に示すように、決定部210が、プログラムから明示的にリードアクセスを発行するサーバを指定した関数を呼び出してもよい(ステップS191)。そして、リードアクセス発行部110が、指定されたタイミングで指定されたサーバに対して、リードアクセスを発行する(ステップS195)。
In this method, as shown in FIG. 14, the
以上説明したように、本発明の実施の形態の分散システム1によれば、上記実施形態と同様な効果を奏するとともに、ライトアクセスやアキュムレートアクセスとともに、効率のよい処理を行うことができる。
As described above, according to the distributed
以上、図面を参照して本発明の実施形態について述べたが、これらは本発明の例示であり、上記以外の様々な構成を採用することもできる。 As mentioned above, although embodiment of this invention was described with reference to drawings, these are the illustrations of this invention, Various structures other than the above are also employable.
たとえば、本発明の実施形態における最小構成は、図27に示すような情報処理装置1000とすることができる。情報処理装置1000は、複数のサーバ(分散テーブルサーバ10)がそれぞれ有する複数の分散テーブル(不図示)からデータを読み出すリード(read)アクセス処理のキー(Key)、および、キーに基づき読み出した結果を用いて実行する処理を定めるコールバック(Callback)、を受け付ける受付部102と、受け付けたリードアクセス処理を待機させ、該当する分散テーブルサーバ10に後で発行する待機リードアクセスとしてキーとコールバックをアクセス待ちリスト104に登録する登録部106と、アクセス待ちリスト104に登録された待機リードアクセスについて、所定の条件に従い、待機リードアクセスを発行する発行先の分散テーブルサーバ10および発行タイミングを決定する決定部108と、決定部108が決定した発行先の分散テーブルサーバ10に、決定した発行タイミングで、待機リードアクセスを発行し、分散テーブルサーバ10から当該アクセス結果を受け取るリードアクセス発行部110と、リードアクセス発行部110が受け取ったアクセス結果(バリュー)を用いて、アクセス待ちリスト104に登録された該当する待機リードアクセスのコールバックを実行し、実行したコールバックの待機リードアクセスをアクセス待ちリスト104から削除するコールバック実行部112と、を備える。
For example, the minimum configuration in the embodiment of the present invention may be an
図27の情報処理装置1000は、上記実施形態のクライアント装置を実現する図3のコンピュータ60と同様なコンピュータのハードウェアとソフトウェアの任意の組み合わせによって実現される。図27は、ハードウェア単位の構成ではなく、論理的な機能単位のブロックを示している。
本実施の形態の情報処理装置1000では、コンピュータプログラムに対応する各種の処理動作をコンピュータのCPUが実行することにより、図27の各種ユニットが各種機能として実現される。The
In the
この構成によれば、情報処理装置1000が、任意のプログラムを対象として、プログラム上の任意の場所に現れる分散テーブルサーバ10へのリード関数による複数のリードアクセス処理を、リードアクセス毎に行うのではなく、アクセス待ちリスト104に登録して一定数以上待機させることで、サーバ毎にまとめて実行することができる。そして、この構成により、プログラム上に複数現れるリードアクセス処理を、その都度処理する場合に比較して、リードアクセス時にかかるレイテンシによるアクセス処理速度への影響を削減することができ、高速化を図ることができる。
According to this configuration, the
以上、実施形態および実施例を参照して本願発明を説明したが、本願発明は上記実施形態および実施例に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。 While the present invention has been described with reference to the embodiments and examples, the present invention is not limited to the above embodiments and examples. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.
以下、参考形態の例を付記する。
1. 複数のサーバがそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、前記キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付ける受付手段と、
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録する登録手段と、
前記アクセス待ちリストに登録された前記待機リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行する発行先のサーバおよび発行タイミングを決定する決定手段と、
前記決定手段が決定した前記発行先の前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取るリードアクセス発行手段と、
前記リードアクセス発行手段が受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除するコールバック実行手段と、を備える分散システム。
2. 1.に記載の分散システムにおいて、
前記登録手段は、前記サーバ毎、または前記キー毎に、前記待機リードアクセスを分類して前記アクセス待ちリストに登録し、
前記決定手段は、前記サーバ毎または前記キー毎に、前記待機リードアクセスの前記発行タイミングを決定する分散システム。
3. 1.または2に記載の分散システムにおいて、
前記決定手段は、各前記サーバの性能情報に基づいて求まる、前記キー1つあたりにかかる前記アクセス結果の取得時間に基づいて、前記リードアクセスの前記発行先となるサーバを選択する分散システム。
4. 1.乃至3.いずれかに記載の分散システムにおいて、
前記決定手段は、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が一定数以上になったときを、前記発行タイミングであると決定する分散システム。
5. 1.乃至4.いずれかに記載の分散システムにおいて、
前記決定手段は、
前記アクセス待ちリストのメモリ量が一定量以上になった場合、前記発行タイミングになったと判断し、
前記メモリ量が一定量以上になった時点で、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が多いサーバを前記リードアクセスの前記発行先として選択する分散システム。
6. 1.乃至5.いずれかに記載の分散システムにおいて、
前記決定手段は、一定時間以上、前記リードアクセス発行手段により前記リードアクセスが発行されていないサーバを前記リードアクセスの前記発行先として選択する分散システム。
7. 1.乃至6.いずれかに記載の分散システムにおいて、
前記受付手段は、前記分散テーブルのキーに対して値を書き込むライトアクセス処理をさらに受け付け、
前記アクセス待ちリストを参照し、前記ライトアクセス処理と同じキーに対する前記待機リードアクセスが存在する場合、前記コールバック実行手段は、前記ライトアクセス処理の前記値で前記待機リードアクセスの前記コールバックを実行し、前記アクセス待ちリストから当該待機リードアクセスを削除する分散システム。
8. 7.に記載の分散システムにおいて、
前記受付手段は、前記リードアクセス処理より後に受け付ける前記ライトアクセス処理を、先に処理することを禁止する禁止フラグを、前記リードアクセス処理の前記キーと前記コールバックとともに受け付け、
前記登録手段は、受け付けた前記禁止フラグを前記待機リードアクセスの前記キーおよび前記コールバックとともに前記アクセス待ちリストに登録し、
さらに、前記登録手段は、前記アクセス待ちリストを参照し、受け付けた前記ライトアクセス処理と同じキーに対する前記待機リードアクセスの前記禁止フラグが登録されている場合、受け付けた前記ライトアクセス処理を待機させ、該当するサーバに後で発行する待機ライトアクセスとして前記キーと前記値を前記アクセス待ちリストに登録する分散システム。
9. 3.に記載の分散システムにおいて、
前記決定手段は、前記キー1つあたりにかかる前記アクセス結果の取得時間を前記サーバ毎に算出し、最小値が閾値以下のサーバを前記リードアクセスの前記発行先として選択する分散システム。
10. 9.に記載の分散システムにおいて、
前記決定手段は、前記登録手段が、前記アクセス待ちリストに前記待機リードアクセスを登録する度に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う分散システム。
11. 9.に記載の分散システムにおいて、
前記決定手段は、前記登録手段による前記アクセス待ちリストへの前記待機リードアクセスの登録が所定回数毎に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う分散システム。
12. 9.に記載の分散システムにおいて、
前記決定手段は、一定時間毎に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う分散システム。
13. 1.乃至12.いずれかに記載の分散システムにおいて、
前記決定手段は、前記リードアクセスの前記発行先と、前記発行タイミングの指定を受け付け、前記指定に従い、前記リードアクセスの前記発行先と、前記発行タイミングを決定する分散システム。Hereinafter, examples of the reference form will be added.
1. Receiving means for receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
Registration means for waiting the read access process received and registering the key and the callback in an access waiting list as standby read access to be issued later to a corresponding server;
For the standby read access registered in the access waiting list, in accordance with a predetermined condition, a determination unit that determines an issue destination server that issues the standby read access and an issue timing;
Read access issuing means for issuing the standby read access to the server of the issue destination determined by the determining means at the determined issue timing and receiving the access result from the server;
Using the access result received by the read access issuing means, the callback of the corresponding standby read access registered in the access waiting list is executed, and the standby read access of the executed callback is waited for the access And a callback execution means for deleting from the list.
2. 1. In the distributed system described in
The registration means classifies the standby read access for each server or each key and registers it in the access waiting list,
The determination unit is a distributed system that determines the issuance timing of the standby read access for each server or each key.
3. 1. Or in the distributed system according to 2,
The distributed system, wherein the determination unit selects a server that is the issue destination of the read access based on an acquisition time of the access result for each key obtained based on performance information of each server.
4). 1. To 3. In any one of the distributed systems,
The distributed system determines that the issue timing is when the number of standby read accesses registered in the access waiting list exceeds a certain number.
5. 1. To 4. In any one of the distributed systems,
The determining means includes
When the amount of memory in the access waiting list exceeds a certain amount, it is determined that the issue timing has been reached,
A distributed system that selects a server with a large number of standby read accesses registered in the access waiting list as the issue destination of the read access when the amount of memory exceeds a certain amount.
6). 1. To 5. In any one of the distributed systems,
The distributed system selects the server to which the read access is not issued by the read access issuing means as the issue destination of the read access for a predetermined time or more.
7). 1. To 6. In any one of the distributed systems,
The accepting means further accepts a write access process for writing a value to the key of the distributed table;
If the standby read access to the same key as the write access process exists with reference to the access waiting list, the callback execution means executes the callback of the standby read access with the value of the write access process And a distributed system for deleting the standby read access from the access waiting list.
8). 7). In the distributed system described in
The accepting unit accepts a prohibition flag that prohibits processing the write access process received after the read access process, together with the key and the callback of the read access process,
The registration means registers the received prohibition flag in the access waiting list together with the key of the standby read access and the callback,
Further, the registration means refers to the access waiting list, and when the prohibition flag of the standby read access for the same key as the accepted write access process is registered, the accepted write access process is made to wait, A distributed system for registering the key and the value in the access waiting list as a standby write access to be issued later to a corresponding server.
9. 3. In the distributed system described in
The determination unit calculates a time for obtaining the access result per key, for each server, and selects a server having a minimum value equal to or less than a threshold value as the issue destination of the read access.
10. 9. In the distributed system described in
The determination means calculates the acquisition time of the access result per one key each time the registration means registers the standby read access in the access waiting list, and A distributed system that makes prior choices.
11. 9. In the distributed system described in
The determination unit calculates the acquisition time of the access result per one key for each predetermined number of registrations of the standby read access to the access waiting list by the registration unit. A distributed system for selecting the issue destination.
12 9. In the distributed system described in
The distributed system is a distributed system that calculates the acquisition time of the access result per one key at regular time intervals, and selects the issue destination each time it is calculated.
13. 1. To 12. In any one of the distributed systems,
The distributed system receives a designation of the issue destination of the read access and the issue timing, and determines the issue destination of the read access and the issue timing according to the designation.
14. 情報処理装置が、
複数のサーバがそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、前記キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付け、
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録し、
前記アクセス待ちリストに登録された前記リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行するサーバおよび発行タイミングを決定し、
決定した前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取り、
受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除する情報処理装置のデータ処理方法。
15. 14.に記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
前記リードアクセス処理を受け付けたとき、前記サーバ毎、または前記キー毎に、前記待機リードアクセスを分類して前記アクセス待ちリストに登録し、
前記アクセス待ちリストに登録された前記リードアクセスについて、前記サーバ毎または前記キー毎に、前記待機リードアクセスの前記発行タイミングを決定する情報処理装置のデータ処理方法。
16. 14.または15.に記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
各前記サーバの性能情報に基づいて求まる、前記キー1つあたりにかかる前記アクセス結果の取得時間に基づいて、前記リードアクセスの前記発行先となるサーバを選択する情報処理装置のデータ処理方法。
17. 14.乃至16.いずれかに記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
前記アクセス待ちリストに登録された前記待機リードアクセスの件数が一定数以上になったときを、前記発行タイミングであると決定する情報処理装置のデータ処理方法。
18. 14.乃至17.いずれかに記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
前記アクセス待ちリストのメモリ量が一定量以上になった場合、前記発行タイミングになったと判断し、
前記メモリ量が一定量以上になった時点で、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が多いサーバを前記リードアクセスの前記発行先として選択する情報処理装置のデータ処理方法。
19. 14.乃至18.いずれかに記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
一定時間以上、前記リードアクセスが発行されていないサーバを前記リードアクセスの前記発行先として選択する情報処理装置のデータ処理方法。
20. 14.乃至19.いずれかに記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
前記分散テーブルのキーに対して値を書き込むライトアクセス処理をさらに受け付け、
前記アクセス待ちリストを参照し、前記ライトアクセス処理と同じキーに対する前記待機リードアクセスが存在する場合、前記ライトアクセス処理の前記値で前記待機リードアクセスの前記コールバックを実行し、前記アクセス待ちリストから当該待機リードアクセスを削除する情報処理装置のデータ処理方法。
21. 20.に記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
前記リードアクセス処理より後に受け付ける前記ライトアクセス処理を、先に処理することを禁止する禁止フラグを、前記リードアクセス処理の前記キーと前記コールバックとともに受け付け、
受け付けた前記禁止フラグを前記待機リードアクセスの前記キーおよび前記コールバックとともに前記アクセス待ちリストに登録し、
さらに、前記アクセス待ちリストを参照し、受け付けた前記ライトアクセス処理と同じキーに対する前記待機リードアクセスの前記禁止フラグが登録されている場合、受け付けた前記ライトアクセス処理を待機させ、該当するサーバに後で発行する待機ライトアクセスとして前記キーと前記値を前記アクセス待ちリストに登録する情報処理装置のデータ処理方法。
22. 16.に記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
前記キー1つあたりにかかる前記アクセス結果の取得時間を前記サーバ毎に算出し、最小値が閾値以下のサーバを前記リードアクセスの前記発行先として選択する情報処理装置のデータ処理方法。
23. 22.に記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
前記アクセス待ちリストに前記待機リードアクセスを登録する度に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う情報処理装置のデータ処理方法。
24. 22.に記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
前記アクセス待ちリストへの前記待機リードアクセスの登録が所定回数毎に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う情報処理装置のデータ処理方法。
25. 22.に記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
一定時間毎に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う情報処理装置のデータ処理方法。
26. 14.乃至25.いずれかに記載の情報処理装置のデータ処理方法において、
前記情報処理装置が、
前記リードアクセスの前記発行先と、前記発行タイミングの指定を受け付け、前記指定に従い、前記リードアクセスの前記発行先と、前記発行タイミングを決定する情報処理装置のデータ処理方法。14 Information processing device
Receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
Waiting for the accepted read access processing, registering the key and the callback in the access waiting list as standby read access to be issued later to the corresponding server,
For the read access registered in the access waiting list, in accordance with a predetermined condition, determine a server that issues the standby read access and an issue timing,
Issuing the standby read access at the determined issue timing to the determined server, receiving the access result from the server,
Information processing for executing the callback of the corresponding standby read access registered in the access waiting list using the received access result and deleting the standby read access of the executed callback from the access waiting list Device data processing method.
15. 14 In the data processing method of the information processing device described in
The information processing apparatus is
When the read access processing is accepted, the standby read access is classified and registered in the access waiting list for each server or for each key,
A data processing method of an information processing apparatus for determining the issuance timing of the standby read access for each of the servers or for each key of the read access registered in the access waiting list.
16. 14 Or 15. In the data processing method of the information processing device described in
The information processing apparatus is
A data processing method of an information processing apparatus for selecting a server that is the issue destination of the read access based on an acquisition time of the access result for each key obtained based on performance information of each of the servers.
17. 14 To 16. In the data processing method of the information processing apparatus according to any one of the above,
The information processing apparatus is
A data processing method of an information processing apparatus that determines that the issue timing is when the number of standby read accesses registered in the access waiting list exceeds a certain number.
18. 14 To 17. In the data processing method of the information processing apparatus according to any one of the above,
The information processing apparatus is
When the amount of memory in the access waiting list exceeds a certain amount, it is determined that the issue timing has been reached,
A data processing method of an information processing apparatus that selects a server having a large number of standby read accesses registered in the access waiting list as the issue destination of the read access when the memory amount becomes a predetermined amount or more.
19. 14 To 18. In the data processing method of the information processing apparatus according to any one of the above,
The information processing apparatus is
A data processing method of an information processing apparatus that selects a server to which the read access is not issued for a certain time or more as the issue destination of the read access.
20. 14 Thru 19. In the data processing method of the information processing apparatus according to any one of the above,
The information processing apparatus is
Further accepting a write access process for writing a value to the key of the distributed table;
If the standby read access to the same key as the write access processing exists with reference to the access waiting list, the callback of the standby read access is executed with the value of the write access processing, and the access waiting list A data processing method of an information processing apparatus for deleting the standby read access.
21. 20. In the data processing method of the information processing device described in
The information processing apparatus is
The prohibition flag for prohibiting the write access process received after the read access process from being processed first is received together with the key and the callback of the read access process,
Registering the accepted prohibition flag in the access waiting list together with the key of the standby read access and the callback;
Further, referring to the access waiting list, if the prohibit flag for the standby read access for the same key as the accepted write access process is registered, the accepted write access process is made to wait and the corresponding server is A data processing method of an information processing apparatus for registering the key and the value in the access waiting list as standby write access issued in step (1).
22. 16. In the data processing method of the information processing device described in
The information processing apparatus is
A data processing method of an information processing apparatus that calculates an acquisition time of the access result per one key for each server and selects a server having a minimum value equal to or less than a threshold as the issue destination of the read access.
23. 22. In the data processing method of the information processing device described in
The information processing apparatus is
Each time the standby read access is registered in the access waiting list, the acquisition time of the access result for each key is calculated, and each time it is calculated, data of the information processing apparatus that selects the issue destination Processing method.
24. 22. In the data processing method of the information processing device described in
The information processing apparatus is
Information processing for calculating the acquisition time of the access result per one key every time the registration of the standby read access to the access waiting list is performed a predetermined number of times, and selecting the issue destination each time it is calculated Device data processing method.
25. 22. In the data processing method of the information processing device described in
The information processing apparatus is
A data processing method of an information processing apparatus that calculates an acquisition time of the access result for each key at a certain time, and selects the issue destination each time it is calculated.
26. 14 To 25. In the data processing method of the information processing apparatus according to any one of the above,
The information processing apparatus is
A data processing method of an information processing apparatus that accepts specification of the issue destination of the read access and the issue timing, and determines the issue destination of the read access and the issue timing according to the specification.
27. 情報処理装置を実現するコンピュータに、
複数のサーバがそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、前記キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付ける手順、
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録する手順、
前記アクセス待ちリストに登録された前記待機リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行するサーバおよび発行タイミングを決定する手順、
決定した前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取る手順、
受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除する手順、を実行させるためのプログラム。
28. 27.に記載のプログラムにおいて、
前記リードアクセス処理を受け付けたとき、前記サーバ毎、または前記キー毎に、前記待機リードアクセスを分類して前記アクセス待ちリストに登録する手順、
前記アクセス待ちリストに登録された前記リードアクセスについて、前記サーバ毎または前記キー毎に、前記待機リードアクセスの前記発行タイミングを決定する手順をコンピュータに実行させるためのプログラム。
29. 27.または28.に記載のプログラムにおいて、
各前記サーバの性能情報に基づいて求まる、前記キー1つあたりにかかる前記アクセス結果の取得時間に基づいて、前記リードアクセスの前記発行先となるサーバを選択する手順をコンピュータに実行させるためのプログラム。
30. 27.乃至29.いずれかに記載のプログラムにおいて、
前記アクセス待ちリストに登録された前記待機リードアクセスの件数が一定数以上になったときを、前記発行タイミングであると決定する手順をコンピュータに実行させるためのプログラム。
31. 27.乃至30.いずれかに記載のプログラムにおいて、
前記アクセス待ちリストのメモリ量が一定量以上になった場合、前記発行タイミングになったと判断する手順、
前記メモリ量が一定量以上になった時点で、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が多いサーバを前記リードアクセスの前記発行先として選択する手順をコンピュータに実行させるためのプログラム。
32. 27.乃至31.いずれかに記載のプログラムにおいて、
一定時間以上、前記リードアクセスが発行されていないサーバを前記リードアクセスの前記発行先として選択する手順をコンピュータに実行させるためのプログラム。
33. 27.乃至32.いずれかに記載のプログラムにおいて、
前記分散テーブルのキーに対して値を書き込むライトアクセス処理をさらに受け付ける手順、
前記アクセス待ちリストを参照し、前記ライトアクセス処理と同じキーに対する前記待機リードアクセスが存在する場合、前記ライトアクセス処理の前記値で前記待機リードアクセスの前記コールバックを実行する手順、
前記アクセス待ちリストから当該待機リードアクセスを削除する手順をコンピュータに実行させるためのプログラム。
34. 33.に記載のプログラムにおいて、
前記リードアクセス処理より後に受け付ける前記ライトアクセス処理を、先に処理することを禁止する禁止フラグを、前記リードアクセス処理の前記キーと前記コールバックとともに受け付ける手順、
受け付けた前記禁止フラグを前記待機リードアクセスの前記キーおよび前記コールバックとともに前記アクセス待ちリストに登録する手順、
前記アクセス待ちリストを参照し、受け付けた前記ライトアクセス処理と同じキーに対する前記待機リードアクセスの前記禁止フラグが登録されている場合、受け付けた前記ライトアクセス処理を待機させ、該当するサーバに後で発行する待機ライトアクセスとして前記キーと前記値を前記アクセス待ちリストに登録する手順をコンピュータに実行させるためのプログラム。
35. 29.に記載のプログラムにおいて、
前記キー1つあたりにかかる前記アクセス結果の取得時間を前記サーバ毎に算出し、最小値が閾値以下のサーバを前記リードアクセスの前記発行先として選択する手順をコンピュータに実行させるためのプログラム。
36. 35.に記載のプログラムにおいて、
前記アクセス待ちリストに前記待機リードアクセスを登録する度に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う手順をコンピュータに実行させるためのプログラム。
37. 35.に記載のプログラムにおいて、
前記アクセス待ちリストへの前記待機リードアクセスの登録が所定回数毎に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う手順をコンピュータに実行させるためのプログラム。
38. 35.に記載のプログラムにおいて、
一定時間毎に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う手順をコンピュータに実行させるためのプログラム。
39. 27.乃至38.いずれかに記載のプログラムにおいて、
前記リードアクセスの前記発行先と、前記発行タイミングの指定を受け付ける手順、
前記指定に従い、前記リードアクセスの前記発行先と、前記発行タイミングを決定する手順をコンピュータに実行させるためのプログラム。27. In a computer that implements an information processing device,
A procedure for receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
A procedure for causing the received read access process to wait and registering the key and the callback in an access waiting list as standby read access to be issued later to a corresponding server,
A procedure for determining a server that issues the standby read access and an issue timing for the standby read access registered in the access waiting list according to a predetermined condition;
A procedure of issuing the standby read access to the determined server at the determined issue timing and receiving the access result from the server;
Executing the callback of the corresponding standby read access registered in the access waiting list using the received access result, and deleting the standby read access of the executed callback from the access waiting list; A program for running
28. 27. In the program described in
A procedure for classifying the standby read access and registering it in the access waiting list for each server or for each key when the read access processing is accepted,
A program for causing a computer to execute a procedure for determining the issuance timing of the standby read access for each of the servers or the keys for the read access registered in the access waiting list.
29. 27. Or 28. In the program described in
A program for causing a computer to execute a procedure for selecting a server to which the read access is issued based on the access result acquisition time per key obtained from the performance information of each server .
30. 27. Thru 29. In any program,
A program for causing a computer to execute a procedure for determining that it is the issue timing when the number of standby read accesses registered in the access waiting list exceeds a certain number.
31. 27. Thru 30. In any program,
A procedure for determining that the issue timing has been reached when the memory amount of the access waiting list exceeds a predetermined amount;
A program for causing a computer to execute a procedure for selecting a server having a large number of standby read accesses registered in the access waiting list as the issue destination of the read access when the memory amount becomes a predetermined amount or more .
32. 27. Thru 31. In any program,
A program for causing a computer to execute a procedure of selecting a server to which the read access has not been issued as the issue destination of the read access for a predetermined time or more.
33. 27. Thru 32. In any program,
A procedure for further receiving a write access process for writing a value to the key of the distributed table;
A step of referring to the access waiting list and executing the callback of the standby read access with the value of the write access process when the standby read access to the same key as the write access process exists;
A program for causing a computer to execute a procedure for deleting the standby read access from the access waiting list.
34. 33. In the program described in
A procedure of accepting a prohibition flag for prohibiting the processing of the write access processing received after the read access processing, together with the key and the callback of the read access processing;
Registering the accepted prohibition flag in the access waiting list together with the key of the standby read access and the callback;
If the prohibit flag of the standby read access for the same key as the accepted write access process is registered with reference to the access waiting list, the accepted write access process is waited and issued to the corresponding server later A program for causing a computer to execute a procedure for registering the key and the value in the access waiting list as standby write access to be performed.
35. 29. In the program described in
A program for causing a computer to execute a procedure for calculating, for each server, an access result acquisition time for each key, and selecting a server having a minimum value equal to or less than a threshold as the issue destination of the read access.
36. 35. In the program described in
Each time the standby read access is registered in the access waiting list, the acquisition time of the access result for each key is calculated, and each time the calculation is performed, a procedure for selecting the issue destination is executed on the computer. Program to let you.
37. 35. In the program described in
A procedure for calculating the acquisition time of the access result per one key every time the registration of the standby read access to the access waiting list is performed a predetermined number of times, and selecting the issue destination each time it is calculated A program that causes a computer to execute.
38. 35. In the program described in
A program for calculating the access result acquisition time per one key at regular intervals, and causing the computer to execute a procedure for selecting the issue destination each time the key is calculated.
39. 27. Thru 38. In any program,
A procedure for accepting designation of the issue destination of the read access and the issue timing;
A program for causing a computer to execute a procedure for determining the issuance destination of the read access and the issuance timing in accordance with the designation.
40. 複数のサーバがそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、前記キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付ける受付手段と、
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録する登録手段と、
前記アクセス待ちリストに登録された前記待機リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行する発行先のサーバおよび発行タイミングを決定する決定手段と、
前記決定手段が決定した前記発行先の前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取るリードアクセス発行手段と、
前記リードアクセス発行手段が受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除するコールバック実行手段と、を備える情報処理装置。
41. 40.に記載の情報処理装置において、
前記登録手段は、前記サーバ毎、または前記キー毎に、前記待機リードアクセスを分類して前記アクセス待ちリストに登録し、
前記決定手段は、前記サーバ毎または前記キー毎に、前記待機リードアクセスの前記発行タイミングを決定する情報処理装置。
42. 40.または41.に記載の情報処理装置において、
前記決定手段は、各前記サーバの性能情報に基づいて求まる、前記キー1つあたりにかかる前記アクセス結果の取得時間に基づいて、前記待機リードアクセスの前記発行先となるサーバを選択する情報処理装置。
43. 40.乃至42.いずれかに記載の情報処理装置において、
前記決定手段は、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が一定数以上になったときを、前記発行タイミングであると決定する情報処理装置。
44. 40.乃至43.いずれかに記載の情報処理装置において、
前記決定手段は、
前記アクセス待ちリストのメモリ量が一定量以上になった場合、前記発行タイミングになったと判断し、
前記メモリ量が一定量以上になった時点で、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が多いサーバを前記待機リードアクセスの前記発行先として選択する情報処理装置。
45. 40.乃至44.いずれかに記載の情報処理装置において、
前記決定手段は、一定時間以上、前記リードアクセス発行手段により前記待機リードアクセスが発行されていないサーバを前記待機リードアクセスの前記発行先として選択する情報処理装置。
46. 40.乃至45.いずれかに記載の情報処理装置において、
前記受付手段は、前記分散テーブルのキーに対して値を書き込むライトアクセス処理をさらに受け付け、
前記アクセス待ちリストを参照し、前記ライトアクセス処理と同じキーに対する前記待機リードアクセスが存在する場合、前記コールバック実行手段は、前記ライトアクセス処理の前記値で前記待機リードアクセスの前記コールバックを実行し、前記アクセス待ちリストから当該待機リードアクセスを削除する情報処理装置。
47. 46.に記載の情報処理装置において、
前記受付手段は、前記リードアクセス処理より後に受け付ける前記ライトアクセス処理を、先に処理することを禁止する禁止フラグを、前記リードアクセス処理の前記キーと前記コールバックとともに受け付け、
前記登録手段は、受け付けた前記禁止フラグを前記待機リードアクセスの前記キーおよび前記コールバックとともに前記アクセス待ちリストに登録し、
さらに、前記登録手段は、前記アクセス待ちリストを参照し、受け付けた前記ライトアクセス処理と同じキーに対する前記待機リードアクセスの前記禁止フラグが登録されている場合、受け付けた前記ライトアクセス処理を待機させ、該当するサーバに後で発行する待機ライトアクセスとして前記キーと前記値を前記アクセス待ちリストに登録する情報処理装置。
48. 42.に記載の情報処理装置において、
前記決定手段は、前記キー1つあたりにかかる前記アクセス結果の取得時間を前記サーバ毎に算出し、最小値が閾値以下のサーバを前記リードアクセスの前記発行先として選択する情報処理装置。
49. 48.に記載の情報処理装置において、
前記決定手段は、前記登録手段が、前記アクセス待ちリストに前記待機リードアクセスを登録する度に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う情報処理装置。
50. 48.に記載の情報処理装置において、
前記決定手段は、前記登録手段による前記アクセス待ちリストへの前記待機リードアクセスの登録が所定回数毎に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う情報処理装置。
51. 48.に記載の情報処理装置において、
前記決定手段は、一定時間毎に、前記キー1つあたりにかかる前記アクセス結果の取得時間を算出し、算出される度に、前記発行先の選択を行う情報処理装置。
52. 40.乃至51.いずれかに記載の情報処理装置において、
前記決定手段は、前記リードアクセスの前記発行先と、前記発行タイミングの指定を受け付け、前記指定に従い、前記リードアクセスの前記発行先と、前記発行タイミングを決定する情報処理装置。40. Receiving means for receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
Registration means for waiting the read access process received and registering the key and the callback in an access waiting list as standby read access to be issued later to a corresponding server;
For the standby read access registered in the access waiting list, in accordance with a predetermined condition, a determination unit that determines an issue destination server that issues the standby read access and an issue timing;
Read access issuing means for issuing the standby read access to the server of the issue destination determined by the determining means at the determined issue timing and receiving the access result from the server;
Using the access result received by the read access issuing means, the callback of the corresponding standby read access registered in the access waiting list is executed, and the standby read access of the executed callback is waited for the access An information processing apparatus comprising: callback execution means for deleting from the list.
41. 40. In the information processing apparatus described in
The registration means classifies the standby read access for each server or each key and registers it in the access waiting list,
The information processing apparatus that determines the issuing timing of the standby read access for each server or each key.
42. 40. Or 41. In the information processing apparatus described in
The information processing apparatus that selects the server that is the issue destination of the standby read access based on the access result acquisition time per key that is obtained based on the performance information of each server. .
43. 40. Thru 42. In the information processing apparatus according to any one of the above,
The information processing apparatus, wherein the determining unit determines that the issue timing is when the number of the standby read accesses registered in the access waiting list exceeds a certain number.
44. 40. Thru 43. In the information processing apparatus according to any one of the above,
The determining means includes
When the amount of memory in the access waiting list exceeds a certain amount, it is determined that the issue timing has been reached,
An information processing apparatus that selects a server having a large number of standby read accesses registered in the access waiting list as the issuing destination of the standby read access when the memory amount becomes a predetermined amount or more.
45. 40. To 44. In the information processing apparatus according to any one of the above,
The information processing apparatus, wherein the determination unit selects a server to which the standby read access has not been issued by the read access issuing unit for a predetermined time or more as the issue destination of the standby read access.
46. 40. To 45. In the information processing apparatus according to any one of the above,
The accepting means further accepts a write access process for writing a value to the key of the distributed table;
If the standby read access to the same key as the write access process exists with reference to the access waiting list, the callback execution means executes the callback of the standby read access with the value of the write access process An information processing apparatus that deletes the standby read access from the access waiting list.
47. 46. In the information processing apparatus described in
The accepting unit accepts a prohibition flag that prohibits processing the write access process received after the read access process, together with the key and the callback of the read access process,
The registration means registers the received prohibition flag in the access waiting list together with the key of the standby read access and the callback,
Further, the registration means refers to the access waiting list, and when the prohibition flag of the standby read access for the same key as the accepted write access process is registered, the accepted write access process is made to wait, An information processing apparatus that registers the key and the value in the access waiting list as a standby write access to be issued later to a corresponding server.
48. 42. In the information processing apparatus described in
The information processing apparatus, wherein the determination unit calculates an access result acquisition time for each key for each server, and selects a server having a minimum value equal to or less than a threshold as the issue destination of the read access.
49. 48. In the information processing apparatus described in
The determination means calculates the acquisition time of the access result per one key each time the registration means registers the standby read access in the access waiting list, and An information processing apparatus that performs the previous selection.
50. 48. In the information processing apparatus described in
The determination unit calculates the acquisition time of the access result per one key for each predetermined number of registrations of the standby read access to the access waiting list by the registration unit. An information processing apparatus for selecting the issue destination.
51. 48. In the information processing apparatus described in
The information processing apparatus, wherein the determination unit calculates an acquisition time of the access result for each key at regular time intervals, and selects the issue destination each time it is calculated.
52. 40. To 51. In the information processing apparatus according to any one of the above,
The information processing apparatus, wherein the determination unit receives a specification of the issue destination of the read access and the issue timing, and determines the issue destination of the read access and the issue timing according to the specification.
53. 40.乃至52.いずれかに記載の情報処理装置と、
前記情報処理装置がアクセスする複数の分散テーブルをそれぞれ有する複数のサーバと、を備える分散システム。53. 40. To 52. An information processing apparatus according to any one of the above;
And a plurality of servers each having a plurality of distributed tables accessed by the information processing apparatus.
この出願は、2012年8月31日に出願された日本特許出願特願2012−192453を基礎とする優先権を主張し、その開示の全てをここに取り込む。 This application claims the priority on the basis of Japanese patent application Japanese Patent Application No. 2012-192453 for which it applied on August 31, 2012, and takes in those the indications of all here.
Claims (10)
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録する登録手段と、
前記アクセス待ちリストに登録された前記待機リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行する発行先のサーバおよび発行タイミングを決定する決定手段と、
前記決定手段が決定した前記発行先の前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取るリードアクセス発行手段と、
前記リードアクセス発行手段が受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除するコールバック実行手段と、を備える分散システム。Receiving means for receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
Registration means for waiting the read access process received and registering the key and the callback in an access waiting list as standby read access to be issued later to a corresponding server;
For the standby read access registered in the access waiting list, in accordance with a predetermined condition, a determination unit that determines an issue destination server that issues the standby read access and an issue timing;
Read access issuing means for issuing the standby read access to the server of the issue destination determined by the determining means at the determined issue timing and receiving the access result from the server;
Using the access result received by the read access issuing means, the callback of the corresponding standby read access registered in the access waiting list is executed, and the standby read access of the executed callback is waited for the access And a callback execution means for deleting from the list.
前記登録手段は、前記サーバ毎、または前記キー毎に、前記待機リードアクセスを分類して前記アクセス待ちリストに登録し、
前記決定手段は、前記サーバ毎または前記キー毎に、前記待機リードアクセスの前記発行タイミングを決定する分散システム。The distributed system according to claim 1,
The registration means classifies the standby read access for each server or each key and registers it in the access waiting list,
The determination unit is a distributed system that determines the issuance timing of the standby read access for each server or each key.
前記決定手段は、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が一定数以上になったときを、前記発行タイミングであると決定する分散システム。The distributed system according to claim 1 or 2,
The distributed system determines that the issue timing is when the number of standby read accesses registered in the access waiting list exceeds a certain number.
前記決定手段は、
前記アクセス待ちリストのメモリ量が一定量以上になった場合、前記発行タイミングになったと判断し、
前記メモリ量が一定量以上になった時点で、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が多いサーバを前記待機リードアクセスの前記発行先として選択する分散システム。The distributed system according to any one of claims 1 to 3,
The determining means includes
When the amount of memory in the access waiting list exceeds a certain amount, it is determined that the issue timing has been reached,
A distributed system that selects a server with a large number of standby read accesses registered in the access waiting list as the issue destination of the standby read access when the memory amount becomes a predetermined amount or more.
前記決定手段は、各前記サーバの性能情報に基づいて求まる、前記キー1つあたりにかかる前記アクセス結果の取得時間に基づいて、前記待機リードアクセスの前記発行先となるサーバを選択する分散システム。The distributed system according to any one of claims 1 to 4,
The distributed system, wherein the determination unit selects a server that is the issue destination of the standby read access based on an acquisition time of the access result for each key obtained based on performance information of each server.
前記決定手段は、一定時間以上、前記リードアクセス発行手段により前記待機リードアクセスが発行されていないサーバを前記待機リードアクセスの前記発行先として選択する分散システム。The distributed system according to any one of claims 1 to 5,
The distributed system, wherein the determination unit selects a server to which the standby read access is not issued by the read access issuing unit for a predetermined time or more as the issue destination of the standby read access.
前記受付手段は、前記分散テーブルのキーに対して値を書き込むライトアクセス処理をさらに受け付け、
前記アクセス待ちリストを参照し、前記ライトアクセス処理と同じキーに対する前記待機リードアクセスが存在する場合、前記コールバック実行手段は、前記ライトアクセス処理の前記値で前記待機リードアクセスの前記コールバックを実行し、前記アクセス待ちリストから当該待機リードアクセスを削除する分散システム。The distributed system according to any one of claims 1 to 6,
The accepting means further accepts a write access process for writing a value to the key of the distributed table;
If the standby read access to the same key as the write access process exists with reference to the access waiting list, the callback execution means executes the callback of the standby read access with the value of the write access process And a distributed system for deleting the standby read access from the access waiting list.
前記受付手段は、前記リードアクセス処理より後に受け付ける前記ライトアクセス処理を、先に処理することを禁止する禁止フラグを、前記リードアクセス処理の前記キーと前記コールバックとともに受け付け、
前記登録手段は、受け付けた前記禁止フラグを前記待機リードアクセスの前記キーおよび前記コールバックとともに前記アクセス待ちリストに登録し、
さらに、前記登録手段は、前記アクセス待ちリストを参照し、前記ライトアクセス処理と同じキーに対する前記待機リードアクセスの前記禁止フラグが登録されている場合、前記ライトアクセス処理を待機させ、該当するサーバに後で発行する待機ライトアクセスとして前記キーと前記値を前記アクセス待ちリストに登録する分散システム。The distributed system according to claim 7.
The accepting unit accepts a prohibition flag that prohibits processing the write access process received after the read access process, together with the key and the callback of the read access process,
The registration means registers the received prohibition flag in the access waiting list together with the key of the standby read access and the callback,
Further, the registration means refers to the access waiting list, and when the prohibition flag of the standby read access for the same key as the write access process is registered, the write access process waits and the corresponding server is made to wait. A distributed system for registering the key and the value in the access waiting list as standby write access to be issued later.
複数のサーバがそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、前記キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付け、
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録し、
前記アクセス待ちリストに登録された前記リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行するサーバおよび発行タイミングを決定し、
決定した前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取り、
受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除する情報処理装置のデータ処理方法。Information processing device
Receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
Waiting for the accepted read access processing, registering the key and the callback in the access waiting list as standby read access to be issued later to the corresponding server,
For the read access registered in the access waiting list, in accordance with a predetermined condition, determine a server that issues the standby read access and an issue timing,
Issuing the standby read access at the determined issue timing to the determined server, receiving the access result from the server,
Information processing for executing the callback of the corresponding standby read access registered in the access waiting list using the received access result and deleting the standby read access of the executed callback from the access waiting list Device data processing method.
複数のサーバがそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、前記キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付ける手順、
受け付けた前記リードアクセス処理を待機させ、該当するサーバに後で発行する待機リードアクセスとして前記キーと前記コールバックをアクセス待ちリストに登録する手順、
前記アクセス待ちリストに登録された前記待機リードアクセスについて、所定の条件に従い、前記待機リードアクセスを発行するサーバおよび発行タイミングを決定する手順、
決定した前記サーバに、決定した前記発行タイミングで、前記待機リードアクセスを発行し、前記サーバから当該アクセス結果を受け取る手順、
受け取った前記アクセス結果を用いて、前記アクセス待ちリストに登録された該当する待機リードアクセスの前記コールバックを実行し、実行した前記コールバックの前記待機リードアクセスを前記アクセス待ちリストから削除する手順、を実行させるためのプログラム。In a computer that implements an information processing device,
A procedure for receiving a key for read access processing for reading data from a plurality of distributed tables respectively possessed by a plurality of servers, and a callback for determining processing to be executed using a result read based on the key;
A procedure for causing the received read access process to wait and registering the key and the callback in an access waiting list as standby read access to be issued later to a corresponding server,
A procedure for determining a server that issues the standby read access and an issue timing for the standby read access registered in the access waiting list according to a predetermined condition;
A procedure of issuing the standby read access to the determined server at the determined issue timing and receiving the access result from the server;
Executing the callback of the corresponding standby read access registered in the access waiting list using the received access result, and deleting the standby read access of the executed callback from the access waiting list; A program for running
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012192453 | 2012-08-31 | ||
| JP2012192453 | 2012-08-31 | ||
| PCT/JP2013/073328 WO2014034852A1 (en) | 2012-08-31 | 2013-08-30 | Distributed system, information processing device data processing method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPWO2014034852A1 JPWO2014034852A1 (en) | 2016-08-08 |
| JP6156380B2 true JP6156380B2 (en) | 2017-07-05 |
Family
ID=50183657
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014533110A Active JP6156380B2 (en) | 2012-08-31 | 2013-08-30 | Distributed system, data processing method for information processing apparatus, and program |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP6156380B2 (en) |
| WO (1) | WO2014034852A1 (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5531760B2 (en) * | 2010-04-28 | 2014-06-25 | 富士通株式会社 | Information processing system and information processing method |
| EP2674868A4 (en) * | 2011-02-10 | 2017-01-04 | Nec Corporation | Database update notification method |
-
2013
- 2013-08-30 JP JP2014533110A patent/JP6156380B2/en active Active
- 2013-08-30 WO PCT/JP2013/073328 patent/WO2014034852A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| WO2014034852A1 (en) | 2014-03-06 |
| JPWO2014034852A1 (en) | 2016-08-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11269834B2 (en) | Detecting quasi-identifiers in datasets | |
| US10831547B2 (en) | Accelerator control apparatus for analyzing big data, accelerator control method, and program | |
| US9686371B2 (en) | Proxy application with dynamic filter updating | |
| US9223614B2 (en) | Systems and methods for event stream processing | |
| EP3507694B1 (en) | Message cache management for message queues | |
| US20210058382A1 (en) | Block sequencing method and system based on tree-graph structure, and data processing terminal | |
| US10560537B2 (en) | Function based dynamic traffic management for network services | |
| JP2021501936A (en) | Preventing long-term transaction execution from holding record locks | |
| CN113127187B (en) | Method and device for cluster expansion and contraction | |
| KR20140048396A (en) | System and method for searching file in cloud storage service, and method for controlling file therein | |
| US20180107600A1 (en) | Response times in asynchronous i/o-based software using thread pairing and co-execution | |
| JP6156380B2 (en) | Distributed system, data processing method for information processing apparatus, and program | |
| JP6189266B2 (en) | Data processing apparatus, data processing method, and data processing program | |
| CN116635840B (en) | Instruction processing method and processor based on multi-instruction engine | |
| KR102157591B1 (en) | Apparatus for Spatial Query in Big Data Environment and Computer-Readable Recording Medium with Program therefor | |
| JP5472885B2 (en) | Program, stream data processing method, and stream data processing computer | |
| KR102816600B1 (en) | Sampling and graph caching apparatus for graph analysis | |
| KR20230108206A (en) | Computational SSDs accelerating deep learning service on large-scale graphs | |
| US20250190849A1 (en) | Maintaining sequentiality for a counter for sequential learning | |
| CN111198900A (en) | Data caching method and device for industrial control network, terminal equipment and medium | |
| KR102024846B1 (en) | File system program and method for controlling data cener using it | |
| Tewari et al. | OQueue: Observable Communication in Learning Directed Operating Systems | |
| Yoshihisa et al. | A low-load stream processing scheme for IoT environments | |
| JP2014063336A (en) | Computer system and job net execution method | |
| WO2025091933A1 (en) | Task scheduling method and apparatus, and computing system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160706 |
|
| 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: 20170509 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170522 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6156380 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |