On Sun, Apr 12, 2009 at 8:11 PM, Niklas Gustavsson <nik...@protocol7.com> wrote:
> On Sat, Apr 11, 2009 at 5:22 AM, Rich Dougherty <r...@rd.gen.nz> wrote:
>> That sounds great. The main issue that (IMO) needs resolving is flow
>> control. At the moment, MINA events are converted to actor messages. It
>> might be possible for events to arrive too quickly and use up all memory. I
>> think there needs to be some sort of communication back from the actor so
>> that MINA can hold off sending new events until it is ready.
>
> Isn't this the general issue about flow control in MINA, with or without 
> Scala?

I think it's a slightly different issue. I'm talking about the fact
that the IoHandler implementation for the Scala bindings basically
does something like:

  def messageReceived(session: IoSession, message: Any) = {
    ...
    sessionActor ! MessageReceived(message)
  }

There is no acknowledgement back from the sessionActor at all. As far
as the rest of MINA knows, the message has been handled as soon as the
messageReceived method returns. But all we've done is sent an
asynchronous notification to the session actor; we don't know when it
will actually be processed. MINA's existing flow control code would
not be able to know whether or not the message has been handled.

Cheers
Rich

--
http://blog.richdougherty.com/

Reply via email to