|
| Replication of autonumber IDs |
| Iniciado por guest, 07,jun. 2017 17:49 - 8 respuestas |
| |
| | | |
|
| |
| Publicado el 07,junio 2017 - 17:49 |
Hi All,
I've just started looking into universal replication using HFSQL between mobile and cloud.
One thing I don't understand is how autonumber IDs are resolved - my users will be adding new records, then adding linked records. Are the numbers changed during replication?
Thanks, will probably have more questions about this topic.
Cheers
Pete |
| |
| |
| | | |
|
| | |
| |
| Publicado el 07,junio 2017 - 18:19 |
Hi Peter,
it looks like yo are talking about pcsoft's black box...
In that case, they simply reserve a range of autoID for each DB. My understanding (based on personal testing) is that each DB has a range corresponding to an INT on 4, ie 2 billions records, and you can have in theory 2 billions DBs, thus using the full 8 bytes of the mandatory autoID size in pcsoft replication system.
Don't look for too much information on their replication system, it's just not there.
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 07,junio 2017 - 22:09 |
Hi Fabrice,
sounds to me as there were GUIDs instead of integers a little bit more practical ... just a small part of 50 years of IT experience ... btw we do synchronize a few hundred cash registers of our customers using GUIDs. I just don't see the use of those age old integers used as auto IDs. Maybe, it's a dBase heritage, who knows? Ok, it's late, good night! |
| |
| |
| | | |
|
| | |
| |
| Publicado el 07,junio 2017 - 22:39 |
Although I coded it myself in WX, the native availability of an HF/WL GUID data type has been requested for many years with tech support by me... I guess it's not sexy enough to put in their yearly novelties brochure lol |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,junio 2017 - 06:27 |
Hi Pierre,
15 years ago we (Systemhaus Predl) published a GUID function on our web site (it had been for WINDEV 5.5 already), and there is an official GetGUID function https://help.windev.com/en-US/… available since version 15! |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,junio 2017 - 13:41 |
Hi Guenter,
I agree, I find GUID more practical for replication too, which is why I'm using them in WXReplication.
However, the question was about autoIDs in PCSot native replication system.
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,junio 2017 - 15:33 |
Thanks Fabrice and everyone else for your answers and comments. So the replication engine assigns a block of IDs before the initial sync. That makes sense.
Previously I have used GUIDs combining deviceID and a count in seconds from a given date, and may go back to this approach.
Presently I only have a need for unidirectional replication, with most data going from mobile to server, so I thought I'd look at the black-box version first for simplicity. Ideally I'd like to compare the speed between a replication and sending data through httpforms (for the latter I would use GUIDs). The records only have a couple of fields each but there may be a lot of records to send. Replication looks easier for delivering filtered data to users from what I can see.
Thanks again
Pete |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,junio 2017 - 19:33 |
Hi Peter
it seems that yo are not using the word GUID the same way.
From your explanation, it looks like you have been using a composite key that you made logically unique, not a GUID.
A guid is a string of hexadecimal values like this a53e98e4-0197-4513-be6d-49836e406aaa (with or without formatting) and the mysterious mathematical magic behind the system allowing to generate guid makes them supposedly unique at the level of the universe...
When I fist started to use GUID, I created a file with a unique string key and coded a loop generating guid and writing them in the file. I let that run on a computer for 2 weeks before starting to believe the tale.
I stopped before the hard drive was full, though, so I must have SOME faith in the theory
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 08,junio 2017 - 19:52 |
Thanks for the correction Fabrice
Regards
Pete |
| |
| |
| | | |
|
| | | | |
| | |
|