#Data storage using Superbase.

1 messages · Page 1 of 1 (latest)

tender drift
#

Hello, I'm making a game that relies on a lot of data traffic(it will probably have 2 players lol) and data store is just not the way to go because of rate limits and sorting issues. Is it a good idea to use Superbase ?

modern eagle
#

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?

tender drift
#

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

modern eagle
#

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

tender drift
#

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

modern eagle
#

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

tender drift
#

Yeah

#

I'm dumb

#

Should I use profile service, suphis module, data store 2 or stock

modern eagle
#

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

tender drift
#

DataStore2?

modern eagle
#

havent used it

tender drift
#

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

modern eagle
#

ds2 does caching apparently but i feel like that wouldnt be very helpful for your use case

tender drift
#

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

modern eagle
#

ok youre definitely going to want to combine every tile for a single player into one key

tender drift
#

How do I sort?

modern eagle
#

hm

tender drift
#

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

modern eagle
#

highest likes in a players collection?

#

honestly you may be stuck using a third party for this

tender drift
#

The game is about adding a game to a list, it will store it's id, likes, creation date and other things

modern eagle
#

which will subject you to hosting costs or their own rate limiting depending on what you go for

tender drift
#

Supabase is free, no rate limits and 1gb if storage

#

50k users but won't use auth

modern eagle
#

id say just try that then

tender drift
#

Idk how to use supabase tho I don't even know if it can sort

modern eagle
#

probably can

tender drift
#

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

modern eagle
#

if nothing else you can sort it manually as you fetch the data

tender drift
#

Yeah I'ma go to sleep it's midnight and I need to get up to 6:50 am

#

Bye

pulsar sonnet
#

or you could try google spreadsheet and connect it to your game(maybe not for data but game triggering events/values manipulationj

tender drift
# pulsar sonnet or you could try google spreadsheet and connect it to your game(maybe not for da...

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