#Data storage using Superbase.
1 messages · Page 1 of 1 (latest)
assuming you mean supabase, id recommend seeing if theres ways of minimizing datastore usage first rather than resorting to an external database
what are you doing that saturates datastores so much?
I want to make something using profile service if I need to use data store where I can save a tile to a global list ( [tileId]={likes=3,(data here)} ). I want the list if tikes to be sorted from most likes to least likes and I want to update the list globally every time someone add a tike
Tile* autocorrect doing weird things
I can make an ordered data store but I will have to deal with rate limits
TileId as key, likes as content
are you expecting it to frequently update?
if so you could look into memory stores
which offer a lot higher limits in exchange for a bit less reliability if youre storing things long term
but if youre updating things quite often the volatility shouldnt be as much of a concern
you could have datastores as a backup that save less often
Imagine there is 100 people per minute adding a new tile(just a requirement in case it "blow up") and 1k players per minute liking and removing like from a tile. I want it to update like every 30s or on a button press. Let's say a tile is kept for a year
datastore limits scale by player count
if you have your own rate limiting so they cant add or remove tiles constantly and have a buffer for likes that only updates the store every couple minutes or so, you shouldnt run into datastore rate limiting
up to you, though anything other than stock seems like itd do more harm than good since you want to access datastores from multiple servers at the same time
maybe not the exact same time but youll run into session locking problems especially with ps or sdm
DataStore2?
havent used it
To get sorted data I'm stuck to 2x per player per minute wich mean that if they can get a new page every 30s
ds2 does caching apparently but i feel like that wouldnt be very helpful for your use case
They can refresh or get a new page every 30s
And I can use get async 10x per player per minute wich mean I can load 10 tikes every 30s
ok youre definitely going to want to combine every tile for a single player into one key
How do I sort?
hm
Heres the problem
Doni fetch the whole big ass table and sort it, do I not sort at all but it will suck, do I use a third party
highest likes in a players collection?
honestly you may be stuck using a third party for this
The game is about adding a game to a list, it will store it's id, likes, creation date and other things
which will subject you to hosting costs or their own rate limiting depending on what you go for
id say just try that then
Idk how to use supabase tho I don't even know if it can sort
probably can
I'm coding this shit alone I don't know if I'm gonna make it 😭, if I fail I will just do no sorting and that's it
if nothing else you can sort it manually as you fetch the data
or you could try google spreadsheet and connect it to your game(maybe not for data but game triggering events/values manipulationj
Meh, I want to store data and sort it with high rate limits, I could use firebase and robase but there's other limitations. Http service can make 500 requests per minute per server. Firebase free plan offer 100 simultaneous connections. If I make the server size of 1, max player count before limit is 100. If I make the server size 10, I will be able to make 50 request per minute per player, and have 1000 players connected simultaneously
But I can optimize simultaneous connections with messaging service or memory service or smth
I connect on a single server to the database and pass the infos through messaging service