I have a web application currently deployed in jetty8, which is based on jsf2, jersey and atmosphere. I would like to migrate to GAE but the following question comes up to me:
Does GAE support jetty8?
There is a servlet that performs periodically a data base cleaning task every day. In order to do that a task gets spawn at the beginning and delayed in a loop in order to run every 24h.
I’ve read GAE does not allow tasks to be spawned. Is there another way to do that and be supported by GAE?
I don’t know if GAE supports version 8 of Jetty specifically, but it runs on Jetty instances.
You have to think of GAE more as a PAAS (platform as a service) than an IAAS (infrastructure as a service) provider. You have to take a look at the services they provide and check if they match your requirements. See What Is Google App Engine? for a general overview or Java Enterprise Edition (Java EE) Technologies for specific framework compatibility. The GAE is not a common JRE, it has a limited set of supported classes: The JRE Class White List. This may limit compatibility further. I don’t know if Atmosphere runs. I don’t know what Jetty 8 specifics you need. Websockets? No. You may use channels instead: The Channel API (Java).
Long running tasks are not allowed the way you do it (a 24h delay). But you can start scheduled tasks, see here: Scheduled Tasks With Cron for Java.
Request are limited in execution time (60 seconds) so you can’t run long running tasks that way. But you can spawn longer running (10 minutes) background tasks, see here: The Task Queue Java API.
Important: Look at the quotas. As they punish certain application behaviour you will need to adapt your application to this. This can totally change your application design!
In my experience migrating to GAE is an intense engagement. GAE is not suited as a drop in replacement for other hosting solutions. If you want such IAAS providers (like Amazon EC2) are better suited.