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
Data inserted in one machine is not replicated to another machine of the same local network (example.js) #14
(base) raphy@pc:~/hypercore/multi-hyperbee/examples$ node example.js -s pc
pc diff key: fc733af1328096be2403d1b903f7f546d77fd5938e215cd8c3627e3b2682c5c7
And then,
on the (pc) :
(base) raphy@pc:~/hypercore/multi-hyperbee/examples$ node example.js -s laptop,pc -k db4a84cb045286941aa499e3bce94b725cbf17ffc4115c3c76a2f84e558bedad,fc733af1328096be2403d1b903f7f546d77fd5938e215cd8c3627e3b2682c5c7
laptop,pc diff key: 9ea4dec61b2babd7573ab435d0f1e2a5ab1c08fdce5b68f33e4915b93981d378
Please enter some data
first_data
second_data
third_data
I get this folders structure on the (pc) :
(base) raphy@pc:~/hypercore/multi-hyperbee/examples$ ls -lah
total 44K
drwxrwxr-x 8 raphy raphy 4,0K set 24 17:56 .
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:56 laptop,pc
drwxrwxr-x 2 raphy raphy 4,0K set 24 17:56 laptop,pc_diff
drwxrwxr-x 2 raphy raphy 4,0K set 24 17:56 laptop,pc_peer_1
drwxrwxr-x 2 raphy raphy 4,0K set 24 17:56 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 17:54 pc
drwxrwxr-x 2 raphy raphy 4,0K set 24 17:54 pc_diff
-rw-rw-r-- 1 raphy raphy 963 set 13 20:00 Readme.md
and in (pc) the content of laptop,pc/data :
(base) raphy@pc:~/hypercore/multi-hyperbee/examples/laptop,pc$ nano data :
But the data inserted has not been replicated to the second machine (the laptop):
(base) marco@marco-U36SG:~/hypercore/multi-hyperbee/examples$ ls -lah
total 24K
drwxrwxr-x 4 marco marco 4,0K set 24 17:50 .
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 17:50 laptop
drwxrwxr-x 2 marco marco 4,0K set 24 17:50 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
I tried to execute
example.js
with two machines belonging to the same local network:(laptop) :
(pc) :
And then, on the (pc) :
I get this folders structure on the (pc) :
and in (pc) the content of laptop,pc/data :
(base) raphy@pc:~/hypercore/multi-hyperbee/examples/laptop,pc$ nano data :
But the data inserted has not been replicated to the second machine (the laptop):
Is this fine, or have I done something wrong, and / or is an issue of my local network, may be blocking multicast traffic, as suggested here https://github.com/kappa-db/workshop/issues/30#issuecomment-922337475 ?