NetTalk Central

Author Topic: Netsync question 3  (Read 4549 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Netsync question 3
« on: August 20, 2019, 11:29:33 AM »
Testing question 2:

I insert two recs CENTRAL 1 and CENTRAL 2 in the Central office setting the STS ok.
both st and sts are set and equal, ok
pic 1
Then I insert two recs in an external office PILAR 1 and PILAR 2
st ok and sts 0
pic 2
Server running on Central
The I Sync from Pilar
pic3
Now in Central and in Pilar I have 4 recs, the original 2 and the 2 from Pilar, you can see the two from Pilar has a minimal differece between st and sts
pic4

Problem 1: If I sinc again those records are allways sent to the server. I think it is because the ts and sts diff

Problem 2:
Then I change record "Central 2" to "Central 22" in Pilar and sync... all ok
Then I delete both Central records using Sql, not deleting it from the app, and sync... and the only record inserted in Pilar is the "Central 22", which Ive change, but not "Central 1"
Is this ok?

« Last Edit: August 20, 2019, 11:51:29 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Netsync question 3
« Reply #1 on: August 21, 2019, 12:05:25 AM »
>> Then I delete both Central records using Sql, not deleting it from the app,

If you do this, then you are working "outside the system" and there are a number of things that _might_ occur.

a) the record may be sent back from the client to the server and so "re-appear" there.
b) the record may be sent back from the server to the client, and so "re-appear" there.
the databases may just remain out-of-sync forever.

It's important, when you are dealing with distributed data, that all the programs accessing the data follow the rules.
this includes the manual changes you make if you use a SQL Manager.

the rules include, but are not limited to,
a) not changing the guid
b) changing the ts and (possibly) sts
c) not deleting records (set dts instead)

You are allowed to purge (ie physically delete) records where dts has been set, and all data sets have synchronized.
(Clients can be set to auto-purge deleted records if you like.)

Editing data directly is not recommended for these reasons.

cheers
Bruce