Skip to content
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

Synchronization across multiple instances #1089

Closed
4asifm opened this issue Jun 6, 2020 · 3 comments
Closed

Synchronization across multiple instances #1089

4asifm opened this issue Jun 6, 2020 · 3 comments

Comments

@4asifm
Copy link

4asifm commented Jun 6, 2020

Love this gem. I have tried a lot of note-taking software - but this really suits my needs.

I have a question though.

Is it possible to have synchronization set-up on multiple devices with one master. For example, my typical use case is something like this

  1. I will setup a server instance - which will be accessible from anywhere and which will act as master
  2. On my desktop, for normal work, I will use the desktop version - to upload notes, files, web snippets etc.
  3. Sometimes when I am not at my desktop, i might browse my collection through a web-browser on the tablet. And maybe upload one or two web snippets etc.

So, is it somehow possible to synchronize #2 and #3 with #1 or would I have to write code to make this happen?

Also, I am thinking of a few improvements which I might take up someday - namely, a good mindmapping interface and as a central core of my notes - i like the mindmeister interface a lot - where tasks, notes, and everything is included in the same visual diagram. This is for another day, though

@4asifm
Copy link
Author

4asifm commented Jun 6, 2020

So, I re-read the "synchronization" wiki page @ https://github.com/zadam/trilium/wiki/Synchronization

what i want to know is - if I access the server via a browser or another instance of Trilium and save a note in it, will the other instances of Trilium get updated? Or delete a note in one instance?

So, essentially who decides which is the master? And what happens to edits from one instance which conflicts with other instances?

@zadam
Copy link
Owner

zadam commented Jun 6, 2020

if I access the server via a browser or another instance of Trilium and save a note in it, will the other instances of Trilium get updated? Or delete a note in one instance?

Yes, all updates are propagated across all instances.

So, essentially who decides which is the master? 

There isn't really a "master". Rather than master-slave it's better to think about the sync as git - decentralized - all instances have full set of data and are equal. Sync server is special only in the sense that it's accessible on the network.

And what happens to edits from one instance which conflicts with other instances?

Trilium handles this situation by just picking up the newer change and discarding the older change (timestamp comparison). The older change should still be visible in note revisions so it should be possible to recover any data lost in conflict resolution.

@4asifm
Copy link
Author

4asifm commented Jun 6, 2020

Awesome. Sounds perfect.

@4asifm 4asifm closed this as completed Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants