I was thinking since some time already about mirroring between elog servers,
and actually started already some implementation.
The problem with mirroring on the file level does not work. Assume two
servers "serv1" and "serv2". Then assume that one message gets submitted on
serv1 and at the same day another message gets submitted on serv2. Now you
have on both servers a file 030726a.log, but you cannot copy this file
simply from one server to the other, since you would overwrite the message
submitted on the other server. Furthermore, you need file level access,
which is maybe easy between your laptop and your desktop computer, but not
if the two mirror servers are in different countries. Like in our
collaboration we have three servers located in Switzerland, Italy and Japan
(meg.psi.ch, meg.pi.infn.it, meg.icepp.s.u-tokyo.ac.jp), where we cannot
have direct disk access.
So what I propose is the following mirror scheme:
o Each elog server may contain a list of mirror servers in the configuration
file
o Each elog server calculates an MD5 checksum from all local messages
o Synchronization between servers can be triggered manually (by clicking
on "Synchronize") or automatically at a given time and interval
o On Synchronization, the elogd server fetches the MD5 list from the mirror
server and compares it with the local list
o If a message has been edited remotely but not locally, it's fetched and
stored locally, same in the other direction
o If a message got edited on both sides since the last synchronization, the
user is asked to resolve the conflict (keep local or keep remote message)
o If there is a new message locally, its submitted at the remote server, but
with the same submission date/time as locally, same in the other direction
o If new messages are present on both sides, their message ID is changed so
that it is unique, then they are copied over. If there are already replies
to this message, their link (using the message ID) is changed accordingly
So I plan to implement this scheme in the next time. The MD5 checksum is
already there. If anybody has comments or additional wishes concerning
mirroring, telling them right now would be great, since I then can
accomodate them easier during the implementation.
- Stefan |