p2panda / aquadoggo

Node for the p2panda network handling validation, storage, aggregation and replication
GNU Affero General Public License v3.0
69 stars 5 forks source link

Let document subscription stream updates from materializer #605

Open cafca opened 8 months ago

cafca commented 8 months ago

Best reviewed commit by commit

The subscription field for receiving updates about a specific document is updated to trigger sending a new update whenever the materializer finishes a new version of it.

This required changing up the message bus and service manager a bit to allow receiving updates about newly updated documents from within the http service. Context receives a new field containing the service sender, which is now constructed outside the service manager and passed in to it as a parameter.

Then, a new message type DocumentUpdated is added, which is emitted in the reducer task whenever documents are created or updated. This lets use then connect any running subscription stream to the service bus and listen for updates of their queried document.

📋 Checklist

sandreae commented 7 months ago

This is already looking good :pray: :pray: :pray: ! Is there any more functionality you want to include?