You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Javascript implementation of the rendezvous protocol for libp2p
10
+
> Javascript implementation of the rendezvous server protocol for libp2p
9
11
10
12
## Lead Maintainer <!-- omit in toc -->
11
13
@@ -23,7 +25,7 @@
23
25
24
26
## Overview
25
27
26
-
Libp2p rendezvous is a lightweight mechanism for generalized peer discovery. It can be used for bootstrap purposes, real time peer discovery, application specific routing, and so on. Any node implementing the rendezvous protocol can act as a rendezvous point, allowing the discovery of relevant peers in a decentralized fashion.
28
+
Libp2p rendezvous is a lightweight mechanism for generalized peer discovery. It can be used for bootstrap purposes, real time peer discovery, application specific routing, and so on. This module is the implementation of the rendezvous server protocol for libp2p.
27
29
28
30
See the [SPEC](https://github.com/libp2p/specs/tree/master/rendezvous) for more details.
29
31
@@ -35,35 +37,58 @@ See the [SPEC](https://github.com/libp2p/specs/tree/master/rendezvous) for more
35
37
> npm install --global libp2p-rendezvous
36
38
```
37
39
38
-
Now you can use the cli command `libp2p-rendezvous-server` to spawn a libp2p rendezvous server.
40
+
Now you can use the cli command `libp2p-rendezvous-server` to spawn a libp2p rendezvous server. Bear in mind that a MySQL database is required to run the rendezvous server.
41
+
42
+
### Testing
43
+
44
+
For running the tests in this module, you will need to have Docker installed. A docker container is used to run a MySQL database for testing purposes.
39
45
40
46
### CLI
41
47
42
-
After installing the rendezvous server, you can use its binary. It accepts several arguments: `--peerId`, `--listenMultiaddrs`, `--announceMultiaddrs`, `--metricsPort` and `--disableMetrics`
48
+
After installing the rendezvous server, you can use its binary. It accepts several arguments: `--datastoreHost`, `--datastoreUser`, `--datastorePassword`, `--datastoreDatabase`, `--enableMemoryDatabase`, `--peerId`, `--listenMultiaddrs`, `--announceMultiaddrs`, `--metricsPort` and `--disableMetrics`
For further customization (e.g. swapping the muxer, using other transports) it is recommended to create a server via the API.
54
+
For further customization (e.g. swapping the muxer, using other transports, use other database) it is recommended to create a server via the API.
55
+
56
+
#### Datastore
57
+
58
+
A rendezvous server needs to leverage a MySQL database as a datastore for the registrations. This needs to be configured in order to run a rendezvous server. You can rely on docker to run a MySQL database using a command like:
⚠️ For testing purposes you can skip using MySQL and use a memory datastore. This must not be used in production! For this you just need to provide the `--enableMemoryDatabase` option.
49
71
50
72
#### PeerId
51
73
52
-
You can create a [PeerId](https://github.com/libp2p/js-peer-id) via its [CLI](https://github.com/libp2p/js-peer-id#cli).
74
+
You can create a [PeerId](https://github.com/libp2p/js-peer-id) via its [CLI](https://github.com/libp2p/js-peer-id#cli) and use it in the rendezvous server.
75
+
76
+
Once you have a generated PeerId json file, you can start the rendezvous with that PeerId by specifying its path via the `--peerId` flag:
You can specify the libp2p rendezvous server listen and announce multiaddrs. This server is configured with [libp2p-tcp](https://github.com/libp2p/js-libp2p-tcp) and [libp2p-websockets](https://github.com/libp2p/js-libp2p-websockets) and addresses with this transports should be used. It can always be modified via the API.
0 commit comments