[zeromq-dev] running guide examples

john skaller skaller at users.sourceforge.net
Sun Jan 29 09:30:52 CET 2012


I'm developing a process manager to run the Guide examples.

http://www.zeromq.org/docs:labs:process-manager

I'm not sure I understand this:

http://zguide.zeromq.org/page:all#A-Publish-Subscribe-Proxy-Server

In the example, the local client subscribers appear to need to connect to:

tcp://localhost:5556

but the remote ones need to connect to

tcp://999.999.999.999:8100

Unfortunately, wuclient uses a the hardcoded address tcp://localhost:5556,
so there's no way to test the configuration of the above example.

Assuming I got this right, I wonder if we can change the examples roughly like this:

address = get_arg (1, "tcp://localhost:5556");

The idea is that without arguments, the program runs as it does now,
and also a sample address is manifestly displayed in the code
for the reader to see, as now.

But the program will be "pluggable" in that the default can be overridden on
the command line, which would allow us to say:

wuclient "tcp://localhost:8100"

to run the remote wuclients in the guide example cited above.
In my test harness I might override more addresses.
This may apply to other examples (I have only encoded part of the
Guide so far so I'm still in for some fun :)

I will probably change all the Felix examples to use this protocol, however
the process manager should be able to run the C and C++ examples too.

--
john skaller
skaller at users.sourceforge.net







More information about the zeromq-dev mailing list