Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The data updated configuration at application level has priority over the configuration at dataspace level. It means, no notification at all can be sent if the configuration is not enabled at application level, no matter which configuration is set at dataspace level.

Proposition 1: Extending existing entities with notification configuration

This proposition consists in extending current existing CPS concepts with additional properties to enable or disabling the notification for a specific instance.

...

For performance optimization, caching dataspace information is considered to avoid requesting the database each time this information is needed.

Proposition 2: Create new entities dedicated to notification configuration

This proposition consists in implementing new dedicated entities to support event notification filtering, without impacting existing ones.

A specific class is created for each type of notification that can be configured (application, dataspace, ...). Any instance of these classes is defining if the corresponding entity should be sent for data updated notification. Configuration for application notification can not obviously have more than one instance. Also, a class is created to define the default behaviour, for each type, when no specific configuration is provided for a specific instance.

The implementation includes:

  • Entity classes
  • Repository classes for persistence
  • Model classes
  • Service classes to support notification configuration management (create, read, update, delete)
  • Controller classes to support web REST API to manage notification configuration (create, read, update, delete)

Below is the entity/model classes diagram and a data sample example:

draw.io Diagram
bordertrue
diagramNamecps-event-notification-filtering
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth934
revision1

...

959
revision2

Proposition 2 pro and cons

  • Pros
    • Dedicated entity and model does not impact existing ones
    • Information required to determine if a data update should be published or not is not spread in multiple entities, then could be most efficient to retrieve.
    • Generic and flexible solution that should be able to support consistent evolution
  • Cons

Proposition 3: Use application properties for notification configuration

This proposition consists in a simple and straight forward solution to support notification filtering by using application configuration properties.

...