168 points · by polm23 · 5y ago · 71 comments
"Hmm, I need a way to store user- and system-provided data persistently to disk. They need to be looked-up by name, and maybe searchable. Some kind of 'system' for storing 'files'. Hmmmm... If only the computer had something like this... Oh, I know! I'll put them in a sqlite database!"
Facepalm
Or how about a system designed with intentional obfuscation as a means of selling more storage?
Fortunately, I was exposed to this early on when a family member wanted to move their music from iTunes to a non-Apple phone.
You would think storing music would be fairly simple and straight forward --- sorted by artist, album and track or something similar.
Not so with Apple.
What came from iTunes was so arcane and obtuse that I was convinced it could only be intentional obfuscation. And I decided then and there to avoid playing in their sandbox.
iOS has a built in tool for managing storage space, which is much better.
I don’t see what is wrong with reporting that to you.
(1) Just "files" are not going to save you -- they must also be in the standard format. It may be pretty simple for text-only notes with no support for formatting, but anything more advanced gets complex fast, especially if you expect files to be editable.
("Editable" is the worst, actually.. Imagine a pen-based note-taking app which stores data as PDF in user-accessible location... users would expect to be able to drop any random PDF and have it show up and be editable. This will make the code immensely more complex compared to simple proprietary format)
(2) The file interface is pretty limited (no easy way to detect new files, can only query by name), so you need indexes and secondary metadata. You might need a non-trivial amount of metadata in app-specific format for advanced functionality, like "get past version" or "find similar objects".
If you are allowing user to mess with your files, this gets much harder -- you now need to be able to re-scan the whole folder, and try to infer renames. This is certainly possible -- many old-school MP3 managers did this -- but it is a significant additional effort.
(3) A lot of times, it is easier to provide alternate mechanisms rather than trying to shoehorn the data model into filesystem (this applies less to mobile, and more to other non-file-based apps), for example:
- The (cloud based) note-taking service I use offer "export" option -- your notes are stored in whatever cloud database, but there is a 2-click way to download entire thing as .zip full of text + opml files.
- There are also APIs -- the same service offers API to download/upload notes. I run a small script from crontab which downloads all the nodes periodically to my computer.
- Local only: "git" does not expose past revision as files -- you use various git commands to see that data.
That's the problem. They shouldn't be your files, they should be the user's files.
The same goes with the files -- sure, they belong to user, but as long as you want to process it in the program, you need to follow program's rules. How complex and onerous those rules are depends entirely on the program. For example:
- Text editor like emacs can handle pretty much any file you throw at it -- but OpenOffice will fail with "file damaged" error if you just change 1 byte in the file header
- Many programs require filenames to have certain suffix
- Some programs require files to live in designated "projects" dir
- A lot of programs have some sort of internal database and will fail if user edits it in a non-trivial way.
- Some programs require you to do special manual actions anytime you rename the file using third-party file managers (for example, git needs "git add"/"git rm")
Let's not pretend that allowing arbitrary file renames is some sort of ideological standpoint which separates "user files" from "non-user's files". Every program requires something from user to work, and "do not allow arbitrary filenames" is just one point on this spectrum. OpenSSL does not impinge on user freedom just because it requires a very rigid naming structure in /etc/ssl/cert.
As a software author, you are only responsible for those files insofar as the user allows you to be. The user still owns those files and can do whatever they want with them.
If they have damaged the files your software uses, that's on them, not you; you are not responsible for that, unless it was your software that did it.
Also, it should be pretty simple for a piece of software to tell the user why it can't open a file it needs to open, including a damaged header, a wrong suffix or filename, or a file not being in the correct directory. If the user caused the problem, telling them the problem should make it easy for them to fix it.
In addition to that, if software does not have flexibility in where they put files (such as using environment variables), I would argue that that rigidity does, in fact, impinge on user freedom.
The point of a shoebox app is decouple the user model of organization of data from the file system model even as files are used for storage.
This is done because the filesystem user model is inadequate or inappropriate, or because the storage model is expected to change.
iOS allows apps to expose their data as files within the Files app without requiring them to expose the underlying files themselves.
A good example of this is Quip, which is a collaborative document editor. All of Quip’s data is stored in their online database, but it is also exposed through the files app as a set of PDFs.
Notes could expose a filesystem style view if Apple prioritized it. Of course then we’d have the issue of file format versioning etc. to deal with. If I were them I wouldn’t be rushing to make that trade-off.
This is a weak analysis. I agree reasonably with your overall point, that this isn't entirely iOS's fault. But I see no evidence or cause to believe any of the alternate anti-file approaches have anything better to offer, present better. You yourself argue that better interfaces are presentable atop the filesystem interface, so it's obviously not a limiting factor in data-representation & data-modelling.
Rather, to me, I see cloudification requiring adaption. Files didn't apply, weren't connected, where-as the digital entities we we began trying to work with were connected, cross-system. That doesn't outmode the filesystem, but it does require adaption & reconsideration. It requires connecting. It requires going further.
I'd point out that we have no replacement for the filesystem. There's no words, no descriptor we can use to describe the alternate, the pervasive, cloudy objects that we interact with everywhere. There's nothing generic, or user-manageable that's replaced the idea of the file.
Files were a convenient reification of the digital to sacrifice, to make computing harder, and because we didn't know how to make the notion of a file more online.
I think it’s fairly clear that the iOS photos app is easier to navigate than a folder with tens of thousands of files. Even the notes app presents the notes in a more useful way than a folder would. Other obvious examples are things like notion or roam research, or any number of systems where the file metaphor just isn’t natural.
Many people today use a web browser to view pages of text and multimedia connected via hyperlinks. This technology hides the underlying implementation which may be files, or may be databases or other kinds of store. It is more successful than the earlier file based protocols such as FTP and Gopher.
> I'd point out that we have no replacement for the filesystem.
It’s not clear what this is supposed to mean.
We have many other kinds of data store, e.g. relational databases, graph database, time series databases etc.
I don't think arguing that 'the main ui is not a file browser' is enough to show that a web browser is a shoebox app.
> It’s not clear what this is supposed to mean.
i was super clear. what else have we presented users as a consistent cross system abstraction/means to handle data? nothing. you have nothing.
i dont understand your arguments on ios photos or notes. google photos is one big folder full of files, and some photos can be tagged or organized. this would fit into either a filed symlinking paradigm or a use of extended attributes. i have zero clue ehy you think these apps are anything other than files and folders, but obfuscated.
This article is great. Great topic, great coverage, good range, solid points. Thanks.
I mean, my Nokia N9110 communicator back in 2000 (which had no associated cloud service) had the same setup for note app -- single file in proprietary format, with all notes stored there. And no mass export tools either!
And before that, in the middle school, we used "At Ease" system [0] which was alternative system interface which exposed no files -- there was one "tab" with objects, but no folders or renames.
This isn’t the case. iOS is closer to “At ease”, which pre-dated palm os by a decade.
The Newton also used a database for storage.
For example, here I use a merkle DAG-based file format to represent CRDT-like types:
https://www.hyperhyperspace.org
The resulting abstraction can be universally looked up using a hash (or short sequence of words), can be modified offline and synchronized flawlessly. It's still WIP (for example, you still can't export it to an actual file, hehe).
Developers dont want to rewrite their data models to reflect a strange API or weird model. I dont want to pollute my domain objects with MutableReferences or extend HashedObject. So while I think the ideas in Hyperhyperspace are good, the programming model needs revisiting if you want people to actually use it. You need to use plain old objects and spider them for references.
ORMs dont require you to use MutableReferences, they let you use your actual data model as is.
If we can get the backend storage to be P2P then any application outside the backend storage can be written traditionally.
I am personally interested in distributed SQL databases and have written a simple distributed SQL database that could in theory be used as a P2P application backend with distributed joins
I think a combination of event sourcing and CRDTs could be used to provide arbitrary synchronisation and merging between peers that handles bad actors through web of trust.
I have started a discussion of P2P storage backends on Infinity family which is a community of inventors (I can provide invites). I have mentioned Hyperhyperspace there.
https://0oo.li/intent/74001/distributed-data-storage#1630701...
There are other projects that take an approach similar to what you're describing (Automerge and its derivatives, mainly).
I guess there is a distinction between distributed databases and permission-less p2p applications. Having a data center where you can trust the compute nodes running your distributed database is very different than having random untrusted peers over the net. But maybe data validation can be done in a less intrusive way, something like what Automerge does for JSON merging (maybe in a typed setting?).
That said, hyper-hyper-space is still work in progress, once we have a proper library of container types programming will be a bit more intuitive. Or so I hope, at least.
I see you're going for a zero trust model where you have baked identities into the data structure. Which is very cool.
We have a discussion about this problem on Infinity.
https://0oo.li/method/60001/community-managed-software-secur...
One idea is to strictly review all distributed apps, so sign them by a central party.
If you want to run arbitrary source code which is untrusted you need a interpreter like Ethereum/Bitcoin or browser JavaScript.
I like the approach you can exclude nodes or identities you dont like which is the federated approach mastodon and matrix take. But it doesn't really scale if actors can mass produce identities to spam the network.
I liked what Freenet's FMS did (freenet messaging system) which is web of trust. Your visibility of content is based on a transitive trust setting on an identity. So if you knew a good person and trusted them you could still see good content.
Reddit solves the problem by having a 'new' section which is where any users content goes but it's not the default view. HN does the same. Good content gets manually audited.
I am really excited by P2P software and Braid. I think the problem is running information systems over a P2P network is not a solved problem. The automerge, yjs and Hyperhyperspace projects all provide parts of a data storage layers. Either need to hitch a ride on the browser like Hyperhyperspace with webrtc or something dedicated like a DHT like Kademlia.
The day I can distribute host an information system backend and frontend and others can help host it with me that would be success to me.
So we have problems with distributed storage and distributed compute.
You might get replies on Infinity to your comment..if you join the following Telegram groups you will get notifications.
https://t.me/en0oo and https://t.me/oo0oio
This invite link doubles as an explanation of the site. https://0oo.li/accounts/signup/?invite=0x3fFca3853B7eb67A5a8...
And we are planning to make the site peer to peer at some point when the ontology is concrete.
Can/should one argue that web apps should be backed by highly indexable/searchable file systems so that when I want to depart a platform I can just ask the backend for my files?
IMO, the only valid use for them is storing configuration that somehow can't be kept in memory after reading config files. Actual "data" (content) should be kept in stable, readable formats.
Not sure they are (or ever will be) the core issue preventing this future. Linux desktops are file based, in principle one could envisage intelligent open souce PIM applications that integrate all the personal data securely and privately, but nothing of the sort exists...
In principle, sure, centralize data management. It's important. I get it. Messy shared filesystems aren't a great way of archiving data. But at the same time, they're a good solution for quickly producing and using data.
The context was around specialized desktop application for technical users (desktop GIS). Yes, you can stream data, and yes, database connections are very much a thing, but that doesn't get around the simple fact that the UIs on everything are set up for local file access. Furthermore, the other applications used alongside this also expect (and in many cases, only accept) local files. 90% of the expensive software you're paying for (or the open solutions too) can't talk to that nice fancy internal-only API you set up to "replace filesystems". In practice, folks are going to wind up with local files anyway, which means you wind up with multiple different copies of the data, which was the whole thing you were trying to avoid.
Also, users are _mostly_ creating new data and not just consuming existing data. The whole point is to have a gui toolbox for processing data and creating new datasets. At a deep level, that's best solved by local files for this use case. (i.e. the formats you need to use for interoperability are meant to be updated efficiently as local files. You can stream them, but not easily update them.) Yes, it's possible to have centralized data stores, but they often wind up being a SMB/NFS/etc share because you need to open the data in multiple applications and local files _are_ the interoperability standards. Embrace shared filesystems where they make sense. They're not the enemy.
Next is hierarchy. Folders are a _great_ system for organizing temporary ad-hoc work. They're also a pretty good system for organizing longer-lived structures. Pushing things into a limited database schema or tagging structure actually makes things harder to find than a "working folder" approach, as it's difficult to group unrelated data together. Sure, you can tag things for grouping, but that generally loses hierarchy. You can reproduce hierarchy with nested tags, but then you're back to representing things as folders. That representation is _useful_ in many cases and isn't a bad thing.
In short, filesystems are good for interoperability on the desktop and desktop workflows are still very necessary for many things. Hierarchical organization is useful, and insisting on dropping it comes with a cost. "Shoebox" / no-file solutions are good for some cases, but not for all. Be _very_ careful about trying to force solutions where they don't fit.