Skip to main content

About MivRHash

MivRHash (Million-value Remote Hash) is a remote hash table data structure which provides the compatible interface with the Python dict’s interface. It stores hash table data in remote server. Therefore, it is useful when your application uses so many big hash tables (dict objects) that memory in one machine is not sufficient (in other words, you can utilize main memory in multiple hosts in your application). It is originally created for storing inverted indexes of a search engine.

MivRHash allows you to specify the destination of the host where it will store data into. On the remote host, you need to run mivrhashservice to listen to hash operation requests from the client.

Since MivRHash provides the same interface with Python’s dict, adapting your application with MivRHash is very easy. It requires you to change only a line of code (e.g., the hash table initialization statement) to make your application a distributed one.

MivRHash optimized its performance by using write-back cache. You can specify the cache-size when you initialize the remote hash object. The default cache size is 1000 items.

Example

On the server (i.e., the machine that will store hash data), run the service:

$ python -m mivrhash.mivrhashservice  (or python mivrhashservice.py)
Server listening on port 10080

On the client, write code like this:

from mivrhash.mivrhashclient import MivRHash
h1 = MivRHash( "server_address", 10080 )
h1['hello'] = 'world'
h1[5] = 6
h1[ ( 'some', 'tuple' ) ] = 'hello'
h1[ 'aHash' ] = { 1 : 2, 3 : 4 }
h2 = h1[ 'aHash' ]
h2[1] = 5
# Now you need to explicitly assign h2 to h1['aHash']
# because h1 does not automatically recognize the change on its items
print h1['aHash']   # { 1 : 2, 3 : 4 }
h1['aHash'] = h2
print h1['aHash']   # { 1 : 5, 3 : 4 }
for k in h1.iterkeys():
    print k
h1.clear()
h1.close()  # free memory on remote server and disconnect
h1 = None   # this also free memory and disconnect

Installation

MivRHash is designed for very easy installation. It is a pure Python package. You can just copy the whole folder mivrhash into your site-packages directory (e.g., /usr/lib/python2.6/site-packages or C:/Python2.6/Lib/site-packages). The setup script is also available:

$python setup.py install

It requires no additional dependencies to be installed because it depends only on packages that are in Python standard library (such as cPickle and urllib).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

mivrhash-1.0.zip (11.1 kB view details)

Uploaded Source

mivrhash-1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mivrhash-1.0.win32.exe (208.6 kB view details)

Uploaded Source

File details

Details for the file mivrhash-1.0.zip.

File metadata

  • Download URL: mivrhash-1.0.zip
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mivrhash-1.0.zip
Algorithm Hash digest
SHA256 4798bfbdd15438b9be54a34304c6cca9b0bcdb465c92d7427ca21a4feacf4d01
MD5 19f94f007c35146175503330be3e75b8
BLAKE2b-256 24bff12a77c2e1c89c84280e03936180917e57e59cdf585c2cd1cdae4ff01f76

See more details on using hashes here.

File details

Details for the file mivrhash-1.0.tar.gz.

File metadata

  • Download URL: mivrhash-1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mivrhash-1.0.tar.gz
Algorithm Hash digest
SHA256 e534f402922287644d6de918f3fe7d43edbe355c0a97e383efc836d61811aefe
MD5 0613fbe362400a1fade9911f1429214b
BLAKE2b-256 3f4d039b88b28675ee31c9d6feabceac3ed3043ec0a9a4762650ba6c01313826

See more details on using hashes here.

File details

Details for the file mivrhash-1.0.win32.exe.

File metadata

  • Download URL: mivrhash-1.0.win32.exe
  • Upload date:
  • Size: 208.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mivrhash-1.0.win32.exe
Algorithm Hash digest
SHA256 f2792b39ccac329bde2c698eacaf8c2f8f48bbcb45e3dc0fa1528bf50e1d4826
MD5 e7d8938a1ebfe101fdae74f922cb7527
BLAKE2b-256 7423bb624f00f46914ab43b30fcf2165e334df9349829380478ed127d731d212

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

3 files

This release

1.0 This release

3 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page