jump to navigation

Restlet in the cloud with Google App Engine! April 11, 2009

Posted by Jerome Louvel in Restlet.

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.


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!




1. raveendra kumar - April 18, 2009

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

2. Docs para Google AppEngenie for Java « darv.in - April 28, 2009

[…] REST Restlet in the cloud with Google App Engine […]

3. Stefan - April 29, 2009

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. Jerome Louvel - April 29, 2009


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,

5. Stefan - April 30, 2009

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. Restlet available on Android phones « Noelios Technologies - May 6, 2009

[…] computers based on Java SE/EE, in Web browers with our GWT edition and even in the cloud with a new Google AppEngine edition. But, we are still missing the Mobile […]

7. Jerome Louvel - May 17, 2009

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).


8. Mylo - May 20, 2009

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

9. Jerome Louvel - May 21, 2009

Hi Mylo,

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

Best regards,

10. Mylo - May 21, 2009

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.


11. Jerome Louvel - May 21, 2009


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,

12. Mylo - May 21, 2009

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. Jerome Louvel - May 21, 2009


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


14. Restlet 2.0 M3 released « Noelios Technologies - May 27, 2009

[…] packages and with the growing number of special Restlet editions (Java SE/EE, Google Web Toolkit, Google App Engine and Android), it seemed appropriate to rename the Restlet 1.2 branch into Restlet […]

15. Restlet 2.0 M4 released « Noelios Technologies - August 16, 2009

[…] for each edition that we support: Java SE, Java EE (with Servlet support), Google Web Toolkit, Google App Engine and Android. In addition, the porting of the main source code base to each edition is now fully […]

16. Franck RR - November 19, 2009


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. Jerome Louvel - November 19, 2009

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:

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


18. Franck RR - November 23, 2009

The lastest snapshot resolved my problems.


19. Restlet, a RESTful middleware for GWT, GAE and Android « Noelios Technologies - December 17, 2009

[…] Google App Engine (GAE/J) for deployment on Google’s cloud computing infrastructure […]

20. sada - July 30, 2010

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


21. Jerome Louvel - August 17, 2010

Hi Sada,

Please have a look at this complete tutorial:

Best regards,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s