Is firebase DB not available anylonger?

Is firebase DB not available any longer?>
I cannot find the component any longer and i do not fiund any proper alternative….
Thanks
Stefan

1 Like

Hi Stefan.

It sounds like your using the Drag And Drop builder.

Have you tried using cloud variables?

Cheers,
Luke

4 Likes

Hi Stefan, here are our docs that show how to connect Firebase DB on our Drag and Drop platform.

Let me know if you have any further questions!

Best,
Cassandra

4 Likes

Hello @sketch , @cassandra
In the documentation you pointed to it shows only how to connect to FB. Lack of informations about how to actually using it makes me imagine further.
So, instead of connecting to FB in StP, and then having the cloud database just like a local one at our disposal, and manipulating it using get/save, in DnD, after connecting will just define some cloud variable (as an object with multiple parameters if needed) and work with that variable, changing values of some parameters and so on. That cloud variable is always connected to FB as it is a cloud variable.
Is this correct ?
I’m pretty new to DnD interface, so my first question after this will be: how often this cloud variable is updating my FB ? What is happening if a user’s connection is lost during the process ? In StP we always have the control at the moment data is saved on the FB, with error message if this is happening and let us have the option what to do further.
This is my first question that comes in my mind. And this strengthen my feeling of a lost control over my no-coding in DnD :melting_face:

4 Likes

I know the question is not directed to me but allow me to explain further.

I want to distinguish between two cases:

  • You supplied Firebase parameters to the project settings page
    In this case the cloud variables are directly and continuously connected to your Firebase Realtime DB and any changes in the cloud variables are instantly reflected to the FB DB.
  • You have not supplied Firebase parameters to the project settings page
    The cloud variables will still work but you will be saving your data in the Thunkable cloud instead of yours and any other member uses the same variable name as you did will be able to read the values stored.

The other issue is the fact that in StP the FB component is asynchronous but the cloud variables are only synchronous which has an advantage and a disadvantage at the same time.

Another issue is the absence of the dynamic listener we used to have in StP. DnD does not have a way to assign a listener to any key in the database using code. This is a huge drawback.

1 Like

This really clarify the situation for me. Thank you very much. I even didn’t though to use cloud variables without supplying FB DB’s credentials in page project. (:saluting_face: < newbie here)

This is what I thought when I said that without a control about the time when my variable is saved to cloud, any connection break will eventually freeze my app too (depending on what is doing at that time).

I bet this is slowing the app, as it continuously keep variable “alive” using connection. At least will be slower that in the other case.

1 Like

Cloud Databases takes bandwidth and resources and to reduce the load, cloud providers use different techniques. A widely used technique, specially for free users is to put the connection to sleep and only wake up the connection when needed which makes the first request to the database takes longer than the subsequent requests.

Due to the synchronous nature of the cloud variables in Thunkable, this would effect the app response time.

The other issue about the way Thunkable designed the cloud variables is the inability to deal with errors. For example, if my database uses access rules then, in StP, I would request to read a value from the database and if I get access denied I can show a message to the user such as you are not allowed to use this function. This trick does not work when using cloud variables making it harder to manage.

2 Likes

Oh, this would be a big issue for me, as I used that message too in StP in some cases :thinking: … and I hate workarounds instead of a clean approach.

2 Likes