Meteor-Community-Packages / Meteor-Community-Packages/ground-db

[Question] What is the granularity when syncing?

Open
#175 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
569
Forks
77
PR merge metrics
No merged PRs in 30d

Description

Let's say that two users do changes to the same document while offline, but in different sections of the document. If user 2 goes back online after user 1, will the changes made by user 1 be lost?

In my database, each row contains a JS object, and one property of this object is an array. This array is bound to a series of check-boxes on the interface. What I would like is that if two users do changes to those check-boxes, the latest change is kept for each check-box individually, based on the time the when the change was made, not the time when the syncing occurred. Is GroundDB the appropriate tool to achieve this? Is there any mean to add an event handler in which I can add some logic that would be triggered when syncing occurs, and that would take care of the merging ?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing GroundDB's documented synchronization and conflict-resolution behavior; the issue names no files, tests, or entry points. Determine whether per-checkbox, timestamp-based merging and a sync event hook are supported, and document the answer or the required design.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.