Is JBI so bad?

Ross Mason, the CTO of MuleSource, recently started a discussion about JBI.

His first point is that JBI is no TCP/IP, meaning somehow that JBI is targeted at vendors and not at developers. Well, I'm not sure about the TCP/IP thingy, but he's a bit right about JBI being targeted at vendors and not developers. Why? If you have some knowledge about JBI, you know that there are multiple JBI components (bindings that handle a particular protocol such as HTML, JMS, etc... and engines that provides business logic such as a rules engine, a BPEL engine and so on). The developer will mostly see those components, not the JBI APIs: if you work with a BPEL engine and write a process, you won't see the JBI APIs surface in the BPEL at all. If you write a WSDL to define a SOAP/HTTP service, you won't really see JBI there either. So, yes, at some point, he is right that JBI 1.0 hasn't focused on the developer, or I should say, the user. Because if you need a custom component for your JBI container, you, as a developer, will need to dive into JBI and fully understand it. At this point, if you don't use JBI, you'd have to dive into a proprietary set of APIs to write your component. JBI aims to be mostly hidden for the users.

His second point is about some of the restrictions in JBI 1.0, mainly the use of XML, WSDL and no support for streaming. About XML, JBI has ways to convey binary data in non XML formats using attachments (don't you use attachments in your emails?). About WSDL, this point seems a bit weird since MuleSource has a product named Galaxy which is a registry of services described by WSDLs. Everyone knows WSDL is the standard for describing services. Anyway, the JBI specification says each endpoint has to be described by a WSDL, however, since the early days of ServiceMix, WSDL has not been a requirement and you can deploy your endpoints without any WSDL at all. With respect to data streaming, I'm not sure to understand the supposed flaw of JBI here: in the JBI world, a message contains an XML payload (which can be a stream, a DOM document or any kind of XML representation) and a set of attachments (which can also be streams). Just leveraging these APIs, JBI components are able to transfer very large amount of data using streams only.

His third point is about component reuse in JBI. We have users using ServiceMix components inside OpenESB and others using OpenESB components inside ServiceMix. It's true that most of the JBI vendors offer their own set of components. Let me ask the question: doesn't Mule come with its own set of transports? It would not make sense at all to distribute an ESB without any support for the most commonly used transports. It does not mean that these components can not work together.

Last comes some points about the existing standards. Since a long time, I don't think SCA should be viewed as a competitor to JBI. For some reasons exposed above, JBI does not really target the end users, while SCA does. However, SCA does not allow components to interoperate together. Hence, those two standards are complementary, not competitors.

All in all, I think JBI is a good specification. It does not address all the possible use cases in the best way (I'm thinking about handling non XML data) and sometimes goes beyong what should have been required (on the packaging and deployment side), but the core messaging APIs are well defined, and given the success of ServiceMix, I'm far from thinking that JBI should be dismissed.

Comments

Unknown said…
Hi Guillaume,

I think your remarks on Ross's article are very solid. JBI components can be exchanged between different JBI containers (I used a PEtALS and Open ESB JBI component in ServiceMix). That's shows the potential of the JBI specification.
I really find both approaches, the JBI and the Mule architecture, viable for solving integration problems. I think Mule does a great job in solving integration problems where messages can be POJOs and where there's a need for custom logic in Javabeans. ServiceMix or JBI in general does a great job in environments where you predominantly use XML messages and you need hotdeploy functionality and an open standard implementation. So I see implementations for both approaches :-).

Best regards,

Tijs Rademakers
Author of Open Source ESBs in Action

Popular posts from this blog

SSH Server in Java

ServiceMix Kernel is a small container based on OSGi. The latest release allows external clients to connect to it and issue commands using a simple protocol implemented on top of TCP or SSL. However, this remoting protocol has some drawbacks as the internals makes it unable to do another remote login from a remote session. In addition to that, completion and history do not really work great. So I've been thinking about using the SSH protocol, which is widely used, secured, with tons of different clients available. Unfortunately, no SSH server is available in Java. Over the past weeks, I've been working on implementing this SSH server, based on the IEFT specifications, the JSch SSH client library, and the OpenSSH server source code. The server itself is based on Apache Mina which is a great framework for using NIO. The project is available at http://code.google.com/p/sshd/ and although there are lots of limitations right now, the basics of the SSH protocol work. I plan t...

Apache Karaf

ApacheCon was really interesting this year! Recently, a lot of people have expressed a real interest in ServiceMix Kernel , our generic OSGi distribution for server side applications. We've been discussing moving this subproject into Apache Felix for several reasons: raise the visibility and awareness on ServiceMix Kernel attract a broader community Several Apache projects are planning to use ServiceMix Kernel as their container: this includes Apache James , Apache Directory and Apache ActiveMQ . The Apache Sling community is also willing to contribute to this effort along with some other groups like the OPS4J project. During this discussion, a name as been proposed by Jamie Goodyear: Apache Karaf . A carafe is a small container used for serving wine and other drinks (http://en.wikipedia.org/wiki/Carafe). In similarity to the name the Kernel allows applications to be more easily handled, and improves their characteristics (much like a bottle of wine left to breath in a dec...

Camel Endpoint DSL

Camel Endpoint DSL One of the new features of Camel 3.0  is an Endpoint DSL.  This new API aims to provide a type safe replacement for the URLs that are used in Camel to designate the consumer or producer endpoints.  These URLs provide 3 things: the scheme of the URL identifies the component to use, a unique name or id for the endpoint, and a set of parameters to customize the endpoint behavior. Here is an example of an FTP consumer endpoint definition: from( "ftp://foo@myserver?password=secret& recursive=true& ftpClient.dataTimeout=30000& ftpClientConfig.serverLanguageCode=fr" ) .to( "bean:doSomething" ); There are several drawbacks with such constructs : no type safety, bad readability and no simple completion. So we now use the meta model, which is currently extracted from the source using an annotation processor and written in various JSON files, to generate a fluent DSL for each endpoint.  The same...