Perhaps node-datachannel could be a viable alternative?
https://github.com/murat-dogan/node-datachannel
I am a big fan of https://github.com/shinyoshiaki/werift-webrtc it is pure Typescript. Will be easier to debug/deploy.
Lots of other great WebRTC implementations also exist. Check out https://github.com/sipsorcery/webrtc-echoes for all the other implementations if you are open to non node.js
I originally went the same route as you, and found that https://github.com/pion/webrtc is probably the best package out there for webrtc. I learned go just for it, and it paid off tenfold. Less memory, more connections, lower latency.
Thank you so much PaulBGD! It means a lot that you have been consistently happy with Pion.
We got super lucky that a company heavily depended on SCTP in the early days. One of their devs (enobufs) did an amazing job with it.
Same (I tried Node-based WebRTC packages), same (I found pion to be head and shoulders above everything else), same (I learned Go just so I could work with it).
Its ability to be simultaneously low-level and easy to work with is truly something else.
I have this problem with WebRTC too. I'm operating from the native side with anacrolix/torrent and pion/webrtc. I wonder if it's not due to the JS implementation.
Can I buy some of your stock?
yes, write me mod.moody@gmail
Re:WebTorrent
by greatest-ape on Tuesday November 29, 2022 @08:07PM
(#33795604)
If you run your tracker on Linux and an info hash whitelist approach would work for your use case, it might be worthwhile to have a look at aquatic_ws [0]. It relies on tungstenite [1] for websockets and achieves around 20x the throughput of the reference implementation when running with four threads.
I don’t know of anybody who runs it in production, but its sister implementation (BitTorrent over UDP) handles 80k responses per second with lower load averages than opentorrent.
[0] https://github.com/greatest-ape/aquatic
[1]: https://github.com/snapview/tungstenite-rs
(I am the developer of aquatic)
Oh very cool. It looks like it is compatible with WebTorrent. Very cool, thanks
Re:WebTorrent
by ThaUnknown on Tuesday December 06, 2022 @05:12PM
(#33887853)
hey, I'm one of the few remaining active WebTorrent devs and I've seen this issue myself, to the point where it's simply easier to use NWjs or Electron with node integration and use chromiums wrtc implementation instead of the wrtc package, if you ever manage to find a better replacement for wrtc for node tell me, and I'll make sure it's implemented ;p
I hope it gets solved very soon.
I also attach my node profiling output. Looking for some advise if you have any..
[C++]:
[Summary]: [C++ entry points]: