Online Business Systems has been developing and implementing commercial Enterprise Service Bus (ESB) – or middleware – platforms for well over a decade. Our Open Source ESB solution, based on Open ESB technology, brings together leading technologies from the Open Source community that support critical performance and security demands typically associated with much more costly commercial offerings from the leading integration platform providers.

Online’s Open Source ESB allows organizations to realize all the benefits of a secure, highly available, enterprise service oriented architecture (SOA), without the burden of costly licenses and annual support fees. It runs on Red Hat JBoss Fuse, which combines technologies like Apache Camel, Apache CXF, Apache ActiveMQ and Apache Karaf, into a single integrated distribution. Apache Karaf is a lightweight OSGi-based runtime container into which various components and applications can be deployed, including Apache Camel, Apache CXF, and Apache ActiveMQ. It is also a container for our client-specific integration solutions which leverage Enterprise Integration Patterns (EIP) implemented by Apache Camel framework.

Some of the features provided by Apache Karaf are as follows:

  • Hot deployment: Karaf supports hot deployment of OSGi bundles by monitoring jar files in deployment directory.
  • Dynamic configuration: Configurations defined in property files are monitored and changes to these files are propagated to the services.
  • Provisioning: Provisioning libraries or applications can be done through a number of different ways (Maven repository, HTTP, file, etc.), by which they will be downloaded locally, installed and started.
  • Shell console: Unix-like console to manage container.
  • Management: Karaf provides a lot of management indicators and operations via JMX.
  • Web Console to manage OSGi bundles, the instances, the configurations and the log service.
  • Security framework based on JAAS with role-based access control for consoles and JMX.
  • OSGi frameworks such as Apache Felix or Equinox.

Since Apache Karaf provides all the features needed to deploy and manage components and applications, we are considering a custom Karaf distribution preconfigured with all the components needed to run our client-specific integration solutions. A custom Karaf distribution benefits our customers by providing them with more up-to-date base components such as Apache Camel vs other open source ESB solutions provided by product vendors, where the distribution is tied to closed source components that prevent easy upgrading to the latest versions of the open source components.

One question that we receive is “What do we gain by using an OSGi framework?”

The short answer is modularity. OSGi enables applications to be separated into smaller, reusable modules with a well-defined and robust dependency specification. A module explicitly specifies its capabilities and requirements. This explicit dependency specification encourages developers to visualize dependencies among their modules and help them make their modules highly cohesive and less coupled. The OSGi module system is dynamic: it allows modules to be added and removed at runtime. OSGi has very good support for versioning: it supports package versioning as well module versioning. In fact, it allows multiple versions of the same package to coexist in the same runtime, thus allowing greater flexibility to deployers. The service layer of the OSGi platform encourages a more service-oriented approach to build a system. The service-oriented approach and dynamic module system used together allow a system to be more agile during development as well as in production. More information about the benefits of OSGi can be found here, here and here.

A few examples where our Open Source ESB solution benefits from OSGi include:

  • Updates to existing ESB exchanges without downtime – Updates via hot deployment involve downtime because the application must be restarted. But since OSGi allows multiple versions of the same bundle to co-exist, we can remove the old version of the bundle once the updated version of the same bundle is started without any disruption.
  • More dynamic model for running each exchange independently – Non-OSGi solutions, such as the Sonic ESB, can provide independence of exchanges by running them in multiple management containers, but these containers run in separate JVMs. OSGi allows us to install, uninstall, stop and start individual exchanges in the same JVM seamlessly.

The only caveat to the benefits of using an OSGi framework, especially for larger and more complex projects, is that there is also a cost in terms of time required during the design phase of the application to decompose the features into smaller functional units.

However, given the complexity of ESB projects and their interdependencies, this decomposition is a best practice regardless, and the benefits far outweigh the investment in time.

Leave a Reply