4

I am evaluating several technologies for an open source app for the google app engine. I'm searching for information regarding OSGI on googles app engine.

I have found Lemmon but it seems to be a dead project. The last checkin was in mid 2009... :-/ There is also a eclipse blog entry from april 2009, but it's not a real success story.

Has anyone successfully used OSGI in a GAE app?

Patrick Cornelissen
  • 7,968
  • 6
  • 48
  • 70

3 Answers3

7

The biggest single problem with this is the incompatability between the OSGi framework & GAE regarding thread management.

GAE manages threads (and machine instances) for you and makes it hard/controlled how you deal with threads in your own application. OSGi really does the opposite.

brucej72
  • 71
  • 1
  • 1
5

I did some experiments on this, too, also see this question.

On top of various technical issues, GAE and OSGi are conceptually not a good fit at all. OSGi maintains a lot of internal state, such as which bundles are started, and has a really elaborate lifecycle. On GAE, your application is spread across multiple JVM and the JVM can be killed at any time. You would in effect have to recreate/synchronize the whole bundle startup process for every request.

Community
  • 1
  • 1
Thilo
  • 257,207
  • 101
  • 511
  • 656
  • Thanks, maybe google will someday provide a osgi'ish environment so people can deploy more fine grained application modules – Patrick Cornelissen Apr 02 '10 at 10:04
  • Yes, using something like OSGi under the covers to support "smaller" modules would be nice, especially if it helped reduce the server startup time, which is a real problem on GAE/J. – Thilo Apr 05 '10 at 00:39
1

I've not used OSGI on the GAE, however I had a suggestion that you might try -- perform a hasty proof of concepts with Lemmon (or other implementations). Basically, try it.

As I understand it, you can setup a Google App Engine site for no cost. I'd take advantage of that and do an as-quick-as-possible proof-of-concept.

Keep in mind, that some open source projects won't have constant check-ins. Sometimes, once a open source project does what the author intended it to do, development is stopped until something new is needed. The next check-in may not take place for months when the original implementor's requirements change or perhaps a code-base adopter finds an issue.

Frank V
  • 25,141
  • 34
  • 106
  • 144