Hi,

> > The real trick is platform dependency
> 
> It should be possible to write a real platform independent zeroconf
> solution based solely upon ZMQ and OpenPGM.
> 
> Christian

        It is always possible but I'm not sure it is wise.  Zeroconf is
actually a relatively tricky protocol and you can easily flood your network
with random udp packets when negotiations get complicated unless you
implement every little feature involving exponential back offs, slow
restarts and all sorts of other RFC details I don't remember.

        While Avahi is unfortunately more complicated, it is still fairly
easy to wrap up.  Or you can just compile mdns responder for Linux, turn off
Avahi and use that instead.  Or, as someone pointed out, there are existing
wrappers; I've just not seen any good ones for C++ out there so rolled my
own.

        Just as a note, the real reason I use zeroconf is not so much
locating services, while that is nice it is not as important to me as the
ability to post record data associated with the service.  I install a single
daemon on each machine and nothing else.  When it starts up it builds a
record with machine configuration (# cpu/core, memory etc), current load
information.  When I need to start a new service, I have a coordinator which
monitors the records and says: xxx is a good machine to start your service
on.  The installed daemon on each machine has the ability to start/stop
processes for me which is then used.

        Beyond the above, I also don't have configuration files scattered
about.  Again, all configuration information is posted in records associated
with the primary coordination service.

        Basically this all means that to add a new blade to my cluster takes
all of 5 minutes to boot it up, install the daemon and plug it into the
network.  The machine will get used immediately and no fiddling with
configurations or other settings is required.  Additionally, if a machine is
having problems, removing it is just a matter of turning off it's
advertisement, waiting till all services migrate out (or force kill them if
you want) and removing the machine.  This ability to change the cluster on
the fly is priceless when you get over 10+ machines, it saves huge amounts
of work and headaches in the long run. 

KB

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to