Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Replication and concurrency
Tue, Sep 1 2009 3:07 AMPermanent Link

Tony Pomfrett
Will the bi-directional replication demonstrated in the technical article "Building a Sales Quote Replication System in ElevateDB" properly handle the case
where both Salesmen edit their copy of the same quote before replication can take place? By properly, I mean that the first salesman to replicate should
succeed and the second should fail (otherwise he would be overwriting somebody else's changes). And is there a mechanism to advise a remote user that
one of his updates could not be applied and cause his edit to be refreshed by the current master copy?
Tue, Sep 1 2009 12:01 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tony,

<< Will the bi-directional replication demonstrated in the technical article
"Building a Sales Quote Replication System in ElevateDB" properly handle the
case where both Salesmen edit their copy of the same quote before
replication can take place? >>

The example segments quotes by sales person, so it punts on the issue of
edits conflicting with one another.

<< By properly, I mean that the first salesman to replicate should succeed
and the second should fail (otherwise he would be overwriting somebody
else's changes). >>

No, EDB does not handle this at the engine level.  However, if you want this
level of conflict resolution, you can do so by implementing a BEFORE UPDATE
trigger on the table, and checking the LOADINGUPDATES() function in it,
acting accordingly to check the NEWROW values against the OLDROW values, and
issuing an exception if there is a conflict (RAISE).

<< And is there a mechanism to advise a remote user that one of his updates
could not be applied and cause his edit to be refreshed by the current
master copy? >>

Again, this must be implemented by you as your needs dictate.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image