Skip to content
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

Evaluate WebTransport protocols and APIs #272

Open
endel opened this issue Oct 1, 2019 · 13 comments
Open

Evaluate WebTransport protocols and APIs #272

endel opened this issue Oct 1, 2019 · 13 comments
Labels
🧮 @colyseus/schema Problems related to Schema Serializer 🔍 research 🚀 feature

Comments

@endel
Copy link
Member

endel commented Oct 1, 2019

There's a draft on WebTransport going on, which is a successor of WebSocket that supports both reliable and unreliable communication. It's not currently usable - hopefully, it will in the future (when?)

It would be nice to start thinking about how to make Colyseus use its reliable/unreliable API for sending and/or receiving data.

@endel endel added 🚀 feature 🧮 @colyseus/schema Problems related to Schema Serializer labels Oct 1, 2019
@endel endel pinned this issue Oct 1, 2019
@endel
Copy link
Member Author

endel commented Oct 1, 2019

According to w3c/webtransport#65 (comment), we could use the RTCQuicTransport as a proof of concept, before WebTransport is actually implemented.

I honestly don't think WebRTC is viable for authoritative servers, but we could use RTCQuicTransport's communication layer to be prepared for supporting unreliable messages while WebTransport is being developed and matured.

@ouya99
Copy link

ouya99 commented Feb 2, 2020

why WebRTC not viable for authoritative servers?

http://geckos.io/

@yandeu
Copy link

yandeu commented Jun 4, 2020

why WebRTC not viable for authoritative servers?

It is! It was initially just not meant to be used on the server. But there are now WebRTC libraries for Nodejs, Golang, C++, Rust, Python and surly many more.

@IfnotFr
Copy link

IfnotFr commented Jun 8, 2020

Just sharing something for the brainstorming. we were talking about it with ECSY users. The http://geckos.io/ guy is showing some real improvements with bad connections.

200ms and 10% packet loss TCP vs UDP :
https://youtu.be/ZEEBsq3eQmg?t=104

This is impressive !

@yandeu
Copy link

yandeu commented Jun 8, 2020

200ms and 10% packet loss TCP vs UDP

To be precise, the latency to the Package Loss Test was 225ms (Georgia US). The latency to the EC2 server was 130ms (Frankfurt DE). If the latency was >200ms, WebSockets would have performed much worse.

@IfnotFr
Copy link

IfnotFr commented Jun 8, 2020

Oh you are this guy, I did not noticed, i am ambarased :D

... Thanks for the precisions btw, your tests shows why UDP is important :)

@GameDevBhavesh
Copy link

@endel any plan about implementing http://geckos.io udp socket for colyseus ????

@jerrygreen
Copy link

I wanted to find some handy ways to do networking in haxe/heaps game, and this looks quite good, and potentially just excellent with UDP... Looks real promising, especially with that proof of concept video posted by @IfnotFr (originally by @yandeu).

Now I wonder what new API it will bring into the library, because of the nature of UDP, it's only beneficial in some particular cases, like when you have little pieces of data that you want to update as frequent as possible, like sending position of a unit, or position of a mouse, etc. Any ideas?

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 30, 2021
@github-actions
Copy link

github-actions bot commented Sep 6, 2021

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as completed Sep 6, 2021
@endel endel unpinned this issue Jan 21, 2022
@endel endel removed the Stale label Jan 5, 2024
@epurban
Copy link

epurban commented Apr 27, 2024

Hi @yandeu! I was wondering if you and your team plan to add WebTransport support once webkit implements it. They have accepted it to their standard positions. We would love to use the benefits of UDP through Colyseus for our multiplayer game! Thanks and have a great weekend :)

@endel
Copy link
Member Author

endel commented Apr 27, 2024

Hi @epurban, thanks for your interest here!

I've been experimenting with the fails-components/webtransport implementation of WebTransport in the webtransport branch. The JavaScript SDK also has a webtransport branch and things are mostly working, though there are still a few things to be improved/refactored to unify the transport API's.

So far, in addition to the send() method, I've added sendUnreliable() both on the server and client. By default, both a bidirectional stream and the "datagram" stream are being read for every connection - this might not be a good idea for every use-case...

The fails-components/webtransport hasn't been used extensively, so it might have some limitations, it would be really valuable if we could get more people involved in experimenting and helping test out.

(I'm reopening this issue to continue the discussions...)

@endel endel reopened this Apr 27, 2024
@freeqaz
Copy link

freeqaz commented Apr 29, 2024

Thanks for the update, @endel! @epurban and I will try slapping that in place for our existing Colyseus app to give it a spin.

If we find any bugs should we open bugs as new issues? Or just document them in this thread? Happy to help however we can!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧮 @colyseus/schema Problems related to Schema Serializer 🔍 research 🚀 feature
Projects
None yet
Development

No branches or pull requests

8 participants