#What is the best method to check the status of the DataStoreService to make sure it's online?

1 messages · Page 1 of 1 (latest)

harsh notch
#

working on a gamepass gifting system, and i'm tryna make sure that the datastoreservice is online before prompting the player with the product.

only two methods i've found were either

(using ProfileStore btw)

drowsy sleet
#

With GetAsync() and some prints

#

you can test

harsh notch
#

im using this right now

#

and if it returns true, prompt them

drowsy sleet
#

or check roblox api status via httpservice

harsh notch
#

yeah

#

im asking which one is more efficient

#

or better to do

drowsy sleet
#

the one more efficient is the one with setAsync

#

beacuse the http can have delay

prime sandalBOT
#

studio** You are now Level 12! **studio

drowsy sleet
#

but

#

httpService checks roblox's global status

#

and is good for large-scale system checks

harsh notch
#

well i'm checking to see if it's online every time a player tries to prompt a purchase

#

obviousily with a remote rate limiter

#

but

drowsy sleet
#

Since you need to check every time a player attempts to purchase use GetAsync() instead of SetAsync() to avoid write limits

#

but you can use setasync() method bc it's also good

drowsy sleet
harsh notch
#

like setasync write limits?

#

didnt know those existed ll

drowsy sleet
#

I mean

#

That roblox allows only a certain number of writes per minute per server

harsh notch
#

shit i didnt even know that

#

had to look it up

#

would it be better to use http service instead then?

drowsy sleet
#

And if too many players try to purchase you may hit the limit and fail to save actual player data like inventrory, etc

#

You can just change setasync with getasync

harsh notch
#

yeah but i dont wanna exhaust my getasync either

drowsy sleet
#

For getasync, for exemple if 10 players are in a server you can make 160 reads per minute

harsh notch
#

yeah i saw

drowsy sleet
#

But with setasync you can make only 24

harsh notch
#

damn alr

drowsy sleet
#

For setasync the equation is 4+(2xPlayerCount)
For GetAsync is 60+(10xPeopleCount)

harsh notch
#

well to be fair im using profilestore

#

which i think works differently

drowsy sleet
#

No

#

Its the same

harsh notch
#

it has an autosave feature intead of just setting it immediately

drowsy sleet
#

I think

slender fable
#

ProfileStore uses datastores so it'd use up some of the allowance of get / set calls, but probably not many

drowsy sleet
#

Yea but if writing to often can get too the limit @slender fable no?

harsh notch
#

if it fails i think it just retries

#

until it works

drowsy sleet
harsh notch
#

queue i believe

slender fable
slender fable
harsh notch
#

using profilestore itself

slender fable
harsh notch
#

when a player tries to gift someone else a gamepass, it should save to their data (even if they're offline)
the issue is that if for some reason it doesn't get saved after the player who is gifting already bought the product, it'd essentially not save for them

olive nexus
#

As long as your using ProcessReceipt, you shouldn't have to worry.

#

If it fails to save then you just reject the receipt

harsh notch
#

i am, but NotProcessedYet still doesn't refund the player

#

at least from the reports ive seen

olive nexus
#

Yeah, but it will push the handling of that action until later

#

When the DataStore is hopefully back up and running

#

If the DataStoreService is down you have bigger issues

#

None of your players data is going to save.

harsh notch
#

if the player leaves and just joins a different server, it wouldn't go through

#

tryna figure out how other games handle gifting

olive nexus
harsh notch
#

is it not?

#

said so across multiple devforums i've seen

olive nexus
harsh notch
#

ohh alright

olive nexus
#

If the user joins another server, you coukd end up with both servers processing the receipt. As stated on the documentation.

#

Depending on how long that processing action takes place.

harsh notch
#

i mean as long as it gets saved, it shouldn't matter even if it gets overwrited

#

all im doing pretty much is just saving a value that says that player owns this specific gamepass

olive nexus
#

Yeah that should be fine

harsh notch
olive nexus
#

If any DataStore action fails, you can just lock down the server I guess. Kick everyone out or attempt to send them to a new server.

#

You'd want to ensure the DataStore is actually down though

harsh notch
#

think profilestore deals with that already

#

somehow