[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Multi-Master Replication



On Fri, Nov 29, 2002 at 03:30:28PM -0600, Jon Miner wrote: 

> I've been wracking my brain trying to figure out an elegant solution to
> this, but I'm at a loss.  Since neither slapd knows about the other
> replication agreement (in a manner of speaking -- they know that they
> have replication agreements, but not who is replicating to them), there
> seems to be no way to serialize the changes such that this situation
> won't happen.
> 
> It seems that an external clock or sequence is required.o

Yes, that's how Microsoft does it for Active Directory.  There's a
timestamp and GUID tacked onto each directory operation and object,
and newest stamp / highest GUID wins in the case of conflicting
updates.  They also have an extra property for all objects called
"Originating Write" which is used to prevent update loops.
Netscape/Sun's iPlanet directory server keeps the timestamp stuff in
the directory too, but sometimes gets confused and tags the
unresolvable conflict with a nsds5ReplConflict marker attribute, which
the administrator has to go and find and fix (grumble grumble).  Here
are the implementation details:

Overview:
http://www.microsoft.com/windows2000/en/advanced/help/sag_ADintro_17.htm

Here's some more detail:
http://www.microsoft.com/windows2000/techinfo/reskit/en-us/distrib/dsbh_rep_cqjr.asp?frame=true

iPlanet (er... Sun ONE directory server):
http://docs.sun.com/source/816-5606-10/replicat_new.htm#1106141

Of course, Microsoft uses a proprietary replication protocol which is
probably out of place in an open package like OpenLDAP.  The Samba
guys have made quite a bit of progress reverse-engineering all the AD
stuff lately though - the samba 3.x alpha releases can now join an
Active Directory tree and play nice with the other windows boxes (but
still can't run an AD tree by themselves).

Of course, an enterprising hacker like yourself could probably extend
the existing slurpd replication code to do the timestamp magic...

-- 
 - Jason                      Currently at: Home (Fremont, CA) (Partly Cloudy)

"If you've done six impossible things before breakfast, why not round
it off with dinner at Milliway's, the restaurant at the end of the
universe?"