Realtime Database triggers (pt. 3) with Cloud Functions for Firebase – Firecasts

Realtime Database triggers (pt. 3) with Cloud Functions for Firebase – Firecasts


Danny Hutson

39 thoughts on “Realtime Database triggers (pt. 3) with Cloud Functions for Firebase – Firecasts

  1. Brilliant! I actually have never had a race condition. But you imparted the knowledge really well. Thanx again. However, I couldn't find the code for the scripter?!

  2. Hey folks, you can get all the source code from this video series on at gist here: https://gist.github.com/CodingDoug/490f9222c8b0f696338e2d74fcb78594

  3. Nice video, but why did you use async/await here? Would it have also been posible to return the update promise and call the transaction after the update promise resolved ?

  4. How/Can cloud function remove some posts or messages that pass some time limit, say 3 days old posts or messages, and cloud function remove it automatically for you, thanks so much

  5. You use transction to prevent error from users override the count if they update things at the same time, before this tutorial i realized this problem may cause some problem for mobile app, lets say if an user tapped the message like button so 4 likes to 5, but he lost the cell data after he tapped it, once he regain the datasignal, 1000 users already liked it, the real like count should be 1005, but this user still holds the like count 4, once he updated he will change like count from 1005 to 5, and this will cause a big error, so i used a work around, just use the message like array number to update the like count, it is accurate, but my concern is will it be wasting lots of resouse??? Because i count the entire array everytime an user click the like. Thanks

  6. I am using firestore as the database 😭, could you please make video tutorial about firestore triggers with cloud function doug? Can’t wait. Thanks for the video tutorial btw

  7. Hi, good evening, I used the firebase platform before this new update. I would like to know where I can find some support, so I wanted to know what key I can put in my arduino I connect with the application, everything has changed

  8. Hi,
    I need to retrieve image from firebase storage via my dialogflow chatbot google assistant. I already uploaded the image to storage and add the http link to firebase cloud database. If I ask "download my photo" to google assistant(test app), it should receive image response from firebase. I already enable webhook in dialogflow and using index.js file for coding.

    Please help me to add code for image retrieving.
    Fill up the code here
    case 'photo.database':

    break;

    Thanks

  9. Is there any why by which i can maintain the session or some sort of variable between 2 function invocations. let's assume this example:
    we have an end point which invokes a 3rd party api on every n number of calls to the endpoint. i know that is possible to store that counter in the RTD or FS but thats an overhead as it adds millisecconds to every request and involves the doc read and write (cost involved). So again some sort of local cache. I have used the memory-cache npm package in the node application and it works fine. but the firebase functions simply clears of every thing once the invoked method is done executing, which clears the memory cache.

  10. Great tutorial and video i am waiting for more

    I have a some doubts, if i have closed operation in a transaction to avoid race conditions is better manage all backend operation in that form? and if i have multiple onCreate documents updates within I must put all of the in one function ?, in the same transacction method? or is better manage with a batch process?

    Thanks!!.

  11. I am having issues applying an update to an item retrieved in a transaction, as I only want to apply the change based on what value it is. How can I do that?

  12. so big question
    @6:10 you mention removing the snapshot out of the onDelete
    but the following code uses the snapshot as a point of reference
    can you do that with context?

  13. Very essential video, but difficult to understand the English for Indian people like me. Can you upload these videos by an Indian?

  14. good day sir… can you please view my code function about push notification, and here is the link:

    https://stackoverflow.com/questions/55507788/error-function-crashed-details-registration-tokens-provided-to-sendtodevice

    thank you verry much..

Leave a Reply

Your email address will not be published. Required fields are marked *