Hot on the heels of Google Widget Toolkit(GWT) switching to Jetty, the little server that can has received some more Google luv’n!   Google’s new App Engine Java service is powered by Jetty! With App Engine, you can build web applications using standard Java
technologies and run them on Google’s scalable infrastructure.

Initially it is a little difficult to see Jetty in use, but you can see the jetty classes in the SDK download and if your application throws an exception then investigation of the stack trace in the log reveals the Jetty servlet container is used.

Not only that, the stack trace and other documentation show that Google have really exploited the embeddablility and extensibility of Jetty at a number of levels:

  • They are using their own RPC style connector to receive requests from their front end web servers.
  • They use the google account authentication as the only supported authentication mechanism.
  • The HTTP sessions are clustered via the database or memcache
  • There is an appengine-web.xml configuration file
  • Jetty is embedded in their SDK and eclipse development plugin.

Thus Google have plugged in many new and/or extended components in a way that validates our open, component based architecture.   When it comes to application servers we do not believe that one size fits all and strongly encourage such customization for purpose.

We are really pleased that the google App team picked Jetty for their hosting service and welcome them to the ever growing list of Jetty powered projects!


The revealing exception:

javax.servlet.ServletException: This is an exception	at com.acme.HelloWorld.doGet(	at javax.servlet.http.HttpServlet.service(	at javax.servlet.http.HttpServlet.service(	at org.mortbay.jetty.servlet.ServletHolder$SingleThreadedWrapper.service(	at org.mortbay.jetty.servlet.ServletHolder.handle(	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(	at	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(	at	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(	at org.mortbay.jetty.servlet.ServletHandler.handle(	at	at org.mortbay.jetty.servlet.SessionHandler.handle(	at org.mortbay.jetty.handler.ContextHandler.handle(	at org.mortbay.jetty.webapp.WebAppContext.handle(	at	at org.mortbay.jetty.handler.HandlerWrapper.handle(	at org.mortbay.jetty.Server.handle(	at org.mortbay.jetty.HttpConnection.handleRequest(	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(	at	at org.mortbay.jetty.HttpConnection.handle(	at	at	at$EvaluationRuntime$6.handleBlockingRequest(	at$EvaluationRuntime$6.handleBlockingRequest(	at	at	at$	at	at	at	at	at	at	at	at	at	at	at	at	at$	at Source)

Edited 11 Apr 2009:

In response to the questions about continuations, we found this discussion on the google app engine forums, which says:

“We do not support continuations.  All requests need to complete their work within the ~30 second deadline and then return control back to App Engine. There is not currently any support for chunked transfer encodings, hanging gets, or background processing, so continuations would not be very useful.”

This is interesting, but we’d like to feedback to google that there are plenty of interesting uses for continuations that do not need waits longer than 30 seconds, background processing or chunked responses:

  • We encourage the use of long polling techniques that always send complete responses and thus don’t need chunking etc. 
  • In many cases, background processing is not needed. Suspended requests can be resumed by other requests (eg chat, auctions, collaborative editing etc.) or even other responses completing (eg quality of service filter).
  • For interactive web applications, having a long poll of 20s will still give great latency and throughput advantages over a more frequent polling solution.

Now it maybe that Googles RPC connector cannot operate asynchronously, so they are forced to have a thread allocated.  If that is the case, then they should talk to us and we’d be please to teach them how to better scale their infrastructure (we also specialize in teaching egg sucking 🙂



Google AppEngine uses Jetty!

7 thoughts on “Google AppEngine uses Jetty!

  • April 10, 2009 at 9:03 am

    That’s great news Greg. I was wondering. Any idea whether it supports continuations?

  • April 10, 2009 at 10:18 pm

    Hey Greg, congrats on Google using Jetty so heavily! Clearly they recognize good technology.
    On a side note, it seems the webtide blogs are not working with Planet Eclipse. Your RSS feed encodes the HTML tags rather than encapsulating them in CDATA tags, and the Planet scraper doesn’t seem to deal with them well.

  • April 10, 2009 at 11:26 pm

    there is a chance that continuations will work as they have extended our core connection classes, but a lot depends on how they have implemented some key methods. We’ll give it a go in the next few days and see.

  • April 10, 2009 at 11:56 pm

    I’ve edited the blog with some more information regarding continuations

  • July 28, 2011 at 3:47 am

    Great ,more and more business will adopt jetty as their power application server.
    I want to build a PAAS platform base on jetty,does any one can give me any suggestion
    on architecture ? Trade King

Comments are closed.