Open Dexagod opened 3 years ago
In the case of the filter sets, how should we then handle the default case where no filters are passed. maybe through a default keyword? e.g.
const resultsMap = await agent.watchNotifications()
const iterator : AsyncIterator = resultsMap['default'];
Or is this not intuitive enough
@Dexagod Are we sure that this union/intersection capability doesn't exist yet in SHACL/ShEx? If it does, then it might be easier and more portable to just use that.
SHACL indeed has union / intersection support, my bad. So these can directly be incorporated in the shape.
The reason for the separate shapes and separate returns is because policies for e,g, inbox processing consist of a match clause (in this case a shape to match), and an action. However I do not see a way to semantically describe all actions that one might require, so it makes sense to return all notifications matching a given shape, and have the developer implement the relevant actions himself.
A Linked Data Notification processing agent should be able to evaluate multiple different filters over the inbox. Similar to how in a mail inbox, multiple processing rules can be set to rout incoming emails.
In the current implementation of the Linked Data Notifications agent the agent only filters the messages that are validated by all passed shape filters (union). This is insufficient for more elaborate use cases. E.g. the orchestrator component for Mellon requires the evaluation of multiple policies, that may all have a different activation condition (shape).
Ideally, the interface of the agent should enable clients to decide exactly which shapes should be matched by emitted notifications. This could be made possible by enabling a client to specify a union and intersection operation.
Additionally, a client may be interested to retrieve different sets of notifications, matching different sets of filters. For this, we could allow multiple sets of filters to be created and passed. This enables the agent to return iterators for all different filter sets containing the matching notifications.
An example for the config file / separate filter file including both ideas:
An example for the return value of the agent: