Apache Karaf vs. Servicemix

17,360

Solution 1

We're using Karaf for a number of our applications. We were already using Camel (JMS and Esper) for integration between several different platforms (a JBoss 4.2 instance, a Tomcat and several Felix instances) and as this was working well there was little justification in migrating this too (which would have been cause to consider ServiceMix).

The only reason we have some Felix nodes, is that they're limited in use (on client desktops), rarely need/get updated and I wanted the smallest footprint for these nodes. For anything OSGi on the serverside we're using Karaf.

Karaf provides all of the features you'd expect and need for a production environment (see the apache-karaf tag's info). We do our development and testing against standard minimal framework (using pax-exam) but deploy to Karaf.

If you don't need an ESB, JCA, BPEL, etc but want a solid, tunable OSGi container, then Karaf on it's own is more than adequate. (And if you found yourself needing a limited subset of ServiceMix's functionality you can always install these in a Karaf instance).

You can also customise the Karaf distribution as part of a maven build - personally I like have the container as part of the application's build, as I can checkout, build and run the entire setup from the command line in minimal time.

Recently there's a clustering subproject of Karaf called Cellar using HazelCast, I not sure if this applies to ServiceMix too.

Solution 2

Karaf's life started as the ServiceMix core. Currently, ServiceMix is really a set of bundles that are deployed into a Karaf container. ServiceMix has a number of very handy bundles which do a lot of cool stuff that karaf doesn't. That said, the two primary reason for using ServiceMix is if you want: 1) an ESB, 2) NMR (a feature that allows you to community between bundles AND instances of Karaf).

This all said, the ServiceMix group is currently planning version 5, which will remove the ESB and NMR features and will be focused on being a management container for Camel. In ESB's a great deal of effort when into creating components that could be described using BPL (Business Process Language). However, the folks that wrote ServiceMix began to focus on the implementation of EIP's (Enterprise Integration Patterns) which largely does the same stuff as BPL, but does it in a more standardized and accepted manner. This work was done under the Camel project.

So, in short. If you are using ServiceMix 4+, you're also using Karaf. If you want a more robust integration environment, the environment of choice today (in the Apache/Felix world at least) is Karaf, Camel, and a few bundles from Servicemix.

Solution 3

Here's a little comparative illustration I made. Going from the simplest case (JVM with OSGi functions provided by Apache Felix at the bottom), to more complete/manageable OSGi functions (Apache Karaf in the middle), to enough functions to implement complete ESB instances (Apache ServiceMix at the top) (note that "an ESB" is not a product but a set of endpoints, routers, databases, ETL functions and whatnot configured together in a particular task-specific way).

From Felix to Karaf to ServiceMix

Share:
17,360

Related videos on Youtube

Ben ODay
Author by

Ben ODay

Software Consultant and owner of Initek Consulting a firm that specializes in vehicle telematics, Iot and cloud based integration solutions.

Updated on September 28, 2020

Comments

  • Ben ODay
    Ben ODay almost 4 years

    Is anyone using Karaf instead of Servicemix? If so, how did you come to this decision? I'm aware that Servicemix adds a layer of functionality around Karaf, just curious if Karaf is being used on its own and why...

  • Malcolm McRoberts
    Malcolm McRoberts over 11 years
    Does Karaf come with a SOAP engine for web services? I know I can add CFX to get that. I'm wondering if that comes with ServiceMix.
  • David Tonhofer
    David Tonhofer over 6 years
    It may be that some features previously available in Karaf have migrated down to Felix, the web description on this is hard to understand.
  • David Tonhofer
    David Tonhofer over 6 years
    ...and will the future bring? To ServiceMix or Not to ServiceMix
  • David Tonhofer
    David Tonhofer over 6 years
    "Blueprint" is the Apache Aries Blueprint, which is dependency injection framework for OSGi and was standardized by the OSGi Alliance in OSGi Compendium R4.2. (and apparently is based on the Spring Dynamic Modules implementation. However OSGi seems now very dead at Springsource: Not a single Guide in the search results.
  • Heiner
    Heiner about 6 years
    CXF 3.1.9 is included in servicemix 7.0.1