OSGI on google app engine?
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 l开发者_StackOverflowast 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?
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.
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.
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.
精彩评论