5 ms·
I agree with with all those requirements except for the first one. I think there should be a way to export to files/directories, but using files/directories as
by AriaMinaei 7y ago
I agree with with all those requirements except for the first one.
I think there should be a way to export to files/directories, but using files/directories as the primary persistence mechanism is inherently limiting:
- Editing things with classic text editors loses the intent of each edit. Ever seen a git diff look radically different from what your changeset intended? That's because a simple A/B comparison cannot recover the intention of each edit. You lose information here. Like, did the user change the name of function A, or did she define a new function that looks a lot like function A?
- Backing up with external tools will work. But syncing will be limited. Because the sync tools don't understand the structure of the document.
- How does the tool assign a unique ID to the smallest unit of content (say, a word, or a link, or a paragraph?)
- Editing files with a classic text editor will also break real-time collaborative editing.
- The_Colonel 7y agoI totally agree. Filesystem works only for the simplest of use cases. Besides what you mentioned, their requirement of "Multi-directional (incoming+outgoing) link" is essentially impossible to do well with file based approach: - the only identifier of a file is the path, once you rename a file, all the links pointing to it are broken - for incoming links you'd have to scan the rest of the notes for links (which will get slow at some point) Typical way to mitigate this is to create some index files, name note files with UUIDs instead of their natural names, but this then creates a lot of other problems as well. You might also find out that the limitations of filesystem (strict tree structure, strict split between directories and files) might not be a best fit for note structure ...
- TuringTest 7y agoI was thinking of a system where the content of the nodes is persisted as files, like in static website generators, and then the interactive view is generated from the content read in files when the application starts or is updated. Wikis work that way, where the payload of each page is a flat text sequence with simple markup. The structure, relations and metadata could then be stored in a serverless database, like Git does in the .git folder. Not perfect, but I think the benefits for personal information outweight the limitations.
- The_Colonel 7y ago> Wikis work that way, where the payload of each page is a flat text sequence with simple markup. That depends on the wiki. The most well known - MediaWiki - uses traditional DB like MySQL or Postgres. > The structure, relations and metadata could then be stored in a serverless database, like Git does in the .git folder. Not perfect, but I think the benefits for personal information outweight the limitations. What happens when files and metadata go out of sync? People want to have the data in plaintext for interoperability with other tools so they are going to edit the data outside of the app. And your app does not know files changed so it can't selectively update the indexes/metadata. Another motivation for flat files is that users want to use standard sync tools like syncthing, dropbox etc. But these metadata and indexes will not work at all in case of write conflicts - dropbox does not know how to merge those serverless database files.
- TuringTest 7y ago> Wikis work that way, where the payload of each page is a flat text sequence with simple markup. That depends on the wiki. The most well known - MediaWiki - uses traditional DB like MySQL or Postgres. They still persist each page as a self-contained single flat text field, though. For the wiki model, it doesn't matter how it is stored in the hard drive, but that you get atomic nodes of content. If the node is a text file, you get the benefit of accessing such content through the file system and a text editor instead of a DBMS. That's invaluable for accessing content from a collection of multiple devices, operating systems and alternative applications, i.e. the use case for personal information. > And your app does not know files changed so it can't selectively update the indexes/metadata. Why would the app not know that files are changed? Any development environment nowadays may check for touched files and re-parses them on the fly, for example for instant preview of web pages.
- The_Colonel 7y ago> Why would the app not know that files are changed? Any development environment nowadays may check for touched files and re-parses them on the fly, for example for instant preview of web pages. Modern OS provide APIs to watch file changes (on Linux e.g. it's inotify). However: 1) Does not work when your app is not running. When your app starts up it needs to rescan all files. 2) Does not scale well - watching files is expensive and OS usually have usage limits. IDEs provide a great example since they need to solve essentially the same problem - when my Intellij starts up it spends a while until it scans all the changed files (to do that it must go through all of them). After that it starts complaining that my inotify OS limit is too low and it can't watch all the files in the project. All this is fine for lightweight use. But if you're serious with using your knowledge base, you'll run into tens of thousands of items in the course of few years.