pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.49k stars 405 forks source link

Synchronize notes with ownCloud natively, without additional software #1624

Open dsamersoff opened 4 years ago

dsamersoff commented 4 years ago

It would be nice if QOwnNotes will manage notes sync without any additional software.

The reason for it:

1) Security - generic folder-syncyng software is not secure by it's nature and is forbbiden in most of corporate environment

2) Simplicity/Manageability - separate software require it's own configuration/update/maintenance process

3) Intilligent metadata sync - merge sqlite database content (e.g. tags) application specific way

As soon as the sources of a ownClient is available on github and uses similar developement stack, it might be not too hard to achive. It might be possible to use libsync from the client or ever just bundle it in as a separate app with an appropriate parameters .

pbek commented 4 years ago

Thank you for your suggestion. QON is completely file-based and you can use every sync service to sync your notes. QON is also built in a way to allow external tools to sync those files.

It would be nice if QOwnNotes will manage notes sync without any additional software.

If you want to sync your notes a service to sync the notes to is required. So what system are we talking about? Just ownCloud? Nextcloud is far more popular nowadays...

Security - generic folder-syncyng software is not secure by it's nature and is forbbiden in most of corporate environment

In what way do you think it is not secure? And in what way would that be different in QON?

Simplicity/Manageability - separate software require it's own configuration/update/maintenance process

If you are using a file service (like ownCloud, Nextcloud, Dropbox, Syncthing, Bittorrent sync, SMB, ...) then most likely you also have that sync client already installed. File syncing is a complex business and sync tools are very sophisticated! Integrating even one service to reliably sync a folder structure with 1000s of files (possibly very large ones for note attachments) in the background would a huge amount of work.

Intilligent metadata sync - merge sqlite database content (e.g. tags) application specific way

It would be quite a huge amount of work to try to sync two (or more) sqlite databases. If someone wants to spend that amount of time on it (are you volunteering?) it would be the same amount if done with an external sync tool. QOwnNotes even now detects conflict files of Nextcloud, ownCloud and Dropbox. I created #1625 as separate feature request.

pbek commented 4 years ago

bundle it in as a separate app with an appropriate parameters

The sync tools have an installer. QOwnNotes doesn't (and I like it to keep it that way e.g. to be able to use it in portable mode). Even the ways to get the sync clients vary a lot from operating system to operating system.

dsamersoff commented 4 years ago

All generic syncing tools catch filesystem update events and do upsync, also they periodically connect to the server to perform downsync. It's out of scope to describe all problems caused by this behaviour. The most painfull cases: it puts the risk that the file occasionaly placed into the synced folder will be uploaded to the server; it makes unwilling network connection when you are on cell traffic or VPN.

As an opposite, QOwnNotes expected to sync only controlled files (sqlite database and notes) and only when it is running. No installer is necessary in this case, because you don't need to catch any filesystem events or run as a service - QOwnNotes recognizes internally that some of notes was changed and trigger sync activity.

pbek commented 4 years ago

QOwnNotes needs a full sync of all files and folders in your note folder(s), including all images and attachment files in that folders. It needs exactly the same functionality the sync tool is offering, including every "unwilling network connection". The Nextcloud sync tool also offers "selective sync", so you can only watch your note folder(s). You can also manage different Nextcloud servers or accounts with it. QOwnNotes also would need this functionality.

It still doesn't look feasible to me to fork and maintain Nextcloud's sync tool just for a little convenience to some users.

QOwnNotes recognizes internally that some of notes was changed and trigger sync activity.

How should it do that for changes on other synced computers? And other processes also can alter your local note files, for that case it also needs to do the same like Nextcloud's sync tool: watch for file system modification events.

grosjo commented 4 years ago

Hello I am quite confused about this

The desktop app asks for Nextcloud credential (even for an API to be installed on the server), but there is no button actually sync the files.

I followed all the steps, (and got "ok" on "settings" for Nextcloud setup in QON) but where is the button "sync" ?

pbek commented 4 years ago

You might want to read https://docs.qownnotes.org/en/latest/getting-started/concept/ and https://docs.qownnotes.org/en/latest/getting-started/qownnotesapi/

grosjo commented 4 years ago

You might read as well https://github.com/nextcloud/notes/wiki/API-0.2

Without the sync, this app looses its purpose, right ?

pbek commented 4 years ago

The Nextcloud API is not sufficient for what QOwnNotes does. Plus why would anyone be locked-in to Nextcloud? (see above)