Wednesday, January 13, 2010

Apache ServiceMix - Close encounter

Hi there,

I've been pushed by the project I'm working on to use a very specific platform for integrating services, namely Apache ServiceMix. After spending around 8 hours trying to put this piece of code to some use (and failing miserably) I've decided to blog about it.

It's going to be very negative! You've been warned!

Let me start from the absolute beginning which is installation. Apache ServiceMix comes in 2 different distributions: one directly from Apache and another one maintained by IONA company called Fuse ESB. Both were easy to install (especially easy in the case of Apache distro where it came in the usual zipped form ready to go after unzipping). Iona was a bit more annoying with its GUI-based installer (you guys thing we're morons not able to use zipped folders? I hope not!).

After a brief lecture of the tutorial I've started to do some coding. Well, it's an integration platform after all so I thought some "integration exercise" will be ok to start with. All I wanted to do was to generate some messages in constant intervals using quartz and send them to a message queue provided by ActiveMQ (btw. if you have not tried ActiveMQ I strongly recommend you do check it out! It's an amazing piece of free software!).

My problems started at the very beginning where I've had to browse through tons of poorly structured documentation (on both Iona and Apache web sites) to get the hang of how do I actually proceed with such a use case. At this point one might think it is ok because it is a complicated piece of technology so doing some reading is kind of expected... "Some" being the key word here: 8 hours spent on googling for information without much success is in my humble opinion a total disaster! Have you guys heard about user friendliness and learning curves? Not all of us are ESB gurus but many of us are thrown into the pit where using SMX is needed. You really might have done better here!

Speaking of which, there is actually support you can get - but it's PAID!!! You have to pay some jerks to give you information about stuff they have "packaged" and "maintained", whatever the latter part means. This is theft, to say the least...

Going back to the available materials. There's a "tutorial". A piece of "documentation" written in a very easy to understand way. Had this sh*t been right top to bottom my complains would not have been so hard. I mean can you imagine trying to find out how to deal with grails and be left with a hello-world-style application that does not even compile? Or if it actually compiles then running it is a no-go? Can you beat that?!

Moving on I've finally found the answer on the net (provided by some poor soul trying to do the same thing I did today, meaning get started with SMX) and he already found the errors so I was able to do the changes and see (exactly) one file being moved from one folder to another! Ain't that cool?!

Amazed by the extreme complexity of the solution I made I thought that doing some scripting would be kind of cool and maybe would provide me with some more confidence that not everything is actually lost. So I did some googling and bang! There it is! The actual "component" I need was called servicemix-scripting, there's a Maven archetype that creates an example service unit from scratch so I was hoping to feel a loooot more positive. Again, nothing could have been further from the truth...

servicemix-scripting is not available from Iona repositories but it comes bundled with Apache distribution. It is said that "components are written to be JBI-compliant" so I thought moving one component from one distro to the other should not present any issues since both are JBI compliant. The disappointment was huge when I found out that my service unit not only does not start (the one generated by default using Maven archetype) but the error message says completly nothing. I was like "assembly failed to do something because of administrative error of some damn kind"... ehhhhhhh...

I will not bother you with the "F" words I wanted to say about JMS integration. Suffice to say its description and tutorials are where the sun does not shine.

Well, had this not been part of my daily work I would have thrown it away after like 1 hour (yes, I am extremely pervasive! :) ). Will see if I can squeeze some positive outcome in the coming days out of this product. If I do (or if I don't) I'll blog about it soon.

3 comments:

Chris Custine said...

Ouch! We hear you, and your observations have not gone unnoticed. Of course the open source documentation can always be better and we'll strive to improve it. We're also very happy to help on our mailing lists and IRC channels which are documented here: http://servicemix.apache.org/community.html.

Good luck and I hope things go better for you after your first impressions fade ;-)

Thanks,
Chris
ServiceMix Committer and FUSESource employee

Matthias Hryniszak said...

Thanks for the tip - I'll definitely try to look for help there.

Matthias Hryniszak said...

Well... it's been some time and the docs on Apache site are still the same. Points 1.1 to 1.7 contain no code whatsoever, lots of BS, lots of crap.

Well, maybe I'm dumb this way but I'd never ever ever select SMX for _any_ project. Not in a million years!