Graphics.DCOMMSettings - lordmundi/wikidoctest GitHub Wiki

DCOMM Settings

« Connecting Clients To Manager Without Multicast | EDGE User’s Guide | A Simple DCOMM Light Client »

Here are just a few notes for folks looking to dive a bit deeper into the settings used to configure DCOMM. If you haven't already, make sure to read the pages Manager Setup and DCOMM Notes first.

The main settings used to configure DCOMM are (you can find defaults in edge_settings.cfg):

MC_TAG : a text string to identify each manager. Clients will listen for all multicast packets on a specific group and port but only pay attention to those with a matching MC_TAG to what they are looking for.

MC_GROUP : The multicast address that the announcement is sent out on

MC_PORT : Similar to the MC_GROUP address above, this is the multicast port that is used on that address

SERVER_ADDRESS : On the manager/server side, this will be the address that gets broadcast out to the clients to connect to (I think if it is not provided then it uses the result of a gethostbyname call i believe). On clients, if SERVER_ADDRESS and TCP_PORT are both defined, it will try to just directly connect to the manager and not listen for the multicast announcement at all.

TCP_PORT : Similar to SERVER_ADDRESS above. For manager, tells dcomm what port to listen to. For clients, this would normally be discovered via the multicast announcement, but if the client already has SERVER_ADDRESS and TCP_PORT defined, it will just connect directly.

UDS_NODE : not really used any more.

So, in case it isn't clear, the multicast messages from the manager aren't used for data transfer at all - they are just used for automatic discovery. So, if you don't want to use multicast, you can switch your dcomm config file to the "direct_comm.cfg" file and it will let you define SERVER_ADDRESS and TCP_PORT so that clients don't need to see multicast at all. See Connecting Clients To Manager Without Multicast

If you want to run two different DCOMM managers simultaneously, and they are on two different machines, then the only thing you would need to change is the MC_TAG. Then, clients would hear everyone's server announcement, but only connect to the one with the matching tag. If you are running multiple manager on the same machine however, then you will likely need to change the TCP_PORT since you can't have the actual TCP listening socket of the server be the same for both processes. You shouldn't need to change the MC_GROUP or MC_PORT unless you have some specific reason to.

By default, edge has ${USER} in the MC_TAG, which means that different users on the network will automatically deconflict their managers on the network and not have to worry since their tags would be different. You could just as easily include $HOST inside your MC_TAG to perform that deconflict with hostnames, or whatever else you would like.

But in the end, know that the data sent on multicast is just a very small announcement of the DCOMM manager/server and its server address and port so that clients can discover it. All of the actual DCOMM data for nodes is sent over the TCP connection whose port is specified by TCP_PORT.

« Connecting Clients To Manager Without Multicast | EDGE User’s Guide | A Simple DCOMM Light Client »