JP2009020757A - Data registration apparatus, data registration method and program - Google Patents
Data registration apparatus, data registration method and program Download PDFInfo
- Publication number
- JP2009020757A JP2009020757A JP2007183580A JP2007183580A JP2009020757A JP 2009020757 A JP2009020757 A JP 2009020757A JP 2007183580 A JP2007183580 A JP 2007183580A JP 2007183580 A JP2007183580 A JP 2007183580A JP 2009020757 A JP2009020757 A JP 2009020757A
- Authority
- JP
- Japan
- Prior art keywords
- data
- registration
- information
- writing
- registration information
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、分散ハッシュテーブルへのデータの登録を行うデータ登録装置、データ登録方法及びプログラムに関する。 The present invention relates to a data registration apparatus, a data registration method, and a program for registering data in a distributed hash table.
Chord方式(非特許文献1)やTapestry方式(非特許文献2)などといった分散ハッシュテーブル(Distributed Hash Table,DHT)を代表とする大規模分散ストレージシステムにおいては、ストレージシステム上で取り扱うデータはソフトステート的に保持されることが多い(非特許文献3)。つまり、ストレージシステム上でのデータの保持は一定期間しか保証されず、一次データを所有するデータ源(分散して存在するクライアント)が必要に応じて再び書きこむ必要がある。 In a large-scale distributed storage system represented by a distributed hash table (DHT) such as the Chord method (Non-patent document 1) and the Tapestry method (Non-patent document 2), the data handled on the storage system is in soft state. (Non-Patent Document 3). That is, the retention of data on the storage system is guaranteed only for a certain period of time, and the data source (clients existing in a distributed manner) that owns the primary data needs to rewrite as necessary.
一次データを全てソフトステート的にDHT上で保持する場合、DHTのシステム規模が大きくなり、データ量が大きくなると、データ量に比例して維持すべきステートおよびリフレッシュのための通信が増加してしまい、スケールしない。他方、ソフトステートを用いずに、DHT側にデータの保持を任せると、DHTノードの故障などでデータが失なわれる可能性がある。さらに、DHTからのバックアップあるいはマイグレーションを行う際には、DHTが期待するデータ量を保管しなければならないので、素直にリニアなバックアップを行うと時間がかかりすぎることから、DHTへのバックアップあるいはマイグレーションを行うことが自然であるが、このとき効率的に一方のDHTの内容を他方のDHTにコピーする方法が存在しなかった。
従来、一次データ群からDHTへのデータの書き込み或いは第1のDHTから第2のDHTへのデータの書き込みを行う効果的な方法がなかった。 Conventionally, there has been no effective method for writing data from the primary data group to the DHT or writing data from the first DHT to the second DHT.
本発明は、上記事情を考慮してなされたもので、一次データ群からDHTへのデータの書き込み或いは第1のDHTから第2のDHTへのデータの書き込みを効率的に行うことの可能なデータ登録装置、データ登録方法及びプログラムを提供することを目的とする。 The present invention has been made in consideration of the above circumstances, and is capable of efficiently writing data from the primary data group to the DHT or writing data from the first DHT to the second DHT. It is an object to provide a registration device, a data registration method, and a program.
本発明は、キー情報に対応付けられたデータを該キー情報のハッシュ値に基づいて分散記憶する複数の分散ハッシュノード装置からなる分散ハッシュテーブルに該データを登録するデータ登録装置において、前記キー情報と前記データの元である一次データとを含む登録情報の系列を入力する手段と、入力された前記系列の各々の登録情報について、当該登録情報に係る前記キー情報のハッシュ値を計算するハッシュ手段と、入力された前記系列における登録情報の順序が、同一の分散ハッシュノード装置に記憶すべき登録情報が連続する順序となるように、各登録情報に係る前記キー情報のハッシュ値に基づいて該系列における登録情報の順序をソートするソート手段と、ソートされた前記系列に含まれる登録情報の全部又は一部を対象として、当該登録情報を記憶すべき前記分散ハッシュノード装置への当該登録情報の書き込みを、当該ソート順に従って行う書込手段とを備えたことを特徴とする。 The present invention provides a data registration apparatus for registering data in a distributed hash table including a plurality of distributed hash node apparatuses that distribute and store data associated with key information based on a hash value of the key information. And means for inputting a series of registration information including primary data that is the source of the data, and hash means for calculating a hash value of the key information related to the registration information for each registration information of the inputted series And the order of the registration information in the inputted sequence is based on the hash value of the key information related to each registration information so that the registration information to be stored in the same distributed hash node device is the sequential order. Sorting means for sorting the order of registration information in the series, and targeting all or part of the registration information included in the sorted series Te, the writing of the registration information to be stored the registration information the distributed hash node apparatus, characterized by comprising a writing means for performing in accordance with the sort order.
本発明によれば、一次データ群からDHTへのデータの書き込み或いは第1のDHTから第2のDHTへのデータの書き込みを効率的に行うことができる。 According to the present invention, it is possible to efficiently write data from the primary data group to the DHT or write data from the first DHT to the second DHT.
以下、図面を参照しながら本発明の実施形態について説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(第1の実施形態)
図1に、本発明の一実施形態に係る分散ハッシュテーブルシステムの構成例を示す。
(First embodiment)
FIG. 1 shows a configuration example of a distributed hash table system according to an embodiment of the present invention.
図1において、1はデータ登録装置、2は一次データテーブル、3はDHTノード、8はネットワークである。 In FIG. 1, 1 is a data registration device, 2 is a primary data table, 3 is a DHT node, and 8 is a network.
複数台のDHTノード3が連携して、1つの分散ハッシュテーブル30を構成する。分散ハッシュテーブル30を構成するDHTノードの台数は任意である。また、この台数は、DHTノードの参加・離脱によって、動的に変動し得るものである。
A plurality of
各DHTノード3は、自身が担当するハッシュ値に該当するハッシュ値を与えるキー情報について、図2に例示するようにキー情報(key)とデータ(data:1又は複数のvalue)とを対応付けて保持しており、クライアント装置(図示せず)により送信された、キー情報が指定された問い合せメッセージを受信した場合に、これに応答して、該キー情報のハッシュ値を求め、該ハッシュ値が自身の担当するハッシュ値であれば、該キー情報に対応して記憶しているデータを含む応答メッセージを該クライアント装置へ返送する。自身の担当するハッシュ値でなければ、例えば、その問い合せメッセージを他のDHTノード3へ転送するか、より適切なDHTノード3への参照として、IPアドレスとポート番号の組合せやURLなどを返送する。
Each
なお、DHTノード3については、自ノードに関する情報の管理、参加・離脱制御、隣接ノードに関する情報の管理、データベースの管理、自ノードの属するハッシュ空間上の任意のハッシュ値を担当するDHTノードの検索、クライアント装置からの問い合わせメッセージに対する手続などは、基本的には、従来からある方法を用いて構わない。
For the
一次データテーブル群20の個々の一次データテーブル2は、それぞれ、図3に例示するように、分散ハッシュテーブル30に登録すべきデータの元(データ源)となる多様な一次データ(value)を、そのキー情報(key)に対応付けて保持する。一次データテーブル2の数は任意である。なお、同一のキー情報を持つ一次データが、複数の一次データテーブル2に渡って保持されることもある。 As illustrated in FIG. 3, each primary data table 2 of the primary data table group 20 includes various primary data (values) that are sources (data sources) of data to be registered in the distributed hash table 30. The key information (key) is held in association with it. The number of primary data tables 2 is arbitrary. Note that primary data having the same key information may be held across a plurality of primary data tables 2.
なお、一次データテーブル群20はどのような構成であってもよく、例えば、一次データテーブル群20の個々の一次データテーブル2が通常の独立したデータベースであってもよいし、複数の一次データテーブル2がもう1つの分散ハッシュテーブル30を構成するものであってもよい。 The primary data table group 20 may have any configuration. For example, each primary data table 2 of the primary data table group 20 may be a normal independent database, or a plurality of primary data tables. 2 may constitute another distributed hash table 30.
データ登録装置1は、一次データテーブル2の保持する一次データを、当該一次データを担当するDHTノード3に登録する(すなわち、各一次データは、これに対応するキー情報のハッシュ値を担当するDHTノード3に登録される)。なお、ここでは、データ登録装置1は、個々の一次データテーブル2に対応して一つずつ設けられるものとする。一対のデータ登録装置1と一次データテーブル2とは、互いに独立した装置であってもよいし、一体化した装置であってもよい。
The
1つの分散ハッシュテーブル30を構成する複数のDHTノード3は、ネットワーク8を介して、相互に通信可能である。また、各データ登録装置1は、ネットワーク8を介して任意のDHTノード3と通信可能である。なお、ネットワーク8は、どのようなネットワークでもよい。ここでは、一例としてネットワーク8がインターネットである場合を例にとって説明する。
A plurality of
さて、図1に例示する分散ハッシュテーブルシステムは、例えばトレーサビリティ応用などに用いるサービス構成(例えば文献「尾崎哲, 土井裕介, 若山史郎. 小規模から円滑に拡張できる商品トレーサビリティシステム. 東芝レビュー, Vol.60, No.8, pp.27-31, 2005.」)に適うものである。以下では、本分散ハッシュテーブルシステムを、個品トレーサビリティシステムの構築に利用する場合を例にとって説明するものとする。 The distributed hash table system illustrated in FIG. 1 is a service configuration used for, for example, traceability applications (for example, literature “Tetsu Ozaki, Yusuke Doi, Shiro Wakayama. Product traceability system that can be expanded smoothly from a small scale. Toshiba Review, Vol. 60, No.8, pp.27-31, 2005.)). Hereinafter, a case where the present distributed hash table system is used for constructing an individual product traceability system will be described as an example.
個品トレーサビリティシステムに適用する場合には、例えば、一次データテーブル群20の各一次データテーブル2は、個品ごとの一次データとしての「その個品に関連する情報(例えば、品質情報等)を提供するサーバ装置の情報(例えば、URL)」を、そのキー情報としての「その個品に固有の識別情報(以下、タグIDと呼んで説明するものとする)」に対応付けて保持し、分散ハッシュテーブル30の各DHTノード3は、ルックアップ等に用いるインデックス用のテーブルに、二次データとしての(1又は複数の)上記URL等をタグIDと対応付けて保持する。なお、この場合、URL等は、図1の一次データテーブル2を持つノードを示すものであってもよいし、他のサーバ装置を示すものであってもよい。
When applied to an individual product traceability system, for example, each primary data table 2 of the primary data table group 20 includes “information related to the individual product (for example, quality information) as primary data for each individual product. The server information to be provided (for example, URL) ”is held in association with“ identification information unique to the individual product (hereinafter referred to as tag ID ”) as the key information, Each
図4に、個品毎に付与されるタグIDの一例として、EPCglobalにおけるGID−96(EPCglobal. EPC tag data standards version 1.3. EPCglobal Ratified Specification, March 2006.)を示す。この場合、タグIDは、会社ID・商品種別ID・個品IDの3階層からなる。なお、この場合、DHTは、例えば、会社毎あるいは会社及び商品種別毎などに設けられるが、これに限定されるものではない。 FIG. 4 shows GID-96 (EPCglobal. EPC tag data standards version 1.3. EPCglobal Ratified Specification, March 2006) in EPCglobal as an example of a tag ID assigned to each individual product. In this case, the tag ID consists of three layers of company ID, product type ID, and individual product ID. In this case, the DHT is provided for each company or for each company and product type, but is not limited thereto.
このような個品トレーサビリティシステムにおいては、例えば、ある商品(個品)に関する情報を取得・閲覧したいユーザ(例えば消費者)は、クライアント装置(図示せず)から、その個品のタグIDを指定した問い合わせメッセージを、分散ハッシュテーブル30(のいずれかのDHTノード3)に送信し、分散ハッシュテーブル30からURL等のリストを取得した後に、さらに、取得したURL等をもとに所定のサーバ装置に問い合わせメッセージを送信することによって、該個品に関する具体的な情報(例えば温度管理履歴等)を取得する、といった動作が行われる。 In such an individual item traceability system, for example, a user (for example, a consumer) who wants to acquire and view information on a certain item (individual item) specifies a tag ID of the individual item from a client device (not shown). The inquiry message is transmitted to the distributed hash table 30 (any one of the DHT nodes 3), a list of URLs and the like is acquired from the distributed hash table 30, and then a predetermined server device based on the acquired URL and the like. By transmitting an inquiry message to the device, an operation of acquiring specific information (for example, temperature management history) regarding the individual product is performed.
ここで、分散ハッシュテーブル30は、ノード故障などにより、インデックス用のテーブル(タグID:[URL,…])の一部を失うことがある。その際、特定のDHTノード3の保持するデータの一部が壊れるケースや、特定のDHTノード3が故障して(離脱が生じて)、そのDHTノード3が保持していたデータが全て失われるケースなどがある。
Here, the distributed hash table 30 may lose a part of the index table (tag ID: [URL,...) Due to a node failure or the like. At that time, a part of the data held by the
前者の場合には、その壊れたデータをそのDHTノード3に再登録することで復旧できる。
In the former case, the broken data can be recovered by re-registering with the
後者の場合には、その故障したDHTノード3が保持していたデータを、他のDHTノード3に再登録することで復旧できる。どのDHTノード3が故障した場合に、どのDHTノード3を用いて復旧させるかは、予め決めておくのが望ましい。一例として、Chordのように、ハッシュ値の集合で構成されるハッシュ空間において、両端が連結された閉じた数直線としてハッシュ空間が形成される場合を考える(例えば、各DHTノード3にハッシュ値(例えばDHTノードのアドレスのハッシュ値)が割り当てられ、各DHTノード3の担当するハッシュ値の範囲(上限値及び下限値)は、各DHTノード3に割り当てられたハッシュ値に基づいて決せられる)と、この場合、例えば、或るDHTノード3が故障した場合に、そのDHTノード3が保持していたデータを、ハッシュ空間上でハッシュ値の増加方向でそのDHTノード3に最も近いノード(サクセッサー)、あるいは、ハッシュ空間上でハッシュ値の減少方向でそのDHTノード3に最も近いノード(プレデセッサー)が、以降、それら欠損したデータをも保持するものと予め決めておくことができる。
In the latter case, the data held by the failed
なお、ハッシュ値を計算するためのハッシュ関数としては、ビット数が充分長くて一様な割り当てが行なわれる関数として、例えば、SHA−1やMD5を採用することができる。ハッシュ空間は、SHA−1の場合は、m=160とし、MD5の場合は、m=128として、0〜2m−1のmビットの整数で表わされる。 As a hash function for calculating a hash value, for example, SHA-1 or MD5 can be adopted as a function that has a sufficiently long number of bits and is uniformly assigned. The hash space is represented by an m-bit integer of 0 to 2 m −1 with m = 160 for SHA-1 and m = 128 for MD5.
また、各DHTノード3に対応付けるハッシュ値の決め方としては、例えば、当該DHTノード3の持つアドレス(例えばIPアドレス)に対してハッシュ関数を適用して得られるハッシュ値を用いる方法を採用してもよいし、他の方法を採用してもよい。
Further, as a method for determining a hash value to be associated with each
本実施形態のデータ登録装置1は、上記のデータが欠損した領域(故障領域)を検出し、これを復元するものである。
The
以下、本実施形態のデータ登録装置1について詳しく説明する。
Hereinafter, the
図5に、本実施形態に係るデータ登録装置1の構成例を示す。図4に示されるように、データ登録装置1は、指示受信部11、ハッシュ・ソート部12、フィルタ部13、書込部14、入力部15を備えている。
FIG. 5 shows a configuration example of the
指示受信部11は、ネットワーク8を介して、対象となる分散ハッシュテーブル30における故障領域を示す情報(故障領域情報)、該分散ハッシュテーブル30で使用すべきハッシュアルゴリズム、同一のDHTノード3の担当するハッシュ値が連続するようにソートするためのソートアルゴリズムを含む登録指示メッセージを受信し、それらを蓄積するためのものである。
The
なお、上記ハッシュアルゴリズム及びソートアルゴリズムについては、例えば、事前にパラメータの組み合わせを表記する方法を定義して、登録指示メッセージに該パラメータを記述するようにしてもよいし、Java(登録商標)等のプラットフォームにある動的なオブジェクト読み込み手段を用いるようにしてもよい。 As for the above hash algorithm and sort algorithm, for example, a method for expressing a combination of parameters in advance may be defined, and the parameters may be described in the registration instruction message, or Java (registered trademark) or the like may be used. You may make it use the dynamic object reading means in a platform.
また、上記ハッシュアルゴリズム及びソートアルゴリズムは、登録指示メッセージに含めず、個々のデータ登録装置1においてそれぞれ設定するようにしてもよい。
The hash algorithm and sort algorithm may be set in each
故障領域情報は、例えば、故障したデータのキー情報(key)のハッシュ値(h(key))のリストである。なお、該リストのフォーマットは、どのようなものでもよく、例えば、全ハッシュ値を列記する方法で記述してもよいし、ハッシュ値の始点と終点との組を列記する方法で記述してもよいし、それらを併用してもよい。 The failure area information is, for example, a list of hash values (h (key)) of key information (key) of failed data. The format of the list may be any format. For example, the list may be described by a method that lists all hash values, or may be described by a method that lists pairs of hash value start points and end points. They may be used in combination.
なお、指示受信部11が登録指示メッセージを受信できるようにする方法には種々のバリエーションが可能である。
Note that various variations are possible for the method of enabling the
例えば、分散ハッシュテーブル30全体で、故障した領域を記録する故障領域リストというテーブルを共有するものとし(例えば、DHTノード3以外の管理ノード(図示せず)を1台設け、これに故障領域リストを保持させるものとし)、各DHTノード3は、定期的に、自装置が故障領域を持つかどうか調べ、故障領域を持つ場合に、故障領域リストに、故障領域のエントリ(故障領域の始点,故障領域の終点)を書き加えるものとする。
For example, the distributed hash table 30 as a whole is assumed to share a table called a failure area list for recording a failure area (for example, one management node (not shown) other than the
なお、例えば、或るDHTノード3が故障して離脱した場合には、該或るDHTノード3は、故障領域のエントリを書き加えることはできないことになるが、該或るDHTノード3の代わりとなるべきDHTノード3(例えば、サクセッサーあるいはプレデセッサー)が、該或るDHTノード3の離脱を検出した以降に、該或るDHTノード3が保持すべきデータが全て欠損したものとして、故障領域のエントリを書き加えることができるようになる。また、主として耐故障性の向上のために、或るDHTノード3の担当するデータと同じ内容(ミラー)を、常時、該或るDHTノード3が故障して離脱した際に該或るDHTノード3の代わりとなるべきDHTノード3(例えば、サクセッサーあるいはプレデセッサー)が保持するようにする場合には、該代わりとなるべきDHTノード3が、該或るDHTノード3の離脱を検出した以降に、該或るDHTノード3の担当するデータのうちに故障領域があれば、これを故障領域のエントリを書き加えることができるようになる。また、後述する時刻によるバックアップ指示と同様に、ミラーの最終更新時刻をもとにしたデータ復元を行うために、故障領域のエントリに時刻情報を追記してもよい。この場合は、該故障領域に含まれるデータのうち、エントリに記録された時刻よりも新しいデータが失われた可能性があることを意味する。
For example, when a
そして、データ登録装置1は、定期的に、上記管理ノードに、故障領域に関する問い合わせメッセージを送信し、これを受信した該管理ノードが、該故障領域リストを登録指示メッセージに含めて、そのデータ登録装置1に返送するようにしてもよい。
Then, the
あるいは、管理ノードが、定期的に、該故障領域リストを含む登録指示メッセージを全データ登録装置1にブロードキャストするようにしてもよい。
Alternatively, the management node may periodically broadcast a registration instruction message including the failure area list to all the
なお、上記では、DHTノード3以外の管理ノードを1台設けるものとしたが、管理ノードを複数台設けてもよいし、管理ノードの代わりに又はこれに加えて、1又は複数のDHTノード3に、管理ノードの役割を担わせてもよい。また、故障領域リストを保持する管理ノード等が複数設けられる場合には、データ登録装置1は、それらのうちのいずれか一つに故障領域に関する問い合わせメッセージを送信すればよい。また、管理ノードが、定期的に、該故障領域リストを含む登録指示メッセージをデータ登録装置1に送信するようにする場合には、管理ノード等が複数設けられるときは、それらノードが、登録指示メッセージを送信すべきデータ登録装置1を分担してもよい。
In the above description, one management node other than the
また、管理ノード等を複数設ける場合に、各管理ノード等で、故障領域リストの対象とするDHTノード3を分担することも可能である。
In addition, when a plurality of management nodes are provided, it is possible to share the
ところで、修復されたデータの情報が、故障領域リストいつまでも残るのを避けるために、故障領域リスト内の各エントリは、時間tで期限切れとなるようにするのが好ましい。ただし、個々のデータ登録装置1は、自身がデータを持つタグIDに対応するデータが欠損になれば、これを復元しなければならないので、復元より先に期限切れが発生して復元し損なうことを回避するために、上記管理ノード等に、時間tよりも短かい間隔で故障領域に関する問い合わせを行って、故障領域リストを確実に取得して、故障したデータを更新するようにするのが好ましい。また、管理ノード等が、定期的に、該故障領域リストを含む登録指示メッセージをデータ登録装置1に送信するようにする場合には、時間tよりも短かい間隔で登録指示メッセージを送信するのが好ましい。
By the way, it is preferable that each entry in the failure area list expires at time t in order to prevent the information of the repaired data from remaining indefinitely. However, the individual
ハッシュ・ソート部12は、書き込み対象とする分散ハッシュテーブル30の持つハッシュ値空間の連続性を考慮して効率的な書き込みを行うために、分散ハッシュテーブル30のハッシュ値空間の連続性に沿って一次データ源のデータをソートする。
The
ハッシュ・ソート部12は、入力部15を介して、対応する一次データテーブル2から、それが保持する全てのエントリ(key,value)を、任意の順序の(key,value)の系列として入力し、該(key,value)の系列の各々のエントリについて、指示されたハッシュアルゴリズムに従って、キー情報keyのハッシュ値h(key)を計算して、(h(key),key,value)を求め、全(h(key),key,value)を、指示されたソート・アルゴリズムに従ってソートして、ソートされた(h(key),key,value)の列を作成する。
The
例えば、複数のDHTノード3が、それぞれ、分散ハッシュテーブル30において使用されるハッシュ値空間から自装置に割り当てられた連続するハッシュ値の範囲に含まれるハッシュ値を与えるキー情報に係るデータを記憶するものである場合に、ソート・アルゴリズムは、該分散ハッシュテーブル30において使用されるハッシュ値空間の順序に従って書き込みが行われるようにソートするものである。
For example, each of the plurality of
具体例として、例えば、Chordに従う分散ハッシュテーブル30において、ハッシュアルゴリズムをMD5あるいはSHA−1とし、ソート・アルゴリズムを昇順若しくは降順又はランダムスタートの昇順若しくはランダムスタートの降順などとすることができる。 As a specific example, for example, in the distributed hash table 30 according to Chord, the hash algorithm may be MD5 or SHA-1, and the sort algorithm may be ascending order or descending order, ascending order of random start, or descending order of random start.
なお、ランダムスタートのソート・アルゴリズムは、データの書き込みが特定のDHTノード3に集中しないように、書き込みを開始するDHTノード3がランダムになるようにするために、ランダムに選択したハッシュ値が先頭になるようにソートするものである。例えばChordのような分散ハッシュテーブルアルゴリズムでは、ハッシュ値の空間は閉じた数直線で表現され、前後関係のみが定義される。従って、数直線のどこから書き込みを開始してもハッシュ値空間を一周することにより、漏れなく全てのvalueを書き込むことができる。
Note that the random start sort algorithm uses a randomly selected hash value so that the
フィルタ部13は、ハッシュ・ソート部12から書込部14に与えられた、ソートされた(h(key),key,value)の列を対象として、指示された「故障領域情報」に基づいて、フィルタリングを行う。すなわち、故障領域情報には、再登録すべきデータのハッシュ値が記述されているので、ソートされた(h(key),key,value)の列から、再登録すべきデータ以外のものを削除する(すなわち、h(key)が故障領域情報に記述されていない(h(key),key,value)を削除すればよい)。
The
なお、このフィルタ部13は、ハッシュ・ソート部12と書込部14との間に設けてもよい。
The
書込部14は、書き込み対象とする分散ハッシュテーブル30の持つハッシュ値空間の連続性とDHTノード3の担当領域を判断しながら、データをかたまり(バルク)単位で書き込む。
The
書込部14は、ネットワーク8を介して、ソート及びフィルタリングされた(h(key),key,value)の列の各登録情報(key,value)を、先頭から(もしくは、ランダムな位置から)順に、分散ハッシュテーブル30(の該当するDHTノード3)へ書き込むものである。
The
なお、ランダムな位置から開始するのは、データの書き込みが特定のDHTノード3に集中しないようにするためである。また、遅いDHTノード近辺で輻輳をおこさないように、書きこみの速度(書き込み先ノードの変更の時間間隔など)に一定の制約をかける(例えば、ランダムな待ち時間を設ける)ようにしてもよい。
The reason for starting from a random position is to prevent data writing from being concentrated on a
図6に、データ登録装置1の処理手順の一例を示す。
FIG. 6 shows an example of the processing procedure of the
データ登録装置1は、一定期間の間に受信された登録指示メッセージに含まれる(対象となる分散ハッシュテーブル30における)故障領域情報(例えば、故障領域リスト)と、ハッシュアルゴリズムと、ソートアルゴリズムとを抽出し、これらを指示受信部11に伝えることで、復元動作をトリガする(ステップS1)。
The
なお、ステップS2で新たな故障領域情報が検出されなかった場合(一定期間の間に登録指示メッセージが受信されなかった場合を含む)は、以降の処理をスキップしてステップS1に戻る。 If new failure area information is not detected in step S2 (including the case where the registration instruction message is not received for a certain period), the subsequent processing is skipped and the process returns to step S1.
さて、ステップS2で新たな故障領域情報が検出された(例えば、故障領域リストに新規に書き加えられた故障領域情報が存在する)場合は、その領域(故障領域の始点、故障領域の終点)をフィルタ部13にセットし、上記ハッシュアルゴリズム及びソートアルゴリズムをハッシュ・ソート部12にセットした後に、データの復元を開始する。
If new failure area information is detected in step S2 (for example, there is failure area information newly added to the failure area list), that area (failure area start point, failure area end point) Is set in the
まず、ハッシュ・ソート部12は、一次データ源である一次データテーブル2から、対象となる分散ハッシュテーブル30に書き込むべき(key,value)形式のデータの(任意の順序の)列を受信し、セットされたハッシュアルゴリズムhを利用してh(key)を計算して(ステップS3)、(key,value)の列を(h(key),key,value)の列に変換した後に、セットされたソートアルゴリズムに従ってソートを行う(ステップS4)。ソートされた(h(key),key,value)の列は、同一のDHTノード3の担当するハッシュ値が連続するようにソートされるので(例えば、chordの場合は、h(key)がハッシュ値空間上で連続するようにソートされるので)、書込部14により効率的に書き込むことができる。
First, the
次に、書込部14は、書き込むべきデータをフィルタ部13に問合せ、フィルタ部13は、セットされた故障領域情報に基づいてフィルタリングを行い(すなわち、ソートされた(h(key),key,value)の列から、故障領域情報にh(key)が含まれないエントリを削除し)、書き込むべきデータ(h(key),key,value)の列を書込部14に返し(ステップS5)、書込部14は、フィルタリング及びソートされたデータ(h(key),key,value)の列における各(h(key),key,value)を対象として、書き込みを行う(ステップS6)。なお、フィルタ部13から書込部14へは、h(key)でソートされた(key,value)を返してもよい。
Next, the
図7に、ステップS6の書き込みの処理手順の一例を示す。 FIG. 7 shows an example of the write processing procedure in step S6.
まず、対象となる分散ハッシュテーブル30のうちから、適当なDHTノード3を一つ選択して設定する(ステップS11)。
First, one
次に、フィルタリング及びソートされたデータ(h(key),key,value)(あるいは、(key,value))の列を対象として、未だ書き込みが完了していないデータ(key,value)のうち、最もソート順の早いものを一つ選択し、(key,value)を含む書き込みメッセージを現在設定されているDHTノード3へ送信することによって、当該データ(key,value)の書き込みを試行する(ステップS12)。
Next, among the data (key, value) that has not yet been written in the column of the filtered and sorted data (h (key), key, value) (or (key, value)), One with the earliest sort order is selected, and a write message including (key, value) is transmitted to the currently set
ここで、データ登録装置1から、書き込むべき(key,value)を含む書き込みメッセージを受信したDHTノード3は、そのkeyから計算したハッシュ値h(key)が自装置の担当するものであれば、該(key,value)を自装置に登録する。h(key)が自装置の担当するものでなければ、該DHTノード3又は他のDHTノード3等が、該ハッシュ値h(key)を担当するDHTノード3により近いDHTノード3(担当するDHTノード3を含む)を解決して、該より近いDHTノード3を指示するリダイレクトメッセージを、データ登録装置1へ返すものとする。
Here, the
なお、例えば、各DHTノード3が、自装置が担当する一連のハッシュ値の直後に位置するDHTノード(後続DHTノード)を記憶しておき、ハッシュ値h(key)が自装置の担当範囲にない(key,value)を含む書き込みメッセージを受信したDHTノード3は、この後続DHTノードの情報をリダイレクトメッセージに含めて返信するようにしてもよい。この場合、後続DHTノードが正しいものであれば、次の書き込みに成功するが、正しいものでなければ、書き込みに成功するまで、次々とリダイレクトメッセージが返信される。もちろん、ハッシュ値h(key)が自装置の担当範囲にない(key,value)を含む書き込みメッセージを受信したDHTノード3が、当該ハッシュ値を担当する正しいDHTノードを他のDHTノード3に問い合わせメッセージを送信するなどして、該正しいDHTノードを解決した上で、該書き込みメッセージを受信したDHTノード3あるいは該問い合わせメッセージを受信したDHTノード3等が、正しいDHTノードを示す情報をリダイレクトメッセージに含めて返信するようにしてもよいし、他の方法を用いてもよい。
For example, each
リダイレクションが発生すれば(ステップS13)、上記DHTノード3から返された上記データを書き込むべき正しいDHTノード3を設定し直し(ステップS11)、あらためて上記データの書き込みを行う(ステップS12)。
If redirection occurs (step S13), the
リダイレクションが発生せず、書き込みに成功すれば(ステップS13)、ソート順で次のデータの書き込みを試行する(ステップS12)。 If redirection does not occur and writing is successful (step S13), an attempt is made to write the next data in the sort order (step S12).
なお、上記ソートによって、同一のDHTノード3に書き込むべきデータが複数ある場合には、それらは連続する順番にソートされるので、次に書き込むべきDHTノード3が変わるまで、ステップS12の書き込みは連続して成功することになる。
If there is a plurality of data to be written to the
以上の処理は、ステップS14で次のデータが有る間、繰り返され、すべてのデータが書き込まれると、処理が終了となる。 The above process is repeated while there is the next data in step S14, and the process ends when all the data is written.
なお、図6及び図7の例では、ステップS5で全データについてフィルタリングを完了した後に、ステップS6で書き込みを行うようにしたが、図7のステップS12において、データを一つ選択した際に、このデータにフィルタリングをかけて(すなわち、故障領域情報に基づいて書き込むべきデータか否か調べて)、書き込むべきデータである場合に、書き込むものとし、書き込むべきデータでない場合には、ステップS14に遷移することを、繰り返し行うようにしてもよい。 In the example of FIGS. 6 and 7, after all the data is filtered in step S5, writing is performed in step S6. However, when one data is selected in step S12 of FIG. This data is filtered (that is, whether or not the data is to be written based on the failure area information). If the data is to be written, the data is written. If the data is not to be written, the process proceeds to step S14. This may be repeated.
以下、より具体的な書き込みの手順例について説明する。 Hereinafter, a more specific example of the writing procedure will be described.
例えばChordの場合は、SHA1により定義される閉じた160ビット1次元のハッシュ値空間となり、1次元空間上の一定の領域を一定のDHTノードが管理する。もし、ソートしないデータ列の書き込みを行った場合は、Chordアルゴリズムに基づくDHTノード探索が書き込み毎に実行され、効率が悪くなるが、本実施形態では、ハッシュ・ソート部12により、書き込み先の分散ハッシュテーブル30のハッシュ値空間の連続性に沿った順序のデータ列で書き込みを行うことによって、特定のDHTノードが担当する領域への書き込みをまとめられるようになり、探索のコストを削減できる。同様に、当該範囲への書き込みが終了し、次のデータエントリを書き込む先を探索する場合も、ハッシュ値空間の連続性に基づき書き込み先を移動するだけでよい。
For example, in the case of Chord, it becomes a closed 160-bit one-dimensional hash value space defined by SHA1, and a certain area on the one-dimensional space is managed by a certain DHT node. If a data string that is not sorted is written, a DHT node search based on the Chord algorithm is executed for each write and the efficiency deteriorates. In this embodiment, the
なお、上記において、分散ハッシュテーブル30を構成する各DHTノード3は、自身が担当するハッシュ値に該当するハッシュ値を与えるキー情報について、キー情報(key)とデータ(data:1又は複数のvalue)とを対応付けて保持し、クライアント装置からのキー情報を指定した問い合せメッセージに応答して、該キー情報に対応して記憶しているデータを含む応答メッセージを返送するものとしたが、その代わりに、各DHTノード3は、キー情報のハッシュ値(h(key))とデータ(data:1又は複数のvalue)とを対応付けて保持し、クライアント装置からのキー情報のハッシュ値を指定した問い合せメッセージに応答して、該キー情報のハッシュ値に対応して記憶しているデータを含む応答メッセージを返送するものであってもよい。この場合には、各実施形態において、データ登録装置1は、キー情報(key)からハッシュ値h(key)を計算した後は、(h(key),value)を扱えばよい(キー情報(key)は扱わなくて構わない)。また、DHTノード3へ送信する書き込みメッセージには、(key,value)の代わりに(h(key),value)を付加すればよい。この点は、第2、第3の実施形態についても同様である。
In the above, each
図8に、pseudocodeによる書き込みのアルゴリズム例を示す。なお、このアルゴリズム例は、図6のステップS4のフィルタリングとステップS5の書き込みを一体化したものである。なお、図6において、//で始まる文はコメント文である。 FIG. 8 shows an example of algorithm for writing by pseudocode. In this example algorithm, filtering in step S4 in FIG. 6 and writing in step S5 are integrated. In FIG. 6, a sentence starting with // is a comment sentence.
このアルゴリズム例において、TupleStreamはTupleのイテレータであり、Tupleはhkeyとvalueの組み合わせである。hkeyはh(key)に相当する、一次データ側の(key,value)に対するh(key)である。sorted_sourceは、(フィルタリングされる前の)ソートされた(h(key),value)である。 In this example algorithm, TupleStream is a Tuple iterator, and Tuple is a combination of hkey and value. hkey is h (key) corresponding to (key, value) on the primary data side, corresponding to h (key). Sorted_source is sorted (before being filtered) (h (key), value).
TupleFilterは、(h(key),value)を対象とする、故障領域情報に基づくフィルタである。 The TupleFilter is a filter based on failure area information for (h (key), value).
DHTNodeは、対象となる分散ハッシュテーブル30のDHTノード3を代表するクラスである。nptrは、DHTノード3の1つのノードを示すDHTNodeのインスタンスへのポインタであり、URLあるいはIPアドレス等を含む。
The DHTNode is a class representing the
nptr.put(t.hkey,t.value)は、一つの(h(key),value)をnptrが示すDHTノード3へ書き込む。なお、ここでは、h(key)を送信する場合について記述しているが、keyを送信する場合には、t.hkeyをt.keyとすればよい。
nptr. put (t.hkey, t.value) writes one (h (key), value) to the
DHTノード3は、自装置の担当する範囲外への書き込み要求については、RedirectExceptionとともにより正しいと考えられるDHTNodeへの参照を返す。catchは、これを受信するものである。nptr=re.redirected_toは、返されたDHTノード3のURLあるいはIPアドレス等から生成されたDHTNodeのインスタンスをnptrにセットする。
The
ここで、対象となる分散ハッシュテーブル30の故障領域情報(故障領域リスト)の発見と広告は、DHTのアルゴリズムによって異なる方式が考えられる。例えば、Chordの場合は、DHTハッシュ値空間上で(前のノードを示す)プレデセッサーの値の変動により、ノードの離脱/故障を発見することができる。離脱したノードが所持していた領域のミラーを当該DHTノードが持っていない場合は、当該DHTノードが持つ故障領域リスト情報に離脱したDHTノードの領域情報を時刻と共に追記し、更新した故障領域リストを広告する。故障領域リストの広告は、(後のノードを示す)サクセッサーおよびChord上の短絡経路であるフィンガーの宛先となる各DHTノードに対して行うことが一例として考えられる。故障領域リストの広告を受信したDHTノードは、その故障領域リストを自身の故障領域リストと比較し、新しいデータが存在する場合のみ自身の故障領域リストに新しいデータをマージし、同様に広告を行う。この比較のために、生成する故障領域リストに疑似乱数や時刻などに基づくIDをつけてもよい。 Here, the discovery and advertisement of the failure area information (failure area list) of the target distributed hash table 30 may be different depending on the DHT algorithm. For example, in the case of Chord, node detachment / failure can be found by fluctuation of the predecessor value (indicating the previous node) in the DHT hash value space. If the DHT node does not have a mirror of the area owned by the detached node, the area information of the detached DHT node is added to the failure area list information of the DHT node along with the time, and the updated failure area list Advertise As an example, the advertisement of the failure area list may be performed for each DHT node that is a destination of a finger that is a short-circuit path on a successor and a chord (indicating a later node). The DHT node that has received the failure area list advertisement compares the failure area list with its own failure area list, merges new data into its own failure area list only when new data exists, and advertises similarly. . For this comparison, an ID based on a pseudo-random number, time, or the like may be attached to the generated failure area list.
故障領域リストの発見と広告と、データ登録装置の組み合わせにより、一次データテーブル群20とインデックス用DHTという構成において、DHTの故障等に由来するデータの欠損から素早く低コストに復帰できる。 By combining the failure area list discovery, advertisement, and data registration device, the primary data table group 20 and the index DHT can quickly and inexpensively recover from data loss due to a DHT failure or the like.
本実施形態によれば、分散ハッシュテーブル上のデータ欠損に対する一次データ源からの復元を効率的に行うことができる。 According to the present embodiment, it is possible to efficiently perform restoration from the primary data source for data loss on the distributed hash table.
(第2の実施形態)
以下、第2の実施形態が第1の実施形態と相違する部分を中心に説明する。
(Second Embodiment)
In the following, the second embodiment will be described focusing on the differences from the first embodiment.
図9に、本実施形態に係る分散ハッシュテーブルシステムの構成例を示す。 FIG. 9 shows a configuration example of the distributed hash table system according to the present embodiment.
本実施形態は、第1の実施形態の一次データテーブル群20を、第1の分散ハッシュテーブル40とし(一次テーブル2をDHTノード4とし)、第1の実施形態の分散ハッシュテーブル30を、第2の分散ハッシュテーブル30として、第2の分散ハッシュテーブル30を、第1の分散ハッシュテーブル40のバックアップとして使用するようにしたものである。 In the present embodiment, the primary data table group 20 of the first embodiment is a first distributed hash table 40 (the primary table 2 is a DHT node 4), and the distributed hash table 30 of the first embodiment is As the second distributed hash table 30, the second distributed hash table 30 is used as a backup of the first distributed hash table 40.
なお、バックアップを複数系統備えてもよく(第2の分散ハッシュテーブル30を複数系統備えてもよく)、この場合には、バックアップは、各系統毎に独立して行えばよい。 Note that a plurality of backups may be provided (a plurality of second distributed hash tables 30 may be provided). In this case, the backup may be performed independently for each system.
図10に、本実施形態に係るデータ登録装置1の構成例を示す。この構成例は基本的には図5と同様である。
FIG. 10 shows a configuration example of the
本実施形態では、第2の分散ハッシュテーブル40に第1の分散ハッシュテーブル30のバックアップを行うにあたって、データ登録装置1は、継続的に(例えば一定期間が経過する毎に)差分バックアップを行う場合を例にとって説明する。なお、この差分バックアップは、例えば、分散ハッシュテーブルやネットワークの負荷が低い時間帯などに行うと効果的である。
In this embodiment, when performing backup of the first distributed hash table 30 on the second distributed hash table 40, the
なお、例えば第1の分散ハッシュテーブル40及び第2の分散ハッシュテーブル30に対して設けられた制御装置7が、各々のデータ登録装置1(の指示受信部11)に対して同時或いは順次にバックアップ指示を出す(個々のデータ登録装置1においては適当な間隔でバックアップ指示を受信する)ようにしてもよいし、制御装置7を設けずに、個々のデータ登録装置1の内部において、自発的に且つ継続的に(例えば、一定期間経過毎に)、その指示受信部11にバックアップ指示を出すようにしてもよい。
For example, the
また、第2の分散ハッシュテーブル30のためのハッシュアルゴリズム及びソートアルゴリズムについても基本的には第1の実施形態と同様であり、例えば、制御装置7が上記ハッシュアルゴリズム及びソートアルゴリズムをバックアップ指示メッセージに含めて各データ登録装置1に与えてもよいし、バックアップ指示メッセージに含めず、個々のデータ登録装置1においてそれぞれ設定するようにしてもよい。
The hash algorithm and sort algorithm for the second distributed hash table 30 are basically the same as those in the first embodiment. For example, the
さて、本実施形態においては、例えば、制御装置7(又はデータ登録装置1自身)が、データ登録装置1の指示受信部11に対して、「前回のバックアップ指示時刻」を示すことによって、その時刻以降に更新された(key,value)のデータエントリのみを更新する方法が考えられる。このときは、一次データ源であるDHTノード4に、個々の(key,value)のデータエントリの登録時刻を記録する機能と、NTP等の機能により個々の一次データ源であるDHTノード4の時計を揃えておく機能とを設けるのが望ましい。例えば、データエントリ(key,value)に、登録時刻reg_tを加えて、(key,value,reg_t)とし、また、上記「前回のバックアップ指示時刻」以降の時刻に登録されたデータエントリ(すなわち、「前回のバックアップ指示時刻」以降の時刻である登録時刻reg_tを持つデータエントリ)のみを登録するように、フィルタ部13が登録時刻reg_tを参照してフィルタリングを行うようにすればよい。
In the present embodiment, for example, the control device 7 (or the
なお、バックアップを一系統だけ備える場合には、より簡単にdirty bitなどの管理手法により、バックアップされていないデータのみを選択的に更新することもできる。例えば、指示受信部11は、dirty bitがセットされているデータエントリのみを登録するようにフィルタ部13を設定し、また、一次データ源であるDHTノード4は、バックアップが完了したデータエントリからdirty bitを解除するようにすればよい。
When only one backup is provided, it is possible to selectively update only the data that has not been backed up more easily by a management method such as dirty bit. For example, the
図11に、本実施形態のデータ登録装置1の処理手順の一例を示す。
FIG. 11 shows an example of a processing procedure of the
ステップS21のステップS2(図6)との相違は、ステップS21で、指示受信部11が(例えば「前回のバックアップ指示時刻」を含む)バックアップ指示を受信したことによって、処理が開始する点である。
The difference between step S21 and step S2 (FIG. 6) is that the process starts when the
ステップS22,S23(ハッシュ計算及びソート)は、図6のステップS3,S4と同様である。 Steps S22 and S23 (hash calculation and sorting) are the same as steps S3 and S4 in FIG.
ステップS24(フィルタリング)のステップS5(図6)との相違は、フィルタリングの内容が、前回のバックアップ指示時刻あるいはdirty bitなどに基づく差分バックアップを行うようにフィルタリングするものである点である。 The difference between step S24 (filtering) and step S5 (FIG. 6) is that filtering is performed so that differential backup based on the previous backup instruction time or dirty bit is performed.
ステップS25(書き込み)は、図6のステップS6及び図7と同様である。 Step S25 (write) is the same as step S6 in FIG. 6 and FIG.
また、第1の実施形態で示した図8の手順例も、フィルタリングの内容が異なる以外は、本実施形態でも同様に使用可能である。 Further, the procedure example of FIG. 8 shown in the first embodiment can also be used in the present embodiment except that the contents of filtering are different.
なお、本実施形態においても、分散ハッシュテーブル40側に設けたデータ登録装置1が、第1の実施形態と同様に分散ハッシュテーブル30における故障領域の復元をも行うようにしてもよい。
Also in this embodiment, the
また、分散ハッシュテーブル30側にもデータ登録装置1を設け、第1の実施形態と同様に分散ハッシュテーブル40における故障領域の復元を行うようにしてもよい。
Further, the
本実施形態によれば、分散ハッシュテーブル間の差分バックアップを効率的に行うことができる。 According to this embodiment, differential backup between distributed hash tables can be performed efficiently.
(第3の実施形態)
以下、第3の実施形態が第1、第2の実施形態と相違する部分を中心に説明する。
(Third embodiment)
In the following, the third embodiment will be described focusing on the differences from the first and second embodiments.
本実施形態に係る分散ハッシュテーブルシステムの構成例は図9と同様である。 A configuration example of the distributed hash table system according to the present embodiment is the same as that shown in FIG.
本実施形態に係るデータ登録装置1の構成例は図10と同様である。
A configuration example of the
第2の実施形態では、第1の分散ハッシュテーブル40から第2の分散ハッシュテーブル30への差分バックアップを行ったが、本実施形態は、第1の分散ハッシュテーブル40から第2の分散ハッシュテーブル30へのコピー(複製)を行うようにしたものである。なお、コピーはどのような目的で行われるものであってもよく、例えばバックアップでも分散ハッシュテーブルシステムのリプレースでも構わない。 In the second embodiment, the differential backup from the first distributed hash table 40 to the second distributed hash table 30 is performed. However, in the present embodiment, the first distributed hash table 40 is changed to the second distributed hash table. 30 (copying) to 30. Note that copying may be performed for any purpose, for example, backup or replacement of a distributed hash table system.
なお、例えば第1の分散ハッシュテーブル40及び又は第2の分散ハッシュテーブル30に対して設けられた制御装置7が、第1の分散ハッシュテーブル40における各々のデータ登録装置1(の指示受信部11)に対して同時或いは順次に、第2の分散ハッシュテーブル30へのコピー指示に、第2の分散ハッシュテーブル30へのエントリポイント(例えばIPアドレスとポート番号)を付加して送信する。なお、第2の分散ハッシュテーブル30のためのハッシュアルゴリズム及びソートアルゴリズムについても基本的には第1、第2の実施形態と同様である。
Note that, for example, the
第1の分散ハッシュテーブル40における各データ登録装置1では、ハッシュ・ソート部12にソートアルゴリズムをセットする点は第1、第2の実施形態と同様であるが、ここでは、対応するDHTノード4が持っている全データをバックアップするため、フィルタ部13には、空データ(null)を設定することによって、書きこみ領域の制限は行わないようにする。
Each
ハッシュ・ソート部12は、データ(key,value)の列を入力として、指定された、第2の分散ハッシュテーブル30のハッシュアルゴリズムとソートアルゴリズムを利用し、ソートされたデータ列(h(key),key,value)を書込部14へ渡す。
The
書込部14は、与えられたデータを先頭から(もしくは、ランダムな位置から)書きこみを開始する。書込部14は、第2の分散ハッシュテーブル30の或るDHTノード3に塊のままのデータを書き込む。書き込むデータがノードの担当領域を外れた時点で、エラー通知等の手段により第2の分散ハッシュテーブル30により定義される空間内の適切な隣接ノードに書きこみ先を変更する。ランダムな位置から開始するのは、第1の分散ハッシュテーブル40における各データ登録装置1が第2の分散ハッシュテーブル30の特定のDHTノード4へ書き込んでしまうような事態を防ぐためである。なお、遅いDHTノード近辺で輻輳をおこさないように、書きこみの速度(書き込み先ノードの変更の時間間隔など)に一定の制約をかける(例えば、ランダムな待ち時間を設ける)ようにしてもよい。
The
図12に、本実施形態のデータ登録装置1の処理手順の一例を示す。
FIG. 12 shows an example of the processing procedure of the
ステップS31のステップS2(図6)との相違は、ステップS21で、指示受信部11が(例えばIPアドレスとポート番号を含む)コピー指示を受信したことによって、処理が開始する点である。
The difference between step S31 and step S2 (FIG. 6) is that the process starts when the
ステップS32,S33(ハッシュ計算及びソート)は、図6のステップS3,S4と同様である。 Steps S32 and S33 (hash calculation and sorting) are the same as steps S3 and S4 in FIG.
ステップS34(フィルタリング)のステップS5(図6)との相違は、フィルタリングの内容が、全データをコピー対象とするようにフィルタリングするものである点である。なお、本実施形態においては、フィルタ部13及びステップS34を省くことも可能である。
The difference between step S34 (filtering) and step S5 (FIG. 6) is that the contents of filtering are filtered so that all data is a copy target. In the present embodiment, the
ステップS35(書き込み)は、図6のステップS6及び図7と同様である。 Step S35 (writing) is the same as step S6 in FIG. 6 and FIG.
また、第1の実施形態で示した図8の手順例も、フィルタリングの内容が異なる以外は、本実施形態でも同様に使用可能である。 Further, the procedure example of FIG. 8 shown in the first embodiment can also be used in the present embodiment except that the contents of filtering are different.
なお、本実施形態においても、分散ハッシュテーブル40側に設けたデータ登録装置1が、第1の実施形態と同様に分散ハッシュテーブル30における故障領域の復元をも行うようにしてもよいし、第2の実施形態と同様に差分バックアップをも行うようにしてもよい。
In this embodiment, the
また、分散ハッシュテーブル30側にもデータ登録装置1を設け、第1の実施形態と同様に分散ハッシュテーブル40における故障領域の復元を行うようにしてもよい。
Further, the
本実施形態によれば、第1の分散ハッシュテーブルから第2の分散ハッシュテーブルへデータ移行を効率的に行うことができる。 According to the present embodiment, data migration can be efficiently performed from the first distributed hash table to the second distributed hash table.
なお、以上の各機能は、ソフトウェアとして記述し適当な機構をもったコンピュータに処理させても実現可能である。
また、本実施形態は、コンピュータに所定の手順を実行させるための、あるいはコンピュータを所定の手段として機能させるための、あるいはコンピュータに所定の機能を実現させるためのプログラムとして実施することもできる。加えて該プログラムを記録したコンピュータ読取り可能な記録媒体として実施することもできる。
Each of the above functions can be realized even if it is described as software and processed by a computer having an appropriate mechanism.
The present embodiment can also be implemented as a program for causing a computer to execute a predetermined procedure, causing a computer to function as a predetermined means, or causing a computer to realize a predetermined function. In addition, the present invention can be implemented as a computer-readable recording medium on which the program is recorded.
なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。 Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.
1…データ登録装置、2…一次データテーブル、3,4…DHTノード、7…制御装置、8…ネットワーク、11…指示受信部、12…ハッシュ・ソート部、13…フィルタ部、14…書込部、15…入力部、20…一次データテーブル群、30,40…分散ハッシュテーブル
DESCRIPTION OF
Claims (15)
前記キー情報と前記データの元である一次データとを含む登録情報の系列を入力する手段と、
入力された前記系列の各々の登録情報について、当該登録情報に係る前記キー情報のハッシュ値を計算するハッシュ手段と、
入力された前記系列における登録情報の順序が、同一の分散ハッシュノード装置に記憶すべき登録情報が連続する順序となるように、各登録情報に係る前記キー情報のハッシュ値に基づいて該系列における登録情報の順序をソートするソート手段と、
ソートされた前記系列に含まれる登録情報の全部又は一部を対象として、当該登録情報を記憶すべき前記分散ハッシュノード装置への当該登録情報の書き込みを、当該ソート順に従って行う書込手段とを備えたことを特徴とするデータ登録装置。 In a data registration device for registering data in a distributed hash table composed of a plurality of distributed hash node devices that distribute and store data associated with key information based on a hash value of the key information.
Means for inputting a sequence of registration information including the key information and primary data that is the source of the data;
Hashing means for calculating a hash value of the key information related to the registration information for each input registration information of the series,
Based on the hash value of the key information related to each registration information, the order of the registration information in the inputted sequence is the order in which the registration information to be stored in the same distributed hash node device is continuous. A sorting means for sorting the order of registration information;
Write means for writing the registration information to the distributed hash node device that should store the registration information for all or part of the registration information included in the sorted series according to the sort order. A data registration device characterized by comprising.
予め複数の前記分散ハッシュノード装置のうちから書き込み先として選択した分散ハッシュノード装置を示すノード情報を保持しておき、
前記系列のうちで書き込み対象となった前記登録情報の書き込みを行うにあたっては、まず、当該登録情報について前記ノード情報を書き込み先として前記書き込みを試行し、この結果、当該登録情報の書き込みに成功した場合は、前記系列において次に書き込むべき順位を持つ登録情報の書き込みに移り、一方、当該登録情報を記憶すべき分散ハッシュノード装置が、前記ノード情報の示す分散ハッシュノード装置とは異なるものであったために、当該登録情報の書き込みに失敗した場合は、前記ノード情報を他の分散ハッシュノード装置に変更した上で、当該登録情報について再度前記書き込みを試行することを特徴とする請求項1に記載のデータ登録装置。 The writing means includes
Node information indicating a distributed hash node device selected as a writing destination from a plurality of distributed hash node devices in advance is held,
In writing the registration information to be written in the series, first, the registration information was tried to be written using the node information as a write destination, and as a result, the registration information was successfully written. In this case, the process shifts to writing registration information having the next order to be written in the series, while the distributed hash node device to store the registration information is different from the distributed hash node device indicated by the node information. Therefore, when the writing of the registration information fails, the writing of the registration information is tried again after changing the node information to another distributed hash node device. Data registration device.
前記書込手段は、ソートされた前記系列に含まれる登録情報のうち、前記選択手段により前記書き込みを行うことが選択されたものについてのみ、前記書き込みを行うことを特徴とする請求項1ないし3のいずれか1項に記載のデータ登録装置。 Prior to the writing means performing the writing, the writing means further comprises selection means for selecting whether to perform the writing for each registration information included in the sorted series,
4. The writing unit according to claim 1, wherein the writing unit performs the writing only on the registration information included in the sorted series that is selected by the selection unit to perform the writing. The data registration device according to any one of the above.
前記選択手段は、ソートされた前記系列に含まれる各々の登録情報について、該登録情報に係る前記キー情報のハッシュ値が前記リスト情報に含まれる場合に、前記書き込みを行うことを選択することを特徴とする請求項5に記載のデータ登録装置。 Means further comprising means for receiving a message indicating list information of hash values of key information relating to missing data in the distributed hash table;
The selection means selects, for each piece of registration information included in the sorted series, the writing to be performed when the hash value of the key information related to the registration information is included in the list information. The data registration apparatus according to claim 5, wherein the data registration apparatus is a data registration apparatus.
前記選択手段は、前記登録情報に含まれる最終更新時刻を示す情報が、前回の書き込みに関する時刻以降の時刻を示すものである場合に、前記書き込みを行うことを選択することを特徴とする請求項7に記載のデータ登録装置。 The registration information includes information indicating the last update time of the primary data related to the registration information,
The said selection means selects the said writing when the information which shows the last update time contained in the said registration information shows the time after the time regarding the last writing, It is characterized by the above-mentioned. 8. The data registration device according to 7.
前記ソート手段は、入力された前記系列における登録情報の順序を、該登録情報に係るキー情報のハッシュ値の昇順又は降順にソートすることを特徴とする請求項1ないし9のいずれか1項に記載のデータ登録装置。 Each of the plurality of distributed hash node devices stores data related to key information that gives hash values included in a range of consecutive hash values assigned to the own device from the hash value space used in the distributed hash table. Is,
10. The sorting means according to claim 1, wherein the sorting means sorts the order of registration information in the input sequence in ascending or descending order of hash values of key information related to the registration information. The data registration device described.
前記ハッシュ手段は、前記ハッシュアルゴリズムに従って、前記キー情報から前記ハッシュ値を計算し、
前記ソート手段は、前記ソートアルゴリズムに従って、前記系列における登録情報の順序をソートすることを特徴とする請求項1ないし12のいずれか1項に記載のデータ登録装置。 Means for receiving a message indicating hash algorithm and sort algorithm information for the distributed hash table;
The hash means calculates the hash value from the key information according to the hash algorithm,
13. The data registration apparatus according to claim 1, wherein the sorting unit sorts the order of registration information in the series according to the sorting algorithm.
前記キー情報と前記データの元である一次データとを含む登録情報の系列を入力するステップと、
入力された前記系列の各々の登録情報について、当該登録情報に係る前記キー情報のハッシュ値を計算するステップと、
入力された前記系列における登録情報の順序が、同一の分散ハッシュノード装置に記憶すべき登録情報が連続する順序となるように、各登録情報に係る前記キー情報のハッシュ値に基づいて該系列における登録情報の順序をソートするステップと、
ソートされた前記系列に含まれる登録情報の全部又は一部を対象として、当該登録情報を記憶すべき前記分散ハッシュノード装置への当該登録情報の書き込みを、当該ソート順に従って行うステップとを有することを特徴とするデータ登録方法。 In a data registration method of a data registration device for registering data in a distributed hash table composed of a plurality of distributed hash node devices that distribute and store data associated with key information based on a hash value of the key information.
Inputting a sequence of registration information including the key information and primary data that is the source of the data;
Calculating a hash value of the key information related to the registration information for each registration information of the input sequence;
Based on the hash value of the key information related to each registration information, the order of the registration information in the inputted sequence is the order in which the registration information to be stored in the same distributed hash node device is continuous. Sorting the order of registration information;
Writing the registration information to the distributed hash node device that should store the registration information for all or part of the registration information included in the sorted sequence according to the sort order. A data registration method characterized by the above.
前記キー情報と前記データの元である一次データとを含む登録情報の系列を入力する手段と、
入力された前記系列の各々の登録情報について、当該登録情報に係る前記キー情報のハッシュ値を計算するハッシュ手段と、
入力された前記系列における登録情報の順序が、同一の分散ハッシュノード装置に記憶すべき登録情報が連続する順序となるように、各登録情報に係る前記キー情報のハッシュ値に基づいて該系列における登録情報の順序をソートするソート手段と、
ソートされた前記系列に含まれる登録情報の全部又は一部を対象として、当該登録情報を記憶すべき前記分散ハッシュノード装置への当該登録情報の書き込みを、当該ソート順に従って行う書込手段とをコンピュータに機能させるためのプログラム。 In a program for causing a computer to function as a data registration device that registers data in a distributed hash table composed of a plurality of distributed hash node devices that distribute and store data associated with key information based on a hash value of the key information ,
Means for inputting a sequence of registration information including the key information and primary data that is the source of the data;
Hashing means for calculating a hash value of the key information related to the registration information for each input registration information of the series,
Based on the hash value of the key information related to each registration information, the order of the registration information in the inputted sequence is the order in which the registration information to be stored in the same distributed hash node device is continuous. A sorting means for sorting the order of registration information;
Write means for writing the registration information to the distributed hash node device that should store the registration information for all or part of the registration information included in the sorted series according to the sort order. A program that causes a computer to function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007183580A JP2009020757A (en) | 2007-07-12 | 2007-07-12 | Data registration apparatus, data registration method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007183580A JP2009020757A (en) | 2007-07-12 | 2007-07-12 | Data registration apparatus, data registration method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009020757A true JP2009020757A (en) | 2009-01-29 |
Family
ID=40360339
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007183580A Pending JP2009020757A (en) | 2007-07-12 | 2007-07-12 | Data registration apparatus, data registration method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009020757A (en) |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010114006A1 (en) * | 2009-03-31 | 2010-10-07 | 日本電気株式会社 | Storage system and storage access method and program |
JP2010271798A (en) * | 2009-05-19 | 2010-12-02 | Nippon Telegr & Teleph Corp <Ntt> | Distributed data management device, method, and program |
JP2011060180A (en) * | 2009-09-14 | 2011-03-24 | Fujitsu Ltd | Method for controlling database system, index server and program |
JP2012053796A (en) * | 2010-09-03 | 2012-03-15 | Nec Corp | Information processing system |
JP2012065165A (en) * | 2010-09-16 | 2012-03-29 | Toshiba Corp | Communication device |
WO2012060465A1 (en) * | 2010-11-02 | 2012-05-10 | 日本電気株式会社 | Information processing device, system, control method, and program |
JP2014063540A (en) * | 2014-01-15 | 2014-04-10 | Toshiba Corp | Memory system having key-value store system |
JP2015035182A (en) * | 2013-08-09 | 2015-02-19 | 日本電信電話株式会社 | Distributed database system |
JP2016021264A (en) * | 2015-10-23 | 2016-02-04 | 株式会社東芝 | Data management method of memory system |
US9361408B2 (en) | 2011-08-08 | 2016-06-07 | Kabushiki Kaisha Toshiba | Memory system including key-value store |
JP2017220148A (en) * | 2016-06-10 | 2017-12-14 | 富士通株式会社 | Program, method, and device for information management |
JP2017220141A (en) * | 2016-06-10 | 2017-12-14 | 富士通株式会社 | Program, method, and device for information management |
JP2020524932A (en) * | 2017-06-20 | 2020-08-20 | エヌチェーン ホールディングス リミテッドNchain Holdings Limited | Method and system for coherent distributed memory pools in blockchain networks |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06103127A (en) * | 1992-09-22 | 1994-04-15 | Kanebo Ltd | Device for managing hash file data and method thereof |
JPH06314299A (en) * | 1993-04-28 | 1994-11-08 | Hitachi Ltd | Data base control method |
JPH11224219A (en) * | 1998-02-05 | 1999-08-17 | Nippon Telegr & Teleph Corp <Ntt> | Decentralized cache control method, decentralization controller, decentralizzed cache system, and storage medium stored with decentralized cache control program |
-
2007
- 2007-07-12 JP JP2007183580A patent/JP2009020757A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06103127A (en) * | 1992-09-22 | 1994-04-15 | Kanebo Ltd | Device for managing hash file data and method thereof |
JPH06314299A (en) * | 1993-04-28 | 1994-11-08 | Hitachi Ltd | Data base control method |
JPH11224219A (en) * | 1998-02-05 | 1999-08-17 | Nippon Telegr & Teleph Corp <Ntt> | Decentralized cache control method, decentralization controller, decentralizzed cache system, and storage medium stored with decentralized cache control program |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8635402B2 (en) | 2009-03-31 | 2014-01-21 | Nec Corporation | Storage system and storage access method and program |
WO2010114006A1 (en) * | 2009-03-31 | 2010-10-07 | 日本電気株式会社 | Storage system and storage access method and program |
JP5321682B2 (en) * | 2009-03-31 | 2013-10-23 | 日本電気株式会社 | Storage system, storage access method and program |
JP2010271798A (en) * | 2009-05-19 | 2010-12-02 | Nippon Telegr & Teleph Corp <Ntt> | Distributed data management device, method, and program |
JP2011060180A (en) * | 2009-09-14 | 2011-03-24 | Fujitsu Ltd | Method for controlling database system, index server and program |
JP2012053796A (en) * | 2010-09-03 | 2012-03-15 | Nec Corp | Information processing system |
JP2012065165A (en) * | 2010-09-16 | 2012-03-29 | Toshiba Corp | Communication device |
US8973015B2 (en) | 2010-11-02 | 2015-03-03 | Nec Corporation | Information processing device, system, control method, and program |
WO2012060465A1 (en) * | 2010-11-02 | 2012-05-10 | 日本電気株式会社 | Information processing device, system, control method, and program |
JP5867407B2 (en) * | 2010-11-02 | 2016-02-24 | 日本電気株式会社 | Information processing apparatus, system, control method, and program |
US9953107B2 (en) | 2011-08-08 | 2018-04-24 | Toshiba Memory Corporation | Memory system including key-value store |
US9361408B2 (en) | 2011-08-08 | 2016-06-07 | Kabushiki Kaisha Toshiba | Memory system including key-value store |
US10579683B2 (en) | 2011-08-08 | 2020-03-03 | Toshiba Memory Corporation | Memory system including key-value store |
JP2015035182A (en) * | 2013-08-09 | 2015-02-19 | 日本電信電話株式会社 | Distributed database system |
JP2014063540A (en) * | 2014-01-15 | 2014-04-10 | Toshiba Corp | Memory system having key-value store system |
JP2016021264A (en) * | 2015-10-23 | 2016-02-04 | 株式会社東芝 | Data management method of memory system |
JP2017220141A (en) * | 2016-06-10 | 2017-12-14 | 富士通株式会社 | Program, method, and device for information management |
JP2017220148A (en) * | 2016-06-10 | 2017-12-14 | 富士通株式会社 | Program, method, and device for information management |
US10749957B2 (en) | 2016-06-10 | 2020-08-18 | Fujitsu Limited | Method and apparatus for information management |
US10754843B2 (en) | 2016-06-10 | 2020-08-25 | Fujitsu Limited | Method and apparatus for information management |
JP2020524932A (en) * | 2017-06-20 | 2020-08-20 | エヌチェーン ホールディングス リミテッドNchain Holdings Limited | Method and system for coherent distributed memory pools in blockchain networks |
JP7165148B2 (en) | 2017-06-20 | 2022-11-02 | エヌチェーン ホールディングス リミテッド | Method and system for consistent distributed memory pool in blockchain network |
JP7165148B6 (en) | 2017-06-20 | 2022-11-28 | エヌチェーン ライセンシング アーゲー | Method and system for consistent distributed memory pool in blockchain network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2009020757A (en) | Data registration apparatus, data registration method and program | |
JP5227955B2 (en) | A distributed hash mechanism for self-regulating networks | |
US20180253484A1 (en) | Computer Implemented Method for Dynamic Sharding | |
EP2521336B1 (en) | Massively scalable object storage system | |
US7286468B2 (en) | Routing system and method for synchronizing a routing system with peers after failover | |
US8990176B2 (en) | Managing a search index | |
EP2418824B1 (en) | Method for resource information backup operation based on peer to peer network and peer to peer network thereof | |
JP2012221419A (en) | Information storage system and data duplication method thereof | |
WO2020063763A1 (en) | Data storage method, apparatus and system, and server, control node and medium | |
CN105339929A (en) | Selecting a store for deduplicated data | |
JP2008217306A (en) | Replication method and system, storage device, and program | |
CN106605217B (en) | For the method and system for being moved to another website from a website will to be applied | |
CN105593839B (en) | Distributed disaster recovery file sync server system | |
JP5907419B2 (en) | Distributed processing system, distributed processing method, and distributed processing program | |
US20120303588A1 (en) | Data de-duplication processing method for point-to-point transmission and system thereof | |
JP5918802B2 (en) | Nodes and programs | |
JP6093320B2 (en) | Distributed processing system | |
JP2010218335A (en) | File storage system, file storage method, and program | |
JP2009171156A (en) | Method and program for constructing/maintaining overlay network | |
JP6714547B2 (en) | Load balancing device, load balancing method, and load balancing program | |
JP5845298B2 (en) | Nodes and programs | |
JP2011180658A (en) | Redundancy method in distributed file system | |
JP6127005B2 (en) | Cluster system server device and program | |
JP5299448B2 (en) | Information communication system, node device, information processing method, and program | |
JP2014146153A (en) | Cluster system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100204 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100216 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100419 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100803 |