Saturday, July 11, 2009

Realization of SOA goals through Apache Camel


Apache camel is a powerful integration tool. It supports many important integration patterns from the "Enterprise Integration Patterns " book. Most importantly the ease of use of complicated integration patterns captures the imagination of a developer.

Apache camel helps realize the goals of SOA with ease. Some prominent aspects of SOA that needed to be achieved in our project were service virtualization, service reusability, scalability , maintainability and service composability . The above goals needed to be satisfied to provide a robust service oriented infrastructure that is capable of sustenance to a rapidly changing software environment.


Here is a brief explanation of the architecture of the project. The project has a three tier architecture. Front end, middle tier and a back-end database. The ESB with the apache camel is the back bone of the architecture. The ESB contains a repository of services, with each of these services achieving a specific goal. For example : There are services to submit jobs to a distributed system, services to cancel jobs form the distributed computing system and services to query the status of job in the distributed computing system. Similarly there are other services to perform different operations on database and other third party systems. Through observation, its clear that services become the building block of the architecture.


The above diagram shows a schematic representation of services used in the project . The apache camel forms the back bone of the architecture and connects disparate services together resulting in a process flow.

Apache camel helps achieve service composibility. To achieve a certain business goal, multiple individual independent entities called services are required. The business goal is achieved by the composition of these services. Apache camel through its camel route feature helps compose a complicated business flow by fixing together a set of individual and independent set of services .


Apache camel help achieve service reusability by allowing invocation of services from the route. All services are defined in such a way that they achieve a part of the goal. They are independent of each other and have a complete meaningful functionality within itself. These independent, individual functionalities are combined together to achieve a complete flow. Apache camel helps combine the individual services together to build a whole process flow . This gives plug-in kind of feature to the architecture where in a new processing method can be added to the existing one by just plugging that service to the camel route.

The services are virtualized from the camel route. The camel component is a backbone deciding the flow of the messages through different services. The camel routes are aware of the services thorough the services uri and access them through the jbi bus. The implementation of the services is abstracted from the camel route. This means that any modification in the behavior of the service will not affect the camel route.


Apache camel provides a strong integration framework. We used a couple integration patterns in our project. The content based router and the pipeline pattern. The content based router pattern decides on the route of the message based on the content of the message. In the project, based on the type operation the route for the message would change. The route for job submission is different from the job query and job deletion. The pipeline pattern routes the output of one service to the next thereby creating a chain of processors, with each processor processing the output of the previous.

2 comments:

  1. Hi Ganesh

    Nice blog post. Do you mind if we add a link to your blog post from the Apache Camel articles webpage at: http://camel.apache.org/articles.html

    Kind regards

    Claus Ibsen
    A Camel rider

    ReplyDelete
  2. Hi Claus,

    Glad to contribute to you guys in anyway possible. Please go ahead.

    Regards,
    Ganesh

    ReplyDelete