01:07 Why use Cloud Functions? 02:03 Summary of Cloud Functions 03:28 Returning Promises 04:13 Google Cloud Functions vs. Cloud Functions for Firebase (TS and JS only) 05:14 Restaurant Reviews example begins 05:23 Urban dictionary joke 05:50 Clients are untrustworthy by nature 06:39 Code Example in TypeScript 10:00 Infinite loops 10:55 "Cloud Functions has fixed my terrible culinary mistake" 12:12 Firebase deploy 12:51 Firebase deploy handles individual Function deploys that you would normally do with Google Cloud Functions 13:38 Top 5 Quirks 13:47 Quirk #1: Performance cold start 14:37 Quirk #2: Global variable out of sync on each server 15:21 Quirk #3: Global variables/libraries always loaded, slowing all cold starts 16:07 ...use lazy loading of libraries instead 16:17 Quirk #4: Order of function execution not guaranteed 16:57 Quirk #5: Duplicate events, use the unique eventID property which is the same across all duplicate function calls 17:52 Conclusion and next video topics
Can you quit Firebase, and get rid of Firebase, and just start an entire department for training and education - train on Oracle, Microsoft's services, Google services - you guys' videos and your documentation is decades better than anything else out there - literally love you guys and love the offering. Been using since 2013! I do have a quick question though - do you know or can reference a video on how to use Firebase in TypeScript? My googling skills have failed me. Can't seem to import firebase.
after one week of playing with Firebase I could say it's as satisfying as playing in Factorio, but without any guilt that I waste my life. I'm kinda building Internet!
Ok so we have some quirks like functions can be called twice or with different ordering. Previously you removed flame plan, so any bigger mistake during development stage can kill our project and finance too (without any possibility to easy STOP it if there is big issue with for example infinite loops. No, alerts are not a solution..). Awesome.. depression and neurosis, we are waiting! :/
Sir, recently I used firebase authentication and hosting for my angular application they are simply awesome. I am also developed backend for that angular app using spring frame work. I wanna know how can use my backend rest api for my application
Hi Todd, Great video. I have a question: Why are always "triggers" shown when teaching about Cloud Functions? I always thought carrying all the client code related to Firebase and db logic to Cloud Functions would be very nice idea. It would keep the client code clean, make us not worry too much about safety rules. And we would be able to make updates without a client update if needed. That's why I am implementing my App to use http requests to Cloud Functions(custom cloud functions). But since it is never been promoted in your videos, I am a little skeptical. If I do that, would I have problems with Performance(cold start) or pricing? or something else? what are the pros/cons of carrying all Firestore crud and logic to Cloud Functions from client? Thank you very much
Just to let you know... I have done exactly what you said. I created an API using Cloud Functions for an app of mine. I did it because I wanted to keep Firebase (except auth) out of my client bundle so it’s small. So I make http requests to do all of my database work and some other things too. I have not noticed any speed issues so far in production. It actually is surprisingly fast... even when I tested on bad connections and old phones.
@@nerdswhosell Thank you very much for the valuable input. I am relieved now:) what about pricing though? Do you think it is worse compared to using Firestore through the client directly? Edit: I am using Flutter
Cool. I want to get deep into Flutter this year. But to your question... I don’t know. I mean you are adding another service into the mix so you will have to pay for the function invocations. But it depends on how big your app will be. I pay for the Flame plan and I think I get many millions of invocations which I don’t think my app will hit for a while. I am building a more robust version of my app which is a paid version and what I plan on doing for this one is only use functions for the small tasks like Todd gives examples of. For my API I am going to containerize it and use Cloud Run instead. I hope that helps in some way.
@@nerdswhosell Yes it helps a lot:) I wish you the best luck and success with your App. And I do think you will love Flutter even more once you get deep in to it. Right now I am struggling through deciding if I should move to Provider from Flutter_Bloc, or use them both or stay with Bloc. State management in my opinion is the part of Flutter which needs most interest by the community for it to become a leader in industry.
You didn't want to talk about the other design pattern where writes go to a "pending" table and sanitized reviews are processed and written to a final table?
Is it possible to use callable functions with Firestore? Like changing the content of a Firestore document by directly calling a callable function? Docs provide a sample only for Realtime Database. I was wondering if the same can be done with Firestore (without using the Firestore triggers).
The cleanUpReview can be deployed to more than two instances (two container), will that two instance handle the update at the same time? This could cost race condition or waste of processing, ist that right?
@@ToddKerpelmanCorp Thank you Todd. It's just that from now. I just know kotlin. So if I want to use cloud functions I will have to learn either type script or Javascript for creating advanced features in my app.
How can I create a like system using Firestore. But Firestore allows one write per second per document? And is it good to use Firestore to store likes count and list of users who like because Firestore charges on Write and Read
Hi, talk about schedule notification with firestore, in my case, i want to give warning notification ex.5 minutes left, and when deadline coming i wanna change my data in firestore? is it possible? thank you
Hello Team Firebase! On the Cloud Firestore page of the Firebase Console, I don't see a way to start creating a Firestore database. The Create Database button has been replaced with the following text: "Ask a project owner to set up Cloud Firestore before using it for the first time"
guys i am having cold start issue. my cloud functions need 5-8+ seconds for booting up the first time a user calls them. the second time it goes faster(0.2sec) any idea on how to avoid this cold starts?
hello sir, I am using the firebase function but when I call the function which is deployed in firebase I got [Error: UNAUTHENTICATED] back in the catch block.
im new using cloud functions in JAVA environment but recently my cloud function kill the process before the job is finishes, I know the support for java still in betha, but it would be nice if we have something like promise in javascrip, I hope see something like that in the future.
Wait a sec, doesn't serverless computing means I don't pre-allocate the number of resources I need from the could so I don't have to worry about scaling and maintaining the server? Sure security and deployment speed are nice when running our code on the server-side, but I'm still using the exact resources I need when running the code on the client-side.