Live data from Hacker News

The Unofficial Guide to Migrating Off of Google App Engine

www-cs-students.stanford.edu

41–50 of 63 posts

Re: The Unofficial Guide to Migrating Off of Google App Engine

#41
post #9

Can someone provide some enlightenment about why one would migrate away from GAE? I only ask because I'm currently building an a web application on GAE and am starting to look down the road, wondering if building on GAE will allow us to grow as a business in the ways we want to, or if there are some arbitrary limitations that will come to bite us later. (knowing of course that we're more or less tied to Google's infr…

For my app the real problem with GAE is high cost.

Can you illuminate that a little? Among the competitors, GAE appears to be among the lowest cost platforms. I'm sure there's certain types of applications that can cause it to become expensive, but I'm not sure I can predict well enough what those are.

Re: The Unofficial Guide to Migrating Off of Google App Engine

#42
post #10

Earlier quoted context omitted.

I think in this reference they are not talking about storing live data in memcache, just copies of objects for faster access. So when you are getting the information about a user you check memcache first, if its not there look it up in datastore and add it to memcache. Then when the user loads a second page you can get the information directly from memcache instead of having to look it up again.

I think that's what he's talking about. The point in question is why are you doing this on a new application? The sort of caching you describe is something you put in place after your site starts seeing a lot of traffic, and running queries for every request start to slow things down to the point where optimizing them doesn't help. If you're designing your app well and running it on a solid stack, that should be some…

I guess I can see that argument, but at the same time its so easy to add memcache that it really seems silly not to add memcache for you models at are accessed a lot. Here is a simple user model, adding memcahce is a total of 7 lines. I just cant see the case where you wouldn't add this to start with:

  from google.appengine.api import memcache
  from google.appengine.ext import db

  class User(db.Model):
    email = db.StringProperty()
    password = db.StringProperty()
    sessionKey = db.StringProperty()

    def userKey(self):
      return "User.session="+self.sessionKey

    def put(self):
      super(User, self).put()
      memcache.delete(self.userKey())
      memcache.add(self.userKey(), self, 600)

    def getCurrent(self, request):
      user = memcache.get(self.userKey())
      if user is None:
        user = User.all().filter('sessionKey = ', request.header.cookie.get('user'))
        memcache.add(self.userKey(), user, 600)
      return user

Re: The Unofficial Guide to Migrating Off of Google App Engine

#43
This guy loses credibility when he says that Django templates is ugly and that there's no unit testing framework.

Those are defensible positions in the first 10 minute impression of app engine, but building a simple app (and testing it with GAEUnit) should put both to rest immediately.

Yes, the Datastore is unreliable, but a newer, more reliable version has been released.

App engine is still my preferred platform of choice -- just waiting for ssl, naked domains, and per-entity-group selection of which datastore service level to use.

Re: The Unofficial Guide to Migrating Off of Google App Engine

#44
post #42

Earlier quoted context omitted.

I think that's what he's talking about. The point in question is why are you doing this on a new application? The sort of caching you describe is something you put in place after your site starts seeing a lot of traffic, and running queries for every request start to slow things down to the point where optimizing them doesn't help. If you're designing your app well and running it on a solid stack, that should be some…

I guess I can see that argument, but at the same time its so easy to add memcache that it really seems silly not to add memcache for you models at are accessed a lot. Here is a simple user model, adding memcahce is a total of 7 lines. I just cant see the case where you wouldn't add this to start with: from google.appengine.api import memcache from google.appengine.ext import db class User(db.Model): email = db.String…

Easy is good. It's a similar level of effort in most frameworks, which is handy.

The thing is, if you turn it on right away you never get a chance to see and fix a bunch of low hanging fruit optimizations that can really help you out. You don't know about them until you start to run up against scaling issues despite all your caching. Once you're there, it's not any fun to try to go back, find and fix those original bottlenecks, so you don't have much option but to start throwing hardware at it.

If, on the other hand you hold off and handle your first few scaling episodes by making your queries and code faster, only adding caching after you're not seeing returns from that other stuff anymore, you'll be able to go a lot farther before you have to start adding hardware.

Re: The Unofficial Guide to Migrating Off of Google App Engine

#46
post #38
post #5

A few points (disclaimer: I work at Google on projects including App Engine) 1) It's not fair at all to say that Google "continue to ignore the two critical issues of uptime and data store latency". The HR datastore is specifically designed to address the concerns about variable latency of datastore operations, and to prevent both planned and unplanned downtime. 2) In my experience, high CPU cost for datastore operat…

Can you elaborate on queries not having "the right indexes"? Since the development server automatically adds indexes for all queries run on local dev machines and the production machines cannot run a query for which the necessary indexes don't exist, it's easy to assume that your indexes must be right. I'd love to hear more about tweaks to existing indexes that can alleviate these sorts of problems.

The geomodel stuff is what I'm referring to here; it's efficient enough that you can actually execute the queries, but it's not necessarily fast (or cheap) to do so.

Re: The Unofficial Guide to Migrating Off of Google App Engine

#47
post #29
post #5

A few points (disclaimer: I work at Google on projects including App Engine) 1) It's not fair at all to say that Google "continue to ignore the two critical issues of uptime and data store latency". The HR datastore is specifically designed to address the concerns about variable latency of datastore operations, and to prevent both planned and unplanned downtime. 2) In my experience, high CPU cost for datastore operat…

I am building everything on AppEngine atm. Initially it was just to prototype but I am thinking of launching a preview release of one app live Can you talk about how big some of the larger customer apps are and how much traffic/uers they serve? It would be easier for ppl in a position like mine to make decisions about AppEngine if there were big examples/case studies to point to in the same way Amazon, Heroku, Racksp…

I can't give any current numbers, but last year we did a blog post about Gigya who had an app that peaked at 1600QPS: http://googleappengine.blogspot.com/2010/02/scalability-mean...

Re: The Unofficial Guide to Migrating Off of Google App Engine

#48
post #41

Earlier quoted context omitted.

For my app the real problem with GAE is high cost.

Can you illuminate that a little? Among the competitors, GAE appears to be among the lowest cost platforms. I'm sure there's certain types of applications that can cause it to become expensive, but I'm not sure I can predict well enough what those are.

Like the application being built by the author of the post. Query eats up CPU time etc.

Re: The Unofficial Guide to Migrating Off of Google App Engine

#49
post #47
post #29

Earlier quoted context omitted.

I am building everything on AppEngine atm. Initially it was just to prototype but I am thinking of launching a preview release of one app live Can you talk about how big some of the larger customer apps are and how much traffic/uers they serve? It would be easier for ppl in a position like mine to make decisions about AppEngine if there were big examples/case studies to point to in the same way Amazon, Heroku, Racksp…

I can't give any current numbers, but last year we did a blog post about Gigya who had an app that peaked at 1600QPS: http://googleappengine.blogspot.com/2010/02/scalability-mean...

Not to disparage your post, but it contains only an inkling of substance. Some people managed to get 1600 QPS on GAE, that tells me absolutely nothing. What was their usage like? How much did they pay? What was their latency like? What did they think of GAE? Etc etc.

Re: The Unofficial Guide to Migrating Off of Google App Engine

#50
post #42

Earlier quoted context omitted.

I think that's what he's talking about. The point in question is why are you doing this on a new application? The sort of caching you describe is something you put in place after your site starts seeing a lot of traffic, and running queries for every request start to slow things down to the point where optimizing them doesn't help. If you're designing your app well and running it on a solid stack, that should be some…

I guess I can see that argument, but at the same time its so easy to add memcache that it really seems silly not to add memcache for you models at are accessed a lot. Here is a simple user model, adding memcahce is a total of 7 lines. I just cant see the case where you wouldn't add this to start with: from google.appengine.api import memcache from google.appengine.ext import db class User(db.Model): email = db.String…

Or if you are using Objectify:

  @Cached
  public class MyEntity {
      @Id Long id;
      ...
  }
:)
Post reply on HN