We are developing a game that will include a shop where players can purchase items for in-game currency.
While it is possible to set the price of each item within studio, my goal is to have an external database where I can store information regarding the items such as the name, description and most importantly the price.
The ideal situation would be where the in-game shop would update in real time when I send the command after making changes to the external database. This all to avoid having to enter studio and shut down or migrate servers.
An important note is that we don’t require the game to SEND or WRITE any data towards the database, only GET data.
While I’ve looked around for solutions that fit my problem, I haven’t had any luck with finding it, hence my post.
it would be simpler to use MessagingService
when you run a command it sends the new item data to all servers and updates it. Also save the new data to a Data Store so new servers can get the updated data.
This. Use MessagingService to signal that the database changed (if you want more efficiency, include what part changed), and have your scripts get the new data and update with that.
Also you can use something like Glitch to host a basic JSON file with your data if you didn’t already set that up and it’s not insanely large.
adding on to this, rather than glitch, i’d recommend using github for it. that way you can rollback the database, and plus not have to worry about glitch requiring usage every once in a while
In my experience when doing that, GitHub has had quite a bit of latency between actual commits and the raw file data being updated. Might’ve been caching, but not sure.