'. '

Equinox

From APIDesign

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
-
Another implementation of [[OSGi]]. Can be merged with [[NetBeans Runtime Container]] via the [[Netigso]] project and it yields surprisingly [[Netbinox|good results]]. Standard info at [[wikipedia::Equinox_OSGi]].
+
[[wikipedia::Equinox_OSGi|Equinox]] is another implementation of [[OSGi]] specification. Can be used together with the [[NetBeans Runtime Container]] via the [[Netbinox]] subproject of the [[Netigso]] effort and it yields surprisingly [[NetbinoxTutorial|good results]].
== Equinox is not [[OSGi]] Framework ==
== Equinox is not [[OSGi]] Framework ==

Revision as of 07:25, 3 February 2010

Equinox is another implementation of OSGi specification. Can be used together with the NetBeans Runtime Container via the Netbinox subproject of the Netigso effort and it yields surprisingly good results.

Equinox is not OSGi Framework

Recently I have upgraded my Netigso project to Felix 2.0. It took a while as I needed to find new tricks to convince Felix to do classloading the way I like. I had this working in 1.4 version, but as this was done via reflection, which is obviously not a public API of Felix, the new tricks were quite different than those used in 1.4 version.

Nevertheless, some people are asking for Equinox support in Netigso. I was a bit reluctant to start such project. My attitude towards OSGi is still not through-fully positive and thus I thought support for one OSGi container is enough. But today was Friday, there was nothing better to do, so I gave Equinox a try.

It is amusing to look at different implementation of the same API! Both Felix and Equinox are supposed to work the same, yet both are coded in quite a different way. While Felix seems to adhere to OSGi spec as close as possible, the Equinox is full of additional abstractions and hooks exposed as API for integrators. As a result I seem to be able to integrate Equinox into Netigso without any wild tricks (like using reflection). One of the available hooks is actually exactly what I need.

It seems to me that Equinox is not by itself an OSGi container. It is prefabricate made for others (Eclipse & co.) to create their own OSGi containers. This is quite a different approach compared to the one taken by the Felix. While Felix adheres to the spec, avoiding containerisms as much as possible, majority of Equinox are various API extensions to tweak or enrich the standard OSGi behaviour.

As a result Felix seems to be the right framework for those who start with modularity and want to be as close as possible to the OSGi specification (Glassfish comes to my mind). Equinox on the other hand is much more friendly to those who want to experiment with new technologies or already have some notion of modularity themselves and need to bridge it to OSGi. Just like I have to do in my Netigso sub-project.

<comments/>


Alex Blewitt said ...

Actually, most of this post is a fabrication. Equinox is an OSGi framework, as evidenced by the fact that it passes the OSGi TCK, without which it couldn't be called an OSGi framework. So the assertion that 'Equinox is not an OSGi framework' is incorrect.

It does highlight something that people often get confused by; OSGi is not meant to be an exclusive specification of 'you can only use this'. It's supposed to be *modular*. And as such, you can add modules to bring your own functionality on top of any system; you're not 'limited' in some arbitrary way to only use those modules as specified in the OSGi spec.

Equinox, by itself, is a standalone OSGi engine. The framework differs from Felix's implementation in that the console is bundled in the 'org.eclipse.OSGi' framework bundle; whereas in Felix it's a separate engine.

But services like the extension registry are provided in their own bundle as a separate OSGi bundle. Just because the extension registry isn't defined in the OSGi core spec doesn't mean it's not OSGi - it's just another layer on top, much like the reference impl for remote services is handled by using different underlying bundles (e.g. ECF or SOAP).

Lastly, OSGi isn't a 'constraining' system which means that you are locked into precisely one way of working. In fact, until 4.2, there wasn't even a standard set of properties to bring up a framework; they were all non-standard properties in that way. At least that's starting to normalise.

--Alex Blewitt 12:11, 11 October 2009 (CEST)

Thanks for speaking up Alex. The title of my post was intentionally more radical than the content. All I wanted to point out is that Equinox (in contrast to Felix) is a meta framework. To turn it into actual OSGi framework you can apply various tweaking functions to it and thus obtain various OSGi frameworks. Obviously one of such tweaking functions can be identity (e.g. no change) yielding OSGi framework known as Equinox. But the meta capacity is something interesting and I wanted to point it out.

--JaroslavTulach 11:12, 12 October 2009 (UTC)

Personal tools
buy