Updated readme

jhiesey-dht-interop
Mike Goelzer 6 years ago
parent fb50c44e7b
commit d31cd93956
No known key found for this signature in database
GPG Key ID: EDAC46A37751AD6D

@ -1,4 +1,36 @@
# libp2p Demos
## Demo 1: DHT Peer & Content with Go and JS Nodes
**What it demonstrates:** A new DHT is created by the Go program `dht-interop`. In a separate terminal or machine, a Node.js program connects to this DHT.
**First terminal:**
```
cd content-dht-provide-find
make
./dht-interop
```
**Second terminal:** run the command printed out by dht-interop, replacing 127.0.0.1 with the IP of the server where dht-interop is listening. Example:
```
node js-dht-test/index.js /ip4/127.0.0.1/tcp/9876/ipfs/QmehVYruznbyDZuHBV4vEHESpDevMoAovET6aJ9oRuEzWa
```
Note that the node ID of `dht-interop` is always `Qm...RuEzWa` because it is being read in from `util/private_key.bin` (an X.509 private key generated by `util/private-key-gen`).
## Demo 2: PubSub
**What it demonstrates**: Two Go nodes are created and run a chat server using a shared PubSub topic. **TODO**: Should be a Go node and a JS node, once I get the two Go nodes version working.
_Acknowledgements: @jhiesey for DHT (content & peer routing) JS+Go interop, @stebalien for PubSub_
--------------------------------------------
util/private-key-gen -> private_key.bin (marshalled private key that is used for stable peer id of bootstrap server)

Loading…
Cancel
Save