Eclipse - OSGi
![]() | ![]() | ![]() |
Equinox
The Eclipse has integrated an OSGi runtime. What does this mean?
Eclipse is based on a plugin model from ground up. The plugin model is at the root of the system, not an add-on like other IDE's. The most basic core of Eclipse 2.0 was a standalone runtime system that did not know anything of Java, editors, resources or GUIs. It only knew about plugins and extension points. The whole IDE was based on this abstract plugin model. This means that Eclipse can be used for many more applications than just a Java IDE. It can be used whenever the work of many developers need to be integrated seamlessly. And, aren't all systems build like that today?
After release 2 the Eclipse team felt that plugins were a wonderful concept, but they were lacking dynamics. Plugins could only be discovered at startup and once a plugin was installed, it could not be removed. This required the dreaded restart (a feature well known from a popular operating systems on the market).
It was therefore decided to include a requirement for dynamic plugins on release 3 of Eclipse. Eclipse runs the so called technology projects that try out technologies before they are included in the mainstream releases. The technology project that had to look at dynamic plugins was called Equinox. The first task of Equinox was to investigate dynamic runtimes. After looking at JMX, Avalon, Tomcat and OSGi it was decided to use OSGi as a starting point. The OSGi Service Platform is already used for home automation, industrial automation, consumer electronics, vehicles (new generation BMW 5 series!), enterprise applications, and will appear soon in a mobile phone near you.
OSGi Service Platform

The OSGi Service Platform is a set of specifications that define an application model inside a VM. Inside a running VM, it is possible to install, start, stop, update and uninstall applications. The VM never has to be stopped. The specifications have a very flexible and powerful management model that made it possible to use the specifications almost as is in Eclipse. It was a compliment to the orginal Eclipse design that it was possible to completely replace the the runtime with an OSGi implementation without requiring changes to the existing plugin base. Eclipse contains the OSGi. Eclipse, off the shelf, now runs all OSGi bundles.
What does this mean for you?
The biggest problem today in the software industry is integration. When I started working in the software industry ('80s) standard libraries were the exception and nobody ever heard of components. We had to develop everything from scratch (Which actually was a lot of fun!). Today, reusing the libraries and components from others is a necessity to survive. The problem with reuse is the integration of all these different parts into a coherent whole. This is hard work and doing this dynamically in the field, is even harder. Still, there is no escape. Systems have to be maintained in more and more configurations and field updates are a necessity to allow products to have a reasonable life time. Both Eclipse and the OSGi Alliance worked on this problem from different angles. Merging these approaches is wonderful news for all developers that develop systems in Java.
How To Start
If you are not experienced, download eclipse and build some plugins for Eclipse. Eclipse contains numerous wizards to build and develop bundles. Developed bundles can be deployed on Eclipse itself (nice for testing), or they can be deployed on OSGi Frameworks that are available from different vendors. There is also a separate project at the Eclipse site that maintains the OSGi runtime, called Equinox. Their site contains an OSGi Framework with a growing set of bundles. However, do not forget to check out the Resources page, there are a lot of other vendors and Open Source groups that also make frameworks and bundles.
For example, you are building a PBX for the small office market. A PBX will consist of lots of components that need to cooperate, but many will depend on the hardware configuration and options. Using the OSGi Service Platform you can break out the codecs, drivers for the line cards (yes, OSGi supports native code), user interface (there is a standardized HTTP server included), and other functionality. You could use the Eclipse runtime inside your PBX by removing all the unnecessary plugins like PDE, SWT, JDE, etc. Or, alternatively, you could use one of the vendor's framework. Using OSGi would give you remote management, developement tools, and access to standardized components. Your PBX could for example be made available to, or use, UPnP devices on the network. For example, incoming calls could be displayed on a UPnP controller, or voice messages could be played on the UPnP enabled television. This kind of extra functionality can be obtained with hardly any effort using standardized OSGi components.
Anyway, to get started, you can check out the Tutorial. This takes you step by step through how to develop OSGi bundles (and therefore Eclipse plugins).
Contact HomePage if you need help with developing OSGi bundles or want to contract out the development of a custom bundle. We can deliver turn key solutions.






