News for hackers. Stuff that matters.
Re:Show HN: Kafka 0.8.0 on Cloudflare Workers by ec109685 on Wednesday October 05, 2022 @10:17PM (#33103550)
The concurrency with Durable Objects when it comes to mutating state is effectively 1: https://developers.cloudflare.com/workers/learning/using-dur...

Parallel requests can be served, but they are all through a single instance and the abstraction gives you effectively exclusive access to the data store while the stateful part of a request is being processed.

Re:Show HN: Kafka 0.8.0 on Cloudflare Workers by MuffinFlavored on Wednesday October 05, 2022 @11:58PM (#33104222)
what kind of “transactions per second” / latency is possible given this fact?
Re:Show HN: Kafka 0.8.0 on Cloudflare Workers by kentonv on Thursday October 06, 2022 @04:59PM (#33114025)
This does imply a hard limit on transactions per second on a particular object, since those transactions must be serialized in a thread. But, this is true of all databases: there is a limit on transactions per second operating on the same "chunk" of the database, since those transactions by definition have to be serialized.

In fact, you may find a traditional database behaves much worse when everyone is trying to modify the same row: if many clients do a read-modify-write at the same time, all but one of them will fail with transaction conflicts and will have to start over. If you aren't careful this can easily be O(n^2) total work done.

With Durable Objects, because your application code itself runs serialized in the object thread with zero storage latency (assuming cache), it's easier to make each operation "atomic" and avoid transaction conflicts entirely.