I really wish DOs had bundled pricing, or something like it. I found myself thinking about how to reduce # objects to be cost effective :/
With regards to Kafka 0.8, I inferred it was due to the protocol being simpler back then, what issues did you hit with newer protocol versions?
Nice way to demo the tech :)
Regarding 0.8, that’s right, I wanted to start with something as simple as possible. This project wasn’t intended for serious, practical usage, so spending time on extra features added in later versions didn’t seem useful. I’d imagine that newer protocol versions could be implemented without too much difficulty, but whether this thing is fast enough to ever be practical is another larger question.
And kudos mate, it's a very cool way to prove the concept. :)
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.
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.
> What about replication? What about leadership election?
> There is none, at least not in the application code. The point of using Durable Objects here is that we can offload these complexities onto the infrastructure layer, and keep our application code focused and minimal.
Yes, exactly. With Durable Objects, these common problems are offloaded to the underlying system, and you can instead focus on the higher-level distributed systems algorithms problems that are unique to the particular infrastructure you want to build.
(I'm the tech lead for Cloudflare Workers and helped design Durable Objects.)