mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Vermillard <jvermill...@archean.fr>
Subject IdleStatusCheker, Was : Re: [About the Filter Chain] Events
Date Wed, 05 Nov 2008 09:15:43 GMT
On Tue, 04 Nov 2008 17:57:55 +0100
Emmanuel Lecharny <elecharny@gmail.com> wrote:

> Maarten Bosteels wrote:
> > Hello,
> >   
> Hi Maarten (eh eh, I typed it correctly this time !),
> > I also use messageSent but I guess I can also replace it with an
> > IoFutureListener.
> >
> > What do you mean when you say that SESSION_IDLE is questionable ?
> > What would you replace it with ?
> >   
> There is a thread which looks for sessions in idle state, in order to 
> kill them after a certain period of time (a timeout). So my question
> is why do we have to deal with a sessionIdle message ? And when is it 
> generated ? I'm missing something in this area.
> > My guts feeling is that exceptionCaught should also be propagated
> > to the outgoing chain...
> > but right now I have no examples to back up that feeling.
> >   
> I have to go deeper into it, too.
> 
> Thanks Maarten !
> 

Ok yesterday night, I drank some Armagnac, removed by brain and started
to try to understand why the hell the IdleStatusChecker is dealing with
polled transport who are triggering idle events on select()/poll()
timeout.

IdleStatusChecker is (ab)used for :

1) the most obvious case, checking for IDLE event every 1 second on
transport who can't do select() timeouting or are blocking, so they need
another task for doing it (VmPipe, SerialTransport).

At the origin it was the only usage, and was a class dedicated to
VmPipe until I extract it and generalized for using it with
SerialTransport (it was called VmPipeIdleStatusChecker).

I was quite surprised when Emm said me it was used with Nio based
transports, so I discovered the other new usages : 

2) check IoService idleing. Funny I didn't know this feature. You
can listen an IoService for idleing. I really wonder who use that.

3) Because in the code editor, there was some free space for more
bloat/code, it's used for update throughput stats (yes an IdleChecker
dealing with throughput).Cause it was easier to plug stats there,
because it was already a task running every 1 seconds.

I think it need to serious rework, for make it understandable without
usage of doping drinks.

Julien

Julien
Julien

Mime
View raw message