That would work too.  Any idea when this will be implemented?

Thanks
Rob

----- Original Message ----
From: Maarten Bosteels <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, May 29, 2007 2:16:21 PM
Subject: Re: Message lifecycle

On 5/29/07, Rob Butler <[EMAIL PROTECTED]> wrote:
>
> Answering my own question.
>
> When using an executor filter
>
> 1) Mina appears to decode messages from the wire as rapidly as
> possible.  It is probably placing them in some sort of queue.
>
> 2) Messages are passed to messageReceived in order and the next call to
> messageRecieved will not happen until the previous one has returned.  Thus,
> any messages you write to the session from within messageReceived will be
> sent in the order.


indeed

It would probably be useful to supply an IoHandler that used an Executor
> pool to process multiple messages on a connection simultaneously for codecs
> that support message correlation.


Is this with you are looking for :
http://issues.apache.org/jira/browse/DIRMINA-334 ?

Maarten


Rob
>
>
> ----- Original Message ----
> From: Rob Butler <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Tuesday, May 29, 2007 12:49:00 PM
> Subject: Re: Message lifecycle
>
> Oh another related question...
>
> Assuming Mina will allow simultaneous processing of messages, is there any
> guarantee on which order messages will be handed to messageReceived.
>
> i.e. if 10 messages are sent down the connection, will messageRecieved be
> sent message 1 first and all other messages in order, or could
> messageReceived be called for message 4 (or whichever) first?
>
> Thanks
> Rob
>
> ----- Original Message ----
> From: Rob Butler <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Tuesday, May 29, 2007 12:44:39 PM
> Subject: Message lifecycle
>
> Hello all,
>
> Hopefully just a quick question here.  I'd really appreciate a quick
> response.
>
> For TCP connections, Mina processes bytes from the wire in order.  But how
> are things handled by the IoHandler and session.write()?
>
> Here's the scenario...
>
> I have a protocol codec, an executor filter and an IoHandler.  Let's also
> say that two messages are sent down the connection.  The protocol codec
> parses the first message from the wire and calls out.write, and then does
> the same for the second message.
>
> Will message 1 be processed to completion (return from the
> IoHandler.messageRecieved call) before message 2 processing begins or will
> both of these messages be processed simultaneously?  Assume it takes a long
> time to process the messages so processing message 1 will not be completed
> before message 2 has arrived.
>
> Does Mina by default do anything to guarantee message ordering?  I.E. if
> message 2's processing completes before message 1 will it be sent on the
> wire first, or does Mina wait and send message 1's output first?
>
> I suspect the answers are the messages will be processed simultaneously
> and Mina doesn't enforce message ordering.  At least I hope that's what the
> answers are.
>
> Is there any existing code in Mina to support in-order message processing,
> or in-order messsage return if a particular protocol needs it?  I don't need
> it at the moment, but I may want to implement some protocols in the future
> that do.  I'm sure others will need that at some time too, so it would be
> nice if it were supplied by the framework.
>
> Thanks
> Rob
>
>
>
>
>
>
>
> ____________________________________________________________________________________Sick
> sense of humor? Visit Yahoo! TV's
> Comedy with an Edge to see what's on, when.
> http://tv.yahoo.com/collections/222
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> Food fight? Enjoy some healthy debate
> in the Yahoo! Answers Food & Drink Q&A.
> http://answers.yahoo.com/dir/?link=list&sid=396545367
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> Finding fabulous fares is fun.
> Let Yahoo! FareChase search your favorite travel sites to find flight and
> hotel bargains.
> http://farechase.yahoo.com/promo-generic-14795097
>





      
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the 
Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

Reply via email to