Restlet Blog

We are living exciting times! This week, Google has released an early version of their widely expected support for Java in Google App Engine (GAE).

GAE is a computing platform that can host your Web applications and offer them  massive and flexible scalability. Free accounts are available and you can pay for extra resources (CPU time, bandwidth, storage and mails sent).

Of course, REST is the perfect choice to build your Web applications that will live in the Google cloud. But, GAE achievements come with constraints because you share computing resources with others. So GAE makes you live in a sandbox with a limited set of Java APIs.

gae-gwt-restlet

The great news is that Restlet has just been adapted to fully work with GAE! This port provides in a single “org.restlet.gar.jar” file:

  • Full Restlet API
  • HTTP(S) server via the built-in Servlet adapter
  • HTTP(S) client via the built-in adapter to java.net.HTTPUrlConnection
  • SMTP client via the built-in adapter for JavaMail
  • Server-side GWT support via the built-in GwtShellServletWrapper class.

In addition, support for GWT is available in both GAE and Restlet (see this post on our port of Restlet on GWT). The usage instructions are available in our online User Guide.

Google France provided us the early access to GAE after their launch event in Paris last Thursday, in collaboration with Didier Girard, Technical Director at SFEIR and author of the OnGWT web site.

Thanks to all of them and to Guillaume Laforge (who ported Groovy to GAE) for their advices and help making this port a reality so quickly and for sharing their passion for GAE!

Update:

16 Comments

  1. raveendra kumar

    Interesting to try this. working GWT and RESTlet .. wonderful combination on GAE. Looking for serious Enterprise application development with this combination ..

  2. Pingback: Docs para Google AppEngenie for Java « darv.in

  3. I am currently looking for a REST framework that runs on GAE – and Restlet looks very promising. However, I am also interested in Spring support. Is there a chance to get this with Restlet for GAE?

  4. Stefan,

    We have a Spring extension that should work on GAE as well. I haven’t tested it yet, but would be happy to make a special version or adjust it if necessary.

    Best regards,
    Jerome

  5. Hi Jerome,

    thanks for your reply. I adjusted the Spring extension to work with the GAE jar (only had to change the ServerServlet import in SpringServerServlet).

    Is this extension supposed to work with ServerResources (yet)? I got it working by overwriting some methods in SpringFinder, but I am not sure that I’m on the right track.

    I also had to create a customized ServletCall, as getSubject() caused an exception (due to GAE restrictions on Subject.getPrincipals().add(Principal)) as soon as getRequest().getUserPrincipal() != null. The solution was to pass the Principal to the constructor of Subject instead.

  6. Pingback: Restlet available on Android phones « Noelios Technologies

  7. Hi Stefan,

    I’ve just made a fresh port of Restlet to GAE. See the SVN trunk. This will give you full support for the new ServerResource classes.

    Note that packages have changed again to their original name (for ServerServlet).

    Thanks,
    Jerome

  8. I cannot seem to find the ServerServlet class in the GAE jar, where is it located?

  9. Hi Mylo,

    It is in the “org.restlet.ext.servlet” package.

    Best regards,
    Jerome

  10. Hi Jerome,

    That package doesn’t exist. I have downloaded the latest GAE jar and the only packages under “org.restlet.ext” is javamail, net and xml.

    If I download the source files it is there, but its not in the jar. Can you check if its been missed out.

    Thanks

  11. Mylo,

    Thanks for the report, that’s correct.

    We had a failing test case preventing the generation of new snapshots. This is fixed now in SVN and should we pushed to the Web site by tomorrow.

    Best regards,
    Jerome

  12. Hi Jerome,

    Maybe it was meant to be in the GAE jar, however I found a org.restlet.ext.servlet jar and included that in my build path as well as the GAE jar and now it works.

    I am guessing this is fine, it will work when I upload to the App Engine right?

  13. Mylo,

    I should definitely work, no more code differences between the port and the main trunk for this extension.

    Cheers,
    Jerome

  14. Pingback: Restlet 2.0 M3 released « Noelios Technologies

  15. Pingback: Restlet 2.0 M4 released « Noelios Technologies

  16. Hi

    I am testing Restlet in GAE but it does not work localy (inside eclipse)
    My conf :
    eclipse 3.5.1.M20090917-0800
    GAE 1.2.6 App Engine
    Restlet 2.0M5
    I have tried the example at http://wiki.restlet.org/docs_1.2/13-restlet/275-restlet/252-restlet.html

    But I am stuck with :
    The server is running at http://localhost:8080/
    19 nov. 2009 15:22:19 org.restlet.routing.Filter doHandle
    WARNING: A filter was executed without a next Restlet attached to it.

  17. Hi Frank,

    The Wiki link you mentions refers to a deprecated version of the documentation (Restlet 1.2 is now 2.0). Try this page instead:
    http://wiki.restlet.org/docs_2.0/13-restlet/275-restlet/252-restlet.html

    You are facing a regression in 2.0 M5 fixed in recent snapshots. A workaround is to override createInboundRoot() instead of createRoot().

    Cheers,
    Jerome

  18. OK.
    The lastest snapshot resolved my problems.

    Thanks
    Franck

  19. Pingback: Restlet, a RESTful middleware for GWT, GAE and Android « Noelios Technologies

  20. I like to work with this configuration.
    Can any one help me in providing guide to work with Restlet in cloud computing.

    Thanks
    -Sada

Leave a Reply