Is Restlet application distributed ?
Hi All, We are going implement a application using Restlet. In this, We need a requirement like distributed system or mechanism. Our Restlet application having different components(modules) which needs to run on different servers(machines). For example, I have 3 different modules which are installed in different machines. In this, there is main module(other than above 3 modules) which needs to identify an incoming request and process the request to corresponding server(module). Could you please suggest me how do i setup to meet my requirement i.e. How to identify the routing for different servers. I would like to know whether Restlet supports or not? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703781
Restlet speed
Restlet does not seem to run as fast as I would expect. I was hoping someone could point me how to get it running faster. Looking at the examples, I've created a simple server: import org.restlet.Server; import org.restlet.data.Protocol; import org.restlet.resource.Get; import org.restlet.resource.ServerResource; public class SimpleServer extends ServerResource { public static void main(String[] args) throws Exception { // Create the HTTP server and listen on port 8182 new Server(Protocol.HTTP, 8182, SimpleServer.class).start(); } @Get public String toString() { return hello, world; } } I also have created a simple client: import java.io.IOException; import org.restlet.resource.ClientResource; public class SimpleClient { public static void main(String [] args) throws IOException { // Create the client resource ClientResource resource = new ClientResource(http://localhost:8182;); // Write the response entity on the console long startTime = System.nanoTime(); // If getMethod 1 is used, I get 3.12 seconds. // Setting getMethod 2 results in 2.30 seconds. int getMethod = 2; for( int i=0; i 10; i++) { if( getMethod == 1 ) resource.get().write(System.out); else new ClientResource(http://localhost:8182 ).get().write(System.out); } long endTime = System.nanoTime(); System.out.println( (endTime-startTime) / 10.0); } } If both are running on the same system, I get can process 10 requests in 2.3 or 3.1 seconds depending on the method used. I'm not sure why creating a new client resource is faster than reusing the old one. At any rate, I was hoping to run at least 100 in one second. Any thoughts on why this is slow? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703772
RE: Problem using android 2.0.4 and apache http client with HTTPS
Any word on why it was removed? and more relevantly is it safe to use? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703914
Question about Complete Web Server
Hello Everyone, I am new to Restlets and the java Restful coding seen. I had a question about the Complete Web Server feature that is listed for the Restlet Framework. Is this build in web server enterprise or high traffic capable or do you need an implementation of Tomcat, Glassfish ect... to do something that would be getting high traffic or use? Jason Richards System Administrator Signature Card Operations 108 SASB 801.422.4652 THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential infromation intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, dirtribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703983
RE: Restlet speed
Hi Paul, If you are using version 2.0, I would suggest using one of the pluggable HTTP connectors (“org.restlet.ext.net” or “org.restlet.ext.httpclient”) to get production level performances. The internal/default connector is only intended for development/test purpose or small loads). In version 2.1, we are radically improving this connector though. Let us know if this helps. Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com/ http://www.noelios.com De : Paul Vincent Craven [mailto:p...@cravenfamily.com] Envoyé : lundi 14 février 2011 04:26 À : discuss@restlet.tigris.org Objet : Restlet speed Restlet does not seem to run as fast as I would expect. I was hoping someone could point me how to get it running faster. Looking at the examples, I've created a simple server: import org.restlet.Server; import org.restlet.data.Protocol; import org.restlet.resource.Get; import org.restlet.resource.ServerResource; public class SimpleServer extends ServerResource { public static void main(String[] args) throws Exception { // Create the HTTP server and listen on port 8182 new Server(Protocol.HTTP, 8182, SimpleServer.class).start(); } @Get public String toString() { return hello, world; } } I also have created a simple client: import java.io.IOException; import org.restlet.resource.ClientResource; public class SimpleClient { public static void main(String [] args) throws IOException { // Create the client resource ClientResource resource = new ClientResource(http://localhost:8182;); // Write the response entity on the console long startTime = System.nanoTime(); // If getMethod 1 is used, I get 3.12 seconds. // Setting getMethod 2 results in 2.30 seconds. int getMethod = 2; for( int i=0; i 10; i++) { if( getMethod == 1 ) resource.get().write(System.out); else new ClientResource(http://localhost:8182;).get().write(System.out); } long endTime = System.nanoTime(); System.out.println( (endTime-startTime) / 10.0); } } If both are running on the same system, I get can process 10 requests in 2.3 or 3.1 seconds depending on the method used. I'm not sure why creating a new client resource is faster than reusing the old one. At any rate, I was hoping to run at least 100 in one second. Any thoughts on why this is slow? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703984
RE: Is Restlet application distributed ?
Hi Komara, On which basis do you intend to route an incoming request to the correct module? Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com/ http://www.noelios.com De : komara nagarjuna [mailto:komaranagarj...@gmail.com] Envoyé : lundi 14 février 2011 05:54 À : discuss@restlet.tigris.org Objet : Is Restlet application distributed ? Hi All, We are going implement a application using Restlet. In this, We need a requirement like distributed system or mechanism. Our Restlet application having different components(modules) which needs to run on different servers(machines). For example, I have 3 different modules which are installed in different machines. In this, there is main module(other than above 3 modules) which needs to identify an incoming request and process the request to corresponding server(module). Could you please suggest me how do i setup to meet my requirement i.e. How to identify the routing for different servers. I would like to know whether Restlet supports or not? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703985
RE: Question about Complete Web Server
Hi Jason, In version 2.0, there are two pieces you need for this : · The Directory class to serve static files · The Jetty or Simple pluggable connectors (not used as Servlet containers, but as standalone connectors) In version 2.1, our goal is to have an internal HTTP server that is as scalable as the connectors above. In term of references, we have been running http://www.restlet.org for years with this set-up without any trouble and know at least on large site (Overstock.com) using it in such configuration (see public presentation at JavaOne 2008). Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com/ http://www.noelios.com De : Jason Richards [mailto:jason_richa...@byu.edu] Envoyé : lundi 14 février 2011 18:06 À : discuss@restlet.tigris.org Objet : Question about Complete Web Server Hello Everyone, I am new to Restlets and the java Restful coding seen. I had a question about the “Complete Web Server” feature that is listed for the Restlet Framework. Is this build in web server enterprise or high traffic capable or do you need an implementation of Tomcat, Glassfish ect… to do something that would be getting high traffic or use? Jason Richards System Administrator Signature Card Operations 108 SASB 801.422.4652 THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential infromation intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, dirtribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703987
Need noob help
I have coded myself into a hole and need some help out. I would try and post a question with code but seriously, I am not sure where I went wrong at this point. Is there someone who has implemented a Restlet solution that could help me off line? Both from shame and kindness I do not want to pollute the board with my ignorance. Thanks in advance. Scott Shea -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703986
catching parse exception using converter service
Hi! I'm using Restlet 2.0.4 with a converterService (Jackson). Problem is when I receive a Json object with a parse exception, it is not caught in the StatusService (which already works with any other exception that occurs within the resource) Example: WARNING: Unable to parse the object with Jackson. org.codehaus.jackson.map.JsonMappingException: Unrecognized field asd (Class com.example.ClassDTO), not marked as ignorable at [Source: org.restlet.engine.http.io.UnclosableInputStream@15e33df; line: 1, column: 2] I'd like to catch it in the StatusService to set the response with an error message. Thanks! -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/catching-parse-exception-using-converter-service-tp6024668p6024668.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703993
RE: Need noob help
Hi Scott, For private support, you can consider our professional services: http://www.noelios.com/products/support Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com -Message d'origine- De : Scott Shea [mailto:scott.s...@apollogrp.edu] Envoyé : lundi 14 février 2011 18:31 À : discuss@restlet.tigris.org Objet : Need noob help I have coded myself into a hole and need some help out. I would try and post a question with code but seriously, I am not sure where I went wrong at this point. Is there someone who has implemented a Restlet solution that could help me off line? Both from shame and kindness I do not want to pollute the board with my ignorance. Thanks in advance. Scott Shea -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703986 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703994
Re: catching parse exception using converter service
I'm getting also as a response of the request a 415 http code UnsupportedMediaType which is not true since the Type is correct -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/catching-parse-exception-using-converter-service-tp6024668p6024796.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2703995
RE: Need noob help
Hello Scott, if you need some help inline, you can have a look at the user guide: http://wiki.restlet.org/docs_2.0/318-restlet.html Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2704005
RE: Re: catching parse exception using converter service
Hello, I think that, for the moment, these kind of parsing errors are actually caught as unsupported media type error. Perhaps, this kind of exception should not be wrapped and hidden. I've entered an issue for that: http://restlet.tigris.org/issues/show_bug.cgi?id=1238 Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2704007
RE: Is Restlet application distributed ?
Hi Jerome, My Restlet application would have a common Gateway and the underlying functionality will be provided by different modules. For scalability reasons, different underlying modules will be hosted on different servers. Each server knows where different modules are hosted. So when the Gateway receives the request, based on the URL it knows which module will service the request and which server it needs to be routed to, based on the information it knows about which server is hosting which module. The sessions will also be managed commonly across all servers. So in order to make this routing possible, router.attach needs some kind of redirection to a different URL so that request ends up on correct server. Can you please help us on how to set this up in Restlet? Regards, Komara. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2704198