I am thinking about using Firebase instead of Parse (as that is shutting down) for my future mobile backend needs. I really like the realtime database aspect of it, but it doesn't have backend logic easily integrated like Parse did with Cloud Code. Is there any easy way to achieve this functionality, or will it be coming soon? Thanks.
-
It would be good to know what kind of back-end logic you are looking for. There are some processes that Firebase does automatically and some that can be implemented / integrated with other providers. – Jay Mar 01 '16 at 19:03
-
Sending pushes when data is changed from my server, uploading files to S3, restricting access to clients for some logic, etc... – Dylan Diamond Mar 02 '16 at 06:18
1 Answers
Update (March 10, 2017): Firebase just released Cloud Functions for Firebase, which allows you to run JavaScript functions on Google's servers in response to Firebase events (such as database changes, users signing in and much more). Additionally Zapier doesn't play all that nice with Firebase so there are better solutions at this point and with Firebase Storage, Firebase now offers a single solution for database, storage and push needs.
Firebase doesn't directly support push's. However, Firebase is a live and dynamic database that notifies your application whenever data changes: added, edited or removed which may address the need for push.
Additionally, if you need to directly support pushing of data (instead of or in addition to the built-in functionality) you can leverage Zapier.com (or others) to provide that functionality.
Restricting access to data in Firebase is done with Firebase Rules which offer flexibility in who can access data (and can also guarantee how and what data is stored
Interfacing with S3 (file storage) can also be pretty easily done through Zapier, and depending on your file size (<10M) you could also save files in Firebase.

- 34,438
- 18
- 52
- 81
-
Zapier only runs every 15 minutes right? how can you constantly observe Firebase changes? – Rodrigo Ruiz May 30 '16 at 20:16
-
@RodrigoRuiz Unfortunately Zapier.com has dropped support for Firebase, or, Firebase has dropped support for Zapier - it depends on who you ask (there is some finger pointing going on). It did not run on a schedule, and was free form - as soon as data was written to a node that Zapier was watching, it would execute it's instructions. So for example I could sent out emails to 25 people consecutively very easily. Observing the changes was simple, there was a designated Firebase node that would trigger the Zapier events. It was actually pretty cool and worked well for us. – Jay May 30 '16 at 23:02
-
do you know any alternatives that would work now? Is it possible to do it with Heroku + NodeJS? – Rodrigo Ruiz May 31 '16 at 19:54
-
@RodrigoRuiz With Firebase 3.2, a lot of functionality was added including notifications and a number of other functions so I would look through all of the new content that was added. A lot of it depends on what you are specifically after. – Jay May 31 '16 at 20:37
-
I'm after basic processing. Think of it as observe when a value changes in Firebase and log to the console in my server. – Rodrigo Ruiz Jun 01 '16 at 03:12
-
Hey @Jay, since we just released [Cloud Functions for Firebase](https://firebase.google.com/docs/functions/) do you mind adding a note at the top of your question about that? Your answer is still valid, but there's a new alternative now. See [my answer here](http://stackoverflow.com/questions/35360421/firebase-and-backend-logic/35365324#35365324) for how I mixed the old with the new. :-) – Frank van Puffelen Mar 10 '17 at 15:30
-