Hello, I started to review the Mina3 code and I have a couple of points I want to share with you:
1) It is possible to close all existing connections established by a client, the method is called disconnect (BTW a log message is issued but with an address which is the last one connected so it may be confusing), but there is no corresponding method for the server: the unbind method simply stop listening for new connections but existing ones are kept alive. I think we should align for the server but we should rename it like release or shutdown but we need to think about the lifecycle of those service objects: once this method has been called, can the user call again connect ? 2) I noticed that some threads are created through the SelectorPool implementations, and those threads are lost forever when the client or server is gargage collected. Is there any reasons why the implementations are not related to the Java Executor framework. We should think of a release mechanism when the SelectorPool has been allocated by the IOService. 3) In order to get even better performances, I spoke with Emmanuel about the NIO2 asynchronous operations. Since then, I looked at the Windows and Linux/MacOS implementations and it seems thy do more or less what Mina did before: a thread is issuing epollctl instead of select and there is registration/unregistration mechanism against this thread. I don't think we might get much improvement but I have started a little POC just to know. -- Jeff MAURY "Legacy code" often differs from its suggested alternative by actually working and scaling. - Bjarne Stroustrup http://www.jeffmaury.com http://riadiscuss.jeffmaury.com http://www.twitter.com/jeffmaury
