Blindstore server
Note that this is a deprecated proof-of-concept implementation. Efficient implementation is an on-going effort mostly happening in 'blindstore/blindstore' repository.
System requirements: Python 3.4, numpy, libscarab.
Python requirements:
$ pip install -r requirements.txt
To run a Blindstore server, simply run server.py with Python 3.4.
To run the server in Flask debug mode, use the --debug switch. Never use this mode on a production machine, as it allows for remote code execution on the server.
A Python class for accessing a Blindstore server is provided. A simple example to connect, set and retrieve is shown below:
from client import BlindstoreArray
URL = 'http://localhost:5000/'
array = BlindstoreArray(URL)
print("The Blindstore array has {count} entries of {size} bits each."
.format(count=array.length, size=array.record_size))
print("Setting...")
array.set(2, bytearray([5]))
print("Retrieving...")
print(array.retrieve(2))
# -> [0, 1, 0, 1]To connect to the server, we create a BlindstoreArray object, passing the server's URL. The BlindstoreArray object retrieves the number of records on the server, and the size (in bits) of each record, storing them in the length and record_size attributes respectively.
To store data on the server, we call the set method, passing the index to set as an int and the data as a byte array.
To retrieve data, simply call retrieve with the index. The data is returned as a list of bits.
Both set and retrieve calls are synchronous.
Logo:
- Eye designed by Eugen Belyakoff from the Noun Project.
- Inspiration – Devan Colley's picture
