I had the same experience with my Spring MVC webapp.  I found that the
problem was affected directly by the type of controllers I was
using.

Controllers that use annotations
(org.springframework.stereotype.Controller) take longer to startup.
On the other hand, controllers that extend from
org.springframework.web.servlet.mvc.AbstractController startup fast.

Also, avoid any startup routines that take a long time
(InitializingBean or init-method configurations).  Startup on GAE can
happen whenever an instance of your appspot is cycled up, which means
more often than you think.  I have some logic that need to happen only
once before my application could be used by clients.  So I created an
"admin-only" controller with that logic.  After I deploy to my
appspot, I would call my admin controller and trigger my startup
routine.

And if you need to upload large amounts of data, use the
com.google.apphosting.utils.remoteapi.RemoteApiServlet.  Don't try to
implement your own controller, its too much hassle.

On Oct 6, 12:44 pm, Vladimir <[email protected]> wrote:
> Hello All!
>
> I recently deployed a Spring MVC application to google app engine, and
> the intial load time is about 7sec. Once the application is loaded,
> the app is quite responsive. But, if the app is idle for more than 1
> minute (there isn't ANY traffic to it) the app needs to be again
> reloaded by GAE, which, takes about 7sec as well. For a PRD-level
> application this is unacceptable. (The app is empty -- I'm not even
> using JPA, Sitemesh, Spring Security, etc yet. It just loads a jsp
> page with some text.)
>
> The only "best practice" to fix the 'load time' I've seen so far is to
> set up a cron job that hits the url every minute, therefore keeping
> the app 'loaded'. Obviously this is a terrible solution.
>
> So here are the questions:
> Are there any "best practices" for Spring on GAE in terms of
> "responsiveness"?
> Since google and spring are working on developing better integration
> between the two of them, has there been any news/progress on this
> problem? I can't find anything concrete, that's why I'm asking it here
>
> Thanks!
> Vladimir

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to