Implement observer interface for structure updates - SDMXRI-1157 - NSI 8.1.1
Eurostat agreed to the following if implemented by OECD:
In OECD .Stat Suite, we use NSI web service and mapping store database as a primary source for structural artefacts in addition to several other services that are loosely coupled with NSI service but depend on the structural information managed and stored by it. Now we reached the point that while keeping services loosely coupled we need some sort of synchronisation between services. Here are a few examples of use-cases:
- Deletion of the artefact in NSI/mapping store database should trigger the removal of certain tables in Transfer service (that we use for storing actual data for DSD/Dataflow)
- Insert/update of artefact in NSI could trigger some table/structure changes in OECD data database
- Delete/Update/Insert of the artefact could trigger a re/indexation for search engine used by Data explorer
We propose creating a pluggable interface that would allow observing all artefact related events (Create/Update/Delete) and do needed logic based on organisation needs. In our case we would push these events forward to a message bus (like RabbitMQ) where other micro-services would be able to subscribe to such events and do their logic not impacting the main logic of NSI.
To be implemented in Eurostat JIRA ticket: https://citnet.tech.ec.europa.eu/CITnet/jira/browse/SDMXRI-1157