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:
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.
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With