Thanks! I’ll be using this module for players searching up data of other players. Since roblox datastores are pretty inefficient for it.
Also useful for datastore backups so basically if a player reports a dataloss I can see his last saved value in firebase and see if the amount he told is reasonable.
Firebase also allows for manual input on data too (so long as the current key isn’t too large in rows) which is super handy for reverting data.
I believe you can also use it for special timed events too (with manual input) so you don’t need to update the game and it works live, but I haven’t gotten to that far into it yet
I first started this because I got frustrated at the storage limit on datastore keys and I figured creating some sort of system using OrderedDataStore and os.date() to be convoluted for the goals I was trying to achieve (just a mega dump of every player’s data in full and player’s simply having pointers to this data) and hence I came across Firebase and FirebaseService and developed my own (hopefully) improved version
Im not sure if this is possible, but when I used javascript with firebase (on the web), I was able to do something similar to OnUpdate() which fired every time the key was updated, is something like this feasible in this module, it would be a cool addition.
OnUpdate() which fired every time the key was updated
I’m not entirely sure, I would have to look further into the RESTful API for Realtime Database, but as far as I am aware this isn’t possible.
An alternative, however, would be writing an interface for Robase and having Signals for keys and attaching a function to run when they do change. As stated in the post though, saving upon data change is not at all recommended as you will eat through your download cap - I tested this and within ~2.5 weeks I had to disable the database before it encroached upon the limit.
Also, apologies for the late reply, I have been feeling under the weather and swamped with work, appreciate the suggestion though!
Really cool module, I’ve been using it for my games data storing.
The only criticisms I have are that I think you should probably use promises over pcalls and for the code to be a bit easier on the eyes. Some code needs to be spaced out.
This is the plan for a future update, currently my PC is bust and I need to do some repairs, on top of this I’m unable to travel home due to Covid-19 restrictions and me being in a different country.
I have a lot of improvements to make on this that I plan to begin when I get the chance, thanks for the input!
Oh my god thank you so much. Really funny, since last week I spent ages creating my own site to use as an API to update my firebase storage from website. You’re a lifesaver!
I’m glad that this is of use to you and I hope it’s easy to use and work with, any problems don’t hesitate to ask here, message me, or use the reporting issues section under the post!
Does this module/wrapper help handle or cache up http requests?
Firebase allows updating multiple arrays in a single request, just curious if you’re helping to keep HttpService activity down by grouping multiple requests into one every few seconds?
I’m not sure how well this would handle 70 players joining at once and grabbing data for many people.
Apologies for the delayed response, this module is simply a wrapper for the core functions that Firebase provide in their API.
There is a BatchUpdateAsync which sends a request to the method Firebase uses to update multiple arrays with a PATCH request.
Caching and “proper” handling of requests is down to the programmer. I do plan to add on to this to make it easier to setup and install with little experience.
And the following is the documentation written for BatchUpdateAsync within Robase (I’m unsure how up to date everything is, but this is, as far as i know, the absolute most recent version):