D4n Outlook. This time with a better quotation... I hope > Emmanuel Lecharny [mailto:[email protected]] wrote > > Fair enough. But we can mitigate this risk on the IoProcessor too, by > pulling out of the queue all the messages for a session, until the > socket can't accept any more writing. Something like : > > while () { > WriteReqest message = queue.get(); > Session session = message.getSession(); > Channel channel = session.getChannel(); > > while ( channel is ready for write) do { > channel.write( message ); > message = queue.get( session ); > } > }
That would require a queue per session. So I don't see a difference to the prior model. I thought you wanted a single queue for all session of an IoProcessor. > Does it sounds crazy ? No, but I'm currently not seeing the difference, besides the fact that the IoProcessor handles the queues. Maybe I'm misunderstanding your suggestion. > > * An additional cpu cost will be the increased synchronization > efforts inside the queue... There will be more threads, writing to the > same queue at the same time. > No, because the IoProcessor is using one single thread. Ok, I'm not too deep into the IoProcessor, but I thought the writing requests of different sessions (put to the queue) could be handled simultaneously, while the IoProcessor itself is single-threaded (poll from the queue). > Hmmmm, whatever the queues use, it's irrelevant. There is no reason > that > we don't use the same in the IoProcessor queue, as we have the exact > same number of elements in this queue than the number of all the > elements used in all the Session queues. Maybe there is a little overhead for each queue, but I don't think that it is big enough to justify a design for itself. > > Write-Throttling may be done by a filter. IMHO It's the better place > anyway. > > Absolutly. > > So you may have the option to place the write throttle at the start > of your queue and save processor speed. > > Yes. The problem is to deal with the throttle in a filter, which is not > totally obvious. Yes, I have tried it by myself, but didn't get too far. regards Steve -------------------------------------------------------------------------- PROEMION GmbH Steve Ulrich IT Development (IT/DEV) Donaustrasse 14 D-36043 Fulda, Germany Phone +49 (0) 661 9490-601 Fax +49 (0) 661 9490-333 http://www.proemion.com/ mailto:[email protected] Geschäftsführer: Dipl. Ing. Robert Michaelides Amtsgericht-Registergericht-Fulda: 5 HRB 1867 -------------------------------------------------------------------------- E-mail and any attachments may be confidential. If you have received this E-mail and you are not a named addressee, please inform the sender immediately by E-mail and then delete this E-mail from your system. If you are not a named addressee, you may not use, disclose, distribute, copy or print this E-mail. Addressees should scan this E-mail and any attachments for viruses. No representation or warranty is made as to the absence of viruses in this E-mail or any of its attachments. AKTUELLES http://www.rmcan.de/ NEWS http://www.rmcan.com/
