iCloud Syncing question

Viewing 2 reply threads
  • Author
    Posts
  • July 25, 2025 at 2:21 PM #52751

    Mark Moran
    Participant

    Not critical, but just wondering. I wonder how iCloud syncing handles a bunch of deletions. Say I have a form with 10 records, I import in 1000 records. The the 1010 records sync. I realize I goofed with the import and delete the 1000 new records. It syncs. Then reimport the 1000 records again.

    Does other device need to download the first 1000 records, delete them and then sync the new 1000 records. Seems like that would be inefficient. Just wondering on how sophisticated the logic is behind the syncing.

    July 26, 2025 at 6:35 PM #52755

    Brendan
    Keymaster

    Ok, this is strange. I know I answered your post yesterday about this.

    I’m guessing I forgot to click the Submit button. Doh!

    Anyway, sync in Tap Forms uses a framework called Ensembles to do the heavy lifting.

    It basically sets up a separate database that’s used as a transaction log. When you first enable sync, it does a process called leeching, where it copies all the data in your document to its own CoreData database file. These are essentially all insert transactions.

    Then when you delete your 1000 records, those deletions are recorded into the Ensembles transaction log database. Then that transaction log is synced with your other devices. The records on the other devices will now be deleted.

    Then when you re-add the 1000 records, those are again inserted into the transaction log database.

    Every once in a while when it detects it’s a good time to do it, Ensembles performs a process called baselining where it basically optimizes the transaction log database into a simple series of inserts instead of all those updates and deletes. This way when a new device comes online, it only needs to sync the baseline and not all of the individual inserts, updates, and deletes.

    Hope that makes sense.

    And now I remember what happened to my reply. It’s on my OTHER Mac! Doh!

    Thanks,

    Brendan

    July 29, 2025 at 8:26 AM #52790

    Mark Moran
    Participant

    Yes, thanks for the explanation. I envisioned something like this but didn’t realize the “baselining” happened. Without it the log could get pretty extensive, especially if you’re using 4+ devices.

    Mark

Viewing 2 reply threads

You must be logged in to reply to this topic.