Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Qt Remote Objects] Registry and available instances



  • Hi everyone,

    I started tinkering with Qt Remote Objects (QtRO) recently and I start to get the gist of it.
    I am currently on a single machine topology network to avoid any network issues while I dive into the library.

    I am using the Qt Object Model to use introspection to have a very generic solution so I create QRemoteObjectDynamicReplica objects and it works quite well.
    I have a QRemoteObjectRegistryHost that creates several instances of different classes (based on .rep files). They seem to be properly registered with the Registry and the generic client can connect to it, create replicas and start using them once initialized.

    Until...
    I try to get a second QRemoteObjectHost using a different URL that connects to the existing registry. There again, registration seem to work fine and my client sees all available sources on the network. Great!
    But when I use the instances() properties to get all instances -- meaning the names of the objects registered on the QtRO network -- the function only returns the ones that were created from the registry's host and not from the second one...

    I can't find a way to get all instances available from the network using the registry. The registry gives me the sources' types and locations but not their actual names (via the sourceLocations() method).
    However, the documentation states that a connection to the registry is enough and that the client has no need to connect to individual hosts afterwards.
    The reason why I want to get all instances names is because there are several objects implementing the same types and this on different host nodes on my network.

    So,
    Is there a way to get all instances available on a network through a QRemoteObjectRegistry ?
    If not, what are my options to retrieve all available instances on a QtRO network ?
    My objective is to create replicas of every single source available on my QtRO network (using only one registry as entry point if possible :) ).

    msoum


Log in to reply