...
As the remote servers may not be available, due to network conditions, we also have to wait for the synchronization to be done before we can validate a full replication for an entry. For instance, if we delete an entry on server A, it can be deleted for real only when all the remote servers has confirmed that the deletion was successful.
CSN and UUID
We will use two tags, stored within each entry, to manage the replication. The CSN (Change Sequence Number) is used to tell that an entry is owned by a specific server. A replicated entry on 3 servers will have 3 distinct CSN. The UUID (Universal Unique Identifier) is associated with an entry, and only one. So if we have an entry replicated on 3 servers, it will have 3 CSN (one per server) and only one *UUID (as it's the same entry).
Configuration
The replication system is a Multi-Master replication, ie, each server can update any server it is connected to. The way you tell a server to replicate to others is simple :
...
- add
- delete
- hasEntry
- list
- lookup
- modify
- move
- moveAndRename
- rename
- search
Operations
We are using *Operationµ objects to manage replication inside the interceptor. Here is the *Operationµ classes hierarchy :
Add operation
It creates a AddEntryOperation object, with a ADD_ENTRY operation type (how useful is it, considering that we are already defined a specific class for such an operation ???), an entry and a CSN.
...