HyperDex: A Searchable Distributed Key-Value Store

来源:互联网 发布:javascript sha1 编辑:程序博客网 时间:2024/06/06 20:05

HyperDex strategically places objects on servers so that both search and key-based operations contact a small subset of all servers in the system. Whereas typical key-value stores map objects to nodes using just the key, HyperDex takes into account all attributes of an object when mapping it to servers.

A three-dimensional hyperspace.


The actual mapping technique used by HyperDex ishyperspace hashing. Hyperspace hashing creates a multidimensional euclidean space into which objects are mapped. Each attribute in the original object corresponds to one dimension in the euclidean space. Objects are hashed into this space by hashing all attributes to determine a coordinate in the space.

For example a table of objects with "first name", "last name" and "phone number" attributes corresponds to a three dimensional hyperspace where each dimension corresponds to one attribute in the original object. Such a space is depicted in the diagram at right. In this space, there exist three objects. The red point is "John Smith" whose phone number is 555-8000. The green point is "John Doe" whose whone number is 555-7000. The blue point is "Jim Bob" whose phone number is 555-2000. Anyone named "John" must map to somewhere in the yellow plane. Similarly, anyone with the last name "Smith" must map to somewhere within the translucent plane. Naturally, all people named "John Smith" must map to somewhere along the line where these two planes intersect.

In each multi-dimnesional space corresponding to a type of object, HyperDex assigns nodes to disjoint regions of the space. The above figure shows two of these assignments. Notice that the line for "John Smith" only intersects two out of the eight assignments. Consequently, performing a search for all phone numbers of "John Smith" requires contacting only two nodes. Furthermore, the search could be made more specific by restricting it to all people named "John Smith" whose phone number falls between 555-5000 and 555-9999. Such a search contacts only one out of the eight servers in this hypothetical deployment.

http://hyperdex.org/about/