tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cos...@gmail.com>
Subject Re: APR/native and per socket timeouts.
Date Mon, 21 May 2012 19:28:45 GMT
On Mon, May 21, 2012 at 12:16 PM, Mladen Turk <mturk@apache.org> wrote:

> On 05/21/2012 08:01 PM, Costin Manolache wrote:
>
>> On Mon, May 21, 2012 at 10:48 AM, Mark Thomas<markt@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 timeout ). That will disable the
>> processing
>> in maintain - and java side can do the expiration.
>>
>> No compilation headaches - the only downside is that the actual expiration
>> may happen a bit later.
>>
>>
> This approach would be bad for performance.
> The reason why I put the maintenance inside native is to
> lower down the number of JNI calls.
>
> If you do it in java for each socket, then you will have to
> inform the poller to remove each expired from the native pollset.
> This mean N*sockets extra JNI calls.
>
> If you look at the implementation I return array of all expired sockets
> at once, meaning 1 JNI call.
>

You could send an array of sockets to close and get the same 1 JNI call
if performance is the main reason.

My point is that you can implement per-socket timeout with no native code
changes. If you are to make native code changes - bulk close seems a simple
change.

Costin


>
>
> Regards
> --
> ^TM
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.**org<dev-unsubscribe@tomcat.apache.org>
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message