183 points · by brettcvz · 14y ago · 90 comments
It sounds all horribly abstract but it is the actual reason file names, file systems, and file system APIs exist. Then there is a whole different set of semantic interpretation of the contents of files. Whether it is a simple stream of UTF8 encoded code points, or an ELF file which can describe executable code that is ready to be loaded into memory and executed.
The OP decrys the lack of an interchange format which is simply a convention by which two programs can both interpret the contents of of non-volatile memory which they have both accessed using a unique name. And that mostly because of iOS devices and the applications which have eschewed the idea of putting the names of their non-volatile data sets into a globally accessible namespace.
Somewhere along the way someone decided it'd be a useful abstraction to imagine a hierarchical organization system (directories) on top, so that was glommed on, but it's not real either.
It was never a perfect system, but it worked well enough when most users were fairly technical and had a humanly comprehensible set of labelled data streams.
I appreciate the effort to insulate users from the complexity that has grown up underneath them. The simple fact is that most people fail at large scale taxonomy and organization. It's hard. And it's a lot of work to maintain even if you're good at it. See: library science. So I don't think there is another model that will succeed as well as "files" have.
iOS hides the filesystem, but it's still there obviously. So far all we've seen is insulation for those who need it, as a byproduct of huge control loss for everyone. The other (valuable) byproduct is security.
We haven't found the compromise yet. There might not be one.
One of the first issues is that the disk likes to work in terms of blocks, which tend to lend themselves to arrays, preferably of fixed size so that related data is contiguous. This leads to a limit on the number of files in a directory and so nesting directories is one of the easiest ways to contain more files.
But it's also a little more than that. Directories can group semantically related files together. This means their meta-data is in the same directory inode and so can be read in as a group. This creates more efficiency. Chances are that you'll often access many related files at once, even if it is just to list a directory, so it helps the file system to have some structure so that the meta-data of related files is all read in at once. It's an optimization that takes advantage of our own semantic information to structure the data.
This arises from disks being a really crappy way to access data. They are slow and work best with sequential reads of large amounts of data. It really isn't that useful for a persistent key-value store whose meta-data alone may be much larger than the amount of available memory.
But I tend to think of it as a KV store most of the time anyway and often wonder why we have the silly idea of directories.
We want to associate our keys with namespaces.
Files do exist. They are the values in the filesystem KV store, but they are also a schema for the value so that interoperability works. If we followed your logic, apps would not exist either but we all agree they do.
I disagree that (most) files contain their own schema though. Sometimes the schema is incorporated by reference in the metadata, sometimes in the key name (filename).
Some structured data formats contain a sort of self descriptive sub schema, but they always(?) require something higher up the chain to make sense of it. I can't think of any examples where that isn't the case, but I'll leave the question mark on the always because I'd like to be be proven wrong!
When you reach many, many files, just try to get people to tag them. Just try.
The File is one of the most important core abstractions of our computer systems. Stdin? Stdout? Network I/O? Etc. All files.
And while its true that UNIX (and taken to its logical extreme Plan 9) used a common API to handle all of the transfers between non-memory resident data sets and memory, there are many examples of operating systems that use other schemes. One of my favorites which I got to help build when I was in the kernel group at Sun was a thing called 'mmap' which assigned addresses in your memory space to locations on disk. The 'magic' happened in the VM HAT layer. That scheme is having something of a comeback in 64 bit address processors since few machines actually have 22PB of RAM it is possible to do something like:
struct Stuff *my_stuff;
mmap((void *)my_stuff, file_len, 0, 0, file, 0);
And then be able to make a statement if ((my_stuff+100)->is_ready) { ... }
And have the operating system translate between my notion of a memory address and the data sets offset to instance 100 of the structures contained therein.I expect to see more of that in experimental OS code. Something like char data_file = ChuckOSOpen("some.dat"); which lets me then address data_file like an array of char so
while (char *t = data_file, IsValid(t), t++) { ... };
would then iterate over the contents of data_file as 8 bit values until there wasn't any more data and thus no more validly mapped pages. Read and write are simply assignment, seek is simply math, and close is simply unmap.All without the notion of 'files' but with a notion of 'named data sets' which clearly can be implemented in a number of ways.
1. What if it's "code" not "data"? I thought "data" in this case was just 1's and 0's, i.e. what the represent, e.g. electric charges on a medium? I thought that how we interpret these charges is what makes them "code" or "data".
2. What if the "file" is stored on a "RAM disk"? Is that non-volatile? If no, then does that mean this is not, by your definition, a "file"?2. the implementation of the storage is another level of abstraction away. the filesystem assumes the media it exists on is non-volatile, what exactly that means in implementation is irrelevant. theoretically you could call a traditional spinning disk volatile because i could hit it with a hammer and destroy it.
I have files "in the cloud" that were born on systems that haven't been manufactured since before Google existed. Those files are self-contained units that I control and can move to whatever system I desire.
And, although people here say that end-users just don't know how to use files, I have relatives who are over 85 years old who still manage to attach photos--and Powerpoint presentations, for some reason--to emails and share them.
Saying that we only need an API is saying that it's okay for the data to die when the manufacture goes out of business, or decides that it's time to shut down the DRM servers, or you just lose your phone.
Files are reifications of data that allow us to separate some concerns. Transporting and backing-up files are orthogonal to the data that is in the files. We can compress and email and FTP any kind of data whatsoever.
That's not an insignificant thing.
It was Newton-OS and it used something known as soups for persistent storage. Soups were discoverable databases that intelligently handled Flash cards insertion/ejection. The ability to handle Flash on removable media is still something that mobile OS's have trouble with to this day.
The OS could merge soups on different stores dynamically and detect if some data in a soup was currently in use on an ejected card and ask for the card back. This merging of soups on different storage devices is something I've never seen duplicated in the subsequent 20 years.
Files are not the only way to achieve the requirements in the article. They are just the common solution.
I spent years of my life trying to get rid of treating direct user access to the filesystem as a foundational UI metaphor, at both Apple and Microsoft. As I liked to say, why is the UI based on a filesystem debugger? (If you can see /dev or C:\windows\system32, then yeah, you're running a debugger.)
Many people who aren't programmers don't seem to get deep hierarchy (deep meaning > 2 levels). Searching works, tags kind of work, but few people really know how to set up and use a folder hierarchy.
The reason it works to let the app deal with navigation is that the app knows how to do type-specific, contextual navigation. People like concrete things (whereas programmers like abstract things—a constant struggle). If you're trying to find a song, you want to have a UI that knows about songs: they come in albums, the same song may be on multiple albums, they have artists and composers, etc. Any attempt to represent that in a filesystem hierarchy can be nothing but a compromise.
This has nothing to do with defining standard formats for exchanging units of data. Just how you find them once you've stored them.
Yep. Search works. (But forget tags and taxonomy. Taxonomy is sooo 1994 Yahoo! Library science! LOL!)
Imagine if the whole internet were below /. Now, where's Walter? Lessee. His initials are wrs. He did the Newton object store. Hmm.
Finder can't find. Explorer can't explore.
However, if I simply type "wrs newton object store" into my Chrome address bar, it instantly coughs up the Newton Hall of Fame! https://www.msu.edu/~luckie/hallofame.htm
QED. Wallyscript indeed!
Now on to the bashing....
(I kid)
Seriously, though: For a song, that works fine. But what happens when it's a note I jot down in a hurry? And then an address I tap in for later. And my grocery list.
Now, I have to keep this mental mapping of where my data lives. I have to, essentially, remember file types and associations myself.
Not saying I need a file browser, but the current iOS facility for this isn't good enough. Look at the card-wallet thingy for iOS6. Maybe what would work is something like that for each general type of content. You want to see any stored gift cards and boarding passes? Open your wallet. You want to see any stored notes and grocery lists and what not? Open your moleskin.
You've clearly thought about this more than I have, though. So what's your take on it?
I think in the sort of usage you're describing, you just make random things and save them, and you get them back with search and a chronological list. The three things you describe don't sound like you'll need them after, say, tomorrow afternoon. So why put a ton of effort into organizing them?
It is of course useful to be able to organize arbitrary files in a more permanent way. The repeated mistake (to me) is that the process of organization is not itself considered a concrete application based on specific use cases. For some reason, a document format is considered application-specific, but as soon as you want to group two documents together you're dropped into this pure universal abstraction of a filesystem hierarchy. In other words, applications get to define how files work, but not how folders work.
For example, you could have a "project" that let you group various things together (maybe some CAD drawings of an office remodel along with various random notes and a budget spreadsheet). That's what a folder does, but a project would be much more specific--maybe do some time tracking, have some client-based organizational functions, etc. And of course you'd look at projects in the project application, not in a filesystem debugger.
NewtonScript made me a better programmer. I don't say that about many languages.
I don't know how well it would scale to a non-hand-held device, but it worked really well on the Newton.
Files are useful, but they are not necessary. We are used to them, but there can be better ways to do things.
Files, on the other hand, often have peculiar formats. Is .xls "interoperable"?
I can take any photo, URL or file and open/share it in/to another app. The OS and app developers take care of which apps support which resources, so as a user I'm always presented with a sensible list of apps currently available on my device.
I'd say the notion of a file with a specific file type is too abstract and technical for most use cases for casual users. The UI should group pieces of data as human-understandable resources (i.e. a "picture" can be a .jpg, .png etc.). With this level of abstraction, a user can be expected to understand when presented with a list of apps:
OS: "What do you want to do with this URL?"
User: "Share to Twitter/Facebook/My other browser"
App A shares data with App B. The user makes some changes and App B saves its new copy. It doesn't send the data back to the originating app. It could, but then the user would have to manually do that and save it in App A again.
This is horrendous! People are confusing the poor UI that we have for files (file pickers) with thinking that files themselves are a bad abstraction.
That the current Send-To idiom is limited is not under dispute. That it's worth changing is what's worth discussing.
For example, if I share a photo from the Android Gallery app to Instagram, add some trendy filters and share the modified photo in Instagram, I end up with three copies in the filesystem: The original, and two copies made by Instagram to preserve both the original and filtered version.
After all, Instagram doesn't know/care whether the photo came from a camera or from another app, so it always saves a copy of the original.
Also, each time I share the photo to Twitter, Facebook or other cloud service I create another copy with different resolution, (re)compression and even dimensions, which is saved to the service out of my reach.
I guess having multiple unsynced copies of the same information is a problem that won't be solved as long as we want to have the ability to distribute information freely. One interesting development would be better content-based matching of files (e.g. Google similar image search, content-based indexing of photo subjects in Google Drive).
In another decade we'll have a whole lot of unreadable proprietary app data, inaccessible because the original app doesn't work on new hardware. Extracting it will be a tedious process of either reverse engineering or emulating the old hardware/software combination.
Not that we haven't been down this road before, but it just seems like it's worse this time. Even the word "file format" seems archaic, and not many (other than pirates) seem interested in reverse engineering and/or documenting them.
The best thing I've seen in file system evolution is KDE's KIO: Any KDE application can take any KIO url and use it; all file operations are asynchronious (even if you open local files, and that's very nice even for local files that are big), and any program can use network resources as easy as local with little to no effort.
But we should improve on that: a heterogenous user file system should provide discoverability (e.g. your social network photos are automatically available in any program once you bind the account, and you know where to find them). File system branches restrict some operations on files or hint on their cost (scanning a huge photo bank is a very expensive operation; you can't access the contents of audio files inside a streaming service but you can play them in the program). There also should be other ways to organize files than just dumb hierarcheries (imagine a search box in place of a folder, you need a query and then you enter the search results; or you can have tag cloud in your file system)
There's a great deal of work of innovation here and nobody does it at the moment, so it seems.
Sorry for mistakes 'cause I'm hurrying to go to bed :)
That's why files exist. Not sure what the article is trying to say, TL/DR
There is no doubt in my mind that the file system (as we know it) is dead. Daily workflows are becoming more and more integrated with the social graph. Its one thing to manage your own file set, but try keeping track of everyone's files... or even your own across multiple different purpose devices for that matter.
If I save files using one filtering scheme and someone else saves to the same shared drive using another scheme... both of our files eventually become lost in a mess.
Like others have posted, I believe the solution is search. Maybe not textbox search like Google, but certainly different ways to view lists of files. Can you imagine viewing the most recent files edited by a certain coworker, or the most recent files edited within range of a certain GPS location. I don't have an exact answer how to sort the data, but in my mind... there is a lot of additional data that can be used to help filter file presentations beyond the just the file index and file attributes used today.
I'm in the bay area, working on a startup to address this shift. Message me if interested... I'm always looking for people to talk about it with.
This is what the world wide web does. DNS, HTTP, and MIME types solve these problems. The problem is that it is still to difficult to make things on a device into URLs.
You don't need APIs, you need standard file formats, just like with filesystems.
Perhaps you could expose URLs in a unix file model style and pretend that they are files. Or build http into the kernel and give every file and executable on the system a URI. Or even map 64 bit processor address space to IPv6 addresses. Based on a 4k block size you could address every hard drive in the world in a 64 bit single subnet.
My point is that files are just one type of abstraction. URLs are just better.
$ find ~ -type f -atime -1w | awk -F/ '{print $NF}' | awk -F\. '{if (NF>2 || (NF>1 && $1!="")) print tolower($NF)}' | sort | uniq | wc -l
83
Granted a lot of those are system files.Somehow this crusade against files and the filesystem just feels like it has ulterior motives behind it. I have yet to see even a computer illiterate user who has a hard time understanding "folder" metaphor and that folder may have items inside them, including other folders.
Files and folders are too generic and not generic enough. Some files aren't files, some files are ~folders. Actually most of those files are ~folders, they are containers for other kind of data and relationships. List of samples, Tree of names, Graph of points.
IIRC Plan9 tried to be a little more generic (in a good way), you could read/write/list anything even visual objects with one single mechanism.
We need maps to see/categorize/find data. Graphs of atoms that you can close (as in closure, any datum involved in the meaning of an operation has to be included) to transmit them in a consistent state. Moving files is wrong and everybody have seen it, it's full of hardcoded context.
And for all of them, I should be able to move them between services and applications as I please
There is nothing preventing my shiny new iOS app from sharing files with other applications. Apple is just preventing those files from being stored on the device. Instead, if an app developer wants interoperability, they can have the app save a file to Drop Box, or my Google Drive. Any other application can access that same cloud storage and access the file.
The beauty is we've moved beyond sharing between applications on a single device. Now EVERY application I run on EVERY device I have has the potential to share the same data seamlessly.
This is why iOS doesn't open its file system. It wants the app developers to use something a little more flexible and reliable.
Implementing interoperability with all the possible cloud storage systems shouldn't be left to each app developer separately. This should be a feature of the operating system.
As an Android user, I'm genuinely interested if iOS users find the sharing options between apps too limited. Do you often end up requesting new sharing options from the developers of your favorite apps?
Also, not every piece of data is a file I'd want to save to Dropbox. For example, I share article URLs from Flipboard to 2cloud many times a day (2cloud opens the URL on my desktop browser). I'd hate to have an extra save/open step between the apps.
I get what you mean about only wanting certain documents on Drop Box - that was just a limited example. The spirit of the concept is that the developer can choose what cloud storage to use based on the application.
In the case of a mobile Photoshop app, Drop Box might make sense. In your example, the storage medium would be different (maybe proprietary even) but a cloud space would still be ideal for the end user over just storing these URL's on the local device.
Then, if I have different kinds of documents, I should sign up to a bunch of different third-party cloud systems? Each sign up being another username and password, another point-of-failure for security, more management overhead? All for a system that won't work if I lose network coverage (rural, underground, airplane mode, choked tower, foreign travel etc)?
The cloud does have its good points, but I do not buy this snake oil.
APIs continue to provide interoperability, but instead of having the user select a file to upload, they select an image through the Facebook API. This should ultimately improve the user's experience, but there are some downsides during this transition period (IE: photoshop touch lack of sharing features).
While you could argue FilePicker brings back the file, you could also hedge your bets the other way, and work as much as possible to abstract away the file. Instead of grabbing Facebook photos as a set of files, what if I could easily grab the set of photos than contain me and a friend?
Good for Facebook, bad for you and me.
Files exist because the amounts of "stuff" users want to "store" do not always correlate well to block size.
To put it another way, block size is fixed. But the size of "stuff" is variable.
OK, now you can go back to thinking in terms of "file systems".
Edit: 302 found http://en.wikipedia.org/wiki/Computer_file#History
Files are great when there is a competent, skilled user to provide the interface glue between apps. To automate, and have things just work, interfaces and data types are needed.
That worked great for me. What else is needed?