directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Alderson" <Martin.Alder...@salfordsoftware.co.uk>
Subject Re: [Mitosis] random thoughts ...
Date Mon, 19 Jan 2009 12:15:21 GMT
Hi Emmanuel

> Now, how do we manage replication between server A and server B 
> (whatever the number of real servers present in A and B) ? Simple : as 
> each operation within A or B are done on a globally connected system, 
> with each operation having its unique timestamp (ie, two operations have 
> two different timestamps), all the modifications done globally are 
> ordered. It's just then a matter of re-ordering two lists of ordered 
> operations on A and B, and to apply them from the oldest operation to 
> the newest one. Let's see an example :

This approach is good as it is easy to explain / understand but I have two (related) problems
with it:

1. Availability.  When replication (specifically the roll back, re-apply bit) is taking place
you must prevent new local modifications being applied to ensure consistency.  This means
new modification attempts must either be rejected or frozen until the replication is completed.

2. Efficiency.  Rolling back changes before re-applying might be slower than just applying
with a check.  An example of this being especially bad is with two servers (A and B) which
become disconnected.  Server A has just one modification applied early on.  Server B is heavily
used and has hundreds of thousands of modifications (e.g. a bulk change to all users).  Now
when server A and B reconnect server B will have to roll back all those changes just to apply
a potentially completely unrelated minor change from server A.

Note that both of these become much bigger issues if we want to support periodic (as opposed
to immediate) replication or incremental backup.

It also becomes a bigger problem the more replicas you add - changes may have to be rolled
back and re-applied multiple times.

Using the current system (along with a fix for DIRSERVER-894) the example above would require
very little overhead for server B - the minor change from server A would be sent over and
then either applied or discarded based on the CSN's at the time of the modification.  The
existing modifications don't need to be rolled back / re-applied.

Martin



Mime
View raw message