-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create an application that showcases libp2p universal connectivity #1
Comments
Thanks for the writeup @p-shahi. To make this project more digestible, I've started tackling some of the subproblems for this to work. The first is peer routing, i.e., establishing connectivity from using PeerIDs like I'm first testing this out with TCP from Node for easier testing.js: https://github.com/2color/js-libp2p-transports-example Would love your support on getting this working. I should be able to get a WebTransport example ready this week |
@2color can you create an issue in the js-libp2p repo so that we can diagnose/debug the peer routing there? |
Following a discussion with @TheDiscordian, we're planning on tackling this as follows:
JS Web App
@2color will lead the work on this. Currently in https://github.com/2color/js-libp2p-transports-example/ but will move to this repo Go Daemon
@TheDiscordian will lead the work on this Rust daemon
Currently, we don't have the capacity to do the development of the Rust daemon. So we'd need support for that part. All the code will live in this repo, i.e. a big mono-repo for all language implementations. |
Thanks for the plan @TheDiscordian and @2color! One comment on the "No added encryption" - Noise for TCP connections should be added imo. |
Sorry, I should have been more specific. Encryption over the wire, i.e. transport encryption, will definitely be implemented. |
Some resources here:
|
A Rust daemon would be easy to add by combining https://github.com/mxinden/rust-libp2p-server/ with the WebRTC transport instantiation and a call to |
I just discovered that we have a pubsub example that could be adapted to this project: https://github.com/libp2p/go-libp2p/tree/master/examples/pubsub/chat Since we're under a time crunch, I'd suggest we make use of it @TheDiscordian To adapt it, we'd need to add WebTransport and WebRTC (once the PR for that is merged) |
@mxinden We're probably going to need your help with that. I'm not too familiar with async rust (rust-libp2p-server uses async io and the other link is with Tokio) and the links you sent aren't sufficient for me to move on this without any extra help. |
Closing this as most things have already been implemented. |
Motivation
libp2p supports a wide range of transports that enable libp2p nodes to run as server nodes (on personal PCs or datacenters) or as browser nodes (within the browser).
These libp2p nodes (executing across different runtime environments) can interoperate with one another.
The goal of this project is to demonstrate the interoperability and universal connectivity that libp2p provides.
Goal
We create a sample chat application runs on a diverse libp2p network topology.
This network topology will showcase the different ways nodes can connect to one another. It must contain:
The nodes should form their connections like so:
B1 ← WebRTC W3C → B2 ← WebRTC W3C → B3
↑ ...................................↑ .................................↑
WebRTC B2S.......WebTransport........WebRTC B2S
↓ ...................................↓ .................................↓
S1←...........TCP...........→S2←...........QUIC.......→S3
This showcases:
Note: Other necessary entities in the network like libp2p relay servers or public STUN servers are not shown in the above topology.
In this version of the example, we omit the WebSocket transport but it can be extended in the future to include it.
Outcome
The outcome of this project should be tutorial that walks through the creation of this sample chat app and teaches users how to run libp2p nodes and make use of these new connectivity options.
We can approach the outcome in a piecemeal approach.
The MVP can be to create a tutorial of just the small network of browser nodes and showcase the WebRTC transport.
The second phase can be to incorporate the server nodes (this can also be done piecemeal, for example we could introduce the server nodes one at a time and make the last leg of the tutorial to connect the server nodes with one another.)
Along with a written example, it'd be great to have a video or a presentation that we can showcase to users (and to an audience at IPFS Thing.)
Something this is also desirable but may be out of scope is an interactive webapp that can demonstrate the connectivity options and enable a user to deploy the local network described above with just a few clicks.
Depends on WebRTC W3C in js-libp2p: libp2p/js-libp2p-webrtc#90 and WebRTC browser-to-server in go-libp2p: libp2p/go-libp2p#1999
The text was updated successfully, but these errors were encountered: