Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sisu-users] Sisu in OSGi


Hello,

I need some information about Sisu, to understand if it could be a good fit for my needs. This will be a rather long email, sorry about that.

First a few details about my requirements that will help understand my questions.
  • I'm looking for a DI framework like Guice that provide means of implementing easily AOP and that works in OSGi, with support for dynamic modules.
  • I also want to achieve a good level of portability between JavaSE/JavaEE and OSGi, meaning that my application, while designed to run in an OSGi container and to leverage dynamic modules, should be portable with a reasonable effort to JavaSE/JavaEE (clearly at the expense of some dynamicity) and probably after replacing some key classes with an alternative implementation for JavaSE. This is one of the reasons I am not using the OSGi service registry directly for DI and would rather use Guice. But the rich feature set of Guice and its simpler API for the end user is also another reason (if portability was the only concern I would have evaluated PojoSR).

While searching for an OSGi integration for Guice I stumbled upon Peaberry first, and then Sisu, and if I am not mistaken the author of the two projects is the same.

Now the questions.
  • My understanding is that Sisu allows using the Guice API directly, it just requires you to bootstrap Guice using Sisu specific modules, but then you can use the Injector as usual. Is this correct?
  • Can I bootstrap the Injector passing in additional modules besides the Sisu ones to register custom type listeners, providers and so on?
  • Does it support Guice AOP?
  • Does it support OSGi dynamicity in a way similar to Peaberry, i.e. using an Extender? If so, is there any documentation/sample code/testcase about that I can look at?
  • I noticed that there is a github project called sisu-guice which is a fork of Guice with some patches applied. Does Sisu depend on it or does it works with plain Guice?
  • Peaberry seems more mature, but Sisu looks more interesting, and I believe it's already quite stable since it's used in Maven 3 and Nexus. If I am not mistaken, Peaberry requires you to write Guice modules in a special way which would affect my portability goal or at least increase the effor of the porting, while Sisu seems to impose no special condition on module implementations, is that right?
  • I found an old example of the usage of an earlier version of Sisu on github. The author was not declaring any module at all and Sisu was auto-binding all @Named classes. Is that still the case? If so, may I ask how classes are located in OSGi? And does it come with a performance penalty? I am afraid that the application boot time could increase.
  • I read that one of the Sisu goals is integration with Equinox registry and OSGi registry. That's not super urgent for me, but it's a feature I'd really like. Is there any planned release date for those improvements?

Thanks in advance
GianMaria Romanato.

Back to the top