Sync Conflict Resolution Summary – CouchDB and beyond

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Using Tap Forms Sync Conflict Resolution Summary – CouchDB and beyond

Viewing 2 reply threads
  • Author
    Posts
  • November 24, 2024 at 8:31 AM #51322

    Ben Franklin
    Participant

    Just started using/testing TapForms and really blown away and impressed and happy I gave it a shot.

    QUESTION: : Is conflict resolution just most recent update wins? I searched docs for “conflict” and “resolution” and don’t see anything written on this.

    I ran a test where I kept my phone on Airplane mode and made and edit to one field by appended “ios” to the end of one records and then went on my Mac and added “MacOS” to the end of that same field. When I turned on Airplane mode on my phone I guess I expected it would init some conflict resolution, like when using Git, but seems the iOS note was overwritten.

    I had this idea of using this for a team database for an inventory project but I can see overwriting becoming an issue.

    CouchDB is cool! I am just learning about it and NoSQL because of TapForms after years of using Postgres/MySQL and for the offline abilities it’s just so nice it’ using SQLite and JSON. Reading about how it’s great for syncing and I think I assumed as part of this it meant that it has a great method for conflict resolution.

    I’m using standard CouchDB but also see some options for CouchDB + Clouseau and, of course, the IBM Cloudant offering and wondering if these two additional options have different conflict resolution, or even iCloud — but we’re trying to use the CouchDB sync options so we can use the API for the database to write a custom app on top of it and, hence, would need some method of resolving conflicts.

    Thanks Brendan and anyone else with knowledge on this!

    November 25, 2024 at 10:11 AM #51324

    Brendan
    Keymaster

    Hi Ben,

    Yes, it’s just most recent update wins. Although it’s really just revision number tracking. Each time you make a change to a record, a new revision is created with a revision number. If a device syncs that record with an older revision number, it will be overwritten by the device that has the larger revision number. Once it’s synced, then both devices have the same revision number until you make a change to one device or the other again.

    All the sync services have the same conflict resolution because they all use the same CouchDB sync protocol under the hood. Although except for iCloud, which uses a custom protocol, but that’s really only just for storing and retrieving the changes made to the database, not the actual sync protocol that’s under the hood when using CouchbaseLite.

    Hope that makes sense.

    Thanks,

    Brendan

    November 25, 2024 at 6:08 PM #51328

    Ben Franklin
    Participant

    Okay, thanks for clarification. I guess I am just trying to envision houw problematic this would be for use with a shared base. Given this sync method, I guess if all users stay online all the time and keep receiving updates all the time then two people can be in the same based and not expect much overwriting since they’d alway be seeing the same thing but if one person ran many updates offline, while on a flight or something, and a collaborator was also still in there, I can see this being an issue when the person touches down and likely syncs right over lots possible work from collaborators.

    Anyway, I am fine with just using it for personal databases but just envisioning possibilities since I am enjoying it an like learning about NoSQL options.

Viewing 2 reply threads

You must be logged in to reply to this topic.