diff --git a/proposals/rendezvous.md b/proposals/rendezvous.md new file mode 100644 index 00000000..84306aaf --- /dev/null +++ b/proposals/rendezvous.md @@ -0,0 +1,157 @@ +# Wrap up rendezvous implementation and deployment + +Authors: +- @vasco-santos +- @gozala + +Initial PR: #67 + + + + + +## Purpose & impact +#### Background & intent +_Describe the desired state of the world after this project? Why does that matter?_ + + +##### Problem Statement + +During the lifetime of a libp2p node, particularly during its startup, establishing connections with other peers will be crucial to create a network topology able to fulfill the needs of the node. + +Each connection to a different peer might have different outcomes. Accordingly, each peer will need to find peers providing a given service or playing a given role over time, so that they can operate more efficiently. These services and roles can range from circuit relays to enable connectivity between restricted nodes, subscribers of a given pubsub topic, or even application specific routing. + +Currently the JS stack (only?) does not offer this out of the box. It is expected that the users understand the infrastucture pieces they will need to configure and deploy, as well as get their nodes connected to this infrastructure. This proposal aims to mitigate this entrance barrier, which is one of the main points discussed in most of the meetings with collabs and users of our stack. + +Moreover, nodes in some environments (Ex: browser) cannot have a big number of connections open at the same time. Consequently, we need them to find and connect to the most meaningful peers. + +One of the possible ways to register and discover certain roles/services is using the [rendezvous protocol](https://github.com/libp2p/specs/tree/master/rendezvous). Shortly, 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. + +##### Current state + +We have a working implementation of the rendezvous protocol (Server and client) in JS ready for review and an outdated PR with the implementation in Go (needs Signed Peer Records). We also need to decide wether we need [Rendezvous message signing](https://github.com/libp2p/specs/issues/303) and get it implemented if so. + +#### Assumptions & hypotheses +_What must be true for this project to matter?_ + + +- Dapps need to be able to find relays to bind, in order to accept incoming connections +- Dapp developers want to easily discover all the peers running their dapp +- Developers want out of the box meaningful connections to establish reliable overlay networks +- We want alternatives for service discovery +- We want to extend the number of bootstrap nodes with community deployed nodes that can be discovered via Rendezvous + +#### User workflow example +_How would a developer or user use this new capability?_ + + +Rendezvous can offer a wide range of scenarios. + +1. A developer will start a `js-ipfs` node in the browser (pubsub is enabled by default) and behind the scenes the node will be able to discover and connect to nodes that share the same interestes (pubsub subscriptions) +2. A developer will start a `js-ipfs` node in the browser and the node will try to find available relays out of the box, so that it can use them to receive incoming dials. +3. A developer can use the Rendezvous API to register peers under a given namespace, so that other nodes can easily find them. Example: Discover all the peers running in the dapp scope. A real use case would be Slate, which has this requirement. + + +#### Impact +_How would this directly contribute to web3 dev stack product-market fit?_ + + + +🔥🔥🔥 This would allow nodes to become more self sufficient (or at least would be a first step towards that), instead of requiring users to have all the knowledge about the infrastructure needs of a node to operate efficiently. + + +#### Leverage +_How much would nailing this project improve our knowledge and ability to execute future projects?_ + + + +🎯🎯🎯 - This would enable the users of our stack to focus on their products, rather than understanding all the pieces behind the scenes that need to exist and be configured. + +#### Confidence +_How sure are we that this impact would be realized? Label from [this scale](https://medium.com/@nimay/inside-product-introduction-to-feature-priority-using-ice-impact-confidence-ease-and-gist-5180434e5b15)_. + + + + +## Project definition +#### Brief plan of attack + + + +#### What does done look like? +_What specific deliverables should completed to consider this project done?_ + +- Both GO and JS stacks have Rendezvous clients merged and released +- We have a set of Rendezvous servers deployed +- We have + +#### What does success look like? +_Success means impact. How will we know we did the right thing?_ + + + +- JS and GO nodes can out of the box establish meaningful connections to enable its subsystems to properly work + - Nodes are connected to 6 pubsub nodes + - Nodes are connected to X closest peers + - Browser nodes are always advertising a multiaddr through a relay + - Browser nodes are dialed from go nodes (through a relay) + +#### Counterpoints & pre-mortem +_Why might this project be lower impact than expected? How could this project fail to complete, or fail to be successful?_ + +- Rendezvous Servers cannot handle all the expected load + +#### Alternatives +_How might this project’s intent be realized in other ways (other than this project proposal)? What other potential solutions can address the same need?_ + +We have an efficient and reliable way of performing DHT queries on every single runtime (or an efficient way of delegating them). + +#### Dependencies/prerequisites + + +Part of the [Connection Manager Overhaul](https://github.com/libp2p/js-libp2p/issues/744) (future project pitch) will be essential to achieve all the magic out of the box connections. With this Project, both are users and the dev team will be able to discover meaningful peers in an efficient fashion. Consequently, we can make the connection manager more intelligent to trigger queries and establish connections with the important peers. + +#### Future opportunities + + +## Required resources + +#### Effort estimate + + +Medium + +#### Roles / skills needed + + +- 1 js-libp2p engineer +- 1 go-libp2p engineer +- 1 infrastructure engineer