Posted by Jerome Louvel in : Eclipse, Equinox, OSGi, Restlet, Restlet General
- no 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!
Posted by Jerome Louvel in : Ecosystem, Equinox, GSoC, OSGi, Restlet General
- no comment
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!