Data synchronization
Bart Pietercil
bart.pietercil at gmail.com
Mon Sep 3 05:22:22 CDT 2007
> <snipped>
>
> In MS SQL they use GUID for this.
> Ivan like this solution the most as I see :-)
> So our first step then should be adding this field type into
> Valentina.
>
>
Can you explain GUID as datatype ? I am not familiar with it (well
maybe I am but I want to make sure I understand what YOU mean by GUID )
>> We used a system with a central serial table with pre-generated
>> serials and an id for what satellite this id is. These serials are
>> replicated, too and so every system gets its set of serials. Using
>> triggers to request a serial when a record is generated. But of
>> course there are several more concept on how to handle serials in a
>> distributed system
>
> Yes, pre-generated serials also used often. Although agree, this
> require
> some special job on both computers to prepare them for replications.
> Annoying.
>
>> The same problem is regarding deletion of data. Satellite_1 and
>> Satellite_2 get some contacts in the same time. Now Satellite_1
>> deletes a contact and Satellite_2 changes this contact later in time,
>> then Satellite_1 deletes it. Satellite_1 syncs his data to server,
>> later Satellite_2 syncs too and the contact is back. Next time
>> Satellite_1 syncs with the server he gets the deleted contact back.
>>
>> Other scenario: Satellite_1 and Satellite_2 gets both contact data,
>> but Satellite_2 get the invoices, too. Satellite_1 doesn't see any
>> invoices and deletes the contact, what happened with the joined data
>> that are still on Satellite_2.
>>
>> Of course some of these issues must be handled by application (better
>> system) logic, but there must be propitiate options in the database
>> to configure these rules.
>
> These are "CONFLICTS". In the most hard cases human manual task
> required,
> like when we have conflicts workings with CVS.
Yes, I agree here. This is some form of "error" where the engine
should report the error and wait for user input before continuing.
Or better yet, the records that are triggering the CONFLICT condition
should be put into temp table which can be checked upon ending the
routine.
This way batch sync which may take a few hours are not blocked by a
conflict
Bart
More information about the Valentina
mailing list