mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: [MINA 3.0] dependency against google guava
Date Fri, 26 Aug 2011 11:20:28 GMT
On 8/26/11 12:57 PM, Julien Vermillard wrote:
> Hi !
> I would like to use google guava for core MINA functionalities.
>
> Possible usages  :
> Immutable List :
> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/com/google/common/collect/ImmutableList.html
> convenient for storing filter list in an immutable fashion.

You can make a list immutable by using Collections.unmodifiable( List ).

>
> Listenable futures :
> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/com/google/common/util/concurrent/ListenableFuture.html
> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/com/google/common/util/concurrent/AbstractListenableFuture.html
> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/index.html?com/google/common/util/concurrent/Futures.html
>
> Convenient InetAddress  methods avoiding DNS requests :
> http://guava-libraries.googlecode.com/svn/tags/release09/javadoc/index.html?com/google/common/net/InetAddresses.html

A soon as it brings some value, I have no problem with using a external 
lib. However, if we can get the same result without dependency on 
another external lib, that would be better, IMO.

For instance, ListenableFuture is already available in ActiveMQ 
(http://activemq.apache.org/apollo/documentation/api/apollo-util/org/apache/activemq/apollo/util/ListenableFuture.html).

Copyong the code from there inside MINA would be a possibility.
>
> The HashMap tools are very cool and help you to keep your code concise :
> ex :
> in place of
> Map<K,V>  myMap = new HashMap<K,V>();
> you can write :
> Map<K,V>  myMap = Maps.newHashMap();

Not really convinced aboyt the gain, here.

Bottom line : adding a new dependency is an annoyance, to me. We have to 
add the dependency to MINA, forcing our users to load it. Plus if we 
decide to make MINA OSGi compliant, we will have to encapsulate Guava 
into a separate project, maiking it an OSGi bundle.

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com


Mime
View raw message