The blog is certainly extremely interesting.
I should point out that I have been implementing the AMQP protocol, which is used for messaging (e.g. JMS-style). I think AMQP is easier to deal with than http, so some of the complexities that need to be dealt with in http are avoided in my case, but nonetheless I think a lot of it will apply.
Looking at "To thread or not to thread", processing the reads on a separate thread from the selectors is not something I have tried. Has anyone else tried that with MINA? My gut instinct would be that it might help with a very large number of clients but for smaller numbers of connections (e.g. hundreds) the extra context switch will not help?
I have tried,however, trying to handle OP_WRITE on a different thread from OP_READ but also found (like Jean-Francois) that this didn't help. I suspect this is partly due to my tests though, since I would have thought that tests that try to read and write at the same time would benefit.
One question I do have is around the "Gold Candidate for Memory Leak" (that's in Tips and Tricks part II), because I don't think I quite understand the point.
JF says:
| "So you can ends up with thousand of objects taking vacations, enjoying idle time inside the Selector keys set. If you didn't implement any mechanism to make periodical look inside the Selector keys set, then you will most probably ends up with a memory leak (or your framework performance will be impacted). Worse, you might never notice the problem.... " |
In AMQP, we are using the idle mechanism in MINA to implement heartbeats. If we miss enough heartbeats, we close the channel which does cancel the SelectionKey. Is that not enough ensure that selection keys set gets cleaned up? Even if I were implementing http I would use the idle mechanism to kill inactive connections. Am I missing the point?
RG
| peter royal <[EMAIL PROTECTED]>
21/07/2006 20:07
|
To: [email protected] cc: Subject: Re: Some good news for MINA and asyncweb |
On Jul 21, 2006, at 1:56 PM, Irving, Dave wrote:
> Jean-Francois has been working on integrating asyncweb in to the
> Glassfish app server.
> This seems to have gone pretty well - and there's a write up here
> http://weblogs.java.net/blog/jfarcand/ which you may be interested in
> reading. There's some good compliments for MINA contained with!
neat! but looks like he ripped MINA out from under AsyncWeb to use
grizzly? :)
-pete
--
[EMAIL PROTECTED] - http://fotap.org/~osi
This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates.
This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
