You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Philippe Mouawad <ph...@gmail.com> on 2013/01/06 00:50:55 UTC

Support of websocket ?

Hello,

Shouldn't we start implementing something for Websockets ?

I looked at it and this one seems interesting but license may be an issue:

- http://jwebsocket.org/

Does httpcomponents have something around that ?

Regards
Philippe


-- 
Cordialement.
Philippe Mouawad.

Re: Support of websocket ?

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,

I started looking at this point.
Here what I plan to implement:

   - New Websocket Sampler using Jetty
   - GUI config will have regular infos like path, host, port and a new
   "method" select box which will have the following values and effect:
      - connect => open connection to Websocket server &   store it in
      JMeterContext
      - send (send message) => will use connection to send message
      - close => Will close connection
   - I think I will be using this library for async behaviour:
      - http://code.google.com/p/guava-libraries/

It is still not clear for me what users would like to measure in these kind
of tests:

   - open response time ?
   - receive response time ?
   - What about servers ? would they close stream on first response ? or
   would they keep it open for the test ? or other option ?

Your ideas are welcome.


Regards

Philippe

On Wed, Jan 9, 2013 at 11:10 PM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

> Ok ,
>  jetty API looks clear to me.
> If nobody has an objection, it seems a good starting point.
>
> I will start something as soon as I have time.
>
> Regards
> Philippe
>
> On Sunday, January 6, 2013, Oleg Kalnichevski wrote:
>
>> On Sun, 2013-01-06 at 15:20 +0100, Philippe Mouawad wrote:
>> > Thanks Oleg, did you have the opportunity to play with it ?
>> >
>>
>> I used their CometD transport and was quite happy with it.
>>
>> > According to this:
>> > - http://webtide.intalio.com/2012/10/jetty-9-updated-websocket-api/
>> >
>> > => Requires Java 7, although I think this should not be a blocker as
>> Java 6
>> > will be in EOL within a couple of months.
>> > Only supporting WebSocket version 13 (RFC-6455) , from to what I
>> > understand, this should be fine as it seems it's the last version ?
>> > What is fine is that it should support JSR-356
>> >
>>
>> But as far as I understand that applies to Jetty 9 only, which is still
>> at an early stage of development.
>>
>> >
>> >
>> > Anyway, there seems to be a lot of projects:
>> >
>> >    -
>> >
>> http://java.net/projects/websocket-spec/lists/users/archive/2012-04/message/2
>> >
>> >
>> > AHC seems to provide some portability and can use netty (which has a
>> good
>> > reputation) as underlying impl:
>> >
>> >    -
>> >
>> http://jfarcand.wordpress.com/2012/05/28/writing-portable-websockets-application-using-java/
>> >    - http://sonatype.github.com/async-http-client/providers.html
>> >
>> >
>>
>> My _personal_ opinion of AHC as an HTTP client is quite low. Maybe it is
>> OK as a WebSockets client, though. My advice would still be to go with
>> Jetty 8.
>>
>> Oleg
>>
>>
>>
>
> --
> Cordialement.
> Philippe Mouawad.
>
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: Support of websocket ?

Posted by Philippe Mouawad <ph...@gmail.com>.
Ok ,
 jetty API looks clear to me.
If nobody has an objection, it seems a good starting point.

I will start something as soon as I have time.

Regards
Philippe

On Sunday, January 6, 2013, Oleg Kalnichevski wrote:

> On Sun, 2013-01-06 at 15:20 +0100, Philippe Mouawad wrote:
> > Thanks Oleg, did you have the opportunity to play with it ?
> >
>
> I used their CometD transport and was quite happy with it.
>
> > According to this:
> > - http://webtide.intalio.com/2012/10/jetty-9-updated-websocket-api/
> >
> > => Requires Java 7, although I think this should not be a blocker as
> Java 6
> > will be in EOL within a couple of months.
> > Only supporting WebSocket version 13 (RFC-6455) , from to what I
> > understand, this should be fine as it seems it's the last version ?
> > What is fine is that it should support JSR-356
> >
>
> But as far as I understand that applies to Jetty 9 only, which is still
> at an early stage of development.
>
> >
> >
> > Anyway, there seems to be a lot of projects:
> >
> >    -
> >
> http://java.net/projects/websocket-spec/lists/users/archive/2012-04/message/2
> >
> >
> > AHC seems to provide some portability and can use netty (which has a good
> > reputation) as underlying impl:
> >
> >    -
> >
> http://jfarcand.wordpress.com/2012/05/28/writing-portable-websockets-application-using-java/
> >    - http://sonatype.github.com/async-http-client/providers.html
> >
> >
>
> My _personal_ opinion of AHC as an HTTP client is quite low. Maybe it is
> OK as a WebSockets client, though. My advice would still be to go with
> Jetty 8.
>
> Oleg
>
>
>

-- 
Cordialement.
Philippe Mouawad.

Re: Support of websocket ?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2013-01-06 at 15:20 +0100, Philippe Mouawad wrote:
> Thanks Oleg, did you have the opportunity to play with it ?
> 

I used their CometD transport and was quite happy with it.

> According to this:
> - http://webtide.intalio.com/2012/10/jetty-9-updated-websocket-api/
> 
> => Requires Java 7, although I think this should not be a blocker as Java 6
> will be in EOL within a couple of months.
> Only supporting WebSocket version 13 (RFC-6455) , from to what I
> understand, this should be fine as it seems it's the last version ?
> What is fine is that it should support JSR-356
> 

But as far as I understand that applies to Jetty 9 only, which is still
at an early stage of development.

> 
> 
> Anyway, there seems to be a lot of projects:
> 
>    -
>    http://java.net/projects/websocket-spec/lists/users/archive/2012-04/message/2
> 
> 
> AHC seems to provide some portability and can use netty (which has a good
> reputation) as underlying impl:
> 
>    -
>    http://jfarcand.wordpress.com/2012/05/28/writing-portable-websockets-application-using-java/
>    - http://sonatype.github.com/async-http-client/providers.html
> 
> 

My _personal_ opinion of AHC as an HTTP client is quite low. Maybe it is
OK as a WebSockets client, though. My advice would still be to go with
Jetty 8.

Oleg



Re: Support of websocket ?

Posted by Philippe Mouawad <ph...@gmail.com>.
Thanks Oleg, did you have the opportunity to play with it ?

According to this:
- http://webtide.intalio.com/2012/10/jetty-9-updated-websocket-api/

=> Requires Java 7, although I think this should not be a blocker as Java 6
will be in EOL within a couple of months.
Only supporting WebSocket version 13 (RFC-6455) , from to what I
understand, this should be fine as it seems it's the last version ?
What is fine is that it should support JSR-356



Anyway, there seems to be a lot of projects:

   -
   http://java.net/projects/websocket-spec/lists/users/archive/2012-04/message/2


AHC seems to provide some portability and can use netty (which has a good
reputation) as underlying impl:

   -
   http://jfarcand.wordpress.com/2012/05/28/writing-portable-websockets-application-using-java/
   - http://sonatype.github.com/async-http-client/providers.html


sebb, regarding the implementation in JMeter as it is async, we should try
to make it maybe better than JMS part as if we do it the same it will
require a lot of Threads.



Regards
Philippe

On Sun, Jan 6, 2013 at 2:39 PM, Oleg Kalnichevski <ol...@apache.org> wrote:

> On Sun, 2013-01-06 at 14:24 +0100, Philippe Mouawad wrote:
> > Hello sebb,
> >
> > In their FAQ they say:
> >
> > *Q:* Can I use jWebSockets also for clients other than browsers?  *A:*
> Yes,
> > the jWebSocket technology is not limited to browser clients. We will
> > provide a Java WebSocket client soon.
> > Also see:
> >
> >    -
> >
> http://technology.amis.nl/2012/01/15/stand-alone-java-client-for-jwebsocket-server-communicating-from-java-client-to-web-clients-and-vice-versa-over-websockets/
> >
> >
> > There is an alternative with this one under Apache 2 license:
> >
> >    - http://sonatype.github.com/async-http-client/project-info.html
> >
> >
>
> I personally think Jetty should have the best websocket implementation,
> including client side, at this point. This is what I would advise going
> with.
>
>
> http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/websocket/WebSocketClient.html
> http://webtide.intalio.com/2011/09/jetty-websocket-client-api-updated/
>
> Oleg
>
> > Regards
> >
> > Philippe
> > On Sun, Jan 6, 2013 at 1:03 AM, sebb <se...@gmail.com> wrote:
> >
> > > On 5 January 2013 23:50, Philippe Mouawad <ph...@gmail.com>
> > > wrote:
> > > > Hello,
> > > >
> > > > Shouldn't we start implementing something for Websockets ?
> > > >
> > > > I looked at it and this one seems interesting but license may be an
> > > issue:
> > >
> > > It is an issue.
> > > Also the code seems to be written in JavaScript rather than Java?
> > >
> > > > - http://jwebsocket.org/
> > > >
> > > > Does httpcomponents have something around that ?
> > >
> > > I believe Tomcat are implementing the server side.
> > > Maybe there is some code there that could be useful for a client
> > > implementation.
> > >
> > > ==
> > >
> > > The protocol is asynchronous, so does not fit well with JMeter.
> > > We could perhaps treat it similarly to JMS Subscriber.
> > >
> > > > Regards
> > > > Philippe
> > > >
> > > >
> > > > --
> > > > Cordialement.
> > > > Philippe Mouawad.
> > >
> >
> >
> >
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: Support of websocket ?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sun, 2013-01-06 at 14:24 +0100, Philippe Mouawad wrote:
> Hello sebb,
> 
> In their FAQ they say:
> 
> *Q:* Can I use jWebSockets also for clients other than browsers?  *A:* Yes,
> the jWebSocket technology is not limited to browser clients. We will
> provide a Java WebSocket client soon.
> Also see:
> 
>    -
>    http://technology.amis.nl/2012/01/15/stand-alone-java-client-for-jwebsocket-server-communicating-from-java-client-to-web-clients-and-vice-versa-over-websockets/
> 
> 
> There is an alternative with this one under Apache 2 license:
> 
>    - http://sonatype.github.com/async-http-client/project-info.html
> 
> 

I personally think Jetty should have the best websocket implementation,
including client side, at this point. This is what I would advise going
with.

http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/websocket/WebSocketClient.html
http://webtide.intalio.com/2011/09/jetty-websocket-client-api-updated/

Oleg

> Regards
> 
> Philippe
> On Sun, Jan 6, 2013 at 1:03 AM, sebb <se...@gmail.com> wrote:
> 
> > On 5 January 2013 23:50, Philippe Mouawad <ph...@gmail.com>
> > wrote:
> > > Hello,
> > >
> > > Shouldn't we start implementing something for Websockets ?
> > >
> > > I looked at it and this one seems interesting but license may be an
> > issue:
> >
> > It is an issue.
> > Also the code seems to be written in JavaScript rather than Java?
> >
> > > - http://jwebsocket.org/
> > >
> > > Does httpcomponents have something around that ?
> >
> > I believe Tomcat are implementing the server side.
> > Maybe there is some code there that could be useful for a client
> > implementation.
> >
> > ==
> >
> > The protocol is asynchronous, so does not fit well with JMeter.
> > We could perhaps treat it similarly to JMS Subscriber.
> >
> > > Regards
> > > Philippe
> > >
> > >
> > > --
> > > Cordialement.
> > > Philippe Mouawad.
> >
> 
> 
> 



Re: Support of websocket ?

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello sebb,

In their FAQ they say:

*Q:* Can I use jWebSockets also for clients other than browsers?  *A:* Yes,
the jWebSocket technology is not limited to browser clients. We will
provide a Java WebSocket client soon.
Also see:

   -
   http://technology.amis.nl/2012/01/15/stand-alone-java-client-for-jwebsocket-server-communicating-from-java-client-to-web-clients-and-vice-versa-over-websockets/


There is an alternative with this one under Apache 2 license:

   - http://sonatype.github.com/async-http-client/project-info.html


Regards

Philippe
On Sun, Jan 6, 2013 at 1:03 AM, sebb <se...@gmail.com> wrote:

> On 5 January 2013 23:50, Philippe Mouawad <ph...@gmail.com>
> wrote:
> > Hello,
> >
> > Shouldn't we start implementing something for Websockets ?
> >
> > I looked at it and this one seems interesting but license may be an
> issue:
>
> It is an issue.
> Also the code seems to be written in JavaScript rather than Java?
>
> > - http://jwebsocket.org/
> >
> > Does httpcomponents have something around that ?
>
> I believe Tomcat are implementing the server side.
> Maybe there is some code there that could be useful for a client
> implementation.
>
> ==
>
> The protocol is asynchronous, so does not fit well with JMeter.
> We could perhaps treat it similarly to JMS Subscriber.
>
> > Regards
> > Philippe
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
>



-- 
Cordialement.
Philippe Mouawad.

Re: Support of websocket ?

Posted by sebb <se...@gmail.com>.
On 5 January 2013 23:50, Philippe Mouawad <ph...@gmail.com> wrote:
> Hello,
>
> Shouldn't we start implementing something for Websockets ?
>
> I looked at it and this one seems interesting but license may be an issue:

It is an issue.
Also the code seems to be written in JavaScript rather than Java?

> - http://jwebsocket.org/
>
> Does httpcomponents have something around that ?

I believe Tomcat are implementing the server side.
Maybe there is some code there that could be useful for a client implementation.

==

The protocol is asynchronous, so does not fit well with JMeter.
We could perhaps treat it similarly to JMS Subscriber.

> Regards
> Philippe
>
>
> --
> Cordialement.
> Philippe Mouawad.