Hi Jean-François,

2005/10/11, Jean-François Daune <[EMAIL PROTECTED]>:

I face a tough problem. My server application needs to prioritize some
messages.

I mean that when a message of type X is received, it should be processed
before any other ones.

Actually, the best would be that a message X whose 'age' is higher than
S seconds should be promoted as first one to process.

In a way, it is QoS at message-handling level.

What is the best way in Mina to implement this?


Yes, implementing a filter is the best solution as others noticed. Possibly
you'll have to implement your own ThreadPoolFilter or modify existing one.

BTW thanks for your good idea of QoS. :)

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/


I probably must clarify my need.

Let's consider 100 opened sessions. On each session, if a message of type X is
received, I want it to be processed before Y seconds.

I don't want to reorder messages received per session.

Instead, when my server 'elects' the next session for processing, I want it to
first promote the sessions having a message X older than (Y-Z) seconds.

I have checked BaseThreadPool, and if I understand well, I would need
to change
'fetchBuffer' so that it first chooses SessionBuffer containing such message.

Is that correct?

I am not sure as the difference between readySessionBuffers and
busySessionBuffers does not appear clearly to me (why is a BufferSession added
to busySessionBuffers in fireEvent?)

Regards,

J-F

Reply via email to