This thread reminded me of something I'd posted a while ago:

---snip---
Date: Wed, 26 Nov 2008 14:23:11 +0000
From: Tim Bunce <tim.bu...@pobox.com>
To: Richard Hainsworth <rich...@rusrating.ru>, perl6-language@perl.org
Subject: Re: Files, Directories, Resources, Operating Systems
  
On Wed, Nov 26, 2008 at 12:40:41PM +0100, Mark Overmeer wrote:   
> We should focus on OS abstraction.                                            
>                                                                       
> [...] the design of this needs to be free from historical mistakes.           
>                                                                       

And avoid making too many new ones. There must be useful prior art around.

Java, for example, has a FileSystem abstraction java.nio.file.FileSystem
http://openjdk.java.net/projects/nio/javadoc/java/nio/file/FileSystem.html

which has been extended, based on leasons learnt, in the NIO.2 project
("JSR 203: More New I/O APIs for the JavaTM Platform ("NIO.2")
APIs for filesystem access, scalable asynchronous I/O operations,
socket-channel binding and configuration, and multicast datagrams.")
which enables things like being able to transparently treat a zip file
as a filesystem:
http://blogs.sun.com/rajendrag/entry/zip_file_system_provider_implementation

See http://javanio.info/filearea/nioserver/WhatsNewNIO2.pdf

Tim.

p.s. I didn't know any of that when I started to write this "look for
prior art" email, but a little searching turned up these examples.
I'm sure there are more in other realms, but NIO.2 certainly looks like a
rich source of good ideas derived from a wide range of experience.
---snip---

See http://javanio.info/filearea/nioserver/WhatsNewNIO2.pdf
plus http://java.sun.com/developer/technicalArticles/javase/nio/
There are many hard-learnt lessons in there that we can benefit from.
At the very least the APIs give us "things to think about".

Tim.

Reply via email to