mediachain / aleph

א: The mediachain universe manipulation engine
MIT License
38 stars 16 forks source link

In-memory datastore for aleph peers #144

Closed yusefnapora closed 7 years ago

yusefnapora commented 7 years ago

This adds a Datastore class that's backed by the in-memory MemDOWN backend for LevelUP, the node leveldb library.

I went this route rather than rolling my own in-memory kv store because

Aleph nodes now supports the /mediachain/data protocol to fetch data, but writing to the datastore needs to happen in-process (no push or merge support yet). Still, merge should be fairly easy to accomplish, since we've got remote query working already.

I added a simple test between two aleph nodes, but haven't done an integration test yet.

vyzo commented 7 years ago

:+1: for having a real datastore.

Basically, in terms of workflow, aleph can be the workspace where you are building your data, and when you are ready to publish you push them to your concat.