Apache Karaf vs. Servicemix
Asked Answered
C

4

23

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...

Causation answered 3/8, 2011 at 16:59 Comment(0)
I
28

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.

Indignant answered 4/8, 2011 at 10:9 Comment(0)
S
9

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.

Sherbrooke answered 13/9, 2011 at 20:26 Comment(2)
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.Faunus
CXF 3.1.9 is included in servicemix 7.0.1Threonine
H
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

Hecate answered 29/11, 2017 at 17:53 Comment(3)
It may be that some features previously available in Karaf have migrated down to Felix, the web description on this is hard to understand.Hecate
...and will the future bring? To ServiceMix or Not to ServiceMixHecate
"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.Hecate
A
1

Karaf does NOT come with CXF.

Its pure extracted kernel of ServiceMix. However, you can install CXF on Karaf as below.

karaf:root()> feature:repo:add cxf

Once the feature URL is added we can see the "provided" features by using the following command.

karaf:root()> feature:repo:feature:list | grep cxf

To install cxf fire the command below

karaf:root()> feature:install cxf

Acerose answered 12/7, 2015 at 15:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.