Libp2p/webrtc netlayer


I learned about Spritely Goblins some time ago and recently found my way back to the project somewhat randomly when re-reading Andy Wingo’s blog posts about fibers, then learning of Hoot, then a re-introduction to Goblins. I’m super excited about the progress and direction.

My first thought on seeing Hoot is that we now have a fully-fledged scheme runtime in the browser. With that in place, we can soon run applications built with Goblins, both as clients and servers. This is super exciting to me as it makes distribution trivial; I can start hosting an application by loading the wasm file and keeping my browser open, while clients can connect to my application through similar means.

This assumes, of course, that networking is taken care of somehow — we want to directly connect browsers, ideally in a somewhat decentralized manner. We have prelay, which demonstrates that we can connect two browsers through an intermediary, though the current implementation uses plaintext. My thoughts then turned toward webrtc — direct connections? Check. NAT hole-punching? Check. Encryption, and standardized relaying? Check again.

But webrtc leaves discovery as an exercise to the reader, requiring a signaling server to introduce peers. I then realized that libp2p implements signaling / peer discovery in general, and supports webrtc.

So, what are the team’s thoughts on a libp2p netlayer (or webrtc specifically)? Is anyone actively working on this?

1 Like

We will be implementing a Libp2p netlayer for Goblins this year.
It’s already on the near-term schedule. :slight_smile: Goblins communicates using OCapN…

If you have any resources/references for scheme implementations and other details, we’d be greatful for the pointers/help.

We are also working to get Goblins to run in Hoot (browsers) in parallel. When all that is done, we’ll have fully supported your described scenario.


And, in fact, @tsyesika just started working on the libp2p netlayer today! Expect more soon. :slight_smile: