Skip to content

Commit

Permalink
An enhanced description of the problem that we're trying to solve
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarashev committed Nov 8, 2023
1 parent 003101c commit f0334e1
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion cloud.ganttproject.colloboque/DesignDoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,38 @@ The goal of Colloboque project is to create a protocol and software for real-tim
relational structured data with the option for creating offline data branches with subsequent automated or
assisted merging.

Suppose that our project data is stored on GanttProject Cloud in a task table:

| id | start | duration | color |
|----|------------|----------|-------|
| 1 | 2023-09-01 | 1d | red |

and there are two GanttProject client apps working with that project. One of the client apps is online and
the user changes the task color to yellow, while another is offline, and the user changes the task start date to "2023-10-01", adds a new task with id=2, and goes online in a few hours after that.

We want our table to look like this when both changes are merged:

| id | start | duration | color |
|----|------------|----------|--------|
| 1 | 2023-10-01 | 1d | yellow |
| 2 | 2023-09-01 | 1d | red |

It doesn't seem to be a trivial problem, because concurrent update of the same row would've been an issue even if
we had a centralized database with both users being online at the moment of change. In our case any user may go offline
for quite long time, and we want a reliable protocol that lets them receive the updates or merge the changes that they created when they were offline.

## Alternatives and Related Technologies

There is a number of related technologies and possible alternatives.

### Logical Replication
### RAFT
### PostgreSQL Multimaster
https://pgconf.ru/en/2021/290216

### PostgreSQL branching
### CRDT
https://neon.tech/docs/introduction/branching

### CRDT

### Text data merging

0 comments on commit f0334e1

Please sign in to comment.