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

Refactor subscription logic #335

Merged
merged 33 commits into from
Jun 27, 2023
Merged

Refactor subscription logic #335

merged 33 commits into from
Jun 27, 2023

Conversation

marcelveldt
Copy link
Contributor

@marcelveldt marcelveldt commented Jun 26, 2023

Refactor of the subscription logic for both optimizations reasons and less traffic (prevent congestion).

  • Run interviews and subscriptions in parallel tasks to speedup startup.
  • Only subscribe to specific attributes
  • Detect endpoint additions and removals on bridges

BREAKING CHANGES

  • Schema is bumped to version 4
  • All nodes will be re-interviewed
  • Attribute changed callbacks will not happen if attributes are not specifically subscribed
  • Within the client implementation, the 'get_nodes' and 'get_node' methods are changed from coroutines to regular methods.

matter_server/client/client.py Outdated Show resolved Hide resolved
matter_server/client/connection.py Outdated Show resolved Hide resolved
matter_server/server/device_controller.py Outdated Show resolved Hide resolved
matter_server/common/models.py Outdated Show resolved Hide resolved
matter_server/server/device_controller.py Outdated Show resolved Hide resolved
matter_server/server/device_controller.py Show resolved Hide resolved
matter_server/server/device_controller.py Outdated Show resolved Hide resolved
matter_server/server/device_controller.py Outdated Show resolved Hide resolved
matter_server/server/device_controller.py Show resolved Hide resolved
matter_server/client/client.py Show resolved Hide resolved
matter_server/common/helpers/json.py Show resolved Hide resolved
matter_server/server/device_controller.py Outdated Show resolved Hide resolved
matter_server/server/device_controller.py Outdated Show resolved Hide resolved
matter_server/server/device_controller.py Outdated Show resolved Hide resolved
@MartinHjelmare MartinHjelmare added the breaking-change Breaking changes label Jun 27, 2023
matter_server/common/helpers/util.py Outdated Show resolved Hide resolved
matter_server/common/helpers/util.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@marcelveldt marcelveldt merged commit beb3d64 into main Jun 27, 2023
@marcelveldt marcelveldt deleted the change-subscriptions branch June 27, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants