johanhelsing / matchbox

Painless peer-to-peer WebRTC networking for rust wasm (and native!)
Apache License 2.0
879 stars 72 forks source link

WebTransport backend #251

Open bonsairobo opened 1 year ago

bonsairobo commented 1 year ago

I'm just curious if there is interest in implementing a WebTransport (QUIC) "backend" for the peer-to-peer connections.

There is a relatively new crate for using the WebTransport protocol: https://github.com/BiagioFesta/wtransport

I can see that Matchbox is specifically designed for peer-to-peer networking, relying on a relay server to set up the mesh. I'm not sure if setting up a P2P WebTransport connection is possible or easy at the moment, but I know there are efforts to do so.

Anyway, I need to read more of the code to see what's possible, but I figured I'd start this conversation early.

garryod commented 1 year ago

Thanks for bringing the p2p-webtransport report to my/our attention - I debated at length the benefits of WebRTC and QUIC before getting involved in this project thus I am rather excited by the prospect of eating my cake and having it too.

If this were to develop to the point of a standard - and be available through wasm-bindgen and webrtc - then I see no reason why we wouldn't want to transition the underlying data channels to QUIC.

In the interest of tempering expectations, is not nearly at that stage yet and it's possible possible @johanhelsing and @simbleau will have other thoughts

bonsairobo commented 1 year ago

In the interest of tempering expectations, is not nearly at that stage yet and it's possible possible @johanhelsing and @simbleau will have other thoughts

Yea no worries, I understand QUIC is still in early adoption phase, and it might not end up fitting into Matchbox. But thank you for considering it!

Either way, I still plan on using Matchbox for my game, and I just figured I'd raise the issue to learn what (if any) long term plans there were.

simbleau commented 1 year ago

I haven't looked into QUIC yet much at all, so I googled compatibility with WASM.

At the moment, not a shot.

Solely because Safari doesn't support this https://caniuse.com/webtransport

In the future when it has full adoption, it sounds good on paper. I haven't looked into specifics.

simbleau commented 7 months ago

@johanhelsing Imo any experimental backends like webtransport or QUIC would warrant a new crate. I think this crate is focused on webRtc and will remain that way, since it's embedded too deep to change at this point.

Thoughts? I think we should close as "won't do."