Hacker Newsnew | past | comments | ask | show | jobs | submit | hpx7's commentslogin

Horizontal scaling is certainly a challenge. With traditional load balancers, you don't control which instance your clients get routed to, so you end up needing to use message brokers or stateful routing to ensure message broadcasts work correctly with multiple websocket server instances.


Hi HN, I'm the CTO at Hathora and wrote this piece. Happy to answer any questions


Hi I'm the author of this blog post and the CTO of Hathora. Happy to answer any questions about how we built our Stateful Router for WebSockets and other persistent connections!


WebSockets is built on top of TCP, whereas WebTransport is built on top of UDP. This makes WebTransport better suited for handling latency-sensitive applications like multiplayer games.


https://github.com/cloudflare/quiche/issues/1114

Looks like no Rust HTTP/3 "WebTransport" support yet?

WebTransport and QUIC are different, right?


WebTransport is an HTTP/3 only protocol, and HTTP/3 is a QUIC only protocol. Different but interlinked.


UDP -> QUIC -> HTTP/3 -> WebTransport?


Correct


Does anyone know of any websites/applications that utilize WebTransport? The only thing I've come across are the Showcase demos from https://github.com/yomorun/presencejs


There's a simple echo server demo at https://webrtc.internaut.com/wt/

If you want an example of an application that actively benefits from using WebTransport, there's a proposed video streaming protocol called WARP: https://datatracker.ietf.org/doc/draft-lcurley-warp/

The lack of good examples mostly stems from the fact that there isn't really that many publicly available server libraries yet. The two I can name off the top of my head are aioquic (Python) and the Google QUIC implementation used in Chromium and ENvoy -- the latter is sadly not trivially embeddable by third-party code (I work on it, and I've been trying to make it easier to use, but given that it's a large C++ codebase with a lot of dependencies, this has been taking a while).


I think it's too new. HTTP/3 has only recently been standardized, and Web Transport is built atop that. New tech, not many users yet. I suspect we'll see many web games utilize this in the near future.


It was only added to Chrome in January of this year and isn't in Firefox or Safari. So I suspect there isn't much beyond showcases for now.


Hi HN, I wrote this article because I didn't find much on the internet comparing network performance between cloud providers. I was surprised to see the amount of separation between the top performers and the bottom ones.

We published our benchmarking script on Github[0], I'd love to see results from other geographies and perhaps even other providers like Linode and Hetzner!

[0] https://github.com/hathora/cloud-network-benchmark


If you're interested in using web technologies for your game, you may find the framework I've been working on to be interesting: https://docs.hathora.dev/#/

I've had success using it as the backend+networking stack in conjunction with game UI tools like Phaser and Pixi.js.


Hi there! I started a company this year focused on multiplayer server infrastructure. We also built a multiplayer game framework for Typescript that has gotten 400+ stars on Github in the past few months: https://github.com/hathora/hathora

Would love to connect and exchange notes about multiplayer development -- if you're interested, my email is on my profile.


I have watched your company build up this tech for a little while now, I suspect there are realistically really only handful of us in game software who really know this stuff inside and out and who are contributing back their knowledge.

Thanks for dropping a reply on HN.

I can be reached at andrew at andrewmcwatters.com. I'll shoot you an email.


For an example Hathora game that does client prediction and rollback, take a look at https://github.com/ourcade/flappy-bird-hathora


Thanks, that is a really interesting example.

I am a bit worried by "Dropped or lost input packets are also not handled in this example.", as I would have hoped handling dropped + lost packets would be a framework issue, not a "me" issue.


I'm not the author of the game so not sure exactly what they meant by that, but that game uses Websockets which are built on top of TCP, so developers shouldn't have to deal with dropped packets (and our UDP implementation will have automatic retry built in as well)


The trick is to always send previously unconfirmed inputs. That way if a packet is dropped the missing input is delivered in the next packet.


If anyone wants to try out a game I made using Hathora for a recent gamejam, you can check out star-jump: https://hpx7.itch.io/star-jump

It's a 2d multiplayer platformer using Phaser[0] for physics on the backend, and it's hosted on Hathora Cloud!

[0] https://phaser.io/


FYI the "Submission to ...ll Submissions! banner blocks part of the game window.


Can anyone else confirm that this doesn't work in Safari 15.4?


Try https://hpx7.itch.io/ship-connect if you want to see a mobile friendly Hathora game (made for a different gamejam)

Edit: I realize now you're talking about desktop Safari. Star-jump doesn't seem to work on it for some reason, will have to investigate why...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: