-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ADR for sync with external databases #9220
Conversation
Note that the current implementation is based on the Optimisitc Offline Lock, which does not appear in the ADR. (Was also part at the discussion - see #7618 (comment)) |
The proposed design is an optimistic currency control.
That's also so in the proposal. But the main part of the proposal concerns the question "how do you recognize that things changed on the server and on the client"? |
I started to review the ADR - and put it more in the ADR format. It seems, you describe what we already implemented 5 years ago. We also introduced separate IDs. Will need to dig deeper in this. More input will come the next days. - Thereby, I will also add some results of our discussions of edge cases in the issue. |
Of course there are similarities with the current algorithm. The current version corresponds roughly to what is described in the paragraph "At this point, we could already sync the server and client by asking the server for all up-to-date entries and then using the jabref/src/main/java/org/jabref/logic/shared/DBMSProcessor.java Lines 576 to 582 in a90ee23
This works of course but is not efficient. |
IMHO this is not an ADR. The text should go into /~https://github.com/JabRef/jabref/blob/main/docs/code-howtos/remote-storage.md (if we want to have a huge file; otherwise, two files need to be created). The difference between the current implementation and the described approach is that the user might have a local file. - This is not implemented in the current Postgres/MySQL-sync. The "Shared Database" approach assumes that a) JabRef has the data stored on the remote system, b) there is no connection loss during work, c) the session starts when JabRef is started and the session stops if JabRef is shut down. |
Compare with https://automerge.org/blog/automerge-2/ |
CRDTs would be another option, the problem is however that you would need to locally store a lot more metadata (e.g. for operational CRDTs you essentially need to have the full history of all edits). So you would need another file next to the bib file to store these. Also CRDTs are mainly used when you need low latency and high frequency of edits (e.g. multi-user chat or text editing). Not really something we care about. |
Based on earlier discussion in #7618.
Also closes #7618.
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)