Currently the Roblox HTTP API is limited. The request method takes in a message, and a response is returned. While this works for many use cases it falls short when developers need:
- Status updates or intermediate results from a server
- Real-time external applications
For these use cases, developers need to have the Roblox game server listening for one or more updates from an external server. Essentially, streaming into and out of Roblox.
To get around this, developers must currently break messages into multiple HTTP requests and use a combination of polling and long-polling. Long-polling is difficult to enable in many servers, and most current APIs do not support it. Polling is inefficient (and quickly eats the HTTP request limit) and can cause performance issues on both Roblox and external servers. In short, there isn’t a good work around.
I would like it for my navigation mesh generator so I can stream the map as it is generated, but I don’t want to maintain many large buffer files waiting for requests that may never arrive. Users would love to see the map being generated and streaming would be much easier for me to use. My use case is basically intermediate results and status updates.
You can learn more about my project on the Discord server (Polaris-Nav). Here is a picture of an example mesh on the default obstacle course which the Roblox pathfinder cannot generate a complete mesh for:
- The Lua Chat in the Roblox App could use it, if it wasn’t already implemented in the background and just made unavailable to developers. (real-time external application)
- Leaderboards (real-time external application)
- Matchmaking (status updates)
- Permission systems (status updates)
- Pathfinding (intermediate results)
Streaming can be enabled using HTTP 1.1 chunking or sockets. Allowing TCP socket access comes with security issues (users could easily write a HTTP implementation with insecure headers). UDP sockets are a great option, but is not reliable (good for some use cases, very bad for others). HTTP 1.1 chunking (which all HTTP 1.1 compliant clients should be implementing anyways) is an excellent choice. It doesn’t pose any security issues and is reliable.
No matter the underlying method, the API exposed to Lua should follow the standard every other networking library has:
- A way to create a chunked request / socket
- A method to send chunks / messages
- A callback / event when messages are received (NOT as a result from a sent message)
- A way to send the request or close the socket
Think of it has a “trusted developer” role, a sort of middle ground between open-sourcing Roblox to submit pull requests and keeping Roblox closed-source so only the team with limited resources can add features.
- This feature would be very helpful for my business
- Many Roblox developers would love it
- Most features take a long time to implement on here, but I need it now
- I’ve worked at Roblox before
- I have extensive experience developing networking clusters and web servers
It would be beneficial for everyone if I was hired as a contractor / partner to develop this feature and submit it for review. I’ve submitted a “Senior Navigation Engineer” application, but please reach out to me directly in a DM if you don’t know who is handling my application and what the status is.