views:

178

answers:

2

Hi,

I'm getting close to completing an app engine project (java + jdo), and am a bit worried about startup times. When the app is 'cold', it can take a long time for app engine to load my app (more than 5 seconds) - this is bad because often times the user may just give up after waiting so long.

There's a project called Slim3, which wraps the native datastore - it's supposed to give you startup times of 1 - 3 seconds: http://sites.google.com/site/slim3appengine/

I don't really want to rely on a third party just to get decent startup times, but I don't think we have any choice. Just wondering how you've dealt with long startup times. I read that as long as your app is getting a hit per 2 minutes or so, then your app is kept resident and this isn't really an issue. That's fair and fine by me (if true).

I don't think the app engine team is working on reducing startup time right now, so wondering what, if anything, we should do to solve this ourselves?

Thanks

+1  A: 

Objectify is another alternative datastore wrapper that is supposed to be faster than JDO.

According to the Roadmap, the app engine team is in fact working on this problem, by giving us the ability to reserve instances. Of course there is not even an estimate of a target date, so it is probably still worth looking into a solution in the meantime.

The other thing you can do is make sure that you have eliminated all of your own code as a startup bottleneck. Are you sure it is just the JDO code that is taking a long time? Are there any initialization tasks you can defer until later, to spread the cost of the first hit?

Peter Recore
Yeah I'm not sure how to profile startup time - how can we tell which components are taking how much time to init - and then if objectify/slim3 would help? I'm not using any 3rd party libraries, just plain gae java and the jdo annotations. Not using GWT either.
+1 for Objectify
Ashwin Prabhu
A: 

FYI, in Japanese App Engine community, Slim3 is a defacto standard for accessing to Datastore - over 50% of users on my Twitter TL are using it for profuction service. It's much faster than JDO for both spin-up time and query speed (as fast as low level API), and easier to build a query by utilizing Java/Eclipse's type system.

Thanks,

Kaz

kazunori_279