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
The data inserted in one machine has not been transferred to the other machine (example.js) #13
(base) raphy@pc:~/hypercore/multi-hyperbee/examples$ node example.js -s pc
pc diff key: abda40768f2be8c75cc4c39aa883add00bf42246cdc370a356051af626aebd61
And on (pc):
(base) raphy@pc:~/hypercore/multi-hyperbee/examples$ node example.js -s laptop,pc -k 7dd426f31c70c623099b08662f53c169f2e70088a297c812e86e88c9c9b194d5,abda40768f2be8c75cc4c39aa883add00bf42246cdc370a356051af626aebd61
laptop,pc diff key: 3c88dffdd37ce961db5e4c08774d18fd26ef8a6bdc6b11100558504fac1bc6ed
Please enter some data
first_data
second_data
third_data
fourth_data
I get on (pc) :
(base) raphy@pc:~/hypercore/multi-hyperbee/examples$ ls -lah
total 44K
drwxrwxr-x 8 raphy raphy 4,0K set 24 17:21 .
drwxrwxr-x 15 raphy raphy 4,0K set 18 12:07 ..
-rw-rw-r-- 1 raphy raphy 2,2K set 13 20:00 example.js
drwxrwxr-x 2 raphy raphy 4,0K set 24 17:21 laptop,pc
drwxrwxr-x 2 raphy raphy 4,0K set 24 17:21 laptop,pc_diff
drwxrwxr-x 2 raphy raphy 4,0K set 24 17:21 laptop,pc_peer_1
drwxrwxr-x 2 raphy raphy 4,0K set 24 17:21 laptop,pc_peer_2
-rw-rw-r-- 1 raphy raphy 560 set 14 09:24 multi_hyperbee_usage.js
drwxrwxr-x 2 raphy raphy 4,0K set 24 16:54 pc
drwxrwxr-x 2 raphy raphy 4,0K set 24 16:54 pc_diff
-rw-rw-r-- 1 raphy raphy 963 set 13 20:00 Readme.md
(base) raphy@pc:~/hypercore/multi-hyperbee/examples$
raphy@pc:~/hypercore/multi-hyperbee/examples/laptop,pc_diff$ nano data :
But the data I've inserted in PC has not been transferred to the (laptop):
(base) marco@marco-U36SG:~/hypercore/multi-hyperbee/examples$ ls -lah
total 24K
drwxrwxr-x 4 marco marco 4,0K set 24 16:55 .
drwxrwxr-x 11 marco marco 4,0K set 14 09:43 ..
-rw-rw-r-- 1 marco marco 2,2K set 13 21:01 example.js
drwxrwxr-x 2 marco marco 4,0K set 24 16:55 laptop
drwxrwxr-x 2 marco marco 4,0K set 24 16:55 laptop_diff
-rw-rw-r-- 1 marco marco 963 set 13 21:01 Readme.md
(base) marco@marco-U36SG:~/hypercore/multi-hyperbee/examples/laptop$ nano data
^Hhyperbee^R
^G__peers
(base) marco@marco-U36SG:~/hypercore/multi-hyperbee/examples/laptop_diff$ nano data
^Hhyperbee^R^U
^Smulti-hyperbee-diff
Is this right, or is there something wrong in my execution and / or environment to fix?
I tried to execute
example.js
using two different machines connected to the same local network.(laptop):
(pc):
And on (pc):
I get on (pc) :
raphy@pc:~/hypercore/multi-hyperbee/examples/laptop,pc_diff$ nano data :
~/hypercore/multi-hyperbee/examples/laptop,pc$ nano data :
But the data I've inserted in PC has not been transferred to the (laptop):
Is this right, or is there something wrong in my execution and / or environment to fix?