WebSocket status

2012-02-28 Thread Mark Thomas
WebSocket is working with good performance and passing all Autobahn tests on BIO, NIO and APR. Currently, all three connectors using blocking IO throughout so there is a one to one mapping between threads and connections. Therefore, scalability is not what it could be for NIO and APR. The remaini

Re: WebSocket status

2012-02-28 Thread Filip Hanik - Dev Lists
On 2/28/2012 4:08 AM, Mark Thomas wrote: WebSocket is working with good performance and passing all Autobahn tests on BIO, NIO and APR. Currently, all three connectors using blocking IO throughout so there is a one to one mapping between threads and connections. Therefore, scalability is not wha

Re: WebSocket status

2012-02-28 Thread Mark Thomas
On 28/02/2012 16:58, Filip Hanik - Dev Lists wrote: > On 2/28/2012 4:08 AM, Mark Thomas wrote: >> WebSocket is working with good performance and passing all Autobahn >> tests on BIO, NIO and APR. >> >> Currently, all three connectors using blocking IO throughout so there is >> a one to one mapping

Re: WebSocket status

2012-02-28 Thread Filip Hanik - Dev Lists
On 2/28/2012 11:39 AM, Mark Thomas wrote: On 28/02/2012 16:58, Filip Hanik - Dev Lists wrote: On 2/28/2012 4:08 AM, Mark Thomas wrote: WebSocket is working with good performance and passing all Autobahn tests on BIO, NIO and APR. Currently, all three connectors using blocking IO throughout so

Re: WebSocket status

2012-02-28 Thread Mark Thomas
On 28/02/2012 18:53, Filip Hanik - Dev Lists wrote: > On 2/28/2012 11:39 AM, Mark Thomas wrote: >> You may also be able to help with some problems I am having getting >> non-blocking behaviour between messages with NIO. I'm not 100% clear >> what is happening yet, but I think it is something like:

Re: WebSocket status

2012-03-01 Thread Mark Thomas
On 28/02/2012 21:29, Mark Thomas wrote: > On 28/02/2012 18:53, Filip Hanik - Dev Lists wrote: >> On 2/28/2012 11:39 AM, Mark Thomas wrote: > >>> You may also be able to help with some problems I am having getting >>> non-blocking behaviour between messages with NIO. I'm not 100% clear >>> what is

Re: WebSocket status

2012-03-01 Thread Mark Thomas
On 01/03/2012 11:31, Mark Thomas wrote: > On 28/02/2012 21:29, Mark Thomas wrote: >> On 28/02/2012 18:53, Filip Hanik - Dev Lists wrote: >>> On 2/28/2012 11:39 AM, Mark Thomas wrote: >> You may also be able to help with some problems I am having getting non-blocking behaviour between mess

Re: WebSocket status

2012-03-01 Thread Filip Hanik - Dev Lists
On 3/1/2012 5:33 AM, Mark Thomas wrote: On 01/03/2012 11:31, Mark Thomas wrote: On 28/02/2012 21:29, Mark Thomas wrote: On 28/02/2012 18:53, Filip Hanik - Dev Lists wrote: On 2/28/2012 11:39 AM, Mark Thomas wrote: You may also be able to help with some problems I am having getting non-blockin

Re: WebSocket status

2012-03-01 Thread Filip Hanik - Dev Lists
I have a draft patch [1] that seems to fix this. A similar change would be required for the Comet part of Poller.processKey() Thoughts and/or comments? Not knowing the NIO code very well, there might be a better way to achieve the same result that I haven't seen. Mark [1] http://people.apache

Re: WebSocket status

2012-03-01 Thread Mark Thomas
On 01/03/2012 15:03, Filip Hanik - Dev Lists wrote: > >> I have a draft patch [1] that seems to fix this. A similar change would >> be required for the Comet part of Poller.processKey() >> >> Thoughts and/or comments? Not knowing the NIO code very well, there >> might be a better way to achieve th

Re: WebSocket status

2012-03-01 Thread Filip Hanik - Dev Lists
Mark, what buffer size are you referring to increase for the web socket tests to all pass? Filip On 3/1/2012 9:42 AM, Mark Thomas wrote: On 01/03/2012 15:03, Filip Hanik - Dev Lists wrote: I have a draft patch [1] that seems to fix this. A similar change would be required for the Comet part o

Re: WebSocket status

2012-03-01 Thread Mark Thomas
On 01/03/2012 17:13, Filip Hanik - Dev Lists wrote: > Mark, what buffer size are you referring to increase for the web socket > tests to all pass? Sorry, should have been clearer about that. In o.a.c.websocket.MessageInbound // 2MB - like maxPostSize private int byteBufferMaxSize = 20971

Re: WebSocket status

2012-03-01 Thread Filip Hanik - Dev Lists
I see, MessageInbound has hard coded receive buffers. Got it Filip On 3/1/2012 10:13 AM, Filip Hanik - Dev Lists wrote: Mark, what buffer size are you referring to increase for the web socket tests to all pass? Filip On 3/1/2012 9:42 AM, Mark Thomas wrote: On 01/03/2012 15:03, Filip Hanik -

Re: WebSocket status

2012-03-01 Thread Filip Hanik - Dev Lists
On 2/28/2012 11:39 AM, Mark Thomas wrote: Thanks for the feedback. You may also be able to help with some problems I am having getting non-blocking behaviour between messages with NIO. I'm not 100% clear what is happening yet, but I think it is something like: - HTTP GET (with upgrade request ar

Re: WebSocket status

2012-03-01 Thread Mark Thomas
On 01/03/2012 18:01, Filip Hanik - Dev Lists wrote: > Alright, now that I'm all squared away with Autobahn and test cases > running. Is there a specific unit test you have to produce this behavior? > That would help me for digging through it. Assuming you are running trunk, then what you'll curren

Re: WebSocket status

2012-03-01 Thread Mark Thomas
On 01/03/2012 18:00, Filip Hanik - Dev Lists wrote: > I see, MessageInbound has hard coded receive buffers. Got it They are configurable, they just aren't currently configured. I've been meaning to apply a patch that would add some commented out configuration to the examples webapp so it can just

Re: WebSocket status

2012-03-01 Thread Costin Manolache
On Thu, Mar 1, 2012 at 9:54 AM, Mark Thomas wrote: > On 01/03/2012 17:13, Filip Hanik - Dev Lists wrote: > > Mark, what buffer size are you referring to increase for the web socket > > tests to all pass? > > Sorry, should have been clearer about that. > > In o.a.c.websocket.MessageInbound > >

Re: WebSocket status

2012-03-01 Thread Mark Thomas
On 01/03/2012 18:22, Costin Manolache wrote: > On Thu, Mar 1, 2012 at 9:54 AM, Mark Thomas wrote: > >> On 01/03/2012 17:13, Filip Hanik - Dev Lists wrote: >>> Mark, what buffer size are you referring to increase for the web socket >>> tests to all pass? >> >> Sorry, should have been clearer about

Re: WebSocket status

2012-03-01 Thread Filip Hanik - Dev Lists
hi Mark, sorry, I know you posted this earlier, thanks for reposting it to set me straight. Yes, it can make sense that you see the behavior you are. But in "theory" you shouldn't. If you call readSocket(false,bytes,off,maxRead), all the socket does is that it checks in the OS socket buffer to

Re: WebSocket status

2012-03-02 Thread Mark Thomas
On 01/03/2012 22:55, Filip Hanik - Dev Lists wrote: > You can't register on a selector using another thread. Bingo. That explains it. Is that documented anywhere? I don't recall reading it but I may well have missed it. Looking at the code, it looks like HTTP would have been unaffected which is go

Re: WebSocket status

2012-03-02 Thread Filip Hanik - Dev Lists
On 3/2/2012 2:13 AM, Mark Thomas wrote: You can't register on a selector using another thread. Bingo. That explains it. Is that documented anywhere? I'm not sure if the java.nio documentation says it, I think it does. The Selector object is not thread safe. trying to manipulate interestops and

Re: WebSocket status

2012-03-08 Thread Johno Crawford
On 2/03/2012 2:29 PM, Filip Hanik - Dev Lists wrote: On 3/2/2012 2:13 AM, Mark Thomas wrote: You can't register on a selector using another thread. Bingo. That explains it. Is that documented anywhere? I'm not sure if the java.nio documentation says it, I think it does. The Selector object is

Re: WebSocket status

2012-03-08 Thread Costin Manolache
Speaking of thread safety, in the APR connector, when SSL is used, it may be possible to hit some problems if read and write are called at same time from different threads on same socket - SSL_read and SSL_write share the same context and apparently are not safe. I don't know if websocket allows a

Re: WebSocket status

2012-03-08 Thread Mark Thomas
On 08/03/2012 09:12, Johno Crawford wrote: > What's next / left on the TODO list Mark? Anything I can help out with? Porting the generic HTTP upgrade followed by the WebSocket code to 7.0.x. I don't think there is much for you to do there. WebSocket needs some documentation. My plan was to keep i

Re: WebSocket status

2012-03-14 Thread Johno Crawford
On 8/03/2012 9:10 PM, Mark Thomas wrote: On 08/03/2012 09:12, Johno Crawford wrote: What's next / left on the TODO list Mark? Anything I can help out with? Porting the generic HTTP upgrade followed by the WebSocket code to 7.0.x. I don't think there is much for you to do there. WebSocket needs

Re: WebSocket status

2012-03-14 Thread Mark Thomas
On 14/03/2012 10:15, Johno Crawford wrote: > On 8/03/2012 9:10 PM, Mark Thomas wrote: >> On 08/03/2012 09:12, Johno Crawford wrote: >>> What's next / left on the TODO list Mark? Anything I can help out with? >> Porting the generic HTTP upgrade followed by the WebSocket code to >> 7.0.x. I don't thi

Re: WebSocket status

2012-03-14 Thread Filip Hanik - Dev Lists
On 3/14/2012 8:14 AM, Mark Thomas wrote: On 14/03/2012 10:15, Johno Crawford wrote: On 8/03/2012 9:10 PM, Mark Thomas wrote: On 08/03/2012 09:12, Johno Crawford wrote: What's next / left on the TODO list Mark? Anything I can help out with? Porting the generic HTTP upgrade followed by the WebS