You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Julien Vermillard <jv...@archean.fr> on 2008/11/04 17:50:10 UTC

setTrafficMask poll again

Hi,

There is something in MINA who has hook everywhere in the core, it's
traffic mask. As far I understand the concept, the idea is to be able
to block read and/or writes using session.setTrafficMask(...), I never
needed it, and I wonder who use it and for what exactly ?

Julien

Re: setTrafficMask poll again

Posted by Mark Webb <el...@gmail.com>.
+1 to remove it.

On Wed, Nov 5, 2008 at 3:36 AM, Julien Vermillard
<jv...@archean.fr> wrote:
> On Tue, 04 Nov 2008 18:24:15 +0100
> Emmanuel Lecharny <el...@gmail.com> wrote:
>
>> Maarten Bosteels wrote:
>> > Wasn't it an attempt to implement throttling ?
>> >
>> I have no idea. The documentation is pretty scarse, it's not used
>> anywhere but as a parameter passed from method to method,  the event
>> type is never used to create an event ...
>> > When requests are coming in faster than they're being processed
>> > => set TrafficMask to block reading
>> >
>> Which part of MINA is setting this flag ?
>> > => TCP buffers will fill up (OS level)
>> > => TCP will tell sender to slow down
>> > => OOM prevented
>> >
>> > when queue of incoming messages gets smaller => resume reading
>> >
>> May be it's a part of a big DoS protection heuristic, but it seems to
>> be lagging seriously. Even the throttling filter is a bit
>> incomplete ...
>>
>> Anyone has a better picture than me on this matter ?
>>
>
> Abouot traffic mask & the new filter chain I think you could remove the
> filtering events related to setTrafficMask. See
> https://issues.apache.org/jira/browse/DIRMINA-467 I think we will
> never need it.
>
> Julien
>

Re: setTrafficMask poll again

Posted by Julien Vermillard <jv...@archean.fr>.
On Tue, 04 Nov 2008 18:24:15 +0100
Emmanuel Lecharny <el...@gmail.com> wrote:

> Maarten Bosteels wrote:
> > Wasn't it an attempt to implement throttling ?
> >   
> I have no idea. The documentation is pretty scarse, it's not used 
> anywhere but as a parameter passed from method to method,  the event 
> type is never used to create an event ...
> > When requests are coming in faster than they're being processed
> > => set TrafficMask to block reading
> >   
> Which part of MINA is setting this flag ?
> > => TCP buffers will fill up (OS level)
> > => TCP will tell sender to slow down
> > => OOM prevented
> >
> > when queue of incoming messages gets smaller => resume reading
> >   
> May be it's a part of a big DoS protection heuristic, but it seems to
> be lagging seriously. Even the throttling filter is a bit
> incomplete ...
> 
> Anyone has a better picture than me on this matter ?
> 

Abouot traffic mask & the new filter chain I think you could remove the
filtering events related to setTrafficMask. See
https://issues.apache.org/jira/browse/DIRMINA-467 I think we will
never need it.

Julien

Re: setTrafficMask poll again

Posted by Emmanuel Lecharny <el...@gmail.com>.
Maarten Bosteels wrote:
> Wasn't it an attempt to implement throttling ?
>   
I have no idea. The documentation is pretty scarse, it's not used 
anywhere but as a parameter passed from method to method,  the event 
type is never used to create an event ...
> When requests are coming in faster than they're being processed
> => set TrafficMask to block reading
>   
Which part of MINA is setting this flag ?
> => TCP buffers will fill up (OS level)
> => TCP will tell sender to slow down
> => OOM prevented
>
> when queue of incoming messages gets smaller => resume reading
>   
May be it's a part of a big DoS protection heuristic, but it seems to be 
lagging seriously. Even the throttling filter is a bit incomplete ...

Anyone has a better picture than me on this matter ?

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: [proposal] Was : Re: setTrafficMask poll again

Posted by Julien Vermillard <jv...@archean.fr>.
Hi,

Thanks a lot Mark.

Julien

On Sat, 8 Nov 2008 20:33:17 -0500
"Mark Webb" <el...@gmail.com> wrote:

> I just went ahead and fixed the errors.
> 
> On Sat, Nov 8, 2008 at 8:30 PM, Mark Webb <el...@gmail.com>
> wrote:
> > Getting compilation errors.  Cannot find the TrafficMask class:
> >
> > /Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java:[25,35]
> > cannot find symbol
> > symbol  : class TrafficMask
> > location: package org.apache.mina.core.session
> >
> > /Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/IoFilterAdapter.java:[24,35]
> > cannot find symbol
> > symbol  : class TrafficMask
> > location: package org.apache.mina.core.session
> >
> > /Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java:[28,35]
> > cannot find symbol
> > symbol  : class TrafficMask
> > location: package org.apache.mina.core.session
> >
> > /Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/DefaultIoFilterChain.java:[36,35]
> > cannot find symbol
> > symbol  : class TrafficMask
> > location: package org.apache.mina.core.session
> >
> >
> > --Mark
> >
> >
> > On Fri, Nov 7, 2008 at 10:54 PM, Mark Webb <el...@gmail.com>
> > wrote:
> >> +1
> >>
> >> On Wed, Nov 5, 2008 at 1:16 PM, Maarten Bosteels
> >> <mb...@gmail.com> wrote:
> >>> +1
> >>>
> >>> On Wed, Nov 5, 2008 at 3:01 PM, Julien Vermillard
> >>> <jv...@archean.fr>wrote:
> >>>
> >>>> I would like to propose :
> >>>>  - ignore setTrafficMask events in the filter chain (looks like
> >>>> Mark is already agreeing)
> >>>>
> >>>>  - remove setTrafficMask(..) and keep the following IoSession
> >>>> methods : suspendRead(), suspendWrite(), resumeRead(),
> >>>> resumeWrite() which naming is much better and add methods
> >>>> isWriteSuspended() isReadSuspended()
> >>>> Kill the TrafficMask class and clear all the filters of
> >>>> references to TrafficMas, and of course fix transport classes.
> >>>>
> >>>> That would reduce the complexity of the thingy and make the API
> >>>> for pausing traffic a bit more user-friendly.
> >>>>
> >>>> WDYT ?
> >>>>
> >>>> Julien
> >>>>
> >>>>
> >>>> On Tue, 4 Nov 2008 18:38:15 +0100
> >>>> Julien Vermillard <jv...@archean.fr> wrote:
> >>>>
> >>>> > It was used by Read/WriteThrottlingFilter wich was removed of
> >>>> > 2.0 :
> >>>> >
> >>>> http://www.nabble.com/Dropping-traffic-throttling-from-2.0-td16092085.html
> >>>> > as said by Emm look like it's used nowhere is MINA codebase.
> >>>> >
> >>>> >
> >>>> > As said by Trustin in this mail the remplacement is supposed
> >>>> > to be o.a.m.f.executor.* and no references to setTrafficMask();
> >>>> >
> >>>> > Frankly I don't understand how you can throttle read, without
> >>>> > using setTrafficMask and disabling OP_READ on the low level
> >>>> > socket.
> >>>> >
> >>>> > Julien
> >>>> >
> >>>> > On Tue, 4 Nov 2008 18:01:58 +0100 "Maarten Bosteels"
> >>>> > <mb...@gmail.com> wrote:
> >>>> >
> >>>> > > Wasn't it an attempt to implement throttling ?
> >>>> > >
> >>>> > > When requests are coming in faster than they're being
> >>>> > > processed => set TrafficMask to block reading
> >>>> > > => TCP buffers will fill up (OS level)
> >>>> > > => TCP will tell sender to slow down
> >>>> > > => OOM prevented
> >>>> > >
> >>>> > > when queue of incoming messages gets smaller => resume
> >>>> > > reading
> >>>> > >
> >>>> > > I haven't tried this yet, so I could be totally wrong.
> >>>> > >
> >>>> > > Maarten
> >>>> > >
> >>>> > > On Tue, Nov 4, 2008 at 5:50 PM, Julien Vermillard
> >>>> > > <jv...@archean.fr>wrote:
> >>>> > >
> >>>> > > > Hi,
> >>>> > > >
> >>>> > > > There is something in MINA who has hook everywhere in the
> >>>> > > > core, it's traffic mask. As far I understand the concept,
> >>>> > > > the idea is to be able to block read and/or writes using
> >>>> > > > session.setTrafficMask(...), I never needed it, and I
> >>>> > > > wonder who use it and for what exactly ?
> >>>> > > >
> >>>> > > > Julien
> >>>> > > >
> >>>>
> >>>
> >>
> >

Re: [proposal] Was : Re: setTrafficMask poll again

Posted by Mark Webb <el...@gmail.com>.
I just went ahead and fixed the errors.

On Sat, Nov 8, 2008 at 8:30 PM, Mark Webb <el...@gmail.com> wrote:
> Getting compilation errors.  Cannot find the TrafficMask class:
>
> /Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java:[25,35]
> cannot find symbol
> symbol  : class TrafficMask
> location: package org.apache.mina.core.session
>
> /Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/IoFilterAdapter.java:[24,35]
> cannot find symbol
> symbol  : class TrafficMask
> location: package org.apache.mina.core.session
>
> /Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java:[28,35]
> cannot find symbol
> symbol  : class TrafficMask
> location: package org.apache.mina.core.session
>
> /Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/DefaultIoFilterChain.java:[36,35]
> cannot find symbol
> symbol  : class TrafficMask
> location: package org.apache.mina.core.session
>
>
> --Mark
>
>
> On Fri, Nov 7, 2008 at 10:54 PM, Mark Webb <el...@gmail.com> wrote:
>> +1
>>
>> On Wed, Nov 5, 2008 at 1:16 PM, Maarten Bosteels
>> <mb...@gmail.com> wrote:
>>> +1
>>>
>>> On Wed, Nov 5, 2008 at 3:01 PM, Julien Vermillard <jv...@archean.fr>wrote:
>>>
>>>> I would like to propose :
>>>>  - ignore setTrafficMask events in the filter chain (looks like Mark is
>>>>   already agreeing)
>>>>
>>>>  - remove setTrafficMask(..) and keep the following IoSession methods :
>>>>   suspendRead(), suspendWrite(), resumeRead(), resumeWrite()
>>>>   which naming is much better and add methods isWriteSuspended()
>>>>   isReadSuspended()
>>>> Kill the TrafficMask class and clear all the filters of references to
>>>> TrafficMas, and of course fix transport classes.
>>>>
>>>> That would reduce the complexity of the thingy and make the API for
>>>> pausing traffic a bit more user-friendly.
>>>>
>>>> WDYT ?
>>>>
>>>> Julien
>>>>
>>>>
>>>> On Tue, 4 Nov 2008 18:38:15 +0100
>>>> Julien Vermillard <jv...@archean.fr> wrote:
>>>>
>>>> > It was used by Read/WriteThrottlingFilter wich was removed of 2.0 :
>>>> >
>>>> http://www.nabble.com/Dropping-traffic-throttling-from-2.0-td16092085.html
>>>> > as said by Emm look like it's used nowhere is MINA codebase.
>>>> >
>>>> >
>>>> > As said by Trustin in this mail the remplacement is supposed to be
>>>> > o.a.m.f.executor.* and no references to setTrafficMask();
>>>> >
>>>> > Frankly I don't understand how you can throttle read, without using
>>>> > setTrafficMask and disabling OP_READ on the low level socket.
>>>> >
>>>> > Julien
>>>> >
>>>> > On Tue, 4 Nov 2008 18:01:58 +0100 "Maarten Bosteels"
>>>> > <mb...@gmail.com> wrote:
>>>> >
>>>> > > Wasn't it an attempt to implement throttling ?
>>>> > >
>>>> > > When requests are coming in faster than they're being processed
>>>> > > => set TrafficMask to block reading
>>>> > > => TCP buffers will fill up (OS level)
>>>> > > => TCP will tell sender to slow down
>>>> > > => OOM prevented
>>>> > >
>>>> > > when queue of incoming messages gets smaller => resume reading
>>>> > >
>>>> > > I haven't tried this yet, so I could be totally wrong.
>>>> > >
>>>> > > Maarten
>>>> > >
>>>> > > On Tue, Nov 4, 2008 at 5:50 PM, Julien Vermillard
>>>> > > <jv...@archean.fr>wrote:
>>>> > >
>>>> > > > Hi,
>>>> > > >
>>>> > > > There is something in MINA who has hook everywhere in the core,
>>>> > > > it's traffic mask. As far I understand the concept, the idea is
>>>> > > > to be able to block read and/or writes using
>>>> > > > session.setTrafficMask(...), I never needed it, and I wonder who
>>>> > > > use it and for what exactly ?
>>>> > > >
>>>> > > > Julien
>>>> > > >
>>>>
>>>
>>
>

Re: [proposal] Was : Re: setTrafficMask poll again

Posted by Mark Webb <el...@gmail.com>.
Getting compilation errors.  Cannot find the TrafficMask class:

/Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/IoFilter.java:[25,35]
cannot find symbol
symbol  : class TrafficMask
location: package org.apache.mina.core.session

/Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/IoFilterAdapter.java:[24,35]
cannot find symbol
symbol  : class TrafficMask
location: package org.apache.mina.core.session

/Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/IoFilterChain.java:[28,35]
cannot find symbol
symbol  : class TrafficMask
location: package org.apache.mina.core.session

/Users/elihusmails/dev/mina/mina-cleaning/core/src/main/java/org/apache/mina/core/filterchain/DefaultIoFilterChain.java:[36,35]
cannot find symbol
symbol  : class TrafficMask
location: package org.apache.mina.core.session


--Mark


On Fri, Nov 7, 2008 at 10:54 PM, Mark Webb <el...@gmail.com> wrote:
> +1
>
> On Wed, Nov 5, 2008 at 1:16 PM, Maarten Bosteels
> <mb...@gmail.com> wrote:
>> +1
>>
>> On Wed, Nov 5, 2008 at 3:01 PM, Julien Vermillard <jv...@archean.fr>wrote:
>>
>>> I would like to propose :
>>>  - ignore setTrafficMask events in the filter chain (looks like Mark is
>>>   already agreeing)
>>>
>>>  - remove setTrafficMask(..) and keep the following IoSession methods :
>>>   suspendRead(), suspendWrite(), resumeRead(), resumeWrite()
>>>   which naming is much better and add methods isWriteSuspended()
>>>   isReadSuspended()
>>> Kill the TrafficMask class and clear all the filters of references to
>>> TrafficMas, and of course fix transport classes.
>>>
>>> That would reduce the complexity of the thingy and make the API for
>>> pausing traffic a bit more user-friendly.
>>>
>>> WDYT ?
>>>
>>> Julien
>>>
>>>
>>> On Tue, 4 Nov 2008 18:38:15 +0100
>>> Julien Vermillard <jv...@archean.fr> wrote:
>>>
>>> > It was used by Read/WriteThrottlingFilter wich was removed of 2.0 :
>>> >
>>> http://www.nabble.com/Dropping-traffic-throttling-from-2.0-td16092085.html
>>> > as said by Emm look like it's used nowhere is MINA codebase.
>>> >
>>> >
>>> > As said by Trustin in this mail the remplacement is supposed to be
>>> > o.a.m.f.executor.* and no references to setTrafficMask();
>>> >
>>> > Frankly I don't understand how you can throttle read, without using
>>> > setTrafficMask and disabling OP_READ on the low level socket.
>>> >
>>> > Julien
>>> >
>>> > On Tue, 4 Nov 2008 18:01:58 +0100 "Maarten Bosteels"
>>> > <mb...@gmail.com> wrote:
>>> >
>>> > > Wasn't it an attempt to implement throttling ?
>>> > >
>>> > > When requests are coming in faster than they're being processed
>>> > > => set TrafficMask to block reading
>>> > > => TCP buffers will fill up (OS level)
>>> > > => TCP will tell sender to slow down
>>> > > => OOM prevented
>>> > >
>>> > > when queue of incoming messages gets smaller => resume reading
>>> > >
>>> > > I haven't tried this yet, so I could be totally wrong.
>>> > >
>>> > > Maarten
>>> > >
>>> > > On Tue, Nov 4, 2008 at 5:50 PM, Julien Vermillard
>>> > > <jv...@archean.fr>wrote:
>>> > >
>>> > > > Hi,
>>> > > >
>>> > > > There is something in MINA who has hook everywhere in the core,
>>> > > > it's traffic mask. As far I understand the concept, the idea is
>>> > > > to be able to block read and/or writes using
>>> > > > session.setTrafficMask(...), I never needed it, and I wonder who
>>> > > > use it and for what exactly ?
>>> > > >
>>> > > > Julien
>>> > > >
>>>
>>
>

Re: [proposal] Was : Re: setTrafficMask poll again

Posted by Mark Webb <el...@gmail.com>.
+1

On Wed, Nov 5, 2008 at 1:16 PM, Maarten Bosteels
<mb...@gmail.com> wrote:
> +1
>
> On Wed, Nov 5, 2008 at 3:01 PM, Julien Vermillard <jv...@archean.fr>wrote:
>
>> I would like to propose :
>>  - ignore setTrafficMask events in the filter chain (looks like Mark is
>>   already agreeing)
>>
>>  - remove setTrafficMask(..) and keep the following IoSession methods :
>>   suspendRead(), suspendWrite(), resumeRead(), resumeWrite()
>>   which naming is much better and add methods isWriteSuspended()
>>   isReadSuspended()
>> Kill the TrafficMask class and clear all the filters of references to
>> TrafficMas, and of course fix transport classes.
>>
>> That would reduce the complexity of the thingy and make the API for
>> pausing traffic a bit more user-friendly.
>>
>> WDYT ?
>>
>> Julien
>>
>>
>> On Tue, 4 Nov 2008 18:38:15 +0100
>> Julien Vermillard <jv...@archean.fr> wrote:
>>
>> > It was used by Read/WriteThrottlingFilter wich was removed of 2.0 :
>> >
>> http://www.nabble.com/Dropping-traffic-throttling-from-2.0-td16092085.html
>> > as said by Emm look like it's used nowhere is MINA codebase.
>> >
>> >
>> > As said by Trustin in this mail the remplacement is supposed to be
>> > o.a.m.f.executor.* and no references to setTrafficMask();
>> >
>> > Frankly I don't understand how you can throttle read, without using
>> > setTrafficMask and disabling OP_READ on the low level socket.
>> >
>> > Julien
>> >
>> > On Tue, 4 Nov 2008 18:01:58 +0100 "Maarten Bosteels"
>> > <mb...@gmail.com> wrote:
>> >
>> > > Wasn't it an attempt to implement throttling ?
>> > >
>> > > When requests are coming in faster than they're being processed
>> > > => set TrafficMask to block reading
>> > > => TCP buffers will fill up (OS level)
>> > > => TCP will tell sender to slow down
>> > > => OOM prevented
>> > >
>> > > when queue of incoming messages gets smaller => resume reading
>> > >
>> > > I haven't tried this yet, so I could be totally wrong.
>> > >
>> > > Maarten
>> > >
>> > > On Tue, Nov 4, 2008 at 5:50 PM, Julien Vermillard
>> > > <jv...@archean.fr>wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > There is something in MINA who has hook everywhere in the core,
>> > > > it's traffic mask. As far I understand the concept, the idea is
>> > > > to be able to block read and/or writes using
>> > > > session.setTrafficMask(...), I never needed it, and I wonder who
>> > > > use it and for what exactly ?
>> > > >
>> > > > Julien
>> > > >
>>
>

Re: [proposal] Was : Re: setTrafficMask poll again

Posted by Maarten Bosteels <mb...@gmail.com>.
+1

On Wed, Nov 5, 2008 at 3:01 PM, Julien Vermillard <jv...@archean.fr>wrote:

> I would like to propose :
>  - ignore setTrafficMask events in the filter chain (looks like Mark is
>   already agreeing)
>
>  - remove setTrafficMask(..) and keep the following IoSession methods :
>   suspendRead(), suspendWrite(), resumeRead(), resumeWrite()
>   which naming is much better and add methods isWriteSuspended()
>   isReadSuspended()
> Kill the TrafficMask class and clear all the filters of references to
> TrafficMas, and of course fix transport classes.
>
> That would reduce the complexity of the thingy and make the API for
> pausing traffic a bit more user-friendly.
>
> WDYT ?
>
> Julien
>
>
> On Tue, 4 Nov 2008 18:38:15 +0100
> Julien Vermillard <jv...@archean.fr> wrote:
>
> > It was used by Read/WriteThrottlingFilter wich was removed of 2.0 :
> >
> http://www.nabble.com/Dropping-traffic-throttling-from-2.0-td16092085.html
> > as said by Emm look like it's used nowhere is MINA codebase.
> >
> >
> > As said by Trustin in this mail the remplacement is supposed to be
> > o.a.m.f.executor.* and no references to setTrafficMask();
> >
> > Frankly I don't understand how you can throttle read, without using
> > setTrafficMask and disabling OP_READ on the low level socket.
> >
> > Julien
> >
> > On Tue, 4 Nov 2008 18:01:58 +0100 "Maarten Bosteels"
> > <mb...@gmail.com> wrote:
> >
> > > Wasn't it an attempt to implement throttling ?
> > >
> > > When requests are coming in faster than they're being processed
> > > => set TrafficMask to block reading
> > > => TCP buffers will fill up (OS level)
> > > => TCP will tell sender to slow down
> > > => OOM prevented
> > >
> > > when queue of incoming messages gets smaller => resume reading
> > >
> > > I haven't tried this yet, so I could be totally wrong.
> > >
> > > Maarten
> > >
> > > On Tue, Nov 4, 2008 at 5:50 PM, Julien Vermillard
> > > <jv...@archean.fr>wrote:
> > >
> > > > Hi,
> > > >
> > > > There is something in MINA who has hook everywhere in the core,
> > > > it's traffic mask. As far I understand the concept, the idea is
> > > > to be able to block read and/or writes using
> > > > session.setTrafficMask(...), I never needed it, and I wonder who
> > > > use it and for what exactly ?
> > > >
> > > > Julien
> > > >
>

[proposal] Was : Re: setTrafficMask poll again

Posted by Julien Vermillard <jv...@archean.fr>.
I would like to propose :
 - ignore setTrafficMask events in the filter chain (looks like Mark is
   already agreeing)

 - remove setTrafficMask(..) and keep the following IoSession methods : 
   suspendRead(), suspendWrite(), resumeRead(), resumeWrite()
   which naming is much better and add methods isWriteSuspended()
   isReadSuspended()
Kill the TrafficMask class and clear all the filters of references to
TrafficMas, and of course fix transport classes.

That would reduce the complexity of the thingy and make the API for
pausing traffic a bit more user-friendly.

WDYT ?

Julien


On Tue, 4 Nov 2008 18:38:15 +0100
Julien Vermillard <jv...@archean.fr> wrote:

> It was used by Read/WriteThrottlingFilter wich was removed of 2.0 :
> http://www.nabble.com/Dropping-traffic-throttling-from-2.0-td16092085.html
> as said by Emm look like it's used nowhere is MINA codebase.
> 
> 
> As said by Trustin in this mail the remplacement is supposed to be
> o.a.m.f.executor.* and no references to setTrafficMask();
> 
> Frankly I don't understand how you can throttle read, without using
> setTrafficMask and disabling OP_READ on the low level socket.
> 
> Julien
> 
> On Tue, 4 Nov 2008 18:01:58 +0100 "Maarten Bosteels"
> <mb...@gmail.com> wrote:
> 
> > Wasn't it an attempt to implement throttling ?
> > 
> > When requests are coming in faster than they're being processed
> > => set TrafficMask to block reading
> > => TCP buffers will fill up (OS level)
> > => TCP will tell sender to slow down
> > => OOM prevented
> > 
> > when queue of incoming messages gets smaller => resume reading
> > 
> > I haven't tried this yet, so I could be totally wrong.
> > 
> > Maarten
> > 
> > On Tue, Nov 4, 2008 at 5:50 PM, Julien Vermillard
> > <jv...@archean.fr>wrote:
> > 
> > > Hi,
> > >
> > > There is something in MINA who has hook everywhere in the core,
> > > it's traffic mask. As far I understand the concept, the idea is
> > > to be able to block read and/or writes using
> > > session.setTrafficMask(...), I never needed it, and I wonder who
> > > use it and for what exactly ?
> > >
> > > Julien
> > >

Re: setTrafficMask poll again

Posted by Julien Vermillard <jv...@archean.fr>.
It was used by Read/WriteThrottlingFilter wich was removed of 2.0 :
http://www.nabble.com/Dropping-traffic-throttling-from-2.0-td16092085.html
as said by Emm look like it's used nowhere is MINA codebase.


As said by Trustin in this mail the remplacement is supposed to be
o.a.m.f.executor.* and no references to setTrafficMask();

Frankly I don't understand how you can throttle read, without using
setTrafficMask and disabling OP_READ on the low level socket.

Julien

On Tue, 4 Nov 2008 18:01:58 +0100 "Maarten Bosteels"
<mb...@gmail.com> wrote:

> Wasn't it an attempt to implement throttling ?
> 
> When requests are coming in faster than they're being processed
> => set TrafficMask to block reading
> => TCP buffers will fill up (OS level)
> => TCP will tell sender to slow down
> => OOM prevented
> 
> when queue of incoming messages gets smaller => resume reading
> 
> I haven't tried this yet, so I could be totally wrong.
> 
> Maarten
> 
> On Tue, Nov 4, 2008 at 5:50 PM, Julien Vermillard
> <jv...@archean.fr>wrote:
> 
> > Hi,
> >
> > There is something in MINA who has hook everywhere in the core, it's
> > traffic mask. As far I understand the concept, the idea is to be
> > able to block read and/or writes using session.setTrafficMask(...),
> > I never needed it, and I wonder who use it and for what exactly ?
> >
> > Julien
> >

Re: setTrafficMask poll again

Posted by Maarten Bosteels <mb...@gmail.com>.
Wasn't it an attempt to implement throttling ?

When requests are coming in faster than they're being processed
=> set TrafficMask to block reading
=> TCP buffers will fill up (OS level)
=> TCP will tell sender to slow down
=> OOM prevented

when queue of incoming messages gets smaller => resume reading

I haven't tried this yet, so I could be totally wrong.

Maarten

On Tue, Nov 4, 2008 at 5:50 PM, Julien Vermillard <jv...@archean.fr>wrote:

> Hi,
>
> There is something in MINA who has hook everywhere in the core, it's
> traffic mask. As far I understand the concept, the idea is to be able
> to block read and/or writes using session.setTrafficMask(...), I never
> needed it, and I wonder who use it and for what exactly ?
>
> Julien
>