Reticulum in JavaScript
Started by bergie f9477df559d52317... ·
I've mentioned this on the forum a few times, but now that it is actually partially functional, I think it deserves its own thread:
reticulum-js is a new JavaScript implementation of the Reticulum network stack:
https://reticulum.js.org/
Available on rngit:
rns://adafb3153efd4d96d532568a5208b3b5/reticulum/reticulum-js
and also mirrored to GitHub:
https://github.com/bergie/reticulum-js
What works now:
- TCP and WebSocket interfaces
- LXMF messaging both direct and over a link
- Requests and responses (tested with both NomadNet sites and rngit work documents)
I'm building this mostly because I need Reticulum capability for two systems I'm working on:
- Integration with Signal K "smart boat" platform (Node.js)
- Online collaboration for the new NoFlo visual programming editor (browser and Node.js)
So features needed for those have priority. However, down the line it would be great to have the full RNS spec supported. This means a browser app could theoretically be a transport node!
Reticulum-js has been written with assistance of various LLMs. Not ideal, I know. But right now I need to balance sailing and getting this working quickly.
If anybody is interested in this, I'd love some feedback. Especially:
- General API ergonomics. I've tried to keep it quite "modern JavaScript" and lean heavily on Promises etc
- Ideas for interfaces that would work for browser applications (WebBluetooth? HTTP POST? ...)
There are some usage examples I. The examples/ folder.
Looks interesting!
I added a page talking about the connectivity options for browser apps
https://reticulum.js.org/documents/Browser_Connectivity.html
Here's a Reticulum connector for the Yjs CRDT system. Still needs work (for example, switching to Link Channels, and transferring larger CRDT packets as Resources):
https://github.com/bergie/y-reticulum
I was able to use that with CodeMirror and do browser-to-browser collaborative editing over Reticulum, discovering room peers through announces.
This will make more sense once we have a WebRTC interface, though I'm curious to see whether collaborative editing is practical over LoRa.
Lol, the logo had me laughing so hard. It's not RNS anymore, now it's just "JS". It's brilliant.
Sorry, no constructive comments here, just had to share the laugh. Need to take a proper look at this first when I have some time :)
Mark wrote:
Lol, the logo had me laughing so hard. It's not RNS anymore, now it's just "JS". It's brilliant.
Thanks! The "Reticulum" is in the constellation ;-)
Sorry, no constructive comments here, just had to share the laugh. Need to take a proper look at this first when I have some time :)
Perfect, any comments would be appreciated! I'm sure in these first versions there are a dozen things I'm doing a stupid way.