Friday, November 21, 2008

ESB Basic concepts

JBI: Java business integration is the standard on which ServiceMix is built. JBI defines a standards-based architecture that can be used as the basis for Java-based integration products, in particular an ESB. JBI defines an architecture that allows integration products to be built based on components that can be plugged into the JBI environment. These components can be SE or BC.

SE: Service Engine which provides service to other JBI components.

BC: Binding Component which provides services to external.

NWR: The Normalized Message Router. JBI components (SE or BC) don’t directly communicate with each other—they communicate using the NMR. It’s the NMR’s job to make sure that the messages are exchanged correctly among the various components in the JBI environment.

DC: Delivery Channel. The delivery channel connects a JBI component (a service engine or a binding component) to the normalized message router.

Endpoint: A service can’t be accessed directly. To access a service, you need to use an endpoint. Each service must have at least one endpoint, but it can have many more.

Consumers and providers
In this section on JBI and the next on ServiceMix, we talk a lot about consumers and providers. Consumers and providers are the two roles a component inside a JBI container can have. If a component provides services to another component, the component’s role is the provider. If a component uses a service provided by another component, it consumes this service, and the component is called a consumer.

Service providers declare to the NMR the particular services they provide. Each declaration must be accompanied by a corresponding metadata definition, which describes the declaration. (This metadata definition is supplied by a Component-supplied SPI.) JBI requires that WSDL 1.1 or WSDL 2.0 be used for all such declarations.

Invoking a certain operation on a provider isn’t that hard. You simply create a new
MessageExchangeFactory for a certain service or interface. Using this factory, you create an exchange for a specific operation. Once you have the message exchange, just set the correct message and pass it on the NMR. The NMR will route the message to the correct service. This might all seem a bit complex, but you don’t have to worry. All the JBI-based ESBs out there provide a large set of components so usually you don’t have to be concerned with these internals, unless you’re writing your own SEs or BCs.

Service unit and service assembly
Service engines (SE) and binding components (BC) can be containers themselves to which resources can be deployed. For instance, you could have a service engine that provides validation services and allows you to deploy XML Schemas that can be used for validation.
The resources that you can deploy to such a container are called service units (SUs).
If you group these service units together, you can create a service assembly (SA). SA contains SUs.

No comments:

Post a Comment