Remi, The port is straightforward and will probably be (semi-)automated. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ <http://www.restlet.org/> http://www.restlet.org Noelios Technologies ~ Co-founder ~ <http://www.noelios.com> http://www.noelios.com
_____ De : [email protected] [mailto:[email protected]] De la part de Rémi Dewitte Envoyé : jeudi 16 avril 2009 10:41 À : [email protected] Objet : Re: Re: Google AppEngine and Restlet Jérôme, That is really cool. I was quite sure I was missing some point ! Are you not worried nevertheless to sync compatible changes between org.restlet/ and org.restlet.gae/ in the long term ? For example when ServerResource evolves or for bug fixes. Best regards, Rémi On Thu, Apr 16, 2009 at 10:09, Jerome Louvel <[email protected]> wrote: Hi Remi, As long as the extension only relies on GAE's white listed JRE classes, it will work without any modification (example: the FreeMarker extension). Your dream can come true already :-) In the recent version of "org.restlet.gae.jar", the packages are the same as in "org.restlet.jar" so it should be easy to leverage Restlet extensions that are compatible with GAE. As a result, it should be possible to deploy existing Restlet applications in GAE without any modification, as long as their are compatible with GAE's environment of course. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ <http://www.restlet.org/> http://www.restlet.org Noelios Technologies ~ Co-founder ~ <http://www.noelios.com/> http://www.noelios.com _____ De : [email protected] [mailto:[email protected]] De la part de Rémi Dewitte Envoyé : mercredi 15 avril 2009 23:02 À : [email protected] Objet : Re: Re: Google AppEngine and Restlet Jérôme, As far as I understand, we can't reuse Restlet extensions made for org.restlet.* with org.restlet.gae.* classes, can we ? I have thought at a time that GAE would be a deployment option for our restlet applications. With the gae copy, we may not reuse an application as straitforward as I may have dreamed. I see Restlet extensible enough not to have to copy the full code base. Would that dream have been possible with 1.1 with the API and Engine separation ? Why should not we support this scenario ;) ? Thanks, Rémi On Wed, Apr 15, 2009 at 22:29, Jerome Louvel <[email protected]> wrote: Hi Richy, Thanks for sharing your experience! When I did the adaptation of Restlet to GAE (resulting in the new "org.restlet.gae.jar" available in recent snapshots), I took the source code and had to remove many classes that didn't compile due to the lack of sockets and SSL support (mainly the internal connectors). I'm surprised that the "org.restlet.jar" works despite this and I'm not sure if we should support this usage scenario. In addition, "org.restlet.gae.jar" includes the ServerServlet, the JavaMail and the JDK's Net connectors. In the future, it will leverage other GAE APIs. Regarding FreeMarker, the ContextTemplateLoader I just added to SVN trunk will probably help simplifying its usage in GAE with Restlet. Let me know if you have a chance to test it. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : [email protected] [mailto:[email protected]] Envoyé : samedi 11 avril 2009 14:49 À : [email protected] Objet : RE: Re: Google AppEngine and Restlet After a bit of experimentation I have managed to get a Restlet/Freemarker stack running on GAE. The basic steps I took were : 1. Modify ServletConverter and ServletContextAdapter as detailed below. Basically this means replacing the calls to new ServletLogger with Logger.getLogger e.g. in the ServletConverter constructor do something like... super(new Context(Logger.getLogger(ServletConverter.class.getName()))); 2. Add org.freemarker.jar, org.restlet.jar, org.restlet.ext.servlet.jar and org.restlet.ext.freemarker.jar to the WEB-INF/lib of your google app project and add to the build path. 3. Follow usual setup for getting Restlet working in a Servlet environment. Folow the HelloWorld tutorial in the getting started docs - it should work fine locally (even without doing step 1. However, you'll need to replace these calls in order to get it to run in the real GAE) 4. Freemarker was a little more tricky, but not much. Create a freemarker configuration that uses the class template loader and put this in the Restlet Application context attributes. 5. Make sure your templates are somewhere on the class path. 6. Use the TemplateRepresentation along with your freemarker config from the context attributes 7. Make sure it works locally and upload to the app engine. Hopefully I'll get a chance to write this up properly over easter, but it wasn't too bad and looks promising so far. Cheers, Richy http://wiredupandfiredup.com ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 <http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1648 5> &dsMessageId=16485 97 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 <http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1732 294> &dsMessageId=1732294 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1746672

