Open Eric-Edlund opened 1 year ago
Some sort of support for the publish/subscribe paradigm is essential since it is heavily used by CFS. I anticipate CFS users who want to try CubedOS will require support for this communication model. Many of the comments in the ticket pertain to the v2 architecture and may or may not be an issue for the v1 architecture (depending on how it evolves). The issue requires further discussion.
Having a module handle message distribution creates architecture problems:
Publish_Result
message, meaning modules which rely on pub/sub get no guarantees about what message types they're given.These problems, along with the
Status
parameter of the pub/sub messages colliding with the message system'sStatus
, prevent Pub/sub from using a Mercury generated API. The message guarantees that apply to all other modules don't apply to pub/sub, a sign that maybe pub/sub isn't really a module.Pub/Sub functionality should be moved into the message manager or another core component of CubedOS parallel to it. This would allow us to coordinate registering and subscribing to channels with native Ada async methods and better enforce message type safety.
If we decide to leave pub/sub as a module and want an auto-generated API, rename
Status
to something else in the MXDR file. Most of the auto-generated procedures won't be usable, but it should work.