Hi Christian,

I appologize for this late reply first of all.  It was a busy week.

2005/10/17, Christian Beil <[EMAIL PROTECTED] >:
thanks for your help last time. It really was. I found the part in
SocketIoProcessor I have to modify.
I hope you could help me again :-)
I'm considering whether I should realize this message delaying stuff
like this (modifying MINA), or if I should add a DelayingQueue to my
framework.
Incoming messages would then be handed to the DelyingQueue (in its own
thread) and be fired out from there after some time.
What do you think of this?
But now I need another feature: I want to stop reading from the remote
side of the proxy for some session, if the mobile client side of the
proxy is unable to receive messages for the moment. A kind of flow
control. Is it possible to stop reading from some sessions? I think I
yet need to add some methods to SocketIoProcessor to suspend some
sessions, so that they will note be scheduled for flush.
Perhaps add an attribute to the Session class and in
SocketIoProcessor.processSessions(Set selectedKeys) check for this
attribute and put the session in a SuspendedQueue. What do you think of
this?
Again I will be very grateful for your help.

For reads, it is much better to turn off SelectionKey.OP_READ for the channel you want to suspend reading.

For writes, SocketIoProcess should not call flushSession() method until suspension is not released.

It should be easy to implement and actually Niklas provided a patch for this:

http://www.nabble.com/-mina-Traffic-control-patch-proposal-t427795.html#a1172083

But I didn't look into it yet.

How would a multiplexing filter for mina be, do you know the oldish
WebMUX protocol?

I've just read WebMUX protocol specification roughly.  If I understood correctly, you could create a ProtocolEncoder and ProtocolDecoder that wraps existing protocol Encoders and ProtocolDecoders.

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

Reply via email to