Fuse uses apache karaf as its runtime. Apache karaf is osgi based runtime. So to understand fuse and karaf we need to know what is OSGi
The OSGi technology is a set of specifications that define a dynamic component system for Java. These specifications enable a development model where applications are (dynamically) composed of many different (reusable) components
If we take any java application it acts as application with monolithic architecture at run-time. It may have well structured package hierarchy inside it to group classes together according to their functionality but it provides convenience at development time. Run-time we cant say like I have now improved some package ABC which results in better performance and have some bug fixes now Application should be able to use this new implementation. Its not possible in conventional java system cause in normal java environment application is developed as complete package which contains everything it needs and if something changes even some small part of it whole application needs to be recompiled with changes.
The OSGi tries to solve this problem with something called as dynamic component system. OSGi allows us to modularise our application which was not possible in conventional java application.
In OSGi application is composed of various components which work together to achieve business functionality. These components are resolved at run time by each other which allows us to change one component without need of recompiling or changing whole application. This permits us to even better reuse of modules at run-time.
Benefits of OSGi
Applications are built as collaborating components which hide their implementation details from each other. They communicate with each other using find and bind service module. This allows us to change implementation of one component without breaking dependent components
Dynamic components approach leads to even better re-usability. Many application can leverage same component deployed in container unlike traditional java environment where each application needed to have its dependency bundled with it or provided by container.
OSGi is not about just development of modular components it also covers installation and management of these components.
OSGi allows components to be started, stopped ,installed ,uninstalled or updated dynamically at run time.
Many well known companies and application use OSGi. Like Eclipse the IDE, Oracles weblogic, IBM websphere, Suns Glassfish and Redhats JBoss EAP
Bundles are executable artifacts in OSGi environment .
The bundles are components which work together or independently to form an application. Bundles are unit of execution in OSGi. Its to OSGi what jar is to java (except one jvm runs only one jar separate jar needs separate jvm here OSGi steals the show by allowing multiple bundles to run in same container)
Each bundle connect with other using OSGi service model. In this model each bundle registers what it wants to offer to out side bundles as service in OSGi service registry. Other bundle now find services they want from OSGi registry and bind to that service to leverage registering bundle.
This allows bundle to hide their implementation details from other bundles making upgrade of one bundle independent of other bundles as bundles are not dependant on other bundles implementation but on services provided by other bundle
This allows us to start ,stop ,install, uninstall or update bundles dynamically
A layer which manages how to import and export bundles.
Defines what classes and method are available in that platform or environment where OSGi container is running.
For more details on OSGi please visit official OSGi site OSGi.org