catapult-project / catapult

Deprecated Catapult GitHub. Please instead use http://crbug.com "Speed>Benchmarks" component for bugs and https://chromium.googlesource.com/catapult for downloading and editing source code..
https://chromium.googlesource.com/catapult
BSD 3-Clause "New" or "Revised" License
1.93k stars 564 forks source link

[📍] Handle concurrency #4371

Open dave-2 opened 6 years ago

dave-2 commented 6 years ago

Right now it's not safe for two requests to modify job at the same time. There are a number of cases where we want this:

As far as I know, App Engine doesn't provide any synchronization primitives other than datastore transactions. So we'll need to figure out how to work with just those?

Task queues also have a max_concurrent_requests option which we can set, but that may limit our scalability.

@anniesullie @perezju @simonhatch

simonhatch commented 6 years ago

Datastore supports strong consistency and has some wrappers around atomic operations like transactions.

You could also just defer operations until the start of a job run.

dave-2 commented 6 years ago

Deferring operations may work for user interactions but not cloud pub/sub.