0.10.4 • Published 3 months ago

@robertsvendsen/graphnet v0.10.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

Graphnet

A graphnet consists three or more nodes, but you might as well just use one or two. The graph will broadcast all new clients connecting to it.

Test commands:

Start three nodes which will connect to each other. After they have all started, try killing one, two or all and restart to see what happens.

node src/bin/index.js --port=5080 --identity=test-0

node src/bin/index.js --address=ws://localhost:5081 --port=5081 --identity=test-1 --initial-address=ws://localhost:5080 --initial-identity=test-0

node src/bin/index.js --address=ws://localhost:5082 --port=5082 --identity=test-2 --initial-address=ws://localhost:5080 --initial-identity=test-0

TODO

  • Elections.

    • Speed up candidates by moving it into an own event.
    • Prevent starting a new election if one actually exists.
    • Prevent voting for nodes that are flacky or high ping.
  • Client must validate server before authenticating.

  • Encryption. All nodes have their own key, its transmitted with known-nodes event.
  • Warning/handling conflicts during leader change on appData.
  • Implement distributed log, mergable.

Caveats

Because of handshakes, its not possible to merge two graphnets, they wouldn't be able to talk to each other.

Security

The passphrase is used to connect to each other, mesh-like. All data is encrypted during transfer between nodes. Handshake is done when a node first joins the graph.

Blocking.

  • None

High priority.

  • None

Notes

  • No notes yet.