OSGI Services: Extended status interface

(David Graeff) #1

Hello developer community,

this is the first of a few Ideas I like the AC to consider.

For services that I started to maintain I feel like I’m lacking a way to tell the user the current status of the service. Right now we only have bundle running/stopped, provided by OSGI.

I’d like to have an extended status interface that allows to provide information comparable to a Thing or Rule status. So that would include:

  • A status (restricted by an enum)
  • An extended status enum
  • An extended status message (i18n considered)

For the Hue emulation that would be for example:

  • ONLINE, NONE, “”
  • OFFLINE, CONFIGURATION_ERROR, “Two items have the same Hue ID. Please change the ID of item_1 or item_2”

I would also need that for the embedded mqtt broker. But actually a lot of core services itself would benefit.

I have considered an extended status message in my Paper UI NG design study and I think that is a way more user friendly way than requiring people to watch log files.

This is not related to a notification infrastructure. Notifications are for ongoing / streamed events.

Cheers, David

(Rich Koshak) #2

Seems like a sensible proposal. Are there any negative side effects or impacts you can imagine?

(David Graeff) #3

No, this is merely a new interface for services that is either implemented or not implemented. The REST interface for services will be extended with that status information.

Cheers, David