Hi,

in MINA 2, each session has a write queue.

It sounds a bit spurious, as a session is associated with a IoProcessor in charge of writing data.

What if we remove this write queue, to move to to the IoProcessor ?

Let's analyze the issues we will face and advantages we will get if we change this.

o We will spare a queue for each session, thus consuming less memory. The WriteQueue is a ConcurrentLinkedQueue, and it's not a free data structure in term of memory consumption. o Throttling will become more difficult to manage, because we won't be able to check if the number of messages or bytes has reached its limit in the IoProcessor. o If the write queue is associated with the session, suspending write will just be a matter to forbid the IoProcessor to read the queue. If we move the queue to the IoProcessor, we will have to check for each message present in the queue that its associated session is forbidding the write

If you see some more potential issues,

--

Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to