CARVIEW |
mark nottingham
recent entries all entries feed
Hi, I’m Mark Nottingham. I write about the Web, protocol design, HTTP, Internet governance, and more. This is a personal blog, it does not represent anyone else. Find out more.
Comments? Let's talk on Mastodon. @mnot@techpolicy.social
other HTTP APIs posts
- Designing Headers for HTTP Compression
Tuesday, 27 November 2018 - How to Think About HTTP Status Codes
Thursday, 11 May 2017 - Five Reasons to Considering Linking in Your HTTP APIs
Sunday, 23 June 2013 - Indicating Problems in HTTP APIs
Wednesday, 15 May 2013 - Evolving HTTP APIs
Tuesday, 4 December 2012 - Why PATCH is Good for Your HTTP API
Wednesday, 5 September 2012 - Bad HTTP API Smells: Version Headers
Wednesday, 11 July 2012 - HTTP API Complexity
Monday, 25 June 2012 - Linking in JSON
Friday, 25 November 2011 - RFC 5785 - Well-Known URIs
Wednesday, 7 April 2010 - Squid is My Service Bus
Sunday, 29 April 2007 - Are Namespaces (and mU) Necessary?
Friday, 7 April 2006
Messages vs. Files
Saturday, 7 February 2004
Jon Udell is thinking about the benefits of data being globally available, rather than localised to a machine. I’m in complete agreement; in the last two years, I’ve used Linux, Windows and Mac OSX on the desktop, leading me to be ruthless about data portability.
However, I’m not sure how this leads him to this conclusion;
A general solution would require OSs that work like Groove, and applications that send messages rather than write files.
Why do messages — which in developers’ minds, inevitably means “short-lived” — have an advantage over files? Making your OS message-based seems to just add complexity, not make data more portable and ubiquitous.
I’m very happy that I can use a tool like Unison to move my files back and forth; if they’re messages that live somewhere in limbo, the system becomes much less hackable (in the good sense) to the average developer or sysadmin.
Thinking about messages puts the emphasis on behaviour, rather than data, even though time and time again, data has proven to be more long-lived, flexible and easier to mould to unintended purposes. Why throw that away?
UPDATE: A number of responses; Mark Baker, Patrick Logan and Sean McGrath.
Sean hits the nail on the head (as usual); it’s very true that messages can be thought of as documents, and vice versa, but if the fundamental model of a system isn’t working with documents, you have to reinvent a lot of infrastructure.
Filesystems, after all, are one of the few things that define and hold together operating systems; they allow for unintended uses of data. If you expose everything through a specialized API, everyone who comes into contact with the system — developers, administrators, and users — has to learn a new means of accessing it.
I know that you’re thinking “well, they’ll have to learn a specialized file format anyway,” but that’s not the point; they already have tools for working with files, and they can manipulate the files and see the results as they do so. Try that with an API; the best you can do is something like an interactive interpreter a la Python’s, and it’s still a much steeper learning curve.
Put another way, I can’t think of any good reason why you wouldn’t want to expose persistent state as a file. that doesn’t mean that there can’t be other interfaces, but why lock it up in them?
P.S. Sean, I’m not sure specialised RPOST/RPUT methods are necessary; I think it can be done with a pattern, or maybe a few extra headers.
One Comment
PJ said:
Monday, February 9 2004 at 9:40 AM