开发者

Long app startup times (java), maybe using Slim3 to improve?

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


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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜