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).

Metadata

Release files for mivrhash 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for mivrhash 1.0.1
File Size Uploaded Provenance
mivrhash-1.0.1.zip 11.2 kB Without provenance Details
mivrhash-1.0.1.tar.gz 8.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mivrhash 1.0.1
File Interpreter ABI Platform
mivrhash-1.0.1.win32.exe Details

Total release size: 228.0 kB

Release files / mivrhash-1.0.1.zip

Download URL mivrhash-1.0.1.zip
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0ac4dec75b3e8df97163823f1c54ccb0301a266bb1cdf754335dc28d7c8d0073
BLAKE2b-256 checksum
How to use checksums
8d90905dcf286f68bb0267fad63ab82c89511d3eccb1f793ab77a6505b34056f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mivrhash-1.0.1.tar.gz

Download URL mivrhash-1.0.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9c18f6a10978665254eedeeaef0e8bf180c3daab5953d23c0539696b9e907ebe
BLAKE2b-256 checksum
How to use checksums
f7ee05526a7c29c7159e020a080219185c1395f28c5e9cdee8fa5a6b6fcc46f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mivrhash-1.0.1.win32.exe

Download URL mivrhash-1.0.1.win32.exe
Size 208.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f8efeb5694fabc6775c48cf032bffe22bdcd3e5ceee95b2b38f9af53c259cfd2
BLAKE2b-256 checksum
How to use checksums
f9b33ce738f09799e77777ef294a6e07cab9f46599bb5d39ba6f54d1cfc4a643
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for mivrhash 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.1 This release

3 release files No provenance

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