Page MenuHomePhabricator

Preference service (access) based on cpp microservices
Closed, ResolvedPublic

Description

Workbench preferences are currently stored/managed via blueberry (a.o. berryIPreferences...). That leads to the fact that you only can use preferences, if you are on the plugin level, but not on the module level.
That limitation was already problematic in some cases. (E.G. NodeSelectionDialog had to be moved to a plugin in order to use preferences). Also now it makes problems in T29019.

A clean solution would be to offer microservice interface for preferences and implement a overhauled, tested micro service

Following open questions:

  1. Is the already existing PersistenceService there for in good shape and is its API style OK?
  2. Is wrapping the blueberry preferences a better solution?
  3. Should there by from the micro service layer the possibility to reach informations of the plugin layer. Or do we want to seperate this layers on purpose? If seperated we should reduce the use of blueberry for persistance to the needed minimum (when it is realy information that is only needed by code that is a plugin.

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

kislinsk triaged this task as Normal priority.Mar 17 2022, 10:23 AM
kislinsk added a subscriber: kislinsk.

I would suggest to:

  1. Implement the preferences backend on module level as a micro service
  2. Keep the BlueBerry API as-is but use the new backend

The existing PersistenceService had many issues in the past which lead to the fact that is is semi-abandoned as far as I know but it has to be thoroughly checked. Maybe it is a good candidate for complete removal.

The Workbench already uses QSettings for application-wide settings which is also a possibility to persistently store settings.

I stumbled upon this while working on T28752: [Segmentation] Move Segmentation utilities widgets to SegmentationUI module. I would like to tackle this issue and already started looking into this. Do you already have an idea how to approach it or do we want to discuss it next week?

I stumbled upon this while working on T28752: [Segmentation] Move Segmentation utilities widgets to SegmentationUI module. I would like to tackle this issue and already started looking into this. Do you already have an idea how to approach it or do we want to discuss it next week?

I already implemented most of it as core service a while ago but then was interrupted by something else. As far as I remember it is nearly complete except for the equivalent of BlueBerry's preference storage. I will look for the branch the upcoming week and push it. Never assigned the task, sorry.

I stumbled upon this while working on T28752: [Segmentation] Move Segmentation utilities widgets to SegmentationUI module. I would like to tackle this issue and already started looking into this. Do you already have an idea how to approach it or do we want to discuss it next week?

I already implemented most of it as core service a while ago but then was interrupted by something else. As far as I remember it is nearly complete except for the equivalent of BlueBerry's preference storage. I will look for the branch the upcoming week and push it. Never assigned the task, sorry.

Great to hear. I will pause my current development on the mentioned task so far and see if we can finish them with your changes!

kislinsk added a revision: Restricted Differential Revision.Nov 25 2022, 10:44 PM

Migration guide and a ton of examples can be found in {D763}.

Deleted branch from rMITK MITK: feature/T29025-PreferencesCoreService.