jump to navigation

Restlet improves OSGi support: new edition and update site November 9, 2011

Posted by Jerome Louvel in Eclipse, Equinox, OSGi, Restlet, Restlet General.
add a comment

While OSGi has been for a long time an important deployment environment for Restlet developers, including an innovative project lead by NASA JPL, we have seen a surge of interest in the recent years.

The rise of REST, the addition of an Eclipse Public License option to Restlet and an increased effort from Restlet community is starting to bring new fruits!

Edition for OSGi Environments

Since version 1.1, Restlet has always tried to be friendly to OSGi developers by ensuring that each Restlet module distributed as a JAR file was also a valid OSGi bundle, including correct manifest information.

We also ensured that dependent libraries were distributed as bundles as part of the various Restlet editions and distributions (Zip and Windows installer).

In practice, OSGi development isn’t supported on platforms such as Android, GAE and GWT, leaving the developer free to choose from either the Java SE or Java EE editions of Restlet, as both contain different extensions usable in OSGi such as the Servlet and Jetty extensions.

Progressively, we realized that a new edition of Restlet dedicated to OSGi environments such as Equinox and Felix was necessary to clarify the situation and make space for more OSGi specific features.

Using our automated Restlet Forge, we were able to deliver this new edition, including dedicated Javadocs and distributions as illustrated above.

Eclipse Update Site

In addition, we worked hard on providing a new distribution channel specific to this OSGi edition : an Eclipse Update Site supporting easy installation and automated update right from Eclipse.

Note that this is only recommended if you intended to develop OSGi applications leveraging Restlet, not applications for other target environments such as Java EE or GAE. In the later cases, you should either manually copy the JAR files in your Eclipse project or rely on our Maven repository using a tool such as m2eclipse.

In order to use the Eclipse update site, you should simply use this URL: http://p2.restlet.org/2.1/

More detailed instructions about using this update site are available on this page.

Restlet integration with ECF

In addition, thanks to the work of Scott Lewis, the Eclipse Communications Framework lead, an integration of Restlet with ECF is now available.

This integration supports the OSGi Remote Services specification by adding REST/HTTP bindings based on Restlet and leveraging the Restlet extension for OSGi introduced below.

For additional details, you can read his blog posts #1 and #2. Scott was also very helpful by providing regular feed-back on all others aspect of this blog post.

Upcoming Restlet extension

Finally, based on work initiated via a Google Summer of Code project in 2010, a Restlet extension for OSGi is entering in the Restlet Incubator with the goal to become part of the 2.2 version of the framework.

The extension facilitates the development of very dynamic Restlet applications, supporting for example the live addition of resources and virtual hosts.

This org.restlet.ext.osgi extension is lead by Bryan Hunt and has received significant contributions from Wolfgang Werner.


Step after step, Restlet support for OSGi and the Eclipse ecosystem is growing and we will continue to work in this direction, with plans to add visual tooling for Restlet in Eclipse and to provide more integration with OSGi standard services such as the log service. As always, stay tuned!

GSoC and Restlet integration with Equinox May 6, 2010

Posted by Jerome Louvel in Ecosystem, Equinox, GSoC, OSGi, Restlet General.
1 comment so far

Two years ago, we announced that NASA launched Restlet on the OSGi orbit by developing an integration of Restlet 1.1 with OSGi, based on Equinox extension points. This effort was presented at EclipseCon 2008 & 2009, and the code was contributed to the Ensemble project under a special license as explained by Bryan Hunt in this post. Also, listening to feed-back on OSGi from Restlet community, version 2.0 of the Restlet Framework was enhanced to ensure that all its modules and dependencies were available as good OSGi bundles.

However, even though deploying Restlet components and applications in an OSGi environment is already possible and explained in the user guide, it doesn’t take advantage of the dynamic and extensible nature of OSGi. Today, Bryan Hunt pointed me to a great tutorial written by Wolfgang Werner that nicely describes the Restlet Framework, covers its usage with Eclipse’s Plugin Development Environment (PDE) and explains how to leverage Equinox’s extension points to dynamically register Restlet components, applications and resources. See the series of posts titled “Building web services on Equinox and Restlet”:  part #1, part #2 and part #3.

But wait, there is more good news as a Google Summer of Code 2010 project “Restlet integration with Equinox” was proposed by the Eclipse Foundation and just accepted by Google! Thanks to Bryan Hunt for initiating the effort, to Equinox’s development team for supporting it, including Jeff McAffer, Simon Kaegi and Scott Lewis. We also received a positive review from Benjamin Cabé, an Eclipse contributor. Thanks also to all supporters including Jeff Norris and Khawaja S Shams from NASA, Rob Heittman from Solertium and Thierry Templier.

Two students proposals were submitted, one from Rajeev Sampath and another one from Samrat Dhillon. The first one was finally selected but Samrat has offered to contribute to the project. Rajeev is a Computer Science undergraduate student from University of Moratuwa, Sri Lanka, with good Java and distributed system experience as illustrated by his participation to the Epzilla project on Complex Event Processing (CEP).

I’m very happy to see this project, initiated by the Restlet community, taking shape and wish it full success. At Noelios Technologies, we will support it as co-mentor and encourage other interested parties to join and contribute. The project web site at Google Code is here… stay tuned!


NASA launch Restlet on OSGi orbit May 5, 2008

Posted by Jerome Louvel in OSGi, Restlet General, User interface.

Since 2004, NASA Jet Propulsion Laboratory has become a forefront user of Eclipse RCP (Rich Client Platform). As explained by Jeff Norris in the foreword of the “Eclipse RCP” book, this choice was driven by the UI-level features as well as the modularity offered by Eclipse’s plug-in architecture : Equinox.

The usage of Eclipse RCP started within the JET’s Maestro team and is now shared with other teams at NASA via a framework named ‘Ensemble’. You can read the whole story in this case study.

As Equinox is in fact a full OSGi run-time, it is possible to use it for server-side applications as well. For EclipseCon 2008, Khawaja S Shams and Jeff Norris have given a great presentation on the integration between Equinox and REST, leveraging the Restlet API. The slides are available online.


They introduce the ‘Ensemble REST Framework’, providing a convenient definition of new Restlet Resources via Equinox extension points. This integration nicely uses Eclipse wizards to define those Equinox extension points. Just note that extension points are not yet part of the standard OSGi speciciations.

This initiative, as well as constant interest in OSGi from our users has led us to improve the support for OSGi in the upcoming Restlet 1.1 M4 release. Each JAR in the Restlet distribution is now a full OSGi bundle. An internal activator automatically registers the Noelios Restlet Engine (NRE) with the Restlet API, or the pluggable connectors with the NRE.

You can get more details about the current and planned support for OSGi in Restlet in this RFE. We are also looking forward to playing with Ensemble REST framework which will be released in open source by NASA.