Skip to content

blindstore/blindstore-old-scarab

Repository files navigation

logo

blindstore

Blindstore server

Build Status

Note that this is a deprecated proof-of-concept implementation. Efficient implementation is an on-going effort mostly happening in 'blindstore/blindstore' repository.

Installation

System requirements: Python 3.4, numpy, libscarab.

Python requirements:

$ pip install -r requirements.txt

Running a server

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.

Using the server from Python

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.

License

MIT License

Credits

Logo:

About

Initial PoC of Blindstore relying on libscarab

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages