On 27.3.2012, at 1.14, Michescu Andrei wrote:
This being said and acknowledged here are my 2 cents:
I think that the current '1 brain / 2 workers' seems to be the correct model. The "the client" connects to the "server" and pushes the local changes and after retrieves the updated/new items from the "server". "The brain" considers first server as the "local storage" and the second server as "server storage".
This design makes it too easy to design it in a way that adds extra roundtrips = extra latency. It also kind of hides other problems as well. For example now dsync can way too easily just fail if something unexpected happens during dsync (e.g. mailbox gets renamed/deleted). And there are of course some bugs that I don't really understand why some people are seeing them at all.
For the split design, "come to the same conclusion of the state" is very race-condition prone.
It's race-condition prone with the brain design as well. dsync can't just lock the mailbox during its sync, since the sync can take a long time. With a "brainless" design it's clear from the beginning that there are race conditions and they need to be dealt with.