mbc - MEDS Message Broadcaster/Concentrator

The mbc program acts as a message broadcaster and/or concentrator between one or more clients and one or more MEDS servers.

In broadcast mode, messages received from the servers are broadcast to all of the clients. For example, a single mbc process could connect to MCEVENT servers on multiple front-ends and broadcast event messages received from any of them to client GUIs on multiple workstations. The following command line:

    % mbc 3200@fe1 3200@fe2 ... 3200@feN -listen 3200

would connect to MCEVENT servers on front ends 1 through N and listen for client connections on port 3200. A GUI client which connected to port 3200 on mbc's host would then receive a merged stream of event messages from the various front ends.

As a concentrator, mbc forwards any message received from a client to the MEDS server; the status response received from the MEDS server is then returned to the client. mbc uses the signature field in the MEDS message header to determine which responses go to which clients; the client's original signature is preserved in the returned response. For example, the following command line:

    % mbc 3000@fe -listen 3000

establishes a connection with the MCRCMD task on the front end and listens for client connections on port 3000. Multiple GUI clients can then connect to port 3000 on mbc's host, send commands to the front end machine, and receive response messages. (MCRCMD, by itself, only allows one connection at a time.)

mbc can act as a broadcaster and as a concentrator simultaneously. Messages of class RESP_MC are returned to the client who sent the original command; messages of other classes are broadcast to all of the clients. If mbc is connected to more than one MEDS server, commands received from clients are forwarded to the first server specified on the command line.


% mbc [-ascii] [-binary] [-debug] [-listen port] [-tty] [-vperror]
      server1[@host] [... serverN[@host]]


specifies that MBC should convert the MEDS messages to ASCII and broadcast them to its clients as linefeed-terminated strings. This mode applies to clients connecting to any of the listening ports ("-listen port") specified after this option.
specifies that MBC should broadcast the MEDS messages as is (no ASCII conversion) to its clients. This mode applies to clients connecting to any of the listening ports ("-listen port") specified after this option.
enables debug output (written to stdout).
-listen port
specifies a network server port (i.e., service name or port number) at which MBC will listen for connection requests from clients. Multiple server ports can be monitored for connection requests by repeating this option for each different port.
includes standard output as one of the "connected clients". Messages are automatically converted to ASCII before they are written to standard output.
turns vperror() message output on. vperror() messages are low-level error messages generated by libgpl functions; normally, they are disabled. If enabled, the messages are output to stderr.
server1[@host] [... serverN[@host]]
specifies the service names (or port numbers) and hosts of one or more MEDS servers to which MBC is to connect and from which messages will be received. Host names default to the local host if not explicitly specified.

Alex Measday  /  E-mail