Understanding Cloud Functions: Dealing with parallel execution (Firecasts)

preview_player
Показать описание
Welcome back to another episode of Cloud Functions for Firebase. In the last episode, Doug showed you how global memory and temp disk space was retained between function invocations on the same server instance. In this episode, you will learn how to safely code for your functions that will run in parallel on multiple instances. Check out the resource below to find out more information, and subscribe to the Firebase channel for more app development tutorials!

Рекомендации по теме
Комментарии
Автор

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.

RobinYoulton
Автор

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

JohnDoe-zcmu
Автор

What do you mean by the event can be called twice? If i have a counter with onUpdate trigger i can't rely on it?

danvilela
Автор

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

liquidfootyquotes
Автор

"Oh and there's one more quirk.." So my thing is basically, why does the documentation not make it a point to highlight this EARLY when introducing developers into the ecosystem. I've developed entire solutions not taking these parallel execution nuances and had to literally tear everything back down and re-design. Also why don't you provide recommendations? e.g. using Redis (Cloud Memorystore) for things like queueing, or other data structures that can help developers get creative about working around these issues? Or even a simple "locks" example? This video is effectively a big "oh btw there's this whole elephant in the room, good luck"

devadmin
Автор

Can I make an api using cloud functions?

JohnDoe-dzwu
Автор

@Firebase and @Doug, I believe that in this playlist (Understanding Cloud Functions for Firebase) videos 1 and 2 are reversed

alexbrasileiro
Автор

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!

eduardjsx