Re: APR/native and per socket timeouts.

2012-05-21 Thread Mark Thomas
On 20/05/2012 21:47, Mladen Turk wrote: On 05/20/2012 08:37 PM, Mark Thomas wrote: Therefore, I intend modifying the APR/native code to support per socket time outs. I would be grateful if those of you with more C knowledge than I (which is most people on this list) could: a) tell me now if

Re: APR/native and per socket timeouts.

2012-05-21 Thread Costin Manolache
My understanding is that the timeout is implemented in poll.c maintain() - by scanning the socket list in C. Why not doing the same thing in java - i.e. don't touch native code, have all sockets 'long', and close whenever you need from java ? Costin On Mon, May 21, 2012 at 5:55 AM, Mark Thomas

Re: APR/native and per socket timeouts.

2012-05-21 Thread Mladen Turk
On 05/21/2012 02:55 PM, Mark Thomas wrote: On 20/05/2012 21:47, Mladen Turk wrote: On 05/20/2012 08:37 PM, Mark Thomas wrote: Therefore, I intend modifying the APR/native code to support per socket time outs. I would be grateful if those of you with more C knowledge than I (which is most

Re: APR/native and per socket timeouts.

2012-05-21 Thread Mark Thomas
On 21/05/2012 15:26, Costin Manolache wrote: My understanding is that the timeout is implemented in poll.c maintain() - by scanning the socket list in C. Why not doing the same thing in java - i.e. don't touch native code, have all sockets 'long', and close whenever you need from java ? The

Re: APR/native and per socket timeouts.

2012-05-21 Thread Costin Manolache
On Mon, May 21, 2012 at 9:29 AM, Mark Thomas ma...@apache.org wrote: On 21/05/2012 15:26, Costin Manolache wrote: My understanding is that the timeout is implemented in poll.c maintain() - by scanning the socket list in C. Why not doing the same thing in java - i.e. don't touch native

Re: APR/native and per socket timeouts.

2012-05-21 Thread Mark Thomas
On 21/05/2012 18:30, Costin Manolache wrote: On Mon, May 21, 2012 at 9:29 AM, Mark Thomas ma...@apache.org wrote: On 21/05/2012 15:26, Costin Manolache wrote: My understanding is that the timeout is implemented in poll.c maintain() - by scanning the socket list in C. Why not doing the

Re: APR/native and per socket timeouts.

2012-05-21 Thread Costin Manolache
On Mon, May 21, 2012 at 10:48 AM, Mark Thomas ma...@apache.org wrote: On 21/05/2012 18:30, Costin Manolache wrote: On Mon, May 21, 2012 at 9:29 AM, Mark Thomas ma...@apache.org wrote: On 21/05/2012 15:26, Costin Manolache wrote: My understanding is that the timeout is implemented in

Re: APR/native and per socket timeouts.

2012-05-21 Thread Mladen Turk
On 05/21/2012 08:01 PM, Costin Manolache wrote: On Mon, May 21, 2012 at 10:48 AM, Mark Thomasma...@apache.org wrote: My point was that you don't need to change anything in native. Leave APR as it is - just use '0' as timeout for the websocket sockets ( or any scoket that needs arbitrary

Re: APR/native and per socket timeouts.

2012-05-21 Thread Costin Manolache
On Mon, May 21, 2012 at 12:16 PM, Mladen Turk mt...@apache.org wrote: On 05/21/2012 08:01 PM, Costin Manolache wrote: On Mon, May 21, 2012 at 10:48 AM, Mark Thomasma...@apache.org wrote: My point was that you don't need to change anything in native. Leave APR as it is - just use '0' as

APR/native and per socket timeouts.

2012-05-20 Thread Mark Thomas
Currently, time outs for APR/native sockets are managed at the Pollset level. This means all sockets in a single Pollset must have the same time out. This is starting to become a nuisance. I have already had to add a second Pollset to AprEndpoint to handle separate connection and keep-alive time

Re: APR/native and per socket timeouts.

2012-05-20 Thread Henri Gomez
Did there is a need to have sockets with differents timeout in day to day case ? For example did it is required by specs or API ? The finer, the better but only if there is a real need :-) Btw, i'll take a look to your commits. Le 20 mai 2012 à 20:37, Mark Thomas ma...@apache.org a écrit :

Re: APR/native and per socket timeouts.

2012-05-20 Thread Henri Gomez
And what about using pollsets with specific timeout and associate sockets to pollset according to their timeout needs ? Just an idea. Le 20 mai 2012 à 20:37, Mark Thomas ma...@apache.org a écrit : Currently, time outs for APR/native sockets are managed at the Pollset level. This means all

Re: APR/native and per socket timeouts.

2012-05-20 Thread Mark Thomas
On 20/05/2012 19:44, Henri Gomez wrote: Did there is a need to have sockets with differents timeout in day to day case ? So far, no. The requirements could be met by three pollsets. One for new connections, one for keep-alive connections and one for WebSocket connections. My concern is that

Re: APR/native and per socket timeouts.

2012-05-20 Thread Mark Thomas
On 20/05/2012 19:46, Henri Gomez wrote: And what about using pollsets with specific timeout and associate sockets to pollset according to their timeout needs ? That is what we do currently. I'm not convinced that is a scalable long term solution as the number of things that need different time

Re: APR/native and per socket timeouts.

2012-05-20 Thread Henri Gomez
That is what we do currently. I'm not convinced that is a scalable long term solution as the number of things that need different time outs increases. Main question is : What will be the faster to handle ? A table of pollsets and associate sockets to them (ie: 30s, 60s, 120s, infinite) or

Re: APR/native and per socket timeouts.

2012-05-20 Thread Mladen Turk
On 05/20/2012 08:37 PM, Mark Thomas wrote: Therefore, I intend modifying the APR/native code to support per socket time outs. I would be grateful if those of you with more C knowledge than I (which is most people on this list) could: a) tell me now if this is a crazy idea (and why) b) keep an