sony / nmos-cpp

An NMOS (Networked Media Open Specifications) Registry and Node in C++ (IS-04, IS-05)
Apache License 2.0
136 stars 80 forks source link

Allowed to register a flow without a valid source #355

Closed VenkateswaranJ closed 6 months ago

VenkateswaranJ commented 7 months ago

Registry allows to register IS-04 flow before registering a valid source. Basically, I can create a flow with some random source_id and register to the registry. Is it a valid case?

lo-simon commented 7 months ago

Yes it is allowed, but the nmos-cpp-registry must be configured with "allow_invalid_resources": true

VenkateswaranJ commented 7 months ago

But I can register flow without source even with allow_invalid_resources": false. I'm using the latest version of https://hub.docker.com/r/rhastie/nmos-cpp

rhastie commented 7 months ago

@VenkateswaranJ For the Docker container the "latest" tag is reasonably old but stable. I am currently working on an update which has an Ubuntu 22.04 LTS base. Unfortunately this new build requires quite a bit of testing.

In the interim could you test the "testbuild" tag which is only 20 days old... Do you still see the same issues?

VenkateswaranJ commented 7 months ago

I can register flow without source even in the testbuild (20 days older)

garethsb commented 7 months ago

@VenkateswaranJ is correct about the behaviour. This is the intentional design because the referencing model of IS-04 has the Device as the owner of the Flow (by the device_id reference to the former from the latter). Therefore nmos-cpp only requires the Device to be added before the Flow, not the Source. Other non-owner references are checked and reported in the nmos-cpp-registry logs but do not cause a registration request to be rejected.

garethsb commented 7 months ago

Referential Integrity rules for the Registration API are here: https://specs.amwa.tv/is-04/releases/v1.3.2/docs/Behaviour_-_Registration.html#referential-integrity

Note that the Identity Hierarchy and Identifier Persistence & Generation sections at https://specs.amwa.tv/is-04/releases/v1.3.2/docs/Data_Model_-_Identifier_Mapping.html are slightly out of date and confusing, the Architecture Review team have a backlog item to edit this page.

garethsb commented 7 months ago

The warning "Registration requested for flow: {flowId} from unknown source: {sourceId}" is generated in the log:

https://github.com/sony/nmos-cpp/blob/647d4b399dee2bdf7f4a1fe0c7f8bc5988db9828/Development/nmos/registration_api.cpp#L346-L356

VenkateswaranJ commented 7 months ago

Shall we close this issue?

lo-simon commented 6 months ago

Thank you @VenkateswaranJ for your request, as it has now been resolved, I am going to close this issue.