views:

987

answers:

4

I really like the concept of modular bundles as implemented by OSGi.

I also like "managed deployment" services like Google AppEngine (for web application) or Java WebStart (for client software).

These two ideas seem to complement each-other rather well conceptually.

However, the OSGi standard includes a couple of features that make it impossible for implementations like Felix or Equinox to run on top of sandboxed virtual machines, such as AppEngine or Webstart. In these environments, it is not possible to get direct access to a file system, for example, which precludes the OSGi bundle cache that is used to store persistent bundle state and native libraries.

Now, I have no great interest in using native libraries or have persistent bundle state. Is there some framework that implements the core bundle and services concept of OSGi (ideally in a compatible way so that OSGi bundles can be deployed into it as is), but can work without a bundle cache (and other facilities not available in a sandbox)?

I am looking for something like a limited version of Felix that works on AppEngine or WebStart.

Of course, if the WebStart engine and the Google AppEngine just provided OSGi framework services out-of-the-box that would be great, too...

Update: Another very limiting aspect of AppEngine is that you cannot start new Threads. This prevents (among other things) asynchronous bundle life-cycle management. Obviously not an issue with WebStart.

A: 

If your sole problem comes from the bundle cache and you don't need it, you can may be get rid of it by set this property to null in Equinox or Felix ? I'm pretty sure that this cache is not mandatory to have Equinox to run (don't know for Felix)

Olivier
+1  A: 

I'm pretty sure it can be done, and This eclipse help page could probably get you started. If I understand it correctly, your bundles must be signed and your jnlp file needs to request all permissions.

Vincent De Baere
Yeah, the "request all permissions" part is the problem ...
Thilo
Can you ellaborate on that? I mean: if your code has legitimate needs, why not ask the user to grant permissions to fullfil these needs? Anything constraining you in this field?
Vincent De Baere
The application code does not need file system access. But OSGi needs it internally. Is that a legitimate need? Maybe, maybe not.
Thilo
+1  A: 

You should talk to Chris Aniszczyk. He made it work with Equinox and Knopflerfish. See the screenshot here: http://twitpic.com/300lk He was planning on blogging about it, but I guess he is pretty busy at the moment. Here is the link to his blog: http://mea-bloga.blogspot.com/

Mirko Jahn
Interesting. I hope he does blog about it. I have started my own little experiment here: http://drop.io/appengine/ http://miniosgi.appspot.com/
Thilo
He did blog about it now: http://eclipsesource.com/blogs/2009/04/10/osgi-on-appengine/
Thilo
That's the problem, when people are having too many blogs. It's hard to catch up with all of them (especially if you don't know all of them ;-)) Thanks for the pointer. Seems like they haven't run into the threading problem yet, but hit the one you were facing with the storage...
Mirko Jahn
+2  A: 

EclipseSource have a patched version of osgi engine that (kind of) working in AppEngine, download the project zip files from the blog: http://eclipsesource.com/blogs/2009/04/10/osgi-on-appengine/

J-16 SDiZ