OSGi - Configuration and Settings package

From JQuantLib

Jump to: navigation, search

This article opens a discussion about how JQuantLib should be implemented in an OSGi container. I've choose something relatively simple and already previously implemented by others, so we can concentrate more on best practices and some philosophical matters instead of how to implement it. Well, the discussion is open. I'm throwing some ideas below for your evaluation:


Aspects to consider

I can think of some generic aspects to consider, like ...

  • Which OSGi container?
  • OSGi concepts and best practices
  • Maven and template bundles
  • Closeness to QuantLib API
  • Convenience of SOA

... but this specific example of Configuration and Settings deserves some other items:

  • Adopt third-party packages?
  • Borrow third-party code?


Existing OSGi interfaces

See how abstract class Preferences from JDK6 looks similar to interface Preferences from OSGi R4:


In JQuantLib we have the concept of System preferences and user preferences. This OSGi interface looks promising:


Existing code

We could borrow some ideas from ...


Our homework

Anyway, I think it's time to rethink our classes

  • org.jquantlib.Configuration
  • org.jquantlib.Settings


How to contribute to this discussion

Please click on tab discussion, on the top of this page and let's discuss how it should be implemented.
Your thoughts are welcome :)


Thanks


RichardGomes 22:56, 15 October 2008 (UTC)