I am trying to build a realtime bid matching engine, where the bid matching logic resides inside a firebase cloud function, and i want the cloud function to have only one instance running at any point of time to prevent data contentions condition.
The idea is that for for every new bid, i create a new google cloud task, but at the same time the new task should be dispatched, only when the the previous task is completed.
Regards Suman
You can use the Cloud Task rate limit feature on your task queue. Set it to 1 to dispatch only one task at a time.