Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gemini and Apache Aries blueprint container

Tags:

osgi

Gemini is the reference implementation for OSGi blueprint container, and Apache Aries is another blueprint container that is widely used...including within Apache Karaf.

If I'm starting a new project (with open source technologies as a requirement) and plan to use blueprint, what should be my considerations when choosing between these two?

Is the choice based on what OSGi container will be used, where:

  • for Virgo then Gemini is your best/only? blueprint container choice
  • for Apache Karaf, then Apache Aries's blueprint container if preferred choice

Does it even matter? i.e. Can I just code against blueprint specs, and let the deployment decide what DI container is used in production?

Sorry if this question is not very specific, but the topic itself is rather confusing for me.

like image 829
kctang Avatar asked Feb 07 '12 08:02

kctang


People also ask

What is Apache blueprint?

Blueprint provides a dependency injection framework for OSGi and was standardized by the OSGi Alliance in OSGi Compendium R4. 2. It is designed to deal with the dynamic nature of OSGi, where services can become available and unavailable at any time.

What is Karaf container?

Apache Karaf is a modern polymorphic application container. Karaf can be used as a standalone container, supporting a wide range of applications and technologies. It also supports the "run anywhere" concept (on any machine with Java, cloud, docker images, … ​) using the embedded mode.

What is blueprint XML?

A Blueprint XML file is identified by a top-level blueprint element and contains definitions of component managers such as a bean manager, a service manager, and service reference managers. A Blueprint XML file is identified by a top-level Blueprint element, as shown in the following blueprint.

What is blueprint in Karaf?

karaf-blueprint-example-provider implements and exposes a BookingService using a Blueprint XML file. karaf-blueprint-example-client uses OSGI-INF/blueprint/client. xml Blueprint XML to get a service and start a thread. karaf-blueprint-example-features contains a Karaf features repository used for the deployment.


1 Answers

If you're only using Blueprint, then your idea of coding against the specification and deciding at deploy time is a good one. The behaviour of the two implementations should be identical. If you're unlucky you'll find different bugs in the two, but hopefully not since both implementations are mature. One factor which might influence your eventual decision is that you may find the performance is different between the two. (But for performance, measure, don't guess!)

If you're going to do things beyond core Blueprint, like container managed JPA and JTA you'll find there are more obvious differences between Aries and Gemini. I know Aries has a number of Blueprint extenders in this area, for example (I'm an Aries committer).

In principle Aries should run in Virgo and Gemini in Karaf, but I'm not sure I'd fancy trying it myself, since things in both stacks do build upon Blueprint.

--

http://www.manning.com/cummins - Enterprise OSGi in Action

like image 129
Holly Cummins Avatar answered Oct 14 '22 10:10

Holly Cummins