Re: File API taming
"Zooko O'Whielacronx" <[email protected]>
| Newsgroups | gmane.comp.lang.e.general,gmane.comp.capabilities.general |
|---|---|
| Message-ID | <[email protected]> |
adding Cc: cap-talk; If anyone reads cap-talk and not e-lang, here is the root of this thread: http://www.eros-os.org/pipermail/e-lang/2009-March/013031.html Tahoe implements a file API rather like Ihad Awab's original proposal: the first-class file and directory objects don't know what they are called, and they can be called different different things by different directories. In the context of a distributed system with no trusted server, there hardly seems to be any alternative. Tahoe also allows users to keep a list of names, possibly joined together with separating "/", and deference them in turn from some starting directory. It hardly seems possible to prevent that, either. Here's the api: http://allmydata.org/trac/tahoe/browser/docs/frontends/webapi.txt Various people have used this API successfully but not without problems. One good example problem is here: http://allmydata.org/pipermail/tahoe-dev/2009-February/001158.html Nathan Wilcox wrote a JavaScript library to use this API, and wrote HTML docs for this library, and embedded relative hyperlinks relative to the current directory in those HTML files pointing to sibling HTML files, and was surprised (just before publicly announcing his project) that you can't follow those hyperlinks. I've had similar problems with my JavaScript-on-Tahoe project which resulted in my blog: http://testgrid.allmydata.org:3567/uri/URI:DIR2-RO:j74uhg25nwdpjpacl6rkat2yhm:kav7ijeft5h7r7rxdp5bgtlt3viv32yabqajkrdykozia5544jqa/wiki.html The JavaScript library that I was using -- TiddlyWiki -- wants to write itself back to its original location, which is easy, but in addition it would like to write to the current directory into a file named the same as the original location with the extension changed from .html to .xml, to generate the RSS feed: feed://testgrid.allmydata.org:3567/uri/URI:DIR2-RO:j74uhg25nwdpjpacl6rkat2yhm:kav7ijeft5h7r7rxdp5bgtlt3viv32yabqajkrdykozia5544jqa/wiki.xml In addition it would like to save backup copies of itself to the current working directory under a name like "$FNAME.old-1", "$FNAME.old-2", etc. After a few minutes of thinking about this I changed it from having a reference to its own original source file, to having a tuple of 1. a reference to a directory, and 2. the name of its original source within that directory. Then the RSS feed started working. (Please subscribe to my RSS feed. :-)) Another data point from real implementation is this intriguing note about the "Ten15" system: http://www.mca-ltd.com/martin/Ten15/introduction.html Regards, Zooko