The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: Clustered xPLHal




> Absolutely - John B looked at this in some detail, and I believe that
> some of the basic elements required have been added to the XHCP
Protocol
> (which uses TCP rather than UDP, same port) in preparation for this
sort
> of environment.

Yep, a lot of the design work (and some of the implementation work) has
already gone into this:

The xPLHal replication system consists of 2 installations of xPLHal -
running on different hosts.
One is the master, the other is a slave.

The slave installation is simply a standard install of xPLHal, with a flag
set in xPLHal's XML file to tell it that it is a slave, and the details of
the master server that it should connect to.

When the slave starts up, it makes a persistent XHCP connection (over TCP)
to the master xPLHal server.
It then issues a number of commands to synchronise it's data with the
master xPLHal server (globals, determinators, scripts etc.)

The master continues to send updated information at regular intervals to
the slave, using the XHCP connection.
The slave also sends poll signals to the master to make sure it's still
alive.

Any failure of the master xPLHal will result in either the the TCP channel
dropping, or the master no longer responding to poll messages.
In such cases, the slave then takes over the role of master.

While acting as master, the slave continues to try and reconnect to the
failed master install of xPLHal.
If it successfully reconnects, it transfers all it's state information back
to the master, and the master takes over again.

If for some reason, the master cannot be recovered (HDD failure etc.) then
the slave can be made into a permonent master by removing the indicator in
the XML file that specifies that the install is a slave.

The only issue preventing the above from becoming reality is the lack of
time at the moment.
There is still a lot more work to be done on the replication method, and
it's been a long time since the replication code was last touched, so it
will probably need a number of changes to bring it in line with the other
recent improvements in xPLHal.

How quickly replication gets added to xPLHal really depends on the demand -
if there is sufficient interest in such a feature, it can be moved up the
priority list.

Personally, having a replicated install of xPLHal would be of limited
benefit, as all my xPL hardware hangs off the one box - C-Bus, Comfort,
Meteor etc.
So if I lost xPLHal, I'd also loose the xPL gateways to all the hardware -
so having another install of xPLHal elsewhere on the network would be of
limited use.

But for other people's setups, I guess a replicated xPLHal could be more
useful.

Regards,

John




xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.