Open pan-apple opened 3 years ago
@andreilitvin @cecille
Add as a comment. I believe that 'Advertise' should be 'initiate advertising' and will do any calculation inline that it can (all name and property calculation) however if something is significantly blocking, it would be deferred async to not make 'advertise' block.
I am thinking of these potential blocking operations:
minmdns does a 'enqueue broadcast advertise when we start advertising' however it will not wait for it to be actually sent out over the network.
What are the requirements for Add/Update NOC? Do we need to block until 'advertisement is officially done/available' or it this a concern of add/update callback to not block for long times?
Do we need to block until 'advertisement is officially done/available'
Not at all. Ideally we would do the advertisement completely in the background or something... and definitely in parallel with sending the "we succeeded" response to the caller.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Problem
The API is being called when the device get provisioned with new operational certificates (via AddNOC or UpdateNOC) commands. However, it's not clear how long the API is supposed to take during the synchronous part of the operation. Given, the API could have multiple implementations, for different platforms, it's important to document the timing requirements, and expected design. Based on that the call to
AdvertiseOperational
could be moved to the more appropriate part of the code.Reference: https://github.com/project-chip/connectedhomeip/pull/8826#discussion_r686973301