Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mark Thomas
On 16/01/2013 13:19, Remy Maucherat wrote: > On Wed, 2013-01-16 at 12:08 +, Mark Thomas wrote: >>> It is not really a bug: only the newer Windows (Vista+) have efficient >>> polling. With previous versions, small pollsets have to be used because >>> (apparently) it can only poll over 64 sockets

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Remy Maucherat
On Wed, 2013-01-16 at 12:08 +, Mark Thomas wrote: > > It is not really a bug: only the newer Windows (Vista+) have efficient > > polling. With previous versions, small pollsets have to be used because > > (apparently) it can only poll over 64 sockets at a time. If the size is > > over 1000, the

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mladen Turk
On 01/16/2013 01:05 PM, Remy Maucherat wrote: On Wed, 2013-01-16 at 11:43 +, Mark Thomas wrote: It is not really a bug: only the newer Windows (Vista+) have efficient polling. With previous versions, small pollsets have to be used because (apparently) it can only poll over 64 sockets at a ti

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mark Thomas
On 16/01/2013 12:05, Remy Maucherat wrote: > On Wed, 2013-01-16 at 11:43 +, Mark Thomas wrote: >>> Using multiple pollsets is only needed on some platforms (Windows ...), >>> and it is possible it is not supposed to be mandatory now (Windows >>> should be able to handle large pollsets now). So

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Remy Maucherat
On Wed, 2013-01-16 at 11:43 +, Mark Thomas wrote: > > Using multiple pollsets is only needed on some platforms (Windows ...), > > and it is possible it is not supposed to be mandatory now (Windows > > should be able to handle large pollsets now). So if you accept to drop > > support for running

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mark Thomas
On 16/01/2013 10:43, Remy Maucherat wrote: > On Wed, 2013-01-16 at 09:35 +, Mark Thomas wrote: >> That would be really nice. What I'd need is this: >> >> int removeFromPollset(long socket) >> >> where the return value is either -ve for an error code or +ve for the >> current flags. >> >> Lookin

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Remy Maucherat
On Wed, 2013-01-16 at 09:35 +, Mark Thomas wrote: > That would be really nice. What I'd need is this: > > int removeFromPollset(long socket) > > where the return value is either -ve for an error code or +ve for the > current flags. > > Looking at the code, by the time I have finished the oth

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Remy Maucherat
On Wed, 2013-01-16 at 07:50 +0100, Mladen Turk wrote: > On 01/15/2013 02:29 PM, Mark Thomas wrote: > > Hi, > > > > 3. Currently, we have no record of which Poller a socket is registered > > with. This makes 2) more expensive as we have to iterate through the > > Pollers to find the socket. Tracking

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-16 Thread Mark Thomas
On 16/01/2013 06:50, Mladen Turk wrote: > On 01/15/2013 02:29 PM, Mark Thomas wrote: >> Hi, >> >> 3. Currently, we have no record of which Poller a socket is registered >> with. This makes 2) more expensive as we have to iterate through the >> Pollers to find the socket. Tracking the current poller

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-15 Thread Mladen Turk
On 01/15/2013 02:29 PM, Mark Thomas wrote: Hi, 3. Currently, we have no record of which Poller a socket is registered with. This makes 2) more expensive as we have to iterate through the Pollers to find the socket. Tracking the current poller used by a socket would make 2) a cheaper operation.

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-15 Thread Mark Thomas
On 15/01/2013 21:26, Remy Maucherat wrote: > On Tue, 2013-01-15 at 19:26 +, Mark Thomas wrote: >>> I had to solve each of these issues in the web container of JBoss. >>> Although this is not going to be quite 100% compatible with Tomcat, it >>> is very similar. >>> >>> I recommend looking at th

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-15 Thread Remy Maucherat
On Tue, 2013-01-15 at 19:26 +, Mark Thomas wrote: > >I had to solve each of these issues in the web container of JBoss. > >Although this is not going to be quite 100% compatible with Tomcat, it > >is very similar. > > > >I recommend looking at the branch that is in AS 7 trunk: > >http://anonsvn

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-15 Thread Mark Thomas
Remy Maucherat wrote: >On Tue, 2013-01-15 at 13:29 +, Mark Thomas wrote: >> Hi, >> >> I think I am going to need to refactor the APR Poller code. Before I >get >> to far down that road I wanted to get a sanity check from those that >> understand the APR/native connector better than I do. >>

Re: APR, WebSocket and Servlet 3.1 NIO refactoring

2013-01-15 Thread Remy Maucherat
On Tue, 2013-01-15 at 13:29 +, Mark Thomas wrote: > Hi, > > I think I am going to need to refactor the APR Poller code. Before I get > to far down that road I wanted to get a sanity check from those that > understand the APR/native connector better than I do. > > The main problem: > - I need