I have been reading over the source code to smack, as well as reviewing some of the outstanding performance related bugs and it seems the current version of smack doesn’'t take advantage of any of the features in 1.4 or later versions of Java.
I am mainly refering to the enhanced APIs java.util.conncurrent, for threading and concurrency and java.nio, for socket reading and buffering and charset conversion. But also the String Builder, as apposed to the frequently used StringBuffer.
Are there any plans to implement these features to enhance client performance?
I am looking at implementing XMPP in a distributed SOA (Service Orientated Architecture) like application as a lightweight messaging protocol. Services would communicate events and non essential state through this “message bus” rather than more heavy weight reliable messaging protocols.
At the moment these services don’'t produce a lot of messages so it is not a bid deal.
Look forward to reading your thoughts on this.
java.nio will be used in the next Wildfire release, one may expect it at the end of January.
As Spark which uses Smack is usually used on dedicated clients there the little performance overhead is not critical. I have no idea about your applications, but I expect that they will use a very small xmpp connection pool to connect to Wildfire, and exchanging messages is usually much less cpu intensive then processing their content.
Some venders of “more heavy weight reliable messaging protocols” don’'t use nio within their server so if you want to use 5000 concurrent client connections you hit some problems.
I’'m not aware of plans to use nio also for the client.
Currently Smack is thread-safe so I wonder if changing StringBuffer to StringBuilder is always possible, and looking at every piece of code and test it again will take ages. Also there I wonder if it makes sense within a client API.
Thanks for your explanation.
At the moment I am reviewing your smack API code to see if it fits into our requirements.