Page 1 of 1

How to signal a client that node creation is in progress

Posted: 29 Mar 2018, 12:35
by manuel.bliemel
I'm wondering if there is a standard way how to signal a client from the server that node creation during bootup is in progress.

When a client connects to a server it may expect certain nodes to exist.
If the server has been started but is still in progress adding nodes to the address space the client may receive status code
BadNodeIdUnknown when invoking services on the server.

I thought about rejecting client session connect calls until the server is ready.

Is there maybe a more standard and proper way to do this?

Thanks for your advice!


Re: How to signal a client that node creation is in progress

Posted: 19 Apr 2018, 07:36
by Support Team
Hi Manuel,

There is no simple answer to this question, there is at least no 'standard' way to solve this issue.

In general a client must be prepared for the case that 'expected' OPC UA nodes are temporarily not available. A client should retry later if a needed node is currently not available.

Nevertheless a server should try to complete the setup of the address space before it opens the endpoints for client connections. This avoids an overload of the server with clients that do retries of create monitored item attempts after server startup.

As long as the endpoint of the server is not open, clients are not able to connect. The way to delay this depends on the SDK.

In the C++ SDK, first the startUp() for all registered NodeManagers is called. Then startUp() of all registered modules is called. After these calls, the endpoint is opened. A simple solution would be to block on startUp() until the address space is available. If the creation of the address space is done asynchronous and in parallel for several NodeManagers and modules, you can register an additional module as last module that waits for the completion event from all other NodeManagers and modules and blocks it's startUp() call until it receives these completion events.