1

I have to create a set of plugin manager, where plugin manager is a main process, child processes are plugins using Qt 5.13 and C++. All processes are created on a single PC. Each child process implements Source (in terms of Qt Remote Objects).

I'd like to gather N replicas for N processes. How can I implement this? Is a single QRemoteObjectNode instance enough for it (or do I have to store pairs node-replica)? Is using QRemoteObjectRegistry redundant here? All apps are within one subfolder. Each host node has unique url in the following form: "local:base_name_of_application". I'd like to loop in the form node->acquire("local:current_app_name");

ilya
  • 1,103
  • 14
  • 36

1 Answers1

0

A node can have multiple replicas, and a host node can have multiple sources (and replicas, too, if that is needed). A node can't be shared between processes, but that is the point of QtRO - each process has a node, and QtRO makes communication between them pretty much trivial.

You don't need a registry if you only have a few nodes, or if there is a naming convention that can be followed. An example of when the registry can be helpful is if a source can be run from any PC, so the address can't be known until runtime. In this case, the source node would notify the registry that it exists and its address (where the registry is at a fixed/known address), and this allows client nodes to reach that source.

Brett Stottlemyer
  • 2,734
  • 4
  • 26
  • 38