John D. Mitchell | 1 Feb 09:08 2010
Picon

Re: URGENT - Restlets Gurus

On Jan 30, 2010, at 03:16 , Leonardo Ribeiro Queiros wrote:
[...]
>   The access of the web service had a high performance when only ONE  
> client was using it. However, We had problems when we had more than  
> only one client at the same time using the web service. For ONE  
> client the time for request was 20 ms, but for FIVE clients it was  
> 10 s and for 50 clients it was 40 s.

Sounds like you have a nasty contention in your resource  
implementation. What's behind it?

>   We are really worried about the performance for more than one  
> client because we have been working on this web service for more  
> than ONE YEAR. We need to solve this problem urgently to try to put   
> the web service in production.
>   We are using the Restlet 1 and  Simple conector. The clients  
> aplications request the Web Service with AJAX to autocomplete a  
> TextArea with a list of terms. The response of  Web service's XML is  
> small - 4K.

Why are you using the Simple connector?  I'd strongly suggest  
switching to Jetty.

Where is the data coming from for the XML? Is the nasty contention  
there or in how you're using whatever it is?

>   After a lot of research, We suspect that the bad performance  
> happens because the Restlet 1 is synchronous and if We try to  
> migrate to the Restlet 2 We maybe solve the problem. To do this  
> migration my staff will spend a lot of time so, I would like to know  
(Continue reading)

Tobias Girschick | 1 Feb 09:42 2010
Picon

Re: migration from 1.x to 2.0

Hi Jerome,

I started to migrate to 2.0m7 now and I have an issue:
If I call the getRequest().getRootRef().getIdentifier() method in the
constructor of my Resource I get a java.lang.NullPointerException. 
My Resource extends the ServerResource class and that's what I do:

public AlgorithmResource() {
super();
System.out.println("TEST: " +getRequest().getRootRef().getIdentifier());
}

 <at> Get("html")
public Representation toHtml(){
... some code ...
}

Has the way to get the root (or resource) uri changed from 1.1 to 2.0?

Best Regards
Tobias

On Tue, 2010-01-05 at 22:29 +0000, Jerome Louvel wrote: 
> Hi Tobias,
> 
> We haven't fully documented the migration guide yet. We will work on
> that after our 2.0 RC1 release due this month. For now, here is the
> early draft version available:
> http://wiki.restlet.org/docs_2.0/13-restlet/171-restlet/155-restlet.html
> 
(Continue reading)

Thierry Boileau | 1 Feb 11:33 2010

Re: Simple or jetty connectors

Hello Xavier,

you can find information in the user guide about about to integrate such connectors (client or server) in your applications, and how to configure their specific parameters.
Please note that using one connector or one another has no impact on the way you code your application. They integrate transparently inside the Restlet API and provide only a set of specific parameters (specific to the underlying technology: jetty, simple, grizzly, netty, etc.).

Best regards,
Thierry Boileau

Hello,
Do you know where I could find information/examples about the use of the simple or jetty connectors? More broadly, is there any tutorial about the use of connectors (client or server)?
Thanks in advance
regards
Xavier
Thierry Boileau | 1 Feb 11:36 2010

Re: Simple or jetty connectors

Hi Xavier,

I forgot the link to the documentation:
http://wiki.restlet.org/docs_2.0/37-restlet.html

Best regards,
Thierry Boileau



Hello Xavier,

you can find information in the user guide about about to integrate such connectors (client or server) in your applications, and how to configure their specific parameters.
Please note that using one connector or one another has no impact on the way you code your application. They integrate transparently inside the Restlet API and provide only a set of specific parameters (specific to the underlying technology: jetty, simple, grizzly, netty, etc.).

Best regards,
Thierry Boileau

Hello,
Do you know where I could find information/examples about the use of the simple or jetty connectors? More broadly, is there any tutorial about the use of connectors (client or server)?
Thanks in advance
regards
Xavier
Kirk Daries | 1 Feb 11:50 2010
Picon

M7 and the Restlet client

Hi,

Took me a while to understand why my test cases were failing but i tracked it down to the fact that the client by
default uses async processing under the hood now. Is there any way to turn on or off this feature?

My test cases at the moment create the client once and then reuse the object for subsequent http calls.  

Right now, i've gotten around this by calling client.stop() and client.start() before each use. Is this
the correct way of using it?

Regards,
--KD

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2443759

Xavier Méhaut | 1 Feb 12:04 2010
Picon

Re: Simple or jetty connectors

Thanks Thierry

2010/2/1 Thierry Boileau <thierry.boileau <at> noelios.com>
Hi Xavier,

I forgot the link to the documentation:
http://wiki.restlet.org/docs_2.0/37-restlet.html


Best regards,
Thierry Boileau



Hello Xavier,

you can find information in the user guide about about to integrate such connectors (client or server) in your applications, and how to configure their specific parameters.
Please note that using one connector or one another has no impact on the way you code your application. They integrate transparently inside the Restlet API and provide only a set of specific parameters (specific to the underlying technology: jetty, simple, grizzly, netty, etc.).

Best regards,
Thierry Boileau

Hello,
Do you know where I could find information/examples about the use of the simple or jetty connectors? More broadly, is there any tutorial about the use of connectors (client or server)?
Thanks in advance
regards
Xavier

Xavier Méhaut | 1 Feb 12:21 2010
Picon

GWT RPC servlet next to the gwt RESTLET

Hello,
I wonder how to mix in the same application serverside RPC servlet and calls to restlets, ie I have a GWT GUI which calls either a GWT RPC service or a remote restlet... The only I found up to now, is to run the application in a Servlet container by usisng the servlet connector... but I would prefer launching a RESTLET application which could manage both cases described above.
regards
Xavier

Thierry Boileau | 1 Feb 12:28 2010

Re: Suspended thread doing Client.put

Hi Jeff,

could make a test with the 2.0m7? It helpes to automatically release connection once the entity has been handled.

Best regards,
Thierry Boileau

Yes, we made sure to update and we did notice that there were recent changes to the latch code.
 
-jeff
Hello Jeff,

did you try the latest snapshot (the internal connectors have been updated a few days ago)?

Best regards,
Thierry Boileau

We're seeing the vm blocking forever on a call to Client.put that worked fine on an earlier release of 2.0-SNAPSHOT: Thread [main] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park(Object) line: 158 CountDownLatch$Sync(AbstractQueuedSynchronizer).parkAndCheckInterrupt() line: 747 [local variables unavailable] CountDownLatch$Sync(AbstractQueuedSynchronizer).doAcquireSharedInterruptibly(int) line: 905 CountDownLatch$Sync(AbstractQueuedSynchronizer).acquireSharedInterruptibly(int) line: 1217 CountDownLatch.await() line: 207 [local variables unavailable] HttpClientHelper(BaseClientHelper).handle(Request, Response) line: 490 Client.handle(Request, Response) line: 268 Client.handle(Request) line: 259 Client.put(Reference, Representation) line: 508 Any ideas? Has anyone else seen this behavior? -jeff ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2442913
Jerome Louvel | 1 Feb 12:52 2010

RE: Simple or jetty connectors

Hi Xavier,

 

In addition to the online docs, we are about to publish chapter 4 of the “Restlet in Action” book which covers those aspects with example code.

 

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~
http://www.noelios.com

 

 

 

 

De : xavier.mehaut <at> gmail.com [mailto:xavier.mehaut <at> gmail.com] De la part de Xavier Méhaut
Envoyé : lundi 1 février 2010 12:04
À : discuss <at> restlet.tigris.org
Objet : Re: Simple or jetty connectors

 

Thanks Thierry

2010/2/1 Thierry Boileau <thierry.boileau <at> noelios.com>

Hi Xavier,

I forgot the link to the documentation:
http://wiki.restlet.org/docs_2.0/37-restlet.html



Best regards,
Thierry Boileau




Hello Xavier,

you can find information in the user guide about about to integrate such connectors (client or server) in your applications, and how to configure their specific parameters.
Please note that using one connector or one another has no impact on the way you code your application. They integrate transparently inside the Restlet API and provide only a set of specific parameters (specific to the underlying technology: jetty, simple, grizzly, netty, etc.).

Best regards,
Thierry Boileau


Hello,
Do you know where I could find information/examples about the use of the simple or jetty connectors? More broadly, is there any tutorial about the use of connectors (client or server)?
Thanks in advance
regards
Xavier

 

Thierry Boileau | 1 Feb 12:54 2010

Re: migration from 1.x to 2.0

Hi Tobias,

could you override the ServerResource#doInit method instead of the constructor?

Best regards,
Thierry Boileau


Hi Jerome, I started to migrate to 2.0m7 now and I have an issue: If I call the getRequest().getRootRef().getIdentifier() method in the constructor of my Resource I get a java.lang.NullPointerException. My Resource extends the ServerResource class and that's what I do: public AlgorithmResource() { super(); System.out.println("TEST: " +getRequest().getRootRef().getIdentifier()); } <at> Get("html") public Representation toHtml(){ ... some code ... } Has the way to get the root (or resource) uri changed from 1.1 to 2.0? Best Regards Tobias On Tue, 2010-01-05 at 22:29 +0000, Jerome Louvel wrote:
Hi Tobias, We haven't fully documented the migration guide yet. We will work on that after our 2.0 RC1 release due this month. For now, here is the early draft version available: http://wiki.restlet.org/docs_2.0/13-restlet/171-restlet/155-restlet.html Please, let us know if you have any issue. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com 2010/1/4 <webpost <at> tigris.org>
Hello, I see that the restlet framework in version 2.0m6 has certainly more and better features than the old 1.1 version I am using. I wonder how difficult it is, to migrate to restlet 2.0 as it seems some API changes have taken place? best regards Tobias ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2434634
------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2435029

Gmane