hi all, the game i am working on has a lot of master data and uses HTTPService and APIs to load a lot of data at the server start. (example i have over 4k data rows for crafting items, 800+ for weapons etc)
so to reduce the load on my data server at game start i thought perhaps do this…
Have a disabled script(s) file that holds master data in json format on ServerSide, once loaded into tables it(they) would be destroyed.
Couldn’t you just hold your data in a ModuleScript and store a version number? When a server starts you can periodically check the version number and if there’s a new version you can update it.
Also if you’re simply looking to update this data while the game is running you can use packages. Then you can use Insert service:LoadAssetVersion and InsertService:GetLatestAssetVersionAsync and use the same method to update the data.
thanks for the reply, i did think about packages yes. I assume they are 100% secure, trying to avoid any exploit stuff. Using the disabled script was really just to use as a json file for the source that is loaded into a modulescript. That way i just dump from my api and add to script.source then the module loads it. I cant use StringValue due to size. I assume that putting directly into a Modulescript i would need to have as massive string or lots of table.inserts. Not been doing LUA/Roblox for that long so learning best ways to go about things. Thanks again for your input
thats pretty much what im doing currently, but was just thinking how to reduce the server stress (ever hopefull my game will be a hit ha ha) so your idea of Packages seems a good one for sure i will have a look at using packages, Thanks for the tips, def going to research packages then thanks again
hi there, back end is MS SQL, with c# api called once at start of a server instance. I have an API now that dumps to a modulescript with table.inserts. so I can add to packages. I tried pasting into a script(disabled) the json. LOL Studio didnt like me after that. json was way to big lol but the table inserts are working fine.
the goal was to see if anyone had ideas on what i was thinking about to reduce stress on API calls to my web server for master (in game) data. So I was asking if putting json into a script was a feasible option (disabling it would meen it could have contained raw jason data with no errors).
I am sorted now with pre built module scripts, and packages.