directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject Re: [mina] Current status
Date Sun, 19 Dec 2004 17:59:03 GMT
Trustin Lee wrote:

>Hi.
>
>I added/applied bunch of features and fixes to MINA today.  This post
>summarizes them.
>
>1. IoHandlerFilter and ProtocolHandlerFilter is added.
>
>http://svn.apache.org/viewcvs.cgi/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/IoHandlerFilter.java?rev=122724&view=auto
>
>and
>
>http://svn.apache.org/viewcvs.cgi/incubator/directory/network/trunk/mina/src/java/org/apache/mina/protocol/ProtocolHandlerFilter.java?rev=122724&view=auto
>
>They are very similar to that of Servlet filters as you see.  Adapter
>classes are also provided to let user filter required events only
>easily.  Here is a blacklist filter:
>
>http://svn.apache.org/viewcvs.cgi/incubator/directory/network/trunk/mina/src/java/org/apache/mina/io/filter/BlacklistFilter.java?rev=122739&view=auto
>
>  
>
Yeah the pattern can handle serveral different kinds of use cases.  It 
was an excellent choice!

>Acceptor, Connector, and IoAdapter provides addFilter(...) and
>removeFilter(...) methods and you can add or remove filters at any
>time.  Here is an example:
>
>Acceptor acceptor = new TcpAcceptor();
>acceptor.bind(new InetSocketAddress(8080), new MyIoHandler());
>BlacklistFilter filter = new BlacklistFilter();
>acceptor.addFilter(10, filter); // 10 is a priority number.
>filter.block(new InetAddress("192.168.0.1"));
>
>You can add ProtocolHandlerFilters to IoAdapter of course:
>
>  
>
Berin, Trustin wdyt about using similar constructs in SEDA or even 
making these filter interfaces common (shared across sedang and mina) in 
the protocol API packages?  Is it worth doing that?  Me, I think so.

>Acceptor acceptor = new TcpAcceptor();
>IoAdapter ioAdapter = new IoAdapter();
>acceptor.bind(new InetSocketAddress(8080), ioAdapter.adapt(new
>MyProtocolProvider()));
>ioAdapter.addFilter(0, new MyCoolProtocolFilter());
>
>
>2. There is no need to explicitly start/stop I/O threads.
>
>I/O threads starts when there are any channels to handle, and they
>stops when there are no channels to do.  So convenient, eh? :)
>
>  
>
Huh? I must have missed someting :).  How does this work with thread 
pools?  And why do you do this? Meaning what's the advantage? 

>Now I'll implement thread-pool which is IoHandlerFilter and
>ProtocolHandlerFilter sooner or later.  If once done, we could
>benchmark and profile MINA with lots of clients and tune her. 
>Actually I don't have much experience with benchmarking massively by
>myself.  Is there anyone who can help me?  I need some URLs of tools
>and articles about it.
>  
>
Sorry I don't have much here either.  Jeff Machols was going to look 
into a protocol and benchmarking tool or build a library with clients 
for LDAP.  I think there may be an LDAP benchmarking tool out there.  
I'll peek here and there to see if I can find something.

This a great work Trustin.  I can't wait to see MINA start sucking the 
CAT5 cables off of my network!

Cheers,
Alex


Mime
View raw message