3 ms·
Outside of very niche use cases pushing enforcing consistency to the app layer adds enough complexity to dev process that a one/two programmer team will not ge
by qaq 8y ago
Outside of very niche use cases pushing enforcing consistency to the app layer adds enough complexity to dev process that a one/two programmer team will not generally handle it well. That's why even Google ended up building Spanner.
- stickfigure 8y agoHaving built several large, complicated, high-traffic apps on the Google Datastore, I disagree. Eventual consistency was at worst a minor nuisance. Rather, I found the major pain points to be 1) no joins and 2) no aggregations.
- zzzcpan 8y agoExactly. Eventual consistency was never hard, people should stop taking Google's research so seriously. They mix it with marketing too much.
- qaq 8y agoso you have a distributed system that is handling eventual consistency at the app layer and it was a minor nuisance :)?
- stickfigure 8y agoYes. Genuinely, why is that hard to understand?
- qaq 8y agoBecause for avg. developer reasoning about eventual consistency and handling all the edge cases is fairly hard. If it's easy for you I guess you are far above avg. dev.
- stickfigure 8y agoI hired a couple junior devs and they did fine. There really aren't that many edge cases. If you're changing data, you're in a transaction and that's always strongly consistent. If you're querying data, nobody really cares if it's 10s behind (and usually it was 1-2s). On the other hand, counting a few thousand things is a pretty major PITA. And doing bulk updates requires map/reduce. So there's a cost... but it's not what you seem to think it is.
- qaq 8y agoSome of your projects looks like are in e-commerce space so say if I look at my cart and it is missing products I added say 5 sec ago that would be an issue.
- lrem 8y agoThat's what session affinity is for. I'm pretty ok with 5 seconds delay between adding something to the cart on my laptop and it appearing on my phone. Or, you may do user affinity and I'll have both the same second, but my latency will go bad the first day I travel overseas.
- stickfigure 8y agoIt's trivial to define your entity groups in Google Cloud Datastore such that you have strongly consistent carts. It's how you would naturally build an app, and it doesn't require http sessions (which I've never used on GAE and never expect to in the future). I've built multiple ecommerce sites this way and they work great. What's hard is to do strongly consistent queries across carts. But that isn't something anyone cares about.
- ecnahc515 8y agoThose major pain points are exactly what you're trading off off for when you pick eventual consistency.