Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subscriptions via control protocol #89

Open
BenediktBurger opened this issue Jul 5, 2024 · 1 comment · May be fixed by #91
Open

Add subscriptions via control protocol #89

BenediktBurger opened this issue Jul 5, 2024 · 1 comment · May be fixed by #91
Labels
enhancement New feature or request

Comments

@BenediktBurger
Copy link
Member

Idea:

  • you can subscribe to a Component A calling its register_subscription method
  • For each published message (via data protocol), this Component A will call subscription_message (TBD) on all components which registered themselves previously. "Data" is the content of the data message. Conversation_id is the same. If a component is not reachable, it is removed from the list of subscribers.
  • subscription_message will call handle_subscription_message with an artificial Data message.

This allows to subscribe to events on other computers without creating a dedicated data protocol network.

@BenediktBurger BenediktBurger linked a pull request Jul 9, 2024 that will close this issue
@BenediktBurger BenediktBurger added the enhancement New feature or request label Jul 9, 2024
@BenediktBurger
Copy link
Member Author

Reasoning:
Due to the different architectures of the data and control protocol networks, you might want to subscribe to a publishing actor, which you cannot reach via the data protocol.

We can, however use the control protocol to subscribe and to publish messages. (managing the subscribers manually)

This reflects the experience from pymeasure/leco-protocol#2 (comment) that it is quite simple to use the control protocol only. PUB-SUB does not save on bandwidth anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant