project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.55k stars 2.04k forks source link

Multiple Controllers: Remove UDC Service from CHIPDeviceController and make it a part of the CHIPDeviceControllerFactory #10089

Open sagar-apple opened 3 years ago

sagar-apple commented 3 years ago

Problem

When creating more than 1 controller at a time, we end up trying to start multiple UDC Services all bound to the same port. This is not going to work.

Proposed Solution

The main thing stopping me from pulling UDC commissioning service out from Controller right now is the mDNS singleton usage in CHIPDeviceController.

msandstedt commented 2 years ago

https://github.com/project-chip/connectedhomeip/pull/13294 introduces an approach where the commissioner is decoupled from the controller, and commissioner objects can be created on an as-needed basis for each commissionee.

I would think this would greatly simplify something like UDC in general because then the UDC service could instantiate its own commissioner instances with no reliance on other long-running singleton-like objects.

msandstedt commented 2 years ago

Absent use of #13294, I think there may also be an architectural problem with the originally proposed solution. In many ecosystem architectures, it may be the signing infrastructure that selects fabric. This would make it difficult to select the fabric-scoped commissioner instance up front when UDC requests commissioning.

The architecture in #13294 very cleanly supports an implementation where commissioner instances don't have fabric scope. That would solve this problem.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.