roq-messaging / RoQ

RoQ, Elastically scalable MOM
21 stars 4 forks source link

Evaluation of Apache Karaf #130

Closed sskhiri closed 11 years ago

sskhiri commented 11 years ago

Karaf is a light OSGI micro container. The objective of this evaluation is to define whether it can be used for dramatically reduce the number of RoQ processes in small clusters while keeping flexibility of full distributed deployment on large clusters.

Objectives

The evaluation will contain:

  1. Evaluation of the re-factoring effort for bundlization of RoQ elements
  2. Memory footprint on a Karaf VM compare to a VM and its performance impact on an exchange
  3. The ability to launch Karaf process programatically
  4. The feasibility of a Service Life cycle Manager facade that can load & unload RoQ elements

    Reference

http://karaf.apache.org

sskhiri commented 11 years ago

A first working prototype is running I will push a new branch karafB. This prototype starts a GCM as an OSGI bundle. Then we just need to:

  1. Start Karaf KARAF_HOME/bin/karaf
  2. Install the bundle: karaf@root()>install file:/home/sskhiri/dev/RoQ/RoQ/roq-gcm-bundle/target/roq-gcm-bundle-1.0-SNAPSHOT.jar Bundle ID: 137
  3. Start the bundle by its ID karaf@root()> start 137 16:16:06,003 INFO Karaf Console Local user karaf - Starting the GCM Bundle... 16:16:06,006 INFO Karaf Console Local user karaf - Starting the global configuration manager 16:16:06,006 INFO Karaf Console Local user karaf - Starting with property location @etc/GCM.properties 16:16:06,015 INFO Karaf Console Local user karaf - Started global config Runnable 16:16:06,029 INFO Thread-22 - Shutdown monitor started for Global config manager 16:16:06,086 INFO Karaf Console Local user karaf - Configuration from props: GCM 60000 formatDB false 16:16:06,259 INFO Karaf Console Local user karaf - Meta data:jdbc:sqlite:Management.db 16:16:06,260 INFO Karaf Console Local user karaf - Creating DB schemas if not created yet... 16:16:06,265 INFO Karaf Console Local user karaf - DB Created and initiated. 16:16:06,269 INFO Thread-23 - Shutdown monitor started for org.roqmessaging.management.server.MngtController Server

So it works. However, if we want to have a complete OSGI version we should

  1. Implement the HCM as a bundle : 2 m.days including tests
  2. Implement an OSGI Service and a Service factory for managing the instance of exchanges, monitor, stat monitor and scaling process.: 5-6 m.days including test.

I am still wondering whether we really need to embed a real OSGI container for our needs.