A LevelUP compatible leaderless multi-master database with eventual consistency, using hyperbee + CRDT + HLC. Similarly CockroachDB achieves replication on top of RocksDB, but here it is a pure P2P **streaming** database, with zero central management. LevelDB compatibility allows to use Dynalite on top to achieve DynamoDB compatibility with sophisticated auto-updated secondary indexes, and fairly complex queries. Work on Dynalite is almost completed to remove HTTP server, to make this combination perfect for serverless.
36
stars
5
forks
source link
Catch up after some peer(s) were dormant and on addPeer() #7
Note: We need pubKey above, so that we know which peer has this diff object.
On restart:
Find in Store hyperbee all Stubs that have timestamp that is bigger then the timestamp of the last object written in Store hyperbee using createUnionStream which would be great except after
Get all the Diff objects from the hyperbees using pubKey of the Stub to know where to look for it
Merge Diff objects with Store objects that Diff objects point to
Above algo does not cover the following case
Above find will not find the objects that were not yet applied to Store. Those are the Diff objects that have a timestamp which is earlier then the last timestamp of the Store object
Not yet implemented. But here are some thoughts on how to and some stumbling blocks:
While running
Let's call this Stub
Note: We need pubKey above, so that we know which peer has this diff object.
On restart:
Above algo does not cover the following case
Above find will not find the objects that were not yet applied to Store. Those are the Diff objects that have a timestamp which is earlier then the last timestamp of the Store object