Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6156380B2 - Distributed system, data processing method for information processing apparatus, and program - Google Patents
[go: Go Back, main page]

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 PDF

Info

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
Application number
JP2014533110A
Other languages
Japanese (ja)
Other versions
JPWO2014034852A1 (en
Inventor
拓也 荒木
拓也 荒木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Publication of JPWO2014034852A1 publication Critical patent/JPWO2014034852A1/en
Application granted granted Critical
Publication of JP6156380B2 publication Critical patent/JP6156380B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2216/00Indexing scheme relating to additional aspects of information retrieval not explicitly covered by G06F16/00 and subgroups
    • G06F2216/03Data 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 Non-Patent Document 1. This system uses memcached, which is a general-purpose distributed memory cache system, as data shared by a plurality of machines, and attempts to solve this problem by using it in combination with Hadoop. Here, memcached is a data store in which a key-value pair is stored in a memory and a value can be subtracted from the key. By operating memcached on a plurality of machines and determining the range of keys assigned to each machine, an on-memory data store distributed on the plurality of machines is realized.

非特許文献1では、map関数やreduce関数から、これら複数のマシン上のmemcachedにアクセスすることで、前記の課題を解決しようとしている。これを図26に示す。
また、特許文献1には、MapReduceを実装したオープンソースソフトウェアであるHadoop等を用いて実現される分散処理システムの例が記載されている。
In Non-Patent Document 1, an attempt is made to solve the above-described problem by accessing memcached on a plurality of machines from a map function or a reduce function. This is shown in FIG.
Patent Document 1 describes an example of a distributed processing system realized by using Hadoop or the like, which is open source software that implements MapReduce.

特開2012−58836号公報JP 2012-58836 A

Jimmy Lin、外3名、“Low-Latency, High-Throughput Access to Static Global Resources within the Hadoop Framework”、[online]、2009年、HCIL Technical Report HCIL-2009-01、[平成24年5月25日検索]、インターネット〈URL:http://hcil.cs.umd.edu/trs/2009-01/2009-01.pdf〉Jimmy Lin, 3 others, “Low-Latency, High-Throughput Access to Static Global Resources within the Hadoop Framework”, [online], 2009, HCIL Technical Report HCIL-2009-01, [May 25, 2012 Search], Internet <URL: http://hcil.cs.umd.edu/trs/2009-01/2009-01.pdf>

非特許文献1ではmemcachedを用いているが、以降、一般的な呼称として「分散テーブル」と呼ぶものとする。
非特許文献1に示されている方式では、分散テーブル上のデータにアクセスする際のレイテンシが大きいという課題があった。ネットワークを経由して他のマシン上のバリューを取得する場合、たとえば1msといったような長い時間がかかる。この場合、1秒間に1000回しかデータにアクセスできず、このデータアクセスが全体の実行におけるボトルネックとなる。
Non-Patent Document 1 uses memcached, but hereinafter, it will be referred to as a “distributed table” as a general name.
The method disclosed in Non-Patent Document 1 has a problem that the latency when accessing data on the distribution table is large. When acquiring values on other machines via the network, it takes a long time such as 1 ms. In this case, data can be accessed only 1000 times per second, and this data access becomes a bottleneck in the entire execution.

これを改善するためには、できるだけ複数のデータを一度に読み書きすればよい。すなわち、たとえば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 Document 1, but it is not described how to achieve this.
That is, in the system described in Non-Patent Document 1 described above, it is easy to combine a plurality of accesses appearing at the same place on the program into one, but appearing at different places on the program or in the MapReduce program ( There has been a problem that it is not easy to combine accesses across a plurality of map functions (operating on the same machine).

本発明の目的は、上述した課題である分散テーブルへのアクセス時のレイテンシの影響による処理の遅延を解決する分散システム、情報処理装置のデータ処理方法およびプログラムを提供することにある。   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.

本発明の実施の形態に係る分散システムの構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのアクセス待ちリストの一例を示す図である。It is a figure which shows an example of the access waiting list | wrist of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置を実現するコンピュータの構成を示すブロック図である。It is a block diagram which shows the structure of the computer which implement | achieves the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムにおけるクライアント装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the client apparatus in the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムの利用形態の一つを示すブロック図である。It is a block diagram which shows one of the utilization forms of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムの利用形態の一つを示すブロック図である。It is a block diagram which shows one of the utilization forms of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第1の方法による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence by the 1st method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第2の方法による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence by the 2nd method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第3の方法による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence by the 3rd method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第4の方法による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence by the 4th method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第4の方法による処理手順の他の例を示すフローチャートである。It is a flowchart which shows the other example of the process sequence by the 4th method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第4の方法による処理手順の他の例を示すフローチャートである。It is a flowchart which shows the other example of the process sequence by the 4th method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第5の方法による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence by the 5th method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第6の方法による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence by the 6th method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第7の方法による処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence by the 7th method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのクライアント装置の決定部の第7の方法による処理手順の他の例を示すフローチャートである。It is a flowchart which shows the other example of the process sequence by the 7th method of the determination part of the client apparatus of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムの構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのアクセス待ちリストにライトアクセスが追加で登録された場合の例を示す図である。It is a figure which shows the example when write access is additionally registered into the access waiting list of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのアクセス待ちリストにアキュムレートアクセスが追加で登録された場合の例を示す図である。It is a figure which shows the example when accumulative access is additionally registered into the access waiting list of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのアクセス待ちリストにアキュムレートアクセスの後、さらにリードアクセスが追加で登録された場合の例を示す図である。It is a figure which shows the example when the read access is additionally registered after the accumulative access to the access waiting list of the distributed system according to the embodiment of the present invention. 本発明の実施の形態に係る分散システムのリード関数実行部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the read function execution part of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのライト関数実行部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the write function execution part of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのアキュムレート関数実行部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the accumulation function execution part of the distributed system which concerns on embodiment of this invention. 本発明の実施の形態に係る分散システムのリードアクセス発行部の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the read access issuing part of the distributed system which concerns on embodiment of this invention. MapReduceの動作を表す図である。It is a figure showing the operation | movement of MapReduce. 非特許文献1のシステムの構成を表す図である。1 is a diagram illustrating a configuration of a system of Non-Patent Document 1. FIG. 本発明の実施の形態に係る情報処理装置の論理的な構成を示す機能ブロック図である。It is a functional block diagram which shows the logical structure of the information processing apparatus which concerns on embodiment of this invention.

以下、本発明の実施の形態について、図面を用いて説明する。尚、すべての図面において、同様な構成要素には同様の符号を付し、適宜説明を省略する。   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 system 1 according to an embodiment of the present invention.
The distributed system 1 according to the embodiment of the present invention includes a key for read access processing for reading data from a plurality of distributed tables (not shown) respectively included in a plurality of servers (distributed table server 10), and , A reception unit 102 that receives a callback that defines a process to be executed using a result read out based on the key (Value: Value), and waits for the received read access process, and causes the corresponding distributed table server 10 to The registration unit 106 for registering the key and callback in the access waiting list 104 as the standby read access issued in step 1, and the issue destination that issues the standby read access according to a predetermined condition for the standby read access registered in the access waiting list 104 Of determining the distributed table server 10 and the issue timing 108 and a read access issuing unit 110 that issues a standby read access to the distribution table server 10 of the issue destination determined by the determination unit 108 at the determined issue timing and receives the access result (value) from the distribution table server 10. Using the access result received by the read access issuing unit 110, the corresponding standby read access callback registered in the access waiting list 104 is executed, and the standby read access of the executed callback is deleted from the access waiting list 104. A callback execution unit 112.

図1に示すように、本実施形態では、分散システム1は、複数の分散テーブルサーバ10(図1では、3つの分散テーブルサーバS1、S2、およびS3)とネットワーク3を介して接続されるクライアント装置100を備える。   As shown in FIG. 1, in this embodiment, the distributed system 1 is a client connected to a plurality of distributed table servers 10 (in FIG. 1, three distributed table servers S1, S2, and S3) via a network 3. A device 100 is provided.

本発明の分散システム1は、複数のマシン上に分散して存在するテーブルに対して値を読み書きするシステムであり、特に、読み書きに用いるキーがランダムの場合でも高速にアクセスできる分散テーブルアクセスシステムに好適に適用できる。   The distributed system 1 of the present invention is a system that reads and writes values from and to a table that is distributed on a plurality of machines. In particular, it is a distributed table access system that can be accessed at high speed even when keys used for reading and writing are random. It can be suitably applied.

本発明の分散システム1は、たとえば、大規模なデータを対象とした機械学習やデータマイニング等の分析を行うものに好適に適用できる。本発明の分散システム1は、たとえば、MapReduceのような大規模なデータを扱うシステムにおいて、データ処理部が、ランダムアクセスする共有データが必要な場合に、そのアクセスを高速化するといった用途に適用できる。図5に、データ処理部90が実行するMapReduceプログラムのmap関数やreduce関数から分散テーブルを利用するシステムに、本発明のクライアント装置(図中、「分散テーブルクライアント92」と示す)を適用した例を示す。   The distributed system 1 of the present invention can be suitably applied to, for example, an apparatus that performs analysis such as machine learning or data mining on large-scale data. The distributed system 1 of the present invention can be applied to an application such as, for example, a system that handles large-scale data such as MapReduce, when the data processing unit needs shared data to be randomly accessed and speeds up the access. . FIG. 5 shows an example in which the client device of the present invention (shown as “distributed table client 92” in the figure) is applied to a system that uses a distributed table from the map function and reduce function of the MapReduce program executed by the data processing unit 90. Indicates.

また、本発明の分散システム1は、Webアプリケーションにおいて、Webサーバやアプリケーション(AP:APplication)サーバがデータベースの内容をキャッシュするために分散テーブルを利用するといった用途にも適用可能である。図6に、WebサーバまたはAPサーバ(図中、「Webサーバ/APサーバ94」と示す)がデータベース96の内容をキャッシュするために分散テーブルを利用する場合などに、本発明のクライアント装置(図中、「分散テーブルクライアント98」と示す)を適用した例を示す。
本発明のクライアント装置100は、図5または図6の分散テーブルクライアント(92または98)に相当する。
The distributed system 1 of the present invention can also be applied to a Web application such as a Web server or an application (AP) server that uses a distributed table to cache the contents of a database. FIG. 6 shows a client apparatus (FIG. 6) when the Web server or AP server (shown as “Web server / AP server 94” in the figure) uses a distributed table to cache the contents of the database 96. In this example, “distributed table client 98” is applied.
The client device 100 of the present invention corresponds to the distributed table client (92 or 98) of FIG. 5 or FIG.

図1に戻り、本実施形態のクライアント装置100は、分散テーブルサーバ10にネットワーク3を介して接続されるサーバコンピュータやパーソナルコンピュータ、またはそれらに相当する情報処理装置(図3のコンピュータ60)により実現することができる。また、クライアント装置100は、仮想サーバなどにより構成されてもよい。なお、図1では、クライアント装置100は1つのみ示されているが、本発明の分散システム1において、図示されない複数のクライアント装置100が分散テーブルサーバ10にアクセスすることができる。   Returning to FIG. 1, the client device 100 of the present embodiment is realized by a server computer or a personal computer connected to the distributed table server 10 via the network 3, or an information processing device equivalent thereto (computer 60 in FIG. 3). can do. The client device 100 may be configured by a virtual server or the like. In FIG. 1, only one client device 100 is shown. However, in the distributed system 1 of the present invention, a plurality of client devices 100 (not shown) can access the distributed table server 10.

図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 client device 100 of the distributed system 1 of this embodiment shown in FIG. 1 includes the components shown in FIG. 1 loaded in the CPU (Central Processing Unit) 62, RAM (Random Access Memory) 66, and RAM 66 shown in FIG. Arbitrary combination of hardware and software of an arbitrary computer 60 having a program 70 to be realized, a ROM (Read Only Memory) 64 for storing the program 70, and an I / O (Input / Output) 68 including an interface for network 3 connection It is realized by. The CPU 62 is connected to each element of the computer 60 via the bus 69 and controls the entire computer 60 together with each element. It will be understood by those skilled in the art that there are various modifications to the implementation method and apparatus. Each functional block diagram described below shows a block of logical functional units, not a configuration of hardware units. The computer 60 can also be connected to an input / output device (not shown) via the I / O 68.
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 system 1 is assumed to be a cluster or grid system including a plurality of distributed table servers 10 installed in a data center or the like, for example.
In FIG. 1, the client device 100 includes a reception unit 102, an access waiting list 104, a registration unit 106, a determination unit 108, a read access issue unit 110, and a callback execution unit 112.

受付部102は、複数の分散テーブルサーバ10がそれぞれ有する複数の分散テーブル(不図示)からデータを読み出すリードアクセス処理のキー、および、キーに基づき読み出した結果(バリュー)を用いて実行する処理を定めるコールバック、を受け付ける。   The accepting unit 102 executes a process to be executed using a read access process key for reading data from a plurality of distributed tables (not shown) respectively included in the plurality of distributed table servers 10 and a result (value) read based on the key. Accept the specified callback.

たとえば、分散テーブルへのアクセス処理は、一つのプログラムテキスト上の複数の箇所に現れる。
分散テーブル上のデータアクセスはレイテンシが大きく、性能劣化の原因となる。これを改善するためには、分散テーブルへのアクセス処理では、できるだけ複数のデータを一度に読み書きすればよいが、プログラム上、離れた別の場所に現れる分散テーブルへのアクセスを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 client apparatus 100, or a program executed on at least one other computer that accesses the distributed table via the client apparatus 100. it can.

本発明では、プログラム上、離れた別の場所に現れる複数の分散テーブルに対するアクセスを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 unit 102 accepts a key and a callback specified as arguments in the read function when the read function is called when the program is executed.

アクセス待ちリスト104は、図2(a)に示すように、リードアクセス処理の対象となるデータを保持する分散テーブルを有する分散テーブルサーバ10(担当サーバ)と、待機リードアクセスとしてキー(Key)とコールバック(Callback)のセットとを対応付けて保持する。
なお、アクセス待ちリスト104において、分散テーブルサーバ10(担当サーバ)の情報として、予め付与された識別情報、またはネットワーク3上のIP(Internet Protocol)アドレス等を保持することができる。
As shown in FIG. 2A, the access waiting list 104 includes a distributed table server 10 (responsible server) having a distributed table that holds data to be read access processed, and a key (Key) as standby read access. Corresponding and holding a set of callbacks.
In the access waiting list 104, identification information assigned in advance, an IP (Internet Protocol) address on the network 3, or the like can be held as information of the distributed table server 10 (server in charge).

本実施形態のクライアント装置100において、キーを担当する分散テーブルサーバ10を探索する方法は、分散システムの汎用の手法を用いて行うことができ、特に限定されない。たとえば、分散テーブルサーバ10を探索する方法は、キーのハッシュ値を取って、サーバ数でmod(除算した結果出た余り)を取ることで、分散テーブルサーバ10を求めたり、予め準備された対応関係を用いて分散テーブルサーバ10を探索してもよい。   In the client device 100 of this embodiment, a method for searching for the distributed table server 10 in charge of a key can be performed using a general-purpose technique of a distributed system, and is not particularly limited. For example, a method for searching the distributed table server 10 is to obtain a distributed table server 10 by taking a hash value of a key and taking mod (the remainder obtained as a result of division), or a prepared response. The distributed table server 10 may be searched using the relationship.

本実施形態では、クライアント装置100は、担当するサーバ毎(図2(a))に、待機リードアクセスとしてキーとコールバックのセットを登録する構成としているが、これに限定されるものではない。たとえば、クライアント装置100は、キー毎(図2(b))、または予め属性等によりグループ分けされた複数のキー毎に、コールバックを保持する構成としてもよい。あるいは、クライアント装置100は、サーバ毎、かつ、キー毎(またはキーグループ毎)に分類してコールバックを保持する構成としてもよい。また、キー毎(またはキーグループ毎)にコールバックを保持する構成の場合、リードアクセス発行部110は、アクセスするキー(またはキーグループ)を担当する分散テーブルサーバ10を探して、待機リードアクセスを発行することができる。キー毎(またはキーグループ毎)に分類して保持している構成の場合、リードアクセス発行部110は、サーバの担当キー(またはキーグループ)の変更にも柔軟に対応できる。   In the present embodiment, the client device 100 is configured to register a set of a key and a callback as standby read access for each server in charge (FIG. 2A). However, the present invention is not limited to this. For example, the client device 100 may be configured to hold a callback for each key (FIG. 2B) or for each of a plurality of keys grouped in advance by attributes or the like. Alternatively, the client device 100 may be configured to hold the callback by classifying each server and each key (or each key group). In the case where the callback is held for each key (or each key group), the read access issuing unit 110 searches for the distributed table server 10 in charge of the key (or key group) to be accessed, and performs standby read access. Can be issued. In the case of a configuration in which the keys are classified and held for each key (or for each key group), the read access issuing unit 110 can flexibly cope with a change in the key (or key group) assigned to the server.

図1に戻り、登録部106は、受け付けたリードアクセス処理を直ぐに実行せずに、待機させ、該当する分散テーブルサーバ10(担当サーバ)に後で発行する待機リードアクセスとしてキーとコールバックをアクセス待ちリスト104に登録してバッファリングする。後述するように、本実施形態において、登録部106は、アクセス待ちリスト104に待機リードアクセスを登録したとき、登録したことを決定部108に通知してもよい。なお、登録部106は、リード関数を実行するリード関数実行部とすることができ、リード関数実行部がアクセス待ちリスト104に登録したことを通知してもよい。   Returning to FIG. 1, the registration unit 106 does not immediately execute the received read access processing, but waits, and accesses the key and callback as standby read access to be issued later to the corresponding distributed table server 10 (server in charge). Register in the waiting list 104 and buffer. As will be described later, in this embodiment, when registering the standby read access in the access waiting list 104, the registration unit 106 may notify the determination unit 108 of the registration. The registration unit 106 may be a read function execution unit that executes a read function, and may notify that the read function execution unit has registered in the access waiting list 104.

決定部108は、アクセス待ちリスト104に登録された待機リードアクセスについて、所定の条件に従い、待機リードアクセスを複数まとめて発行する発行先の分散テーブルサーバ10およびその発行タイミングを決定する。たとえば、決定部108は、アクセス待ちリストに登録された待機リードアクセスの件数が一定数以上になったときを、発行タイミングであると決定する。   The determination unit 108 determines the issue destination distributed table server 10 that issues a plurality of standby read accesses and issues the standby timing for standby read accesses registered in the access waiting list 104 according to a predetermined condition. For example, the determination unit 108 determines that the issue timing is when the number of standby read accesses registered in the access waiting list exceeds a certain number.

すなわち、決定部108は、分散テーブルサーバ10毎に、アクセス待ちリスト104に登録された待機リードアクセス処理の数が一定数以上になったときに、その分散テーブルサーバ10を発行先として、その分散テーブルサーバ10に対するリードアクセス処理の発行タイミングとする。あるいは、決定部108は、たとえば、キー毎に、アクセス待ちリスト104に登録された待機リードアクセス処理の数が一定数以上になったときに、そのキーを担当する分散テーブルサーバ10をリードアクセス処理の発行先として、その分散テーブルサーバ10に対するリードアクセス処理の発行タイミングを決定してもよい。   That is, for each distributed table server 10, when the number of standby read access processes registered in the access waiting list 104 exceeds a certain number, the determining unit 108 uses the distributed table server 10 as an issue destination and distributes the distributed read The read access processing issuance timing for the table server 10 is used. Alternatively, for example, when the number of standby read access processes registered in the access waiting list 104 exceeds a certain number for each key, the determination unit 108 performs the read access process on the distributed table server 10 in charge of the key. The issue timing of the read access processing for the distributed table server 10 may be determined as the issue destination of.

以後、この待機処理の発行タイミングの決定方法を第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 access waiting list 104 and the difference in communication speed for each assigned distributed table server 10 are not considered. Therefore, in the client apparatus 100, it is desirable to select and employ the optimum method in consideration of the system configuration of the distributed system 1 from among the first methods combined with other methods described later.

また、リードアクセス処理の発行タイミングは、サーバ毎ではなく、キー毎に、または、予め属性等によりグループ分けされた複数のキー毎に、アクセス待ちリスト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 access waiting list 104 for each key or for each of a plurality of keys grouped in advance according to attributes or the like. It may be when it becomes more than a certain number. Then, the distributed table server 10 in charge of the key whose number of standby read access processes is a certain number or more is set as the read access process issue destination. The plurality of standby read accesses may be issued to the distributed table server 10, the key of the distributed table server 10, or a plurality of keys of the same group including the key.

リードアクセス発行部110は、決定部108が決定した発行先の分散テーブルサーバ10に、決定した発行タイミングで、待機リードアクセスを複数まとめて発行し、分散テーブルサーバ10から当該アクセス結果(バリュー)を受け取る。すなわち、同一サーバのリードアクセスを複数まとめて発行する。   The read access issuing unit 110 issues a plurality of standby read accesses to the issue destination distributed table server 10 determined by the determining unit 108 at the determined issue timing, and sends the access result (value) from the distributed table server 10. receive. That is, a plurality of read accesses from the same server are issued together.

リードアクセスをまとめて発行せず、その度、実行する場合、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 callback executing unit 112 executes the corresponding standby read access callback registered in the access waiting list 104 using the access result (value) received by the read access issuing unit 110, and waits for the executed callback. The read access is deleted from the access waiting list 104.

本実施の形態のクライアント装置100では、コンピュータプログラム70(図3)に対応する各種の処理動作をコンピュータ60のCPU62(図3)が実行することにより、前述のような各種ユニットが各種機能として実現される。
本実施形態のコンピュータプログラム70は、情報処理装置(クライアント装置100)を実現させるためのコンピュータ60に、複数の分散テーブルサーバ10がそれぞれ有する複数の分散テーブルからデータを読み出すリードアクセス処理のキー、および、キーに基づき読み出した結果を用いて実行する処理を定めるコールバック、を受け付ける手順、受け付けたリードアクセス処理を待機させ、該当する分散テーブルサーバ10に後で発行する待機リードアクセスとしてキーとコールバックをアクセス待ちリスト104に登録する手順、アクセス待ちリスト104に登録された待機リードアクセスについて、所定の条件に従い、待機リードアクセスを発行する分散テーブルサーバ10および発行タイミングを決定する手順、決定した分散テーブルサーバ10に、決定した発行タイミングで、待機リードアクセスを発行し、分散テーブルサーバ10から当該アクセス結果を受け取る手順、受け取ったアクセス結果を用いて、アクセス待ちリスト104に登録された該当する待機リードアクセスのコールバックを実行し、実行したコールバックの待機リードアクセスをアクセス待ちリスト104から削除する手順、を実行させるように記述されている。
In the client device 100 according to the present embodiment, various processing operations corresponding to the computer program 70 (FIG. 3) are executed by the CPU 62 (FIG. 3) of the computer 60, whereby the various units as described above are realized as various functions. Is done.
The computer program 70 of the present embodiment causes a computer 60 for realizing an information processing apparatus (client apparatus 100) to read access processing keys for reading data from a plurality of distributed tables respectively included in a plurality of distributed table servers 10, and , A procedure for accepting a callback for determining a process to be executed using a result read out based on a key, a wait for the accepted read access process, and a key and a callback as a standby read access issued later to the corresponding distributed table server 10 For the standby read access registered in the access waiting list 104, the procedure for determining the distributed table server 10 issuing the standby read access and the issuing timing in accordance with predetermined conditions, and the determined amount The standby read access is issued to the table server 10 at the determined issuance timing, the procedure for receiving the access result from the distributed table server 10, and the corresponding standby read registered in the access waiting list 104 using the received access result It is described that an access callback is executed and a procedure for deleting the standby read access of the executed callback from the access waiting list 104 is executed.

本実施形態のコンピュータプログラム70は、コンピュータ60で読み取り可能な記録媒体に記録されてもよい。記録媒体は特に限定されず、様々な形態のものが考えられる。また、プログラム70は、記録媒体からコンピュータ60のメモリ(ROM64またはRAM66)にロードされてもよいし、ネットワークを通じてコンピュータ60にダウンロードされ、メモリにロードされてもよい。   The computer program 70 of this embodiment may be recorded on a recording medium readable by the computer 60. The recording medium is not particularly limited, and various forms can be considered. The program 70 may be loaded from a recording medium into the memory (ROM 64 or RAM 66) of the computer 60, or may be downloaded to the computer 60 through a network and loaded into the memory.

上述のような構成において、本実施の形態の分散システム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 client device 100 in the distributed system 1 according to the present embodiment having the above-described configuration will be described below. FIG. 4 is a flowchart showing an example of the operation of the distributed system 1 of the present embodiment. Hereinafter, description will be made with reference to FIGS. 1 and 4.
In the data processing method of the information processing apparatus (client apparatus 100 in FIG. 1) according to the embodiment of the present invention, the client apparatus 100 receives data from a plurality of distributed tables respectively included in the plurality of distributed table servers 10 (FIG. 1). A read access process key to be read and a callback for determining a process to be executed using a result read based on the key are received (step S101), the received read access process is waited, and the corresponding distributed table server 10 is later processed. The distributed table server that registers the key and callback in the access waiting list 104 as standby read access issued in step S103 and issues standby read access according to a predetermined condition for the read access registered in the access waiting list 104 10 and issue Taimin (Step S105), issues a standby read access to the determined distributed table server 10 at the determined issue timing (YES in Step S107), receives the access result from the distributed table server 10 (Step S109), Using the received access result, a corresponding standby read access callback registered in the access waiting list 104 is executed (step S111), and the standby read access of the executed callback is deleted from the access waiting list 104 (step S111). S113).

図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 decision unit 108 of the client apparatus 100 of the distributed system 1 according to the present embodiment. In the present embodiment, the determination unit 108 performs determination processing using the first method described above.
First, every time the determination unit 108 receives a notification from the registration unit 106 (read function) that it has been registered in the access waiting list 104 (YES in step S121), this processing starts.

そして、決定部108が、アクセス待ちリスト104を参照し、待機リードアクセス処理の数が一定数以上の分散テーブルサーバ10があるか否かを判定する(ステップS123)。一定数以上のサーバがない場合は(ステップS123のNO)、手順は、ステップS121に戻り、決定部108は、次の通知の到来まで待機する(ステップS121のNO)。
一定数以上のサーバがある場合(ステップS123のYES)、決定部108が、当該サーバに対する待機していた複数のリードアクセスをまとめて発行する(ステップS125)。
Then, the determination unit 108 refers to the access waiting list 104 and determines whether there is a distributed table server 10 in which the number of standby read access processes is equal to or greater than a certain number (step S123). If there are no more than a certain number of servers (NO in step S123), the procedure returns to step S121, and the determination unit 108 waits until the next notification arrives (NO in step S121).
When there are more than a certain number of servers (YES in step S123), the determination unit 108 issues a plurality of read accesses waiting for the server collectively (step S125).

あるいは、登録部106が、アクセス待ちリスト104に登録を行う度に、分散テーブルサーバ10毎に登録数をカウントし、メモリ(RAM66等)に記憶してもよい。そして、決定部108は、メモリを参照し、各カウント値が一定値以上になった分散テーブルサーバ10があるか否かを監視してもよい。   Alternatively, each time the registration unit 106 registers in the access waiting list 104, the registration number may be counted for each distributed table server 10 and stored in a memory (RAM 66 or the like). Then, the determination unit 108 may monitor the presence or absence of the distributed table server 10 in which each count value becomes a certain value or more with reference to the memory.

以上説明したように、本発明の実施の形態に係る分散システム1によれば、クライアント装置100が、任意のプログラムを対象として、プログラム上の任意の場所に現れる分散テーブルサーバ10へのリード関数による複数のリードアクセス処理を、その都度リードアクセス毎に行うのではなく、アクセス待ちリスト104に登録して一定数以上待機させることで、サーバ毎にまとめて実行することができる。そして、この構成により、本発明の実施の形態に係る分散システム1において、プログラム上に複数現れるリードアクセス処理を、その都度処理する場合に比較して、リードアクセス時にかかるレイテンシによるアクセス処理速度への影響を削減することができ、高速化を図ることができる。   As described above, according to the distributed system 1 according to the embodiment of the present invention, the client apparatus 100 targets an arbitrary program and uses a read function to the distributed table server 10 that appears at an arbitrary place on the program. A plurality of read access processes can be collectively executed for each server by registering in the access waiting list 104 and waiting for a certain number or more instead of performing each read access each time. With this configuration, in the distributed system 1 according to the embodiment of the present invention, compared to the case where multiple read access processes appearing on the program are processed each time, the access processing speed due to the latency at the time of read access can be reduced. The influence can be reduced and the speed can be increased.

特に、本発明の実施の形態に係る分散システム1によれば、クライアント装置100は、プログラム上の何処にいつ現れるか分からないような複数のリードアクセス処理に好適に適用することが可能になる。その理由は、クライアント装置100が、リードアクセス処理が現れた時に、その処理を受け付けて、適切に待機させる構成を有しているからである。   In particular, according to the distributed system 1 according to the embodiment of the present invention, the client device 100 can be suitably applied to a plurality of read access processes in which it is not known where and when it appears on the program. This is because the client device 100 has a configuration in which when a read access process appears, the client apparatus 100 accepts the process and waits appropriately.

(第2の実施の形態)
本実施形態の分散システム1は、上記実施形態とは、待機アクセス処理の発行タイミングの決定方法が異なり、システム構成を考慮し、メモリ量やクラスタシステムのノード(分散テーブルサーバ10)間のネットワーク的な距離を考慮して、高速化に最適なノードを選択して待機アクセス処理を実行する点で相違する。
本実施形態の分散システム1の構成は、図1の上記実施形態の分散システム1と同じであり、以下、図1を用いて説明する。
(Second Embodiment)
The distributed system 1 of the present embodiment is different from the above-described embodiment in the method for determining the issuance timing of the standby access process, considering the system configuration, and the network configuration between the nodes of the cluster system (distributed table server 10). In consideration of a short distance, a node that is optimal for speeding up is selected and standby access processing is executed.
The configuration of the distributed system 1 of the present embodiment is the same as that of the distributed system 1 of the above-described embodiment of FIG. 1 and will be described below with reference to FIG.

上記実施形態では、クライアント装置100は、分散テーブルへの複数のアクセスを1つにまとめて処理することで、レイテンシの影響を抑えることができ、処理の高速化を図ることができた。本実施形態では、クライアント装置100は、さらに、この複数のアクセスを、どのタイミングでどのサーバに対するものを優先してアクセスするか、メモリ量やマシン間の通信速度の違い等、分散システム1のシステム構成等の条件を考慮して、決定することで、より性能の向上を図るものである。   In the above-described embodiment, the client device 100 can reduce the influence of latency by processing a plurality of accesses to the distributed table into one, and can increase the processing speed. In the present embodiment, the client apparatus 100 further includes a system of the distributed system 1 such as which access is given priority to which server at which timing, a difference in memory amount, communication speed between machines, and the like. The performance is further improved by making a decision in consideration of conditions such as the configuration.

はじめに、第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 determination unit 108 determines that the issue timing has come when the memory amount of the access waiting list 104 exceeds a certain amount, and when the memory amount exceeds the certain amount, the access waiting list 104 is determined. The distributed table server 10 having a large number of standby read accesses registered in is selected as a standby read access issue destination.

アクセス待ちリスト104のメモリ量は、キーとコールバックが必要とするメモリ量を加算していくことで求めることができる。ただし、複数のCallbackオブジェクト間で共有されるメモリがある場合は、コールバックが必要とするメモリ量を正確に求めることが難しい可能性もある。その場合は、リード関数の引数に、アクセス待ちリスト104の登録に必要となるメモリ量を、プログラマが指定するようにしてもよい。アクセス待ちリスト104の利用メモリ量は、コールバックの実行が完了して当該オブジェクトで利用しているメモリが解放され次第、減算する。
なお、アクセス待ちリスト104がキー毎に分類されて登録されている場合、アクセス待ちリスト104に登録された待機リードアクセスの件数が多いキーに対応する分散テーブルサーバ10を待機リードアクセスの発行先として選択する。
なお、この第2の方法では、担当サーバごとの通信速度の違いは考慮されない。したがって、クライアント装置100では、第2の方法を、他の方法と組み合わせた中から、分散システム1のシステム構成を考慮して、最適な方法を選択して採用することが望ましい。
The memory amount of the access waiting list 104 can be obtained by adding the memory amount required for the key and the callback. However, if there is memory shared between multiple Callback objects, it may be difficult to accurately determine the amount of memory required for the callback. In this case, the programmer may specify the amount of memory necessary for registering the access waiting list 104 as an argument of the read function. The used memory amount of the access waiting list 104 is subtracted as soon as the execution of the callback is completed and the memory used by the object is released.
When the access waiting list 104 is classified and registered for each key, the distributed table server 10 corresponding to the key having a large number of standby read accesses registered in the access waiting list 104 is set as the standby read access issue destination. select.
In the second method, the difference in communication speed for each server in charge is not considered. Therefore, it is desirable that the client apparatus 100 selects and employs the optimum method in consideration of the system configuration of the distributed system 1 among the second methods combined with other methods.

次に、第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 determination unit 108 is a server that is a destination of standby read access based on the acquisition time of the access result (value) per key obtained based on the performance information of each distributed table server 10. Select.
In the third method, when the memory amount of the access waiting list 104 exceeds a certain amount, the determination unit 108 determines that the distributed table server 10 having the shortest value acquisition time per key is the standby read access issue destination. Choose as. That is, the determination unit 108 selects the distribution table server 10 having a high communication speed as the issue destination.

具体的には、1つのキーあたりにかかるバリュー取得時間は、分散テーブルサーバ10ごとに、下記の式(1)で求めることができる。

Figure 0006156380
Specifically, the value acquisition time per key can be obtained by the following formula (1) for each distributed table server 10.
Figure 0006156380

ここで、本実施形態の分散システム1がクラスタシステムであることを考慮すると、ノード(分散テーブルサーバ10)間で、互いのネットワーク的な距離が近いノードと遠いノードが存在する。ここで、ネットワーク的な距離は、キー1つあたりにかかるアクセス結果(バリュー)の取得時間で評価することができ、各ノードから他のノードへの通信レイテンシおよびスループット値から求めることができる。   Here, considering that the distributed system 1 of the present embodiment is a cluster system, there are nodes that are close to each other in terms of network and nodes that are far from each other (distributed table server 10). Here, the network distance can be evaluated by the acquisition time of the access result (value) per key, and can be obtained from the communication latency and throughput value from each node to other nodes.

キー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 client device 100, if the distance between the nodes is the same, the standby access process is executed from the node having the largest number of standby access processes. It is desirable to execute access processing. In other words, it is desirable to execute more standby access processes for nodes that are far away. In the present embodiment, the determination unit 108 can select a node having the least influence of latency by selecting the node having the shortest value acquisition time per key as the standby read access issue destination.

ここで、クライアント装置100は、担当サーバごとの通信速度の違いを考慮するために必要な、各担当分散テーブルサーバ10への通信レイテンシおよびスループット等の情報を、予め得ておく。これらの情報は、測定した結果から得た値やシステムの構成(スイッチ/ルータの段数を含むネットワーク構成等)から算出した値をクライアント装置100にあらかじめ登録しておいてもよい。あるいは、クライアント装置100が、システムの初期化時に必要なデータを測定して、これらの情報を求める算出部(不図示)を備えるようにしてもよい。   Here, the client device 100 obtains in advance information such as communication latency and throughput to each assigned distributed table server 10 necessary for considering the difference in communication speed for each assigned server. For these pieces of information, values obtained from the measurement results and values calculated from the system configuration (network configuration including the number of stages of switches / routers) may be registered in the client apparatus 100 in advance. Alternatively, the client device 100 may include a calculation unit (not shown) that measures data necessary for system initialization and obtains such information.

なお、アクセス待ちリスト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 access waiting list 104. However, in the equation (1), the determination unit 108 collects them as one and counts them as one key. Find the number of keys. When it is difficult to obtain the total number of value bytes corresponding to a plurality of keys, for example, the byte size of the value differs depending on the key, the determining unit 108 may use an approximate value in Expression (1). When the influence of the communication latency is overwhelmingly larger than the influence of the throughput, the determination unit 108 sets the term (total number of bytes of values corresponding to a plurality of keys) / throughput in Expression (1). You may delete and approximate.

このようにすることで、全ての分散テーブルサーバ10が同じ条件であるならば、クライアント装置100は、第3の方法においても、第2の方法と同様に、最もアクセス待ち数が多いサーバに対してリードアクセスを発行することができる。もし、全ての分散テーブルサーバ10でアクセス待ち数が同じであれば、ネットワーク的に近いサーバが選ばれる。すなわち、ネットワーク的に遠いサーバについては、クライアント装置100は、なるべく多くのリードアクセスをためてから発行することになる。   In this way, if all the distributed table servers 10 have the same condition, the client apparatus 100 can also perform the same for the server with the largest number of access waiting queues in the third method as in the second method. Can issue read access. If all the distributed table servers 10 have the same access waiting number, a server close to the network is selected. In other words, the client device 100 issues a read access after as much as possible for a server far from the network.

次に、決定部108が発行タイミングと発行先サーバを決定する第4の方法について説明する。
第4の方法では、決定部108は、第3の方法で説明した各分散テーブルサーバ10の「1つのキーあたりにかかるバリュー取得時間」を所定のタイミングで算出し、全分散テーブルサーバ10の中での最小値を求め、最小値に基づいて発行タイミングと発行先サーバを決定する。
Next, a fourth method in which the determination unit 108 determines the issue timing and the issue destination server will be described.
In the fourth method, the determination unit 108 calculates “value acquisition time per key” of each distributed table server 10 described in the third method at a predetermined timing, The minimum value is obtained, and the issue timing and the issue destination server are determined based on the minimum value.

決定部108が、「1つのキーあたりにかかるバリュー取得時間」を算出するタイミングは、リードアクセスがアクセス待ちリスト104に登録される度、リードアクセスがアクセス待ちリスト104に所定回数登録される度、または、一定時間毎である。決定部108は、算出された最小値が閾値以下になった時を発行タイミングと判断し、最小値となったサーバを発行先とする。ここで、決定部108は、アクセス待ちリスト104への登録の有無や登録回数を、登録部106からの通知に基づいて検出することができる。
決定部108は、「1つのキーあたりにかかるバリュー取得時間」を、上記の第3の方法と同様に、サーバごとに上述した式(1)で求めることができ、詳細な説明は省略する。
The timing at which the determination unit 108 calculates “value acquisition time per one key” is determined every time read access is registered in the access waiting list 104, every time read access is registered in the access waiting list 104 a predetermined number of times, Or it is every fixed time. The determining unit 108 determines that the issue timing is when the calculated minimum value is equal to or less than the threshold value, and sets the server having the minimum value as the issue destination. Here, the determination unit 108 can detect the presence / absence of registration in the access waiting list 104 and the number of registrations based on the notification from the registration unit 106.
The determination unit 108 can obtain the “value acquisition time per key” by the above-described formula (1) for each server, as in the third method, and a detailed description thereof will be omitted.

ここで、決定部108は、リードアクセスがアクセス待ちリスト104に登録されたことを、登録部106(リード関数)からの登録通知により検知できる。この通知(リードアクセス)が所定回数以上来るまで待つ理由は、1つのキーあたりにかかるバリュー取得時間の最小値が閾値以下のサーバがあるかどうかを、リード関数からアクセス待ちリスト104に登録した通知を受け取るたびに計算するのが非効率な場合に、まとめて計算してそのオーバヘッドを削減するためである。   Here, the determination unit 108 can detect that the read access has been registered in the access waiting list 104 based on a registration notification from the registration unit 106 (read function). The reason why this notification (read access) waits for a predetermined number of times or more is that the read function registers in the access waiting list 104 whether or not there is a server whose minimum value acquisition time per key is less than or equal to the threshold. This is because when it is inefficient to calculate each time it is received, it is calculated together and the overhead is reduced.

この第4の方法では、クライアント装置100は、アクセス待ちリスト104のメモリ量を参照しないため、設定された閾値の大小によって、過小あるいは過大にアクセス待ちリスト104用のメモリを消費する可能性がある。したがって、クライアント装置100では、第4の方法を、他の方法と組み合わせた中から、分散システム1のシステム構成を考慮して、最適な方法を選択して採用することが望ましい。   In the fourth method, since the client device 100 does not refer to the memory amount of the access waiting list 104, there is a possibility that the memory for the access waiting list 104 is consumed too little or too much depending on the set threshold value. . Therefore, it is desirable that the client apparatus 100 selects and employs the optimum method in consideration of the system configuration of the distributed system 1 from among the fourth methods combined with other methods.

また、第5の方法として、以下の方法も考えられる。
決定部108は、ある一定時間(たとえば、10ms)リードアクセスが発行されていない分散テーブルサーバ10をリードアクセスの発行先として選択する。発行タイミングは、一定時間リードアクセスが発行されていないサーバが存在したときとなる。
As the fifth method, the following method is also conceivable.
The determination unit 108 selects the distributed table server 10 that has not been issued a read access for a certain period of time (for example, 10 ms) as a read access issue destination. The issue timing is when there is a server for which read access has not been issued for a certain period of time.

この方法で一定時間リードアクセスが発行されていない分散テーブルサーバ10を発行先とする理由は、図6に示したWebサーバ/APサーバ94に本発明の分散システム1を用いるような場合、長時間ユーザを待たせるのは望ましくないためである。ただし、この場合はアクセス待ちリスト104のメモリ量や、1つのキーあたりにかかるバリュー取得時間を参照しないため、この第5の方法は、必ずしも効率のよいサーバの選択にはならない。したがって、クライアント装置100では、第5の方法を、他の方法と組み合わせた中から、分散システム1のシステム構成を考慮して、最適な方法を選択して採用することが望ましい。   The reason why the distributed table server 10 for which read access has not been issued for a certain period of time in this method is the issue destination is that when the distributed system 1 of the present invention is used for the Web server / AP server 94 shown in FIG. This is because it is not desirable to make the user wait. However, in this case, since the memory amount of the access waiting list 104 and the value acquisition time per key are not referred to, the fifth method is not necessarily an efficient server selection. Therefore, it is desirable that the client apparatus 100 selects and employs the optimum method in consideration of the system configuration of the distributed system 1 from among the fifth methods combined with other methods.

さらに、第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 access issuing unit 110 issues a read access to the server at the timing when this function is executed. To do.

また、決定部108は、第7の方法として、第1〜第6の方法を少なくとも2つ組み合わせて決定方法として採用してもよい。詳細については、後述する。   Moreover, the determination part 108 may employ | adopt as a determination method combining the 1st-6th method at least 2 as a 7th method. Details will be described later.

図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 determination unit 108 of the client device 100 of the distributed system 1 according to the present embodiment.
The processing procedure in FIG. 8 is an example when the determination unit 108 performs the determination process using the second method described above. In other words, this processing procedure is an example of a determination process for issuing a read access to a server having the largest number of standby read accesses when the memory amount is equal to or greater than a certain level.

図8の例では、決定部108が、リード関数からアクセス待ちリスト104に登録したとの通知を受け取る度に(ステップS121のYES)、本処理が開始する。通知を受け取り(ステップS121のYES)、かつ、アクセス待ちリスト104のメモリ量が一定量以上になった時(ステップS131のYES)、決定部108が、発行タイミングになったと判断する。   In the example of FIG. 8, each time the determination unit 108 receives notification from the read function that it has been registered in the access waiting list 104 (YES in step S121), this process starts. When the notification is received (YES in step S121) and the amount of memory in the access waiting list 104 exceeds a certain amount (YES in step S131), the determination unit 108 determines that the issue timing has come.

そして、決定部108が、その時点で、アクセス待ちリスト104に登録された待機リードアクセスの件数が最も多い分散テーブルサーバ10を発行先に決定する。そして、リードアクセス発行部110が、発行先に決定された分散テーブルサーバ10に、リードアクセスを発行する(ステップS133)。
一方、メモリ量が一定量以上でない場合(ステップS131のNO)、手順は、ステップS121に戻り、決定部108は、次の通知の到来まで待機する(ステップS121のNO)。
Then, the determination unit 108 determines the distribution table server 10 having the largest number of standby read accesses registered in the access waiting list 104 as the issue destination at that time. Then, the read access issuing unit 110 issues a read access to the distributed table server 10 determined as the issue destination (step S133).
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 determination unit 108 waits until the next notification arrives (NO in step S121).

次に、図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 determination unit 108 performs the determination process using the third method described above. That is, this processing procedure is an example of a determination process for issuing a read access to a server having the shortest value acquisition time per key when the amount of memory is a certain level or more.
In the example of FIG. 9, when a notification indicating that it has been registered in the access waiting list 104 is received from the read function (YES in step S121), and the memory amount in the access waiting list 104 becomes equal to or greater than a certain amount (YES in step S131). ), The determination unit 108 determines that the issue timing has come. The processing procedure of FIG. 9 so far is the same as the example of FIG.

そして、決定部108が、1つのキーあたりにかかるバリュー取得時間が最も少ない分散テーブルサーバ10を発行先に決定し、リードアクセス発行部110が、決定された発行先の分散テーブルサーバ10に、リードアクセスを発行する(ステップS141)。   Then, the determination unit 108 determines the distribution table server 10 having the shortest value acquisition time per key as the issue destination, and the read access issue unit 110 reads the read table to the distribution table server 10 of the determined issue destination. An access is issued (step S141).

次に、図10〜図12の処理手順は、決定部108が上述した第4の方法を用いて決定処理を行う場合の例である。各図の手順は、1つのキーあたりにかかるバリュー取得時間を算出(または、バリュー取得時間の最小値と閾値を比較)するタイミングがそれぞれ異なる。   Next, the processing procedure of FIGS. 10 to 12 is an example in the case where the determination unit 108 performs the determination process using the fourth method described above. The procedure in each figure is different in timing for calculating the value acquisition time per key (or comparing the minimum value acquisition time with a threshold value).

図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 access waiting list 104. FIG. 11 shows an example in which the determination process by the fourth method is performed when the read access is registered in the access waiting list 104 a predetermined number of times or more. FIG. 12 shows an example in which determination processing by the fourth method is performed at predetermined time intervals.
First, in the example of FIG. 10, each time the determination unit 108 receives a notification that it has been registered in the access waiting list 104 from the read function (YES in step S121), this process starts.

そして、決定部108が、1つのキーあたりにかかるバリュー取得時間の最小値が閾値以下のサーバがあるかを判別する(ステップS151)。最小値が閾値以下のサーバがない場合は(ステップS151のNO)、手順は、ステップS121に戻り、決定部108は、次の通知の到来まで待機する(ステップS121のNO)。
最小値が閾値以下のサーバがある場合(ステップS151のYES)、決定部108がそのサーバを発行先と決定し、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(ステップS125)。
Then, the determination unit 108 determines whether there is a server whose minimum value acquisition time per key is equal to or less than a threshold value (step S151). If there is no server whose minimum value is equal to or smaller than the threshold value (NO in step S151), the procedure returns to step S121, and the determination unit 108 waits until the next notification arrives (NO in step S121).
When there is a server whose minimum value is equal to or smaller than the threshold (YES in step S151), the determination unit 108 determines that server as an issue destination, and the read access issue unit 110 issues read access to the server (step S125).

また、図11の例では、決定部108が、リード関数からアクセス待ちリスト104に登録したとの通知を受け取り(ステップS121のYES)、かつ、決定部108が、通知を受け取った回数をカウントしておき、所定回数以上、通知を受け取った場合に(ステップS161のYES)、本処理が開始する。以降の手順は図10と同様である。なお、決定部108が本処理を実行した時、カウントはリセットされる。すなわち、所定回数毎に、本処理が実行されることとなる。   In the example of FIG. 11, the determination unit 108 receives a notification that it has been registered in the access waiting list 104 from the read function (YES in step S121), and the determination unit 108 counts the number of times the notification is received. In addition, when the notification is received a predetermined number of times or more (YES in step S161), this processing starts. The subsequent procedure is the same as in FIG. When the determination unit 108 executes this process, the count is reset. That is, this process is executed every predetermined number of times.

また、図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 determination unit 108 receives a notification (timer interrupt) from the timer (YES in step S171), that is, at regular intervals. This process starts. The subsequent procedure is the same as in FIG. The timer time can be set to 10 ms, for example, and may be a preset value or may be changed according to conditions.
Further, in the client device 100, the procedures in FIG. 10 or FIG. 11 and FIG. 12 may be combined.

さらに、図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 determination unit 108 performs the determination process using the fifth method described above. In the example of FIG. 13, a predetermined time interval is measured by a timer (not shown), and every time the determination unit 108 receives a notification (timer interrupt) from the timer (YES in step S171), that is, at regular intervals. Processing starts. Then, the determination unit 108 determines whether or not there is a distributed table server 10 for which a read access has not been issued for a certain time or more (step S181). If there is no distributed table server 10 for which read access has not been issued (NO in step S181), the procedure returns to step S171, and the determination unit 108 waits until the next notification arrives (NO in step S171). When there is a distributed table server 10 for which read access has not been issued (YES in step S181), the determination unit 108 determines that server as an issue destination, and the read access issue unit 110 issues read access to the server. (Step S125).

また、図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 determination unit 108 performs determination processing using the above-described sixth method. In the example of FIG. 14, first, the determination unit 108 calls a function that specifies a server that issues read access and an issue timing (step S <b> 191). When the timing specified by the function is reached (YES in step S193), the determination unit 108 determines the specified distributed table server 10 as an issue destination, and issues a read access to the issue destination distributed table server 10. The unit 110 issues a read access (step S195).

また、第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 determination unit 108 adopts a determination method by combining at least two of the first to sixth methods. Here, the flows of FIGS. 15 and 16 and FIG. 14 can be executed in parallel as will be described later.
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 access issuing unit 110 performs read access to the server. Is issued (step S125 in FIG. 15).

このようなサーバが無くても(図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 access waiting list 104 exceeds a certain amount as in the third method (YES in step S131 in FIG. 15). Then, the determination unit 108 selects the server having the smallest “value acquisition time per key” as the issue destination, and the read access issue unit 110 issues the read access (step S141 in FIG. 15). Even if these conditions are not satisfied (NO in step S131 in FIG. 15 and NO in step S151), a server that has not issued read access for a certain period of time as in the fifth method (in FIG. 16). In step S181, the read access issuing unit 110 issues a read access (step S125 in FIG. 16). Also, a read access is issued when explicitly specified on the program as in the sixth method (step S195 in FIG. 14).

また、これらの方法でリードアクセスを発行する場合、リードアクセス発行部110は、この発行をリードアクセス以外の処理や以前発行したリードアクセスと同時並行に、オーバラップして実行してよい。また、第1から第4、および第6、第7の方法でリードアクセスを発行する場合、リードアクセス発行部110によるリードアクセスの発行の実施は、リード関数が実行されることが主な契機になる。この契機となるリード関数の中からリードアクセスの発行を行い、リード関数が終了した時点でリードアクセスの発行が終了しているように実装すれば、オーバラップは行われない。さらに、契機となるリード関数の中からリードアクセスの発行を行う際、別スレッドでリードアクセスの発行を行えば、当該リードアクセスの発行を、リードアクセス以外の処理や他のリードアクセスの発行とオーバラップして実行できる。   Further, when issuing a read access by these methods, the read access issuing unit 110 may execute the issuance in an overlap manner in parallel with processing other than the read access or the previously issued read access. Further, when issuing read access by the first to fourth, sixth, and seventh methods, the read access issuance by the read access issuing unit 110 is mainly triggered by the execution of the read function. Become. If the read access is issued from among the read functions that trigger this, and the read access is issued when the read function is completed, the overlap is not performed. Furthermore, when issuing a read access from a read function that triggers, if the read access is issued in a separate thread, the read access is issued in a manner other than processing other than read access or other read access issuance. You can wrap and run.

リードアクセス発行部110が、第5の方法や、第7の方法で「一定時間」リードアクセスが発行されていないサーバに対して(図16のステップS181のYES)、リードアクセスを発行する場合、あるいは、第4の方法で「一定時間」ごとに「1つのキーあたりにかかるバリュー取得時間」を計算して、閾値を下回るサーバに対して(図15または図16のステップS151のYES)、リードアクセスを発行する場合、これらの「一定時間」ごとに行う判定をそれぞれ独立したスレッドで行い、当該スレッドでリードアクセスの発行をそれぞれ行うことで、オーバラップを実現することができる。このように、クライアント装置100では、非同期にオーバラップしてリードアクセスを実行させることで処理時間を有効活用することができる。   When the read access issuing unit 110 issues read access to a server to which read access has not been issued by the fifth method or the seventh method (YES in step S181 in FIG. 16), Alternatively, the “value acquisition time per key” is calculated for each “certain time” by the fourth method, and the read is performed for a server that is below the threshold (YES in step S151 in FIG. 15 or FIG. 16). When issuing an access, an overlap can be realized by performing the determination performed for each of these “certain times” with independent threads and issuing a read access with the thread. As described above, in the client device 100, the processing time can be effectively used by asynchronously overlapping and executing read access.

以上説明したように、本発明の実施の形態に係る分散システム1によれば、上記実施形態と同様な効果を奏するとともに、メモリ量やマシン間の通信速度の違い等を考慮に入れた最適なアクセス方法を提供できる。
その理由は、決定部108が、アクセス待ちリスト104で消費されているメモリが一定量を越えると、1要素当たりの取得時間が最小のサーバを選択して当該サーバに対して複数のキーに対するリードアクセスを発行することで、マシンのメモリをできるだけ活用しながら、その時点で最も適切なサーバを選択できるためである。
As described above, according to the distributed system 1 according to the embodiment of the present invention, it is possible to achieve the same effect as the above embodiment, and to optimize the memory amount and the difference in communication speed between machines. An access method can be provided.
The reason is that, when the memory consumed in the access waiting list 104 exceeds a certain amount, the determination unit 108 selects a server having the shortest acquisition time per element and reads the plurality of keys from the server. This is because by issuing access, it is possible to select the most appropriate server at that time while using the memory of the machine as much as possible.

上記非特許文献1記載の技術では、分散テーブルに対する複数のアクセスをまとめることができたとしても、どのタイミングでどのサーバに対するものを優先して行なうのが最適であるかは明らかではなかった。
すなわち、上記非特許文献1記載の技術では、複数のアクセスをまとめるためには、なんらかの形で処理を遅延させる必要がある。そのために必要となるメモリ量を一定にした上で最も効率のよいアクセス方法を実現する必要がある。
In the technique described in Non-Patent Document 1, even if a plurality of accesses to the distribution table can be combined, it is not clear at what timing it is optimal to prioritize which server.
That is, in the technique described in Non-Patent Document 1, it is necessary to delay the processing in some form in order to combine a plurality of accesses. Therefore, it is necessary to realize the most efficient access method while keeping the amount of memory required for that purpose constant.

さらに、実際にシステムが動作する環境を考えると、分散テーブルを構成する各マシンは必ずしも同じ条件ではない。すなわち、マシンの数が多くなると、その接続は多段のツリーとして構成されることが多く、たとえば、同じラック内のマシンの方が別のラック内のマシンよりも通信速度が速いということが起こりうる。   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 system 1 according to the embodiment of the present invention, it is possible to realize an optimum access method taking such an environment into consideration.

(第3の実施の形態)
図17は、本発明の実施の形態に係る分散システム1の構成を示す機能ブロック図である。
本実施形態の分散システム1は、上記実施形態とは、分散テーブルへのリードアクセスだけでなく、ライトアクセス、またはアキュムレートアクセスもアクセス待ちリスト104に登録する点で相違する。
(Third embodiment)
FIG. 17 is a functional block diagram showing the configuration of the distributed system 1 according to the embodiment of the present invention.
The distributed system 1 of the present embodiment is different from the above-described embodiment in that not only read access to the distributed table, but also write access or accumulated access is registered in the access waiting list 104.

本発明の実施の形態に係る分散システム1は、複数の分散テーブルサーバ10にネットワーク3(図17には図示していない)を介して接続されるクライアント装置200を備える。なお、本実施形態のクライアント装置(図中、「分散テーブルクライアント」と示す)200は、上記第1の実施の形態または第2の実施の形態のクライアント装置100の決定部108と同様な決定処理手順を含む手順も実行することができる。   The distributed system 1 according to the embodiment of the present invention includes a client device 200 connected to a plurality of distributed table servers 10 via a network 3 (not shown in FIG. 17). Note that the client apparatus (shown as “distributed table client” in the figure) 200 of this embodiment is the same determination process as the determination unit 108 of the client apparatus 100 of the first embodiment or the second embodiment. Procedures including procedures can also be performed.

本実施形態の分散システム1のクライアント装置200は、図1の上記実施形態のクライアント装置100と同じ、アクセス待ちリスト104と、リードアクセス発行部110と、コールバック実行部112と、を備える。さらに、クライアント装置200は、リード(read)関数実行部202と、ライト(write)関数実行部204と、アキュムレート(accumulate)関数実行部206と、ライト/アキュムレート(write/accumulate)アクセス発行部208と、決定部210と、を備える。   The client device 200 of the distributed system 1 according to the present exemplary embodiment includes the same access waiting list 104, a read access issuing unit 110, and a callback execution unit 112 as the client device 100 according to the exemplary embodiment of FIG. Further, the client device 200 includes a read function execution unit 202, a write function execution unit 204, an accumulate function execution unit 206, and a write / accumulate access issue unit. 208 and a determination unit 210.

リード関数実行部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 function execution unit 202 sets the key (Call) and callback of the read function for each distributed table server 10 in charge of the key on the distributed table. The information is classified and registered in the access waiting list 104. That is, the read function execution unit 202 registers the key and callback in the access waiting list 104 as buffer for standby read access and buffers them. In the present embodiment, the read function execution unit 202, the write function execution unit 204, and the accumulation function execution unit 206 correspond to the reception unit 102 and the registration unit 106 in the above embodiment.

ライト関数実行部204は、プログラムが実行されてライト関数が呼び出されたとき、ライトアクセスの発行をライト/アキュムレートアクセス発行部208に要求、または、ライトアクセス処理を行う。ライト関数は、分散テーブルのデータに書き込みを行う関数であり、データを書き込むデータのキー(Key)と、書き込むデータ(Value)が引数として指定される。ライトアクセス処理とは、ライト関数で指定された引数のKeyのデータに、引数のValueのデータを書き込む処理である。   When the program is executed and the write function is called, the write function execution unit 204 requests the write / accumulate access issue unit 208 to issue a write access, or performs a write access process. The write function is a function for writing data in the distributed table, and a data key (Key) for writing data and data (Value) to be written are designated as arguments. The write access process is a process of writing the argument Value data to the argument Key data specified by the write function.

アキュムレート関数実行部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 access issuing unit 208 to issue an accumulation access or performs an accumulation access process. The Accumulate function performs the arithmetic processing specified as an argument between the value (data) originally in the distributed table corresponding to the key (Key) specified as the argument and the value (Value) specified as the argument. Access and storing the result as key data (value). Here, it is assumed that the specified arithmetic processing satisfies the combining law. An example of the calculation process is addition, multiplication, or obtaining a maximum value or a minimum value. Accumulate access processing is the operation processing specified by the argument between the Key data of the argument specified by the Accumulation function and the Value specified by the argument, and the result of the operation is added to the Key data of the argument. This is a process of writing a value.

ライト/アキュムレートアクセス発行部208は、ライト関数実行部204またはアキュムレート関数実行部206からの要求または、決定部210によって決定された発行タイミングで、ライトまたはアキュムレートアクセスを、該当する分散テーブルサーバ10に発行する。   The write / accumulate access issuance unit 208 sends a write or an accumulative access to the corresponding distributed table server at a request from the write function execution unit 204 or the accumulation function execution unit 206 or at an issuance timing determined by the determination unit 210. Issue to 10.

本実施形態の分散システム1のクライアント装置200において、受付部(ライト関数実行部204)は、分散テーブルのキーに対して値(バリュー)を書き込むライトアクセス処理をさらに受け付ける。そして、リードアクセス発行部110は、アクセス待ちリスト104を参照し、ライトアクセス処理と同じキーに対する待機リードアクセスが存在する場合、ライトアクセス処理の値(バリュー)で待機リードアクセスのコールバックを実行し、アクセス待ちリスト104から当該待機リードアクセスを削除する。   In the client device 200 of the distributed system 1 according to the present embodiment, the reception unit (write function execution unit 204) further receives a write access process for writing a value to the key of the distribution table. Then, the read access issuing unit 110 refers to the access waiting list 104, and if there is a standby read access for the same key as the write access process, executes a standby read access callback with the value (value) of the write access process. The standby read access is deleted from the access waiting list 104.

また、受付部(ライト関数実行部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 function execution unit 204 in the access waiting list 104 together with the standby read access key and callback. Further, the registration unit (write function execution unit 204) refers to the access wait list 104, and if the standby read access prohibition flag for the same key as that of the write access process is registered, the write access process waits, and the corresponding. A key and a value are registered in the access waiting list 104 as a standby write access to be issued later to the server.

ここで、ライト関数またはアキュムレート関数が、対象とするキーのリードアクセスがアクセス待ちリスト104に登録されていない、または登録されていても追い越して処理してよい場合は、ライト関数実行部204またはアキュムレート関数実行部206は、即時ライト/アキュムレートアクセス発行部208にライトまたはアキュムレートアクセス発行を要求する。追い越せないリードアクセスがアクセス待ちリスト104に登録されている場合は、ライト関数実行部204またはアキュムレート関数実行部206は、ライトまたはアキュムレートアクセス処理を、待機アクセスとして、アクセス待ちリスト104に登録する。   Here, when the write function or the accumulation function is not registered in the access waiting list 104 for the read access of the target key, or is registered, the write function execution unit 204 or The accumulation function execution unit 206 requests the immediate write / accumulate access issuance unit 208 to issue a write or an accumulative access. When a read access that cannot be overtaken is registered in the access waiting list 104, the write function executing unit 204 or the accumulating function executing unit 206 registers the write or accumulating access process in the access waiting list 104 as a standby access. .

本実施形態において、決定部210は、アクセス待ちリスト104に登録されているリードアクセスと、それを待ち合わせているライトアクセス、アキュムレートアクセスについて、いつ(発行タイミング)、どの分散テーブルサーバ10(発行先)に発行するかを決定する。   In this embodiment, the determination unit 210 determines when (issue timing) and which distributed table server 10 (issue destination) for the read access registered in the access waiting list 104, the write access that waits for it, and the accumulative access. ) To issue.

本実施形態では、アクセス待ちリスト104で消費されているメモリが一定量を越えると、決定部210が、1要素当たりの取得時間が最小の分散テーブルサーバ10を選択して、リードアクセス発行部110が、当該サーバに対して複数のキーに対するリードアクセスを発行する。そして、コールバック実行部112が、取得したキー(Key)とバリュー(Value)を用いて登録されていたコールバック(Callback)を実行する。その後、ライト/アキュムレートアクセス発行部208が、待ち合わせていたライトアクセス、またはアキュムレートアクセスを該当する分散テーブルサーバ10に発行する。   In this embodiment, when the memory consumed in the access waiting list 104 exceeds a certain amount, the determination unit 210 selects the distributed table server 10 having the minimum acquisition time per element, and the read access issue unit 110. Issues read access to a plurality of keys to the server. Then, the callback execution unit 112 executes the callback (Callback) registered using the acquired key (Key) and value (Value). Thereafter, the write / accumulate access issuing unit 208 issues the waiting write access or the accumulated access to the corresponding distributed table server 10.

決定部210における、いつ、どのサーバにリードを発行するかの決定には、上記実施形態同様に、他の方法も考えられる。すなわち、決定方法には、一定時間以上リードアクセスが発行されていないサーバについて発行する方法、1要素当たりの取得時間が一定値以下のサーバについて発行する方法、プログラマが明示的に指定する方法、また、これらを組み合わせる方法がある。   Other methods are also conceivable in the determination unit 210 for determining when and to which server the lead is issued, as in the above embodiment. That is, the determination method includes a method of issuing a server for which read access has not been issued for a certain period of time, a method of issuing a server having an acquisition time per element of a certain value or less, a method of explicitly specifying by a programmer, There are ways to combine these.

本実施形態のクライアント装置200は、このような構成、および動作を採用することで、プログラム上任意の場所に現れる複数のリードアクセスを一つにまとめて発行し、リードアクセスのレイテンシによる影響を削減することができる。また、本実施形態では、決定部210により、メモリ量やマシン間の通信速度の違い等を考慮に入れた最適なアクセス方法を提供できる。これにより、本発明の目的を達成することができる。   By adopting such a configuration and operation, the client device 200 according to the present embodiment collectively issues a plurality of read accesses appearing at arbitrary locations in the program, thereby reducing the influence of read access latency. can do. In the present embodiment, the determination unit 210 can provide an optimal access method that takes into account the amount of memory, the difference in communication speed between machines, and the like. Thereby, the object of the present invention can be achieved.

以下、各アクセス処理について具体例を示しながら説明する。
まず、分散テーブルからデータを読む場合(リードアクセス)について説明する。
本発明では、分散テーブルサーバ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 table server 10, a mechanism called a callback is used to combine accesses to a plurality of distributed tables appearing at different locations in the program into one. .
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 table server 10 are determined in advance. By describing the declaration of the above MyCallback class and the following read function in the individual programs in advance, the system Realized.

また、分散テーブルに対するリードアクセスを行う際のプログラムインタフェース(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 access waiting list 104. An example of the access waiting list 104 at this time is as shown in FIG. 2 shown in the above embodiment. The access waiting list 104 in the example of FIG. 2A is a collection of given keys and callbacks for each distributed table server 10 in charge of keys. The access waiting list 104 in the example of FIG. 2B is a collection of given keys and callbacks for each key. In the following description, it is assumed that the access waiting list 104 collected for each server in FIG.

アクセス待ちリスト104に登録されたリードアクセス要求は、ある程度ためられ、決定部210によってその発行タイミングと発行先のサーバが決定される。決定部210の動作については、上記実施形態の決定部108と同様である。   The read access request registered in the access waiting list 104 is accumulated to some extent, and the issuing unit 210 determines the issue timing and the issue destination server. About operation | movement of the determination part 210, it is the same as that of the determination part 108 of the said embodiment.

決定部210によって、ある分散テーブルサーバ10へのリードアクセス発行が決定されると、リードアクセス発行部110によって、アクセス待ちリスト104の当該サーバ欄にある少なくとも一つのキーに対するリードアクセスが、当該分散テーブルサーバ10に対して行われる。そして、リードアクセス発行部110は、それぞれのキーに対するバリューを受け取る。   When the determination unit 210 determines to issue a read access to a certain distributed table server 10, the read access issue unit 110 determines that the read access to at least one key in the server column of the access waiting list 104 is the distribution table. This is performed on the server 10. Then, the read access issuing unit 110 receives a value for each key.

そして、コールバック実行部112によって、キーと受け取ったバリューを用いて、アクセス待ちリスト104の当該サーバ欄に登録されていたコールバックが実行される。上述したC++での例を用いると、コールバック実行部112は、Callbackオブジェクトのrunメンバ関数をKeyとValueを引数に実行する。   The callback execution unit 112 executes the callback registered in the server field of the access waiting list 104 using the key and the received value. If the example in C ++ mentioned above is used, the callback execution part 112 will execute the run member function of Callback object by using Key and Value as an argument.

以上により、クライアント装置200は、プログラム上離れた場所に存在する分散テーブルに対するリードアクセスにおいて、同一サーバに対する複数のアクセスをまとめることで、分散テーブルへのアクセスにおけるレイテンシの影響を削減することができる。   As described above, the client apparatus 200 can reduce the influence of the latency in accessing the distributed table by collecting a plurality of accesses to the same server in the read access to the distributed table existing in a place distant from the program.

なお、コールバック内部ではさらにリード関数だけでなく、ライト関数またはアキュムレート関数の実行を行うこともでき、アクセス待ちリスト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 access waiting list 104 together with the read function for the same key. You may register as a plurality together. Further, when the read function for the same key is executed by the program a plurality of times, a plurality of read functions may be registered in the access waiting list 104.

次に、分散テーブルへの書き込みアクセス(ライトアクセス)がある場合について説明する。
通常、共有されるデータに対し、複数のマシン(たとえば、クライアント装置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 client device 200 or other machines connected to the client device 200), exclusive control such as locking is performed. Such control is not targeted. That is, in this embodiment, the case where the read and write access to the distributed table in each machine can be executed in an arbitrary order is targeted.

まず、クライアント装置200は、書き込みアクセスを、ライト(write)アクセスとアキュムレート(accumulate)アクセスに分類する。ライトアクセスは、キー(Key)に対応する値を上書きする通常の書き込みである。アキュムレートアクセスは、元々あった値と指定された値の間で演算を行い、その結果を格納するアクセスである。ここで、指定される演算は、結合法則が成り立つものであるとする。加算や乗算、最大値または最小値を求める演算がこの例となる。   First, the client device 200 classifies the write access into a write access and an accumulate access. Write access is normal writing that overwrites a value corresponding to a key. Accumulated access is an access that performs an operation between the original value and a specified value and stores the result. Here, it is assumed that the specified operation is one in which a combination rule is established. Examples of addition and multiplication are operations for obtaining a maximum value or a minimum value.

たとえば、加算の場合、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 client apparatus 200 are called from the write function and the accumulating function described in each program. As in the case of the read function, both the write function and the accumulation function are completed on the program when the write access and the accumulation access to the distributed table server 10 via the client device 200 are completed. Not necessarily.

まず、ライトアクセスについて説明する。ライト(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 client device 200 may issue a write access basically unconditionally. However, depending on the contents of the program, if the read function is executed for the same key before the write function is executed, it may be possible to prevent the write from overtaking the read. This is in the same machine, and as described above, the order control of read access and write access among a plurality of machines is not considered. Therefore, in the present embodiment, the case where the write access may pass the read access and the case where the write access does not pass are considered.

ライトアクセスがリードアクセスを追い越してよい場合、ライト関数実行部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 function execution unit 204, the write function execution unit 204 first refers to the access wait list 104, and the read for the same key is the access wait list 104. Check whether it is registered in. If registered, according to the request from the write function execution unit 204, the write / accumulate access issuing unit 208 issues a write request to the server in charge of the key, and also writes the value to be written with the key and the write function. The registered callback is executed as an argument. If not registered, according to the request from the write function execution unit 204, the write / accumulate access issuing unit 208 simply issues a write request to the server in charge of the key.

つぎに、ライトアクセスがリードアクセスを追い越さないようにしたい場合を考える。本実施形態では、このような場合に対応するために、追い越されたくないリードにフラグ(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 access waiting list 104. ). That is, as shown in FIG. 18, the registration unit 106 (write function execution unit 204) sets a key (Key1) and a callback (Callback1) as standby read access, and an overtaking impossible flag (true) as an access waiting list 104. Register with.

そして、追い越し不可のリードアクセスと同じキー(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 function execution unit 204, the write function execution unit 204 first refers to the access waiting list 104. When there is a read that cannot be overtaken for the same key (Key1) (when the flag true is registered), the write function execution unit 204 (registration unit 106) also registers the write in the access waiting list 104. This is shown in FIG.

次に、ライト(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 callback execution unit 112 executes the callback using the value of the waiting write.
When the write function for the same key is executed, the write / accumulate access issuing unit 208 overwrites the value of the waiting write with the value of the newly executed write function.
When the accumulation function for the same key is executed, the write / accumulate access issuing unit 208 calculates the result of executing the accumulation function using the value specified in the write function as the original value, and the value of the write function is calculated. To change. For example, if the value specified in the write function is 1 and the accumulate function is to add 2, the write / accumulate access issuing unit 208 changes the value specified in the write function to 3.

そして、ライト(write)がアクセス待ちリスト104に登録されている状態(図18の状態)で、リードアクセス発行部110により、アクセス待ちリスト104の当該リードアクセスが発行されれば、その完了を待ち、ライト/アキュムレートアクセス発行部208が、待ち合わせていたライトアクセスを発行する。   If the read access is issued from the access waiting list 104 by the read access issuing unit 110 in a state where the write is registered in the access waiting list 104 (the state shown in FIG. 18), the read waiting is completed. The write / accumulate access issuing unit 208 issues the write access that has been waiting.

次に、アキュムレートアクセスについて説明する。アキュムレート関数を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 access waiting list 104 for the key specified in the accumulation function will be described. In this case, according to the request from the accumulation function execution unit 206, the write / accumulate access issuing unit 208 immediately issues the accumulation function. Unlike the case of the write function, regardless of whether there is a read access that cannot be overtaken in the access waiting list 104, the callback of the read access is not executed at this time. This is because if the value corresponding to the current key is not known, the value is not determined only by the argument of the accumulation function.

次に、追い越し不可のリードがアクセス待ちリスト104にある場合について説明する。この場合はライト関数の場合と同様、アキュムレート関数実行部206が当該アキュムレートアクセスをアクセス待ちリスト104に登録する。この様子を図19に示す。   Next, a case where a lead that cannot be overtaken is in the access waiting list 104 will be described. In this case, as in the case of the write function, the accumulation function execution unit 206 registers the accumulation access in the access waiting list 104. This is shown in FIG.

アキュムレートがアクセス待ちリスト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 access waiting list 104, the write function execution unit 204 (registration unit 106) determines the accumulation access in the access waiting list 104 as the write access. Replace with and overwrite.

アキュムレートがアクセス待ちリスト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 access waiting list 104, the accumulation function execution unit 206 (registration unit 106) uses the same operation type (for example, addition (add)). If it is, etc.), update the accumulated value. For example, when accumulate (add, Key1,2) is executed in a state where accumulate (add, Key1,1) is registered, the accumulation function execution unit 206 (registration unit 106) displays the registered accumulation. Change rate access to accumulate (add, Key1,3). In the case of different calculation types, the accumulation function execution unit 206 (registration unit 106) registers the accumulation access further thereafter (not shown).

アキュムレートがアクセス待ちリスト104に登録されている状態(図19の状態)で、リードアクセス発行部110により、アクセス待ちリスト104の当該リードアクセスが発行されれば、その完了を待ち、ライト/アキュムレートアクセス発行部208が、待ち合わせていたアキュムレートアクセスを発行する。ここで、待ち合わせていたアキュムレートアクセスに、さらにリードアクセスが待ち合わせていた場合(図20の状態)、アキュムレート後の値はリードアクセスによって計算できるため、コールバック実行部112が、この値を用いてさらに待ち合わせているリードアクセスのコールバックを実行する。   If the read access is issued from the access waiting list 104 by the read access issuing unit 110 in a state where the accumulation is registered in the access waiting list 104 (the state shown in FIG. 19), the read / write accumulation is waited for. The rate access issuing unit 208 issues the accumulated access that has been waiting. Here, when the read access is further waiting for the accumulated access that has been waiting (the state of FIG. 20), the value after accumulation can be calculated by the read access, so the callback execution unit 112 uses this value. Execute the callback for the read access that has been waiting.

たとえば、図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 access issuing unit 110 issuing a read from the state of FIG. The callback execution unit 112 executes Callback1 using this value. When Value2 of the registered accumulation is 2, the write / accumulate access issuing unit 208 issues an accumulation, and the callback execution unit 112 executes Callback5 using 1 + 2 = 3.

また、決定部210による発行タイミングと発行先のサーバの決定処理手順については、上述したように第1〜第7の方法が考えられる。ここでは、説明は省略する。   In addition, as described above, the issue timing and issue destination server decision processing procedure by the decision unit 210 may be the first to seventh methods. Here, the description is omitted.

次に、図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 function execution unit 202 of the client device 200 of the distributed system 1 according to the present embodiment.
The read function execution unit 202 first checks the access waiting list 104, and checks the access waiting list 104 for the access waiting for the same key from the back of the access waiting list 104 (step S201). That is, as shown in FIGS. 18 to 20, there are cases where the write access, the accumulative access, and the read access are registered afterwards in the access waiting list 104, so the read function execution unit 202 checks this later.

ライトアクセスが登録されている場合(ステップS203のYES:図18の状態)、コールバック実行部112が、登録されているバリューを用いて、リード関数の引数のコールバックを実行して(ステップS205)、本処理を終了する。このとき、アクセス待ちリスト104は図18の状態のままとなる。   When write access is registered (YES in step S203: state shown in FIG. 18), the callback execution unit 112 executes a callback of an argument of the read function using the registered value (step S205). ), This process is terminated. At this time, the access waiting list 104 remains in the state shown in FIG.

アキュムレートアクセスが登録されている場合(ステップ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 function execution unit 202 registers the Key and Callback object given as arguments after the accumulating access (step S209). . That is, the state shown in FIG. Thereafter, the read function execution unit 202 notifies the determination unit 210 that the read access has been registered (step S213). In addition, when the determination part 210 does not require this notification, this step can be omitted.

ライトアクセス、アキュムレートアクセスが登録されていない場合は(ステップ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 function execution unit 202 registers the Key and Callback object given as arguments in the access waiting list 104. (Step S211). The read function execution unit 202 notifies the determination unit 210 that the read access has been registered (step S213). As before, this step can be omitted if the determination unit 210 does not require this notification. Further, when registering the read access, the determination unit 210 adds the memory amount necessary for the registration to the memory consumption amount of the access waiting list 104 as necessary.

前述の通り、リードアクセスのキーとコールバックが必要とするメモリ量を加算していくことでアクセス待ちリスト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 access wait list 104 can be obtained, and the memory amount to be added for each registration is specified by the programmer. You may make it do. The determination unit 210 also adds the memory amount when registering write / accumulate access, which will be described later. In these cases, the determination unit 210 adds the memory amount required for the write / accumulate access key and value (in the case of accumulation, the amount of memory required for TYPE information).

図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 function execution unit 204 of the client device 200 of the distributed system 1 according to the present embodiment.
As in the case of the read function, the write function execution unit 204 checks the access waiting list 104 from the back of the access waiting list 104 for the same key in the access waiting list 104 (step S221). When write access is registered (YES in step S223: state of FIG. 18), the write function execution unit 204 overwrites the value of the registered write access with the value given as an argument (step S225). Then, the write function execution unit 204 ends this process.

アキュムレートアクセスが登録されている場合(ステップ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 function execution unit 204 overwrites the registered accumulated access with the write access (step S229). That is, the state shown in FIG. 20 is obtained. Then, the write function execution unit 204 ends this process. If the accumulated access is not registered (NO in step S227), and if the read access is not registered (NO in step S231), the write function executing unit 204 sets the write / accumulate access issuing unit 208. Use write access is issued (step S233). Then, the write function execution unit 204 ends this process.

リードアクセスが登録されている場合(ステップ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 function execution unit 204 checks whether the registered read access can be overtaken. (Step S235). If the overtaking is not possible (NO in step S235), that is, if the flag true is registered, the write function execution unit 204 registers the write access behind this read access in the access waiting list 104 (step S237). ). When the overtaking is possible (YES in step S235), the write function execution unit 204 causes the callback execution unit 112 to execute the read access callback using the value of the argument of the write function, and accesses the read access. Delete from the waiting list 104 (step S239). Further, paying attention to the element immediately before the access waiting for the same key in the access waiting list 104, the process returns to step S221, and the write function execution unit 204 repeats the same processing as above (step S241). When the process is completed for all elements waiting for the same key in the access waiting list 104, the write function execution unit 204 ends the process after repeating the process for the empty element at the end.

たとえば、図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 access waiting list 104 can be overtaken (YES in step S235). The execution unit 204 causes the callback execution unit 112 to execute Callback5 of the read access, and removes the read access from the access waiting list 104 (Step S239). Then, the access waiting list 104 is in the state shown in FIG. Then, returning to step S221, paying attention to the accumulated access at the end of the access waiting list 104, the write function execution unit 204 repeats the process (step S241).

また、図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 function execution unit 204 executes the callback. The read access callback is executed by the unit 112 and deleted from the access waiting list 104 (step S239). Since the next element of interest is not in the access wait list 104, the write function execution unit 204 performs the next iteration process on the empty element. Here, since any of the write access, the accumulation access, and the read access is not registered, the write function execution unit 204 finally issues the write access using the write / accumulate access issuing unit 208 and ends the process. (Step S237).

図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 client device 200 of the distributed system 1 according to the present embodiment.
As in the case of the write function, the accumulation function execution unit 206 checks the access waiting list 104 for the access waiting for the same key from the back of the access waiting list 104 (step S251). When write access is registered (YES in step S253: state shown in FIG. 18), the accumulation function execution unit 206 executes accumulation calculation based on the value of the registered write access and registers as a result. The written write access value is overwritten (step S255). For example, when the value specified in the light function is 1 and the accumulation function is to add 2, the accumulation function execution unit 206 changes the value specified in the light function to 3. Then, the accumulation function execution unit 206 ends this process.

アキュムレートアクセスが登録されている場合(ステップ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 access waiting list 104, and performs the same processing as above. Repeat (step S271). When the processing is completed for all the elements that are waiting for the same key in the access waiting list 104, the accumulation function executing unit 206 ends the process after repeating the process for the last empty element.

たとえば、図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 access waiting list 104 can be overtaken (YES in step S267). The rate function execution unit 206 repeats the process while paying attention to the accumulative access immediately before the end of the access waiting list 104 (step S271). When the processing is completed for all the elements that are waiting for the same key in the access waiting list 104, the accumulation function executing unit 206 ends the process after repeating the process for the last empty element.

図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 access waiting list 104. Perform the next iteration on the element. Here, since any of the write access, the accumulative access, and the read access is not registered (NO in step S253, NO in step S257, and NO in step S265), the accumulating function execution unit 206 performs the final operation. Thus, the write / accumulate access issuing unit 208 is used to issue an accumulative access and the process is terminated (step S273).

図24は、本実施形態の分散システム1のクライアント装置200のリードアクセス発行部110の動作の一例を示すフローチャートである。ライト/アキュムレートアクセス発行部208は、単純にライトアクセス、アキュムレートアクセスを担当するサーバに発行するだけであるが、リードアクセス発行部110は、対象とするサーバを指定して呼び出され、図24のような動作を行う。   FIG. 24 is a flowchart illustrating an example of the operation of the read access issuing unit 110 of the client device 200 of the distributed system 1 according to the present embodiment. The write / accumulate access issuing unit 208 simply issues to a server in charge of write access and accumulative access, but the read access issuing unit 110 is called by specifying a target server. The operation like this is performed.

まず、リードアクセス発行部110は、指定されたサーバに対し、アクセス待ちリスト104の先頭から参照し、先頭の待機リードアクセスから順に以下の処理を繰り返し実行する(ステップS281)。リードアクセス発行部110は、複数のリードアクセスについて、それぞれリードアクセスを順に発行、各キーに対応するバリューを受け取る(ステップS283)。決定部210で必要とされる場合は、リードアクセス発行部110は、この発行時刻をアクセス待ちリスト104に記録しておく。
そして、リードアクセス発行部110は、得られたキーとバリューを用い、登録されていたコールバックを実行し、アクセス待ちリスト104から削除する(ステップS285)。アクセス待ちリスト104の後ろに、ステップS283で発行したキーのリードアクセスの発行を待っているライトアクセスが存在した場合(ステップS287のYES)、リードアクセス発行部110は、ライト/アキュムレートアクセス発行部208を用いてライトアクセスを発行する(ステップS289)。
First, the read access issuing unit 110 refers to the designated server from the top of the access waiting list 104 and repeatedly executes the following processing in order from the top standby read access (step S281). The read access issuing unit 110 issues a read access for each of the plurality of read accesses in order, and receives a value corresponding to each key (step S283). When required by the determination unit 210, the read access issuing unit 110 records this issuance time in the access waiting list 104.
Then, the read access issuing unit 110 executes the registered callback using the obtained key and value, and deletes it from the access waiting list 104 (step S285). If there is a write access waiting for the issuance of the read access for the key issued in step S283 behind the access waiting list 104 (YES in step S287), the read access issuing unit 110 reads the write / accumulate access issuing unit. A write access is issued using 208 (step S289).

同様にアキュムレートアクセスが存在した場合(ステップ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 access issuing unit 110 issues an accumulating access using the write / accumulate access issuing unit 208 (step S293). In this case, the read access issuing unit 110 uses the key and value obtained by issuing the read access, and calculates a value corresponding to the key after the accumulative access (step S295). If neither write access nor accumulated access exists (NO in step S287 and NO in step S291), the read access issuing unit 110 calculates using the key and value received in step S283.
Then, the read access issuing unit 110 repeatedly executes the process for the read / write / accumulate access of the key later (YES in step S297) using the key and value values (step S298). If it does not exist (NO in step S297), the read access issuing unit 110 ends this process.
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 access issuing unit 110 executes the accumulation process using the obtained value for Key1, and the value after the calculation Is obtained as the value for Key1, the subsequent read access is repeated.

次に、本実施形態のクライアント装置200の決定部210によって決定されるアクセス発行処理の動作について、以下説明する。上記実施形態の決定部108の処理手順を示した図7〜図16を用いて、第1〜第7の方法についてそれぞれ説明する。決定部210は、基本的に上記実施形態の決定部108と同様に動作する。   Next, the operation of the access issue process determined by the determination unit 210 of the client device 200 of this embodiment will be described below. Each of the first to seventh methods will be described with reference to FIGS. 7 to 16 showing the processing procedure of the determining unit 108 of the embodiment. The determining unit 210 basically operates in the same manner as the determining unit 108 of the above embodiment.

図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 determination unit 210 receives a notification registered in the access waiting list 104 from the read function (step S121). When this notification is received (YES in step S121), this processing is started, and the determination unit 210 refers to the access waiting list 104 to check whether there is a server having a certain number or more of read access in charge (step). S123). If there is, the read access issuing unit 110 issues a read access to the server (step S125). The operation of the read access issuing unit 110 is actually the above-described operation described with reference to FIG. 24. However, the detailed description will be omitted below, and it will be described as simply issuing a read access.

図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 determination unit 210 first receives a notification registered in the access waiting list 104 from the read function (step S121). When this notification is received (YES in step S121), this process starts, and the determination unit 210 checks whether the amount of memory consumed in the access waiting list 104 is equal to or larger than a certain amount (step S131). If it is equal to or greater than a certain amount (YES in step S131), the read access issuing unit 110 issues a read access to the server with the largest number of access waits (step S133).

図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 determination unit 210 first receives a notification registered in the access waiting list 104 from the read function (step S121). When this notification is received (YES in step S121), this process starts, and the determination unit 210 checks whether the amount of memory consumed in the access waiting list 104 is equal to or larger than a certain amount (step S131). If it is a certain amount or more (YES in step S131), the read access issuing unit 110 issues a read access to the server having the shortest value acquisition time per key (step S141). The value acquisition time per key can be obtained by the above-described equation (1).

図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 determination unit 210 receives a notification registered in the access wait list 104 from the read function (YES in step S121 in FIG. 10) or waits for access from the read function. Either the notification registered in the list 104 is received a predetermined number of times (YES in step S121 in FIG. 11 and YES in step S161), or a notification is received at regular intervals from the timer (YES in step S171 in FIG. 12). This triggers the process. Then, the determining unit 210 refers to the access waiting list 104 and checks whether there is a server whose minimum value acquisition time per key is equal to or less than a threshold (step S151). If there is (YES in step S151), the read access issuing unit 110 issues a read access to the server (step S125).

図13に示す第5の方法の決定処理では、決定部210が、タイマから一定時間ごとに通知を受け取り(ステップS171のYES)、一定時間以上リードアクセスが発行されていないサーバがあるか、アクセス待ちリスト104に記録した前回のリード発行時刻を元に調べる(ステップS181)。もしそのようなサーバがあれば(ステップS181のYES)、リードアクセス発行部110が、当該サーバに対するリードアクセスを発行する(ステップS125)。   In the determination process of the fifth method shown in FIG. 13, the determination unit 210 receives a notification from the timer every predetermined time (YES in step S171), and there is a server for which read access has not been issued for a predetermined time or more. The previous read issue time recorded in the waiting list 104 is checked (step S181). If there is such a server (YES in step S181), the read access issuing unit 110 issues a read access to the server (step S125).

図14に示す第6の方法の決定処理では、決定部210が、プログラムから明示的にリードアクセスを発行するサーバを指定した関数を呼び出す(ステップS191)。そして、リードアクセス発行部110が、指定されたタイミングで、指定されたサーバに対して、リードアクセスを発行する(ステップS195)。   In the determination process of the sixth method shown in FIG. 14, the determination unit 210 calls a function that explicitly designates a server that issues read access from a program (step S191). Then, the read access issuing unit 110 issues read access to the specified server at the specified timing (step S195).

図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 determination unit 210 receives the notification registered in the access waiting list 104 from the read function (step S121 in FIG. 15). When this notification is received (YES in step S121 in FIG. 15), the determination unit 210 checks whether the amount of memory consumed in the access waiting list 104 is equal to or larger than a certain amount (step S131 in FIG. 15). If it is a certain amount or more (YES in step S131 in FIG. 15), the read access issuing unit 110 issues read access to the server having the shortest value acquisition time per key (step in FIG. 15). S141). Otherwise (NO in step S131 in FIG. 15), the determination unit 210 checks whether or not the notification registered in the access waiting list has been received a predetermined number of times or more from the read function (step S161 in FIG. 15). Note that this step may be omitted and the process may proceed to the next as it is established.

もし所定回数以上来ていれば(図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 determination unit 210 checks whether there is a server whose minimum value acquisition time per key is equal to or less than a threshold (step in FIG. 15). S151). If there is (YES in step S151 in FIG. 15), the read access issuing unit 110 issues a read access to the server (step S125 in FIG. 15).

また、本方法では、決定部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 determination unit 210 receives a notification from the timer at regular intervals (YES in step S171 in FIG. 16), and whether there is a server for which read access has not been issued for a certain period of time or not is in the access waiting list 104. The previous read issue time recorded is checked (step S181 in FIG. 16). If there is such a server (YES in step S181 in FIG. 16), the read access issuing unit 110 issues a read access to the server (step S125 in FIG. 16). If there is not (NO in step S181 in FIG. 16), the determination unit 210 checks whether there is a server whose minimum value acquisition time per key is equal to or less than a threshold (step S151 in FIG. 16). If there is (YES in step S151 in FIG. 16), the read access issuing unit 110 issues a read access to the server (step S125 in FIG. 16).

また、本方法では、図14に示すように、決定部210が、プログラムから明示的にリードアクセスを発行するサーバを指定した関数を呼び出してもよい(ステップS191)。そして、リードアクセス発行部110が、指定されたタイミングで指定されたサーバに対して、リードアクセスを発行する(ステップS195)。   In this method, as shown in FIG. 14, the determination unit 210 may call a function that explicitly designates a server that issues read access from a program (step S191). Then, the read access issuing unit 110 issues a read access to the designated server at the designated timing (step S195).

以上説明したように、本発明の実施の形態の分散システム1によれば、上記実施形態と同様な効果を奏するとともに、ライトアクセスやアキュムレートアクセスとともに、効率のよい処理を行うことができる。   As described above, according to the distributed system 1 of the embodiment of the present invention, the same effects as those of the above embodiment can be obtained, and efficient processing can be performed together with write access and accumulated access.

以上、図面を参照して本発明の実施形態について述べたが、これらは本発明の例示であり、上記以外の様々な構成を採用することもできる。   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 information processing apparatus 1000 as shown in FIG. The information processing apparatus 1000 reads the data from a plurality of distributed tables (not shown) that each of the plurality of servers (distributed table server 10) has, and a result of reading based on the key (Key) of read access processing A reception unit 102 that receives a callback that defines a process to be executed using the server, and waits for the received read access processing, and a key and callback as standby read access to be issued later to the corresponding distributed table server 10 The registration unit 106 registered in the access waiting list 104 and the determination of determining the issuing destination distributed table server 10 issuing the standby read access and the issuing timing according to predetermined conditions for the standby read access registered in the access waiting list 104 Unit 108 and the source determined by the determination unit 108 A read access issuance unit 110 that issues a standby read access to the distributed table server 10 at the determined issue timing and receives the access result from the distributed table server 10, and an access result (value) that is received by the read access issue unit 110 And a callback execution unit 112 that executes a callback of the corresponding standby read access registered in the access waiting list 104 and deletes the standby read access of the executed callback from the access waiting list 104. .

図27の情報処理装置1000は、上記実施形態のクライアント装置を実現する図3のコンピュータ60と同様なコンピュータのハードウェアとソフトウェアの任意の組み合わせによって実現される。図27は、ハードウェア単位の構成ではなく、論理的な機能単位のブロックを示している。
本実施の形態の情報処理装置1000では、コンピュータプログラムに対応する各種の処理動作をコンピュータのCPUが実行することにより、図27の各種ユニットが各種機能として実現される。
The information processing apparatus 1000 in FIG. 27 is realized by any combination of computer hardware and software similar to the computer 60 in FIG. 3 that implements the client apparatus of the above embodiment. FIG. 27 shows a logical functional unit block, not a hardware unit configuration.
In the information processing apparatus 1000 according to the present embodiment, the various units shown in FIG. 27 are implemented as various functions by the CPU of the computer executing various processing operations corresponding to the computer program.

この構成によれば、情報処理装置1000が、任意のプログラムを対象として、プログラム上の任意の場所に現れる分散テーブルサーバ10へのリード関数による複数のリードアクセス処理を、リードアクセス毎に行うのではなく、アクセス待ちリスト104に登録して一定数以上待機させることで、サーバ毎にまとめて実行することができる。そして、この構成により、プログラム上に複数現れるリードアクセス処理を、その都度処理する場合に比較して、リードアクセス時にかかるレイテンシによるアクセス処理速度への影響を削減することができ、高速化を図ることができる。   According to this configuration, the information processing apparatus 1000 does not perform, for each read access, a plurality of read access processes using a read function to the distributed table server 10 appearing at an arbitrary place on the program for an arbitrary program. Instead, by registering in the access waiting list 104 and waiting for a certain number or more, it is possible to execute for each server collectively. In addition, with this configuration, it is possible to reduce the influence on the access processing speed due to the latency at the time of read access, compared to the case where multiple read access processes appearing on the program are processed each time, and to increase the speed. Can do.

以上、実施形態および実施例を参照して本願発明を説明したが、本願発明は上記実施形態および実施例に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。   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.
請求項1に記載の分散システムにおいて、
前記登録手段は、前記サーバ毎、または前記キー毎に、前記待機リードアクセスを分類して前記アクセス待ちリストに登録し、
前記決定手段は、前記サーバ毎または前記キー毎に、前記待機リードアクセスの前記発行タイミングを決定する分散システム。
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.
請求項1または2に記載の分散システムにおいて、
前記決定手段は、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が一定数以上になったときを、前記発行タイミングであると決定する分散システム。
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.
請求項1乃至3いずれかに記載の分散システムにおいて、
前記決定手段は、
前記アクセス待ちリストのメモリ量が一定量以上になった場合、前記発行タイミングになったと判断し、
前記メモリ量が一定量以上になった時点で、前記アクセス待ちリストに登録された前記待機リードアクセスの件数が多いサーバを前記待機リードアクセスの前記発行先として選択する分散システム。
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乃至4いずれかに記載の分散システムにおいて、
前記決定手段は、各前記サーバの性能情報に基づいて求まる、前記キー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.
請求項1乃至5いずれかに記載の分散システムにおいて、
前記決定手段は、一定時間以上、前記リードアクセス発行手段により前記待機リードアクセスが発行されていないサーバを前記待機リードアクセスの前記発行先として選択する分散システム。
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.
請求項1乃至6いずれかに記載の分散システムにおいて、
前記受付手段は、前記分散テーブルのキーに対して値を書き込むライトアクセス処理をさらに受け付け、
前記アクセス待ちリストを参照し、前記ライトアクセス処理と同じキーに対する前記待機リードアクセスが存在する場合、前記コールバック実行手段は、前記ライトアクセス処理の前記値で前記待機リードアクセスの前記コールバックを実行し、前記アクセス待ちリストから当該待機リードアクセスを削除する分散システム。
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.
請求項7に記載の分散システムにおいて、
前記受付手段は、前記リードアクセス処理より後に受け付ける前記ライトアクセス処理を、先に処理することを禁止する禁止フラグを、前記リードアクセス処理の前記キーと前記コールバックとともに受け付け、
前記登録手段は、受け付けた前記禁止フラグを前記待機リードアクセスの前記キーおよび前記コールバックとともに前記アクセス待ちリストに登録し、
さらに、前記登録手段は、前記アクセス待ちリストを参照し、前記ライトアクセス処理と同じキーに対する前記待機リードアクセスの前記禁止フラグが登録されている場合、前記ライトアクセス処理を待機させ、該当するサーバに後で発行する待機ライトアクセスとして前記キーと前記値を前記アクセス待ちリストに登録する分散システム。
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
JP2014533110A 2012-08-31 2013-08-30 Distributed system, data processing method for information processing apparatus, and program Active JP6156380B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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