ARINC-IA / CSMIM

4 stars 1 forks source link

Create and enhance registration service type #8

Open uwe-salomon opened 1 week ago

uwe-salomon commented 1 week ago

Request summary: Create an object type for the registration service as standardized by CSMIM. Enhance the registration service by a lookup feature and add that to the type description.

Security Domain: core

Existing Types: None, but a description in the CSMIM standard.

New Types: csmim.obj.registration.1 csmim.obj.directory.1 or join with registration service.

Features:

Regarding the lookup feature: We already have the object ICDs being published in the network. This is sufficient if a particular object type of interest is only instantiated in few, well-known paths. If, on the other side, an object type can be instantiated in many places, a consumer would have to subscribe #/icd/# or similar, in consequence receiving many ICD messages and having to parse them to look for the object type of interest. Generic services like fault reporting or config reporting are particularly impacted by this problem. Every registration and re-registration in the network would send out a volley of ICD messages to these generic services.

One potential solution is to add a "directory service" to the network. This service would most likely be an intrinsic part of the registration service for efficiency reasons. Clients can send requests to the directory service, in order to be alerted when a new registration with certain properties is made. In particular, clients can request to be informed about all objects that have a certain object type of interest. This removes the need to subscribe to all ICD topics; a client would be informed only about the few registrations that are of concern actually.

As an example, a fault reporting service (a.k.a central maintenance service) could want to be informed about all objects that have the type csmim.obj.fault-report.1, wherever they are located in the network, but not from the pax domain.

This idea is similar to the CoRE Resource Directory [RFC 9176]. We might benefit from looking at their design and experience.

uwe-salomon commented 1 week ago

As a side note, we also discussed other solutions to this problem. One idea was to use a specifically prefixed object path for these "generic" object types. For example, a galley object might be published under the path crew/galley/galley/X1. But its fault report object would be published under the path crew/galley/faults/galley/X1. This way, a fault reporting service could directly subscribe the topic v1/data/crew/+/faults/# to get all fault reports in the crew domain. Which would be superior to first receiving all ICDs and then having to subscribe the individual objects of interest.

A drawback of this solution is that it requires a special prefix (such as "faults" in the example above) for all such situations. This prefix must be agreed on in advance. The object tree must be kept clean below this prefix. And proper use of the CSMIM protocol would actually require each client to verify the matching object type before accessing the resources.

matthias-heinisch commented 1 week ago

I like the proposal and think it is very useful. Especially as we expect various of these pervasive topics (configuration, health status, security logging, ...). But I am not convinced this should be integrated into registration service, as handling of individual requests and distribution lists will be complex. Maybe we can define a filter set that we provide instead of these individual queries? For example the registration could publish all ICDs and the directory service compiles different pre-defined subsets.

uwe-salomon commented 1 day ago

A concrete proposal for the topic structure:

Example

Say that some device registered a new object under the path crew/galley/left/x5 with the object type csmim.obj.galley.1 and the supertype csmim.obj.fault-report.1. This supertype is configured in the directory service to be a type of interest. Then the directory service publishes the following message:

PUBLISH v1/data/core/csmim/directory/csmim.obj/fault-report/1/crew/galley/left/x5
QoS: 1
Retain: true
Payload:
  csmim.obj.galley.1

A fault reporting service would have to

In the example, the fault reporting service would have to subscribe to the crew/galley/left/x5/faults resource (assuming that a fault reporter is defined to contain such a resource faults).

Notes