cubesatlab / cubedos

A flight software framework in SPARK/Ada
48 stars 5 forks source link

Depreciate Publish Subscribe Server #42

Open Eric-Edlund opened 1 year ago

Eric-Edlund commented 1 year ago

Having a module handle message distribution creates architecture problems:

These problems, along with the Status parameter of the pub/sub messages colliding with the message system's Status, 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.

pchapin commented 4 months 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.