Robase - A ROBLOX wrapper for Firebase

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 :smiley:

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 :slight_smile:

1 Like

Very nice stuff :ok_hand: . Maybe people willl stop using trello as a database when they find this. :joy:

2 Likes

Discussed this in the opensource community discord and I already have a name for a trello API wrapper project :joy: Thank you though!

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!

1 Like

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.

Otherwise, as I said, a great module!

1 Like

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!

1 Like

what… I’m very confused.

Firebase is migrating to a new database authentication system. This is completely fine though, as deprecated does not mean removed!

Video tutorial:

1 Like

Screen Shot 2021-01-30 at 11.12.52 AM

What do I use for Secret Key here?

You don’t need Database secrets, follow the video tutorial provided to access your auth key.

But there is like nothing there I am confused.

1 Like

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!

1 Like

Thank you kindly for creating a video tutorial, I have now added it to the post under “Getting your authentication token”.

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!

1 Like

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.

I hope this answers your question!

1 Like

Hi, I don’t exactly understand the :BatchUpdateAsync method. Could you provide an example script of using this?

Of course, here’s a method from my “DataHandler” script which handles uploading/downloading data and caching it, slight documentation included:


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):

Finally, apologies for the delayed response, I’m not on devforum on my phone often :slight_smile:

1 Like

Im using FirebaseService, and I’m getting FirebaseService>> [ERROR] HTTP 401 (Unauthorized)

1 Like