Re: Restlet gets funding to accelerate APISpark growth!
awsome! Great work Jerome. On Wed, Nov 13, 2013 at 3:12 PM, Jerome Louvel jlou...@restlet.com wrote: Hi all, Finally, we can share those news: http://blog.restlet.com/2013/11/13/restlet-gets-funding-to-accelerate-apispark-growth/ From an open source point of view, this will give us extra resources to move the RD on the framework forward. In the short term, Thierry Boileau will dedicate fixed time every week to complete version 2.2 and start working on the 3.0 milestone. Their is also a great synergy with APISpark which is fully built on top of the Restlet Framework and lets you export your web APIs as Restlet Framework source code, to prevent lock-in. As this is a usual concern in such events, no change in our open source licensing scheme is expected following this funds raising :) Best regards, Jerome -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3068425
RE: Using JettyServerHelper
Found a solution to using the JettyServerHelper. Here is some code in case others have similar question: Component component = new Component(); Server jettyServer = new Server(Protocol.HTTP, 8080); HttpServerHelper jettyServerHelper = new HttpServerHelper(jettyServer); component.getServers().add(jettyServer); jettyServer.getContext().getParameters().add(maxThreads, 300); jettyServer.getContext().getParameters().add(acceptQueueSize,50); component.getDefaultHost().attach(/, new RootApp()); component.start(); -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3061100
setting server's keepAlive timeout time
Hi, I am using the Jetty Server connector. I am trying to set the time in which a keepalive will end after no activitit. Tomcat has something called: keepAliveTimeout. Can we set this feature in a Restlet standalone? I see that there are a few parameters that might do the above. Would setting maxIoIdleTimeMs set the keepAliveTimeout? Would this be roughly equivalent to tomcat's keepAliveTimeout? Thanks, -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3061104
Using JettyServerHelper
Hi, I am using the Jetty Sever Connector. It is working fine, but I want more control to fine tune the server. Here is my current code: Component component = new Component(); component.getServers().add(Protocol.HTTP, 8080); component.getClients().add(Protocol.FILE); component.getDefaultHost().attach(/, new RootApp()); component.getDefaultHost().attach(, new RootApp()); component.getDefaultHost().attach(/lfs, new LFS_App()); component.getDefaultHost().attach(/pages, new Pages_App()); component.start(); How would I edit this code to change the minThreads and maxThreads. Also, I do not immediately see a way to set the keepAlive time on the sever? Any code hints would be great! -Adam -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Using-JettyServerHelper-tp7578868.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3060623
RE: How much REST should your web API get?
Jerome, this was a good post and lots to think about. I don't have any feed back right now, as much of the conversation was new material for me, but I tended to agree with what Hansson posted. Are you planing on moving Restlet towards more of the Web API style framework, as opposed to a streamlined REST framework? I got that impression from your blog post that is what you might be thinking. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054829
RE: Re: Re: Communication Error (1001) - The connector failed to complete the communication with the server
Jerome, Thanks for your thoughts. My comments were not a knock against the Restlet team. We know you all are working at full steam! I will continue to think how I may be able to help with community documentation. Thanks, -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054650
RE: Re: Communication Error (1001) - The connector failed to complete the communication with the server
Hi David, Everything is working well now for me now and I like restlet, but there does not seem to be much activity on this list. I kind of feel the same way. Restlet matches my needs pretty well, and thing have been going well so far. But, it is too bad that their is not a bigger community and forum here. I wonder if in general StackOverFlow is a better place to post questions and comments? -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054610
RE: Re: Using Asynch setOnResponse
Hi Jerome, Thanks for your reply. I realized that two things were causing a problem: 1) I was using the client net extension. This seemed to prevent async. Can we only use the internal client connector for this feature? 2) I thought the Async Get() was having no effect, when it was in fact working. The problem was that my main() was ending immediately. The async feature must call a daemon thread. I extended the life of my main() and I saw that the async feature worked as expected. One more follow up question: For each async get(), is there a separate thread that is launched with a one-to-one ratio of thread per request. Thanks again, -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054445
Using Asynch setOnResponse
Hi,I am trying to use and understand the asynchronous client callback. Here is code sections: - //In the main: ClientResource cr = new ClientResource(myurl); cr.setOnResponse(new MyUniform()); //cr.get(); cr.getOnResponse(); System.out.println(done with main); //In the MyUniform class public void handle(Request request, Response response) { try { String text = response.getEntity().getText(); System.out.println(text); } catch (Exception e) { e.printStackTrace(); } } I am not quite sure if I should use ClientResource.get or getOnResponse. It seems like I should use getOnResponse, but that is having no effect. If I use get(), it works, but not asynchronously, as it prints done with main after the response is obtained. Any thoughts on how I can set this up? Thanks, -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054435
RE: Re: Evaluating Restlet - few questions
Jerome, As always, thanks for your response. [1] The Jetty connector is production ready and much lighter than a full Servlet container. Great. I have noticed that Restlet runs pretty light, at least compared to tomcat (not much experience with Jetty servlet container). But, the very small heap stack I was seeing the RF+Jetty connector was motivation enough for me to switch to RF for the time being. [2] It is still a work in progress. Not sure to get this ready for RF 2.2 at this point. We need help on the documentation front mostly as most of the code has already been upgraded to the OAuth 2.0 final RFC. Sounds really good. In the future I may want to get involved in helping documenting Restlet. There were a few hicups I encountered when making the transition from a servlet rest system. More complete docs should help this. [3] Yes, it is possible using the callback mechanism. See this method: http://restlet.org/learn/javadocs/snapshot/jee/api/org/restlet/resource/ClientResource.html#setOnResponse(org.restlet.Uniform) This looks great! Did not seem much in the docs or user guide for this. When things calm down, I will take a look at it and see if I can piece together a tutorial. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054176
RE: Re: Setiting media type for webm videos
Thanks Jerome for pointing me in the right direction to debug the issue. I was mistaken, it was actually not a problem with webm videos, but in fact m4v videos (I was mistaken as which video was being fallen back to in the IE browser, I thought IE was falling back to webm, but was in fact falling back to m4v videos). Regardless, while it worked in other browsers, IE was not able to load the m4v videos from a restlet standalone because the media type needed a slight change. The following change worked fine and allows m4v HTML5 videos to load fine in IE another other browsers: getMetadataService().addExtension(m4v, new MediaType(video/mp4)); -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053962
Setiting media type for webm videos
Hi, I am trying to get HTML5 *.webm videos to play from a restlet server. I am using the latest stable with Jetty standalone with the FILE protocol on a directory. Other types of HTML5 videos play fine, but not webm videos, so I suppose it is a meida type problem. Looking at my old tomcat setup (videos played fine under tomcat), I see the following: mime-mapping extensionwebm/extension mime-typevideo/webm/mime-type /mime-mapping So, I tried to translate this to restlet with the following code, but it is still not working. Any ideas? public synchronized Restlet createInboundRoot() { MetadataService ms = new MetadataService(); ms.addCommonExtensions(); ms.addExtension(webm, new MediaType(video/webm)); ms.setEnabled(true); this.setMetadataService(ms); Router router = new Router(getContext()); // route codes here return router; } Thanks, -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053895
RE: Re: Re: redirect with get from post
Jerome, Thanks, that seems to make sense with the status codes. So, by changing the status codes upon a redirect after POST, that should work. -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053529
RE: Re: redirect with get from post
Jerome, thanks for your reply. Yes, I was not aware of the html redirect, as I have always used server side. I suppose that would work, but it does seem that serverside is a more recommended method. My pattern is that an HTML FORM submits a POST, and depending on the circumstance, issues a redirect. This pattern always worked fine using servlets. Switching to Restlet caused a bit of a problem in this area as it was forcing a POST redirect. Too bad we can't designate the redirect method. Is there something in REST or HTTP that dictates against changing methods on a redirect? Regardless, I have found Restlets to be a great framework and I am currently in the process of switching some major code base over to the framework. Thanks again, -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053474
redirect with get from post
Hi, I have a post request, and after that request I need to temporarily redirect to another page. However, I need that redirect to be a GET not a POST. I see in the docs that the redirect uses the same method, which in this case is a POST. Is there any way to change the method being used to a GET? Thanks, -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053244
Evaluating Restlet - few questions
This is my fist message on the restlet discussion. First, I just want to say thanks to the developers of Restlet. It seems like a great api and framework. We are evaluating Restlet, and we have a few general questions. I apologize if the questions are a bit diverse, but I thought I would just send them in one message. [1] Jetty Connector vs Servlet Container: We would like to use the Jetty connector as a standalone outside of a servlet container. Is Restlet standalone with Jetty as stable as using a servlet, or is a servlet container preferred for production? [2] The book mentions that Oauth 2.0 is in draft. Is Oauth 2.0 nearing production code? Not rushing, just wondering? [3] Is there any way to handle Ascynhrous Client requests. Considering that our webserver is also a client to other servers, the client needs to consume other restful services. Is there anyway to consume services in a non blocking or ascyh manner, so as to not keep the threads blocking. If so, can someone point me into the direction of code example. Thanks, -Adam -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3052727