Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can DataStoreService be used effectively to keep record of servers?

Asked by 6 years ago

Is it possible to use DataStoreService to keep track of all Servers of a game so this information can be used? Such as teleporting players as a group to the same server that has enough available space for the entire group.

I've attempted this using UpdateAsync to add a table similar to:

{[NetworkServer.Port] = {PlrCount = NumVal, JobId = JobId}, repeat...}

The Port is meant to be a unique identifier while JobId is used for teleporting players to the specific server using TeleportToPlaceInstance. With my attempt I happen to get a throttle error several time so I'm curious if this is even a viable option? I do know some people use their on webserver to complete this task but can datastores be used AND work?

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Yes and No....

It will depend on the scale. You are not really limited by the number of requests but you are limited by concurrent access. Even if you have multiple keys such as serv_1 ~ serv_100 you will still have the same issue as it will either waste requests or not scale with the system.

We will now receive a warning if a key is set twice in less than 6 seconds but it is undefined how the datastore will act if two server try to save data to the same key.

The good news

We now have the ability to delete keys in the data store so you might be able to setup a solution using both an ordered datastore to get a list of keys and a datastore to hold the data only.

Sadly a lot of people want to use datastores like this to overcome the shortfalls of server management. This is a problem Roblox should provide a solution for not a datastore.

Other developers fall back to using the HTTPService which is not ideal but for larger game it is more worth while as they can add more functionality.

0
Thanks, I believe there is an API roblox has that is server information in JSON, sadly it has to be requested off of the roblox website because it is a http://www.roblox link alphawolvess 1784 — 6y
0
That is not an official API but some people did use it. Roblox did remove server lists for a while as it helped bots spam users. The currently now only show you the avatar icon the user info is not included. User#5423 17 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

Well, I mean, I guess it can work. But as you said, you're getting errors because of too many requests.

I'd use a webserver, pretty easy to set up and doesn't need that much of coding knowledge of that language.

0
Yea, figured a web server was the best way. This is probably how all others complete the task alphawolvess 1784 — 6y

Answer this question