Web Sockets for servers

WebSockets would be a great addition to ROBLOX servers, because it would allow us to setup something such as NodeJS, and make games easier to implement features that require an external server.
Benefits:

  • Less data transferred in total.
  • Would allow our own servers to send data to a Roblox server as long as the socket is open.
  • Since it could connect to NodeJs, this would also reduce resource usage on our servers since its a single process that manages all of the sockets, also making it easier to make say a live cross server chat system, since the NodeJS itself could store the data it needs.
  • No need to use long-polling or spam HTTP requests.

Currently, @TwentyTwoPilots has stated many times that HTTP requests start to fail, which is causing issues for his game, this could be a solution to that.

@loleris wanted to make a live cross server game, with hundreds of people similar to runescape, with this functionality, that would be much much easier to do compared to his solution of spamming http requests every 1/10th of a second or whatever the number he said was.

@shaylan007 said PF wanted to implement matchmaking, this would make it easier, and less resource intensive.

Some features I would personally be implementing with this would be:

  • Live cross server chat for clans, players, and even a global chat.
  • Matchmaking
  • Saving/loading data to my own server (Possible with http requests, it would just be more efficient with this)
  • A live updating market system

Would you want Web Sockets to be implemented?

  • Yes
  • No

0 voters

67 Likes

Full support for this idea. This would allow so much more web functionality and remove the necessity of continuously sending multiple requests to compensate for the lack of a web socket.

8 Likes

I’m actually really intrigued by this idea. I really like the idea of being able to stream data from the server, because it will enable developers to make more dynamic external services. For instance, you’d be able to make a dynamic matchmaking system across servers, or a cross-server chat.
The idea of a dynamic global economy has also struck my mind, but it wouldn’t be very easy to do RESTfully.

Support :thumbsup:

2 Likes

I’m not sure how it’d work API- and security-wise, but I like the idea.

3 Likes

This idea was rejected for security reasons, sorry everyone!

2 Likes

Is there another method we could possibly get that would allow our own servers to send messages to the roblox servers? That is really what is needed right now. Hence why I posted this.

Perhaps can you give an example of the security issues? Just wondering.

16 Likes

@Mr_Purrsalot Hey, you wanted me to ping

4 Likes

Thanks for sharing the original article with me.

17 Likes

Bump because I wonder if there was/can/will be a reconsideration for websocket support.
As of right now there is a hacky way to do websockets but its extremely limited and connection can be easily lost, and with this thread being created almost ten years ago roblox has come a long way since then, is there really no secure way of making websocket support? I see that in 2021 at least one roblox staff was peering at this thread but I feel like it has been forgotten.

Also websocket support would be insanely beneficial for games since third party servers can process things much much faster than lua can, such as calculations involving nested loops.

2 Likes

You could use MessagingService OpenCloud API to send data from an external server to a roblox server and any roblox server to external server can be done through normal post requests using HttpService

Using a get/post request for receiving messages would require polling, and that creates unnecessary traffic. Websockets would be ideal. There is a reason services like discord use websockets to push events. I want more realtime/frequent applications for it.

2 Likes

You don’t need to use get/post to receive messages on the roblox server, you would just connect to the Topic using MessagingService

that doesn’t apply to what I would use it for.

Hey, I’m wondering if using HttpService + the Open Cloud messaging API can address your use cases?

MessagingService APIs (and it’s Open Cloud counterparts) are experience-wide with experience-wide rate limits. I think what most of here want is the ability to create a real-time & 2-way connection between a (external) server and a roblox server.

5 Likes

technically it’s a problem, if basic http requests have a low ratelimit, there’s a reason for it

I disagree. This is an enormous security risk foir my game and will compromise its security.

Then properly secure your game

5 Likes

exactly. there is a reason major companies including ones of game development use such programs. it can’t really hurt to use, just needs a good implementation

2 Likes

How will this compromise your game? You don’t have to use websockets.

4 Likes