I don't really understand how to use this to build a real backend. Everything seem to be revolving around reactions (new thing happening in the DB, file uploaded etc) but isn't the more common use case that you actually want to call the function directly? I'm building a simple React Native/Expo app where I want users to join random chat rooms so I obviously need some logic to delegate this process. Is Firebase/Cloud…
You can definitely do this! There are two ways that readily come to mind: 1. Use the Realtime Database as a communication channel to trigger a Cloud Function that then sets up the thing you need. 2. Create an HTTPS function and call it directly from your app, then do the work you need.
Introducing Cloud Functions for Firebase
51–60 of 129 posts
Re: Introducing Cloud Functions for Firebase
#52I don't really understand how to use this to build a real backend. Everything seem to be revolving around reactions (new thing happening in the DB, file uploaded etc) but isn't the more common use case that you actually want to call the function directly? I'm building a simple React Native/Expo app where I want users to join random chat rooms so I obviously need some logic to delegate this process. Is Firebase/Cloud…
You can definitely do this! There are two ways that readily come to mind: 1. Use the Realtime Database as a communication channel to trigger a Cloud Function that then sets up the thing you need. 2. Create an HTTPS function and call it directly from your app, then do the work you need.
Re: Introducing Cloud Functions for Firebase
#53I don't really understand how to use this to build a real backend. Everything seem to be revolving around reactions (new thing happening in the DB, file uploaded etc) but isn't the more common use case that you actually want to call the function directly? I'm building a simple React Native/Expo app where I want users to join random chat rooms so I obviously need some logic to delegate this process. Is Firebase/Cloud…
You can also hook up to regular HTTP triggers, and make it like an API call: https://firebase.google.com/docs/functions/http-events
Re: Introducing Cloud Functions for Firebase
#54As a 2+ year user of Firebase, this is long overdue. I built my own cloud function infrastructure using their Java SDK and Digital Ocean and I couldn't have built my app (ProBooks.com) without it. It's good to see Cloud Functions moving from Alpha to Beta!
Just out of curiosity, what kind of functionality were you only able to build this way?
Re: Introducing Cloud Functions for Firebase
#55This was a long time coming, so congrats first. I also recently read this from an experienced Firebase developer: https://medium.freecodecamp.com/firebase-the-great-the-meh-a... Interestingly, he lists several things that he things Firebase needs in order to be awesome, and server-functions is last on the list: > 1. Real querying capabilities. Search, joins, the whole enchilada. > 2. Some sort of references likes Mon…
Re: Introducing Cloud Functions for Firebase
#56Re: Introducing Cloud Functions for Firebase
#57Re: Introducing Cloud Functions for Firebase
#58Oh man. This is great. Firebase is now a one-stop shop for the majority of app infrastructure needs, and really is the closest thing to a "serverless" infrastructure. Vendor lock-in aside, I can't think of a reason not to use it, at the MVP level at least.
I'm omitting things like feathers.js b/c the most attractive feature of Firebase-like tools is not having to manage your own server/database.
Re: Introducing Cloud Functions for Firebase
#59Earlier quoted context omitted.
Any service with more than 400 users that want to run a batch process for each user in constant time with respect to number of users.
Right, how many of those do exist with an internal architecture that will fit the Lambda model?
Re: Introducing Cloud Functions for Firebase
#60Earlier quoted context omitted.
If you need more than 400 concurrent invocations please reach out to support (not promising whether or not we'll be able to satisfy arbitrary scale just yet). We're on day one of a Beta product and it'll keep getting better.
And just to clarify, Cloud Functions for Firebase is covered under the Firebase free support, who you can reach here: https://firebase.google.com/support/contact/troubleshooting/
Limit is 5 per year, that's brutal