Synchting as database

Lets say i want to make notes app that uses syncthing as backend. I want it to be mutiuser/multimachine.

Ususaly when this is implemented in applications it uses api provided by service dropbox api or icloud api. I want to liberate from that. The problem is of course i cant just sync sqlite.db file because it will get corrupted. I have to somehow merge the changes.

I know this is hard problem but since devs here are dealing with it all the time - i thought i would ask experts for ideas.

Ideas in my head:

  1. Use some git implementation with some sort of auto commit/merge. (This probably wont help the file corruption problem).
  2. Naive implementation - have clients db separated from sync and use sync files as sort of comunication layer. (clients pass changes to each other using files)

Maybe there is smarter, more elegant way?

Thank you.

For just notes, in order to use something like syncthing to sync them, I’d go with just flat text files in some structure and have the client index them when they change. Into RAM or a non-synced SQLite database or so.

If i have textfiles as JSON text file - maybe for like comments to the text file and stuff like that (not something realtime just memos). Wont that just break when more people will edit it?

Its true i am using shared notes folder with plain textfiles succesfuly between few people with syncthing (i want to bascialy create frontend for that). I am just not sure if there is any conflict mechanism that syncthing does that i don’t have to reinvent (if its just plain textfiles).

Also i looked at syncthing api events - would it be smart to reuse syncthing file watching instead of doing the filewatch myself?

Btw thank you @calmh ! I run design studio and we are heavy users of Syncthing. Couldnt live without it. I actualy looked at how we could help the project - there are discussions around web gui and i was thinking we could help that (design and also implement it). Then i realized that most people see the webgui basicaly just one time and even tho the current angular gui is a bit mess it works OK. What i think might help adoption of the project more is better frontpage / branding. If you would be open to that - we might try do some proposal when we have some spare time. THANKS!

If you finish the notes app, please share it with the community. There was a recent discussion about Evernote alternatives that use syncthing for syncing the notes, but we didn’t end up to find a real solution.

I would appreciate a redesign of the web-gui since it looks a little bit like created by nerds :slight_smile: there were great wireframes, like these ones: Loading Share Experience

Why dont you use the web-gui you just sent? Its not realy a wireframe. Its a bit generic but looks more aprochable then the current one. Or you are looking for someone to develop the wireframe?

Like i said i dont think that webgui is that critical. I think frontpage could use some work though.

I’ve played with an prototype of an Messaging App some years ago. These are basically just Files with an UUID Name which are created (Append-Only Design). Each Client then indexed these Files by their own and watch for changes. Basically the same Idea that Jakob had.

You might take a look on this young Project here: https://github.com/attic-labs/noms This looks very promising -> The versioned, forkable, syncable database

BR, Frank

Hi,

I think you can try skylable. Hereafter the url: https://www.skylable.com

Skylable is an objects sync application which syncs also files.

Noms is something i am watching very closely. It will be blast for apps like this. Its just very young. Quite unusable now i think. But for future reference if somebody comes in totaly try noms.

Sure, the landing page is really critical to spread syncthing. There is another thread discussing to offer wrappers on the landing page, so new people can start easier with Syncthing.