Add metadata events
- Dominant language
- Shell
- Stars
- 625
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Description
One of the main requirements for the new architecture of GrimoireLab is that it works asynchronously. We want that producers/consumers/workers perform their tasks when they can and not when they are ordered.
In order to do this, we need to communicate to all the actors what happens within the platform.
For example, we might want that, when a repository is deleted, all the data stored about that repository is deleted too. We will have to remove the data about that repo in the GrimoireLab database, but also from the knowledge database (e.g. remove all the events we produced from that repo).
To do this, we can have an API call in the `archivists` that removes the data as soon is called. This call can be asynchronous if the `archivists` annotate they need to remove the data in the future and not right away. This option is good but it has some problems we don't like:
- it needs a proxy/balancer to determine what archivists will do the task when the API is called
- it doesn't scale well if we want other actors to perform something extra things
The alternative is to use events. We can send an event informing about that the repository has been deleted. When this event is received by the `archivists`, they will remove the data about that repo. Other actors can be registered to process those type of events and perform their tasks. For this example, we can have a component that each time a repository is deleted, it updates the list of repositories an individual collaborates with.
For a first iteration, we can add the basic operations we already have:
- addTask
- deleteTask
- rescheduleTash
- addRepository
Contributor guide
Assessment
This issue has not been assessed yet.