virto-network / valor

Create HTTP APIs with a plugin system that runs in the server and the browser.
GNU General Public License v3.0
9 stars 8 forks source link

Inter plugin communication #42

Open olanod opened 3 years ago

olanod commented 3 years ago

With the added Context type we can expose an API to send requests to other plugins. The requester should know in advance what kind of messages the receiver is able to handle(e.g. HTTP).

Question to self about API design ... Should this be a simpler "synchronous" kind of API or should it be part of a more generic async one that publishes messages with the option to wait for a response? maybe a sync helper built on top of the async one? should there be a bult-in message queue that dispatches messages to potentially multiple subscribers or leave it to the user to configure a default "message processor" 🤔