A pragmatic approach to Google AppEngine
nicklothian.com
nicklothian.com
I get that in terms of practical advice - but the biggest thing I've been wondering in this whole GAE debate is why you'd select a service where failure is such a norm. Is it solely a cost decision because GAE beats someone like AWS by such a large margin? Theoretical development costs seem like they'd be much lower on platforms where you expect lower error rates.
OTOH, if you are primarily concerned with interacting with 3rd party HTTP based APIs, then you probably need to build that protection layer anyway. This is a scenario where AppEngine works really well - and once you've built that protection layer it isn't such a big deal to extend it to data access too.
Was it Foursquare who had the huge issue a month or so ago? They had many developers worrying about how to re-shard their data because suddenly it couldn't fit into memory. Keep that problem away from me...especially at 2am on a Saturday!
Then again, that theoretical becomes quite practical when your app that runs on EC2 breaks down because it isn't as scalable as you thought it might be. Google has already thought about the tough questions like "what happens if an entire datacenter goes offline?" and GAE has that designed in.
Developing for failure doesn't make sense when you're operating on a small scale, but it makes a lot of sense when you do need to scale. I'd rather take a bit of a development hit up front when there are few users than take the hit when a site really gains traction.
It is no different from sanitizing user inputs. You wouldn’t expect sane people to type alpha chars in a phone number field, yet they do. So you write code to deal with it. If you expect the datastore to fail every now and then, it helps wrapping it in an error handler.
Should it be that way? Certainly not, but software breaks, whether it’s designed by Google or by anyone else, and it’s our job to make it as smooth as possible for our users.
note: the datastore issues are not as common as they used to be a few months ago. And latency is low now.
What makes you think that GAE's error rates are higher than "the norm"? Better question - what makes you think that GAE's error rates are higher than what you can get/do yourself? (Yes, I'm sure that someone can beat GAE, but unless you're that person/organization....)
Yes, GAE encourages you to program for error. Unless you've got an error free alternative, you're either programming for error or hoping for the best.
Is this really normal for a Java app? A typical Rails app (either built by myself or someone else) would have tens of queries in a request and still complete in under 1s. That was my experience with PHP too.
But that won't work on AppEngine.
Need more? It's simple. You just port away from appengine. Or you jump through the insane hoops the author describes just to get your mildly complex pages composed and out the door.