You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

So you've read How to Evaluate an ESB and you're ready to select one. Now the question is, is ServiceMix the right one? Here's some basic information to get your decision-making process started.

Open Source & Open Standards

How do Open Source ESBs compare to commercial ESBs?

In general, they are both viable solutions. To be more specific, hopefully the rest of this page will give you some idea.

Note that both community and commercial Support are available for ServiceMix.

Is ServiceMix based on Open Standards? Is that important?

Yes, and yes.

ServiceMix implements the Java Business Integration or JBI specification (see What is JBI?). This means that standard JBI components can be run in ServiceMix, along with services that use them. Likewise, JBI components or services developed for ServiceMix can be used in any other JBI-compliant ESB.

Additionally, while not a standard per se, ServiceMix lets you use Spring beans as services, which may help you get started quickly. The same Spring beans could be used both in ServiceMix and in other Spring environments (such as, say, in a unit test, or in another application requiring the same logic).

Beyond the above, the message format used internally on the bus is XML-based (with optional binary attachments, etc.), and ServiceMix supports a variety of WS-* specifications for messages going into and out of the bus. More on those later. ServiceMix also uses the standard JMX management and monitoring API.

The bottom line is that you should be able to deploy standards-based services, using standards-based ESB functionality, exchanging standards-based messages. This means your code and configurations should be portable across products, it should be easy to integrate with other environments, and it should be easy to find tools to support development, testing, monitoring, and tuning.

Basic Architecture

JBI: Normalized Messages, Service Engines, Binding Components, oh my!

Let's look at the picture from the Front Page:

In the middle, there's the bus. The messages on the bus are JBI Normalized Messages, which are XML-based with optional binary attachments, header values, etc. (for more detail see What is JBI?).

On the bottom are binding components. These are JBI components (like plugins) that have the capability to convert incoming messages from some protocol (like SOAP over HTTP, REST over JMS, SNMP, some custom binary junk, etc.) into Normalized Messages, and put those messages onto the bus. Or take a Normalized Message from the bus, and send it out using some other protocol. Or both.

On the top are service engines. These are JBI components (again, like plugins) that can do interesting things with Normalized Messages. Like perform some routing, or run a BPEL process, or invoke a method on an EJB and return the result as another Normalized Message.

So when you deploy an application, it will probably include things like:

  • Some POJOs, Spring Beans, or other components with service logic
  • Configuration files to activate certain service engines (e.g. to convert Normalized Messages into method calls on your beans above)
  • Configuration files to activate certain binding components (e.g. to connect your services to the SOAP-over-HTTP protocol on a certain URL)
  • Any additional routing rules, perhaps using a routing service engine, if it can't be deduced (e.g. by comparing the format of a Normalized Message to the WSDL describing the services) or needs additional customization

Note that JBI has a specific format for applications – Service Units in a Service Assembly, so your application could be deployed to another JBI-compliant ESB (assuming the needed JBI Binding Components and JBI Service Engines had also been deployed).

WSDL? Did you say WSDL?

So a JBI service is typically described by a WSDL. This does not mean that SOAP is involved on the bus, though – note that an XML message (for example, a NormalizedMessage) can be compliant with a WSDL without any of the SOAP envelope, headers, or additional overhead.

In some cases, you may deploy a service with an associated WSDL. In other cases, the WSDL may be generated for you (for instance, if you deploy a POJO as a service using the JSR-181 service engine). But the easiest way to make sure a NormalizedMessage gets to a particular service on the bus is to make sure the message complies with the WSDL for that service. Otherwise, you have various routing options to use.

If it happens that you are using SOAP for messages going into and out of the bus, what typically happens is that the binding component will strip off the SOAP envelope, use the body of the SOAP message as the Normalized Message XML, use any SOAP attachments as attachments on the Normalized Message, and use any SOAP headers as headers on the Normalized Message. Then the Normalized Message is sent on the bus to the appropriate Service Engines, etc. Finally, the reverse procedure applies for replies or messages going out of the bus via a SOAP binding component.

How does ServiceMix handle messages on the bus?

The two most common modes are SEDA and JMS flows. For messages that are non-persistent, ServiceMix uses an efficient in-memory system known as the SEDA flow to convey messages on the bus. For messages that are persistent, ServiceMix uses JMS messages with an underlying ActiveMQ broker. You may also choose to force the use of the JMS flow, for example to connect multiple ServiceMix instances.

Message Capabilities

Orchestration

Security

Performance

Testing

Complex Services

Publication / Discovery

Mediation

Policies

  • No labels