Emmanuel Bourg wrote:
Hi,

I started playing with Qpid recently, I'm mostly interested in the Java side of the project. I noticed that the Java client was quite big compared to the other clients. It weights about 4.3MB whereas the .NET client for example is less that 1MB.

It looks like the dependencies could be reduced:

- Commons Lang is only used once in AMQProtocolSession to perform a replace char. This could be replaced by a basic String.replace() or a regexp.

- Commons Configuration seems to be only used by the broker, it's never used in the common and client packages.

- Commons Digester and Commons BeanUtils are in the binary package but don't seem to be used. I guess they are there as transitive dependencies of Commons Configuration?

- Commons Collections is only used for the ReferenceMap, if this class can't be replaced by a WeakHashMap it could probably be copied into the source tree to save 500KB.

- Commons Codec, not sure if it's actually used by the client but its size is quite small.

- backport-util-concurrent should be easy to remove since the client already requires Java 5. As I understand this dependency is required by the Mina jar that was specifically tweaked for Qpid. I can volunteer to repackage Mina without the backport-util dependency.

- qpid-all.jar, I'm not sure to understand its intent since this package doesn't contain any code or resource.

This is just for convenience. It has a manifest-classpath that references all the other jars. We want to kill this at some point, but right now most of our scripts reference it.

- qpid-common.jar is the biggest part of the client. Maybe the implementations of the various AMQP versions could be split into different jars so one can pick the version relevant to its usage (qpid-amqp-0.8.jar, qpid-amqp-0.9.jar, etc) ?


These changes could bring the size of the client to less than 2MB.

What do you think?

I'm generally in favor of examining and reducing our dependencies where possible. We haven't done this in a long time, so I wouldn't be surprised if they could be trimmed a bit. Do you have a specific size/configuration in mind? Are you looking at embedded usage or something?

--Rafael


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org

Reply via email to