Novell is now a part of Micro Focus

Who's on First: Synchronizing Counters Between Trees

Novell Cool Solutions: Tip

Digg This - Slashdot This

Posted: 16 Jun 2003

Some Sound Advice

There are always going to be problems with counters if they are synchronized in both directions and/or the thing they are counting is being updated on both sides of a network as would be the case with grace logins. This has nothing to do with DirXML not synchronizing them correctly -- it has to do with the fact that you are really counting two things -- the grace logins in tree A and the grace logins in tree B. This is complicated by the fact that the changes to the counter can replicate in from another server and that counters are actually stored as a set of deltas until it has replicated everywhere in the tree.

Here's an example:

Server A1 in tree A has a value of {1}.
Server B1 in tree B has a value of {1}.
Server B2 in tree B has a value of {1}.

Server A1 is connected thru DirXML to Server B1.

User logs into workstation that connects to trees A and B, and is connected to B2 in tree B.

Grace logins is changed to {1,-1} on A1 and B2. Grace logins is synced via DirXML to B1 as {0} the sum of the deltas. Grace logins is replicated to B1 from B2, only the -1 is newer than the last time these two servers synced so now B1 has {0, -1} which totals to -1.

Moral of the story: it only makes sense to synchronize counters between trees when they are counting the exact same thing and the counting is happening in one place because there is no way to coordinate the counting.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates