ArticlesBlog

Understanding Cloud Functions: Dealing with parallel execution (Firecasts)

Understanding Cloud Functions: Dealing with parallel execution (Firecasts)


Comments (10)

  1. Doug, do you approve the idea of creating a database collection of jobs queued which are polled, possibly retried and marked as failed or succeeded?
    This could solve the delete before create job order problem and be useful for recovery yet it adds complexity

  2. I have one function which only runs onCreate. I have created a document which triggers that function, and it triggersed 3 times in a matter of milliseconds ( by looking at the logs ) … even through that document has only been created once. No other documents were created that could trigger it or anything, I was just testing my app, topped up 50$, created the credit document, and function triggered 3 times, my wallet ending up with $150. Quite weird behavior.

    The stripe example offered in the github repo doens't really help .. as that idempotency key is something they support, and not firestore. I really can't think of any workaround .. if you guys have any idea .. please advise

    Like always, good work with the videos!

  3. "System may deliver same event more than once, this is rare". Rare, I thought this a norm. This happens frequently in my case, noticed this only during testing ( trigger & monitor logs for console.log ). In my function if it does the same thing, there is no problem, it will try to update same data. I think in firebase when you try to update same data, I think it won't update it, I guess as most databases. So basically if it functionally works, I stop monitoring logs, never had to worry about this. Had to worry only if I am counting invocations, but I am not doing that.

  4. Hey Doug, nice video. I hope a video on Dataflow with Firestore for aggregating data 🙂

  5. Thanks Doug and the Firebase teams, I'm loving this series on Cloud Functions – totally relevant for me as I advance my development into those features.

  6. Can I make an api using cloud functions?

Comment here