Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29580

Rework descriptor mechanism

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 11.5
    • Component/s: Explorer, Runtime
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      ComponentManagerImpl#loadContributions(RegistrationInfo ri, Extension xt) static method was removed, replaced by internal ComponentManager#register(RegistrationInfo ri, Extension xt) method logics, same for ExtensionPointImpl#loadContributions

      Most of contributions will now handle merge, which might not be expected for existing configurations: the list of extension points now handling merge should be documented.

      Show
      ComponentManagerImpl#loadContributions(RegistrationInfo ri, Extension xt) static method was removed, replaced by internal ComponentManager#register(RegistrationInfo ri, Extension xt) method logics, same for ExtensionPointImpl#loadContributions Most of contributions will now handle merge, which might not be expected for existing configurations: the list of extension points now handling merge should be documented.
    • Team:
      AT
    • Sprint:
      nxAT 11.1.26, nxAT 11.1.27, nxAT 11.x.28, nxAT 11.x.29, nxAT 11.x.30, nxAT 11.x.31, nxAT 11.x.32
    • Story Points:
      8

      Description

      Currently there are several issues with the descriptor mechanism, and several needed improvements :

      • using a generic interface to be implemented is a big constraint on "freely annotated xmap" classes, maybe using an annotation instead would be good
      • the merge/override logics needs to be handled in a way that leads developers towards a "standard" way, but still including historic use cases to allow migration to the new system (still, using annotations)
      • lazy merge/override done on this registry requires caches logics: it would be better not to have a lazy behaviour, and compute it once, at framework startup
      • (detail, maybe related) not sure why DefaultComponent holds the descriptor as a class field right now: a lookup, when needed, should be enough
      • when retrieving descriptors from this generic registry, it is not possible anymore to know the contributing component, which does not allow proper error management (NXP-29573, NXP-28948)
      • ideally, all default platform components should be migrated to use this registry, to encourage moving to this new system

      Related improvements

      • a global registry handling all resources allows more easily to document and track overrides on contributions (and order can be documented, see NXP-29569 and NXP-29022 on explorer side)
      • similarly to merge/override, handle contribution enablement in a standard way
      • all components that can handle hot-reload would be covered generically

      Pros

      • runtime services behaviour would be more homogeneous, less error-prone, more user friendly for people writing new components, and people contributing to them
      • it would be easier for Studio to contribute to any extension point, with hotreload covered by the target service
      • the declarative approach using annotations makes it easier to understand and document the service merge/override behaviours, and encourages one "default" approach for new components
      • later, this would also ease up migration towards a better system than xmap for processing of services/contributions (typically spring)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 weeks
                  2w