Things we don't have #2

About this posting series. Previous episodes: #1.

This time we're going to look at virtual filesystems. Perl currently seems to lack in this area compared to some other languages. There are no support for accessing or creating the various VFS's out there from Perl, except for Fuse.

First, KDE's KIO (KIO slaves). There are many slaves available, from accessing devices like Camera and Bluetooh, to the usual network protocols (HTTP, FTP, WebDAV, IMAP), to various settings and applications. One can create a KIO slave from, say Python and Ruby, but currently we lack a library to do so, even for accessing resources using KIO. The KDE4 Perl bindings project seems to lag or stop.

Second, the GNOME project's GVFS/GIO library. Perl does have a couple of libraries (VFS::Gnome, Gnome2::VFS) for the older GNOME VFS though.

Third, the libferris project. This is a more ambitious project to provide a filesystem interface for all hierarchiecal data out there, from relational database to XML files. There is so far no Perl binding for it, although the libferris library itself is not yet widely available on major Linux distributions.

The closest thing we do have for an abstract filesystem layer library is the (sometimes too) cool IO::All. We can already do things like: write to an FTP server, retrieve files as well as HTTP documents, list directories. What's lacking is an asynchronous method of access.

1 Comment

Given the existence of Net::Async::HTTP, Net::Async::FTP, Net::Async::IMAP::Client, etc.. it should be fairly easily possible to write a universal URL-driven async fetching wrapper, similar to the idea that LWP has of a centralised controller with handlers for various URL schemes.

In principle this is fairly easy to write, just needs someone to actually write it.

Ohyes, and pick the name. That's the most important bit. ;)

Leave a comment

About Steven Haryanto

user-pic A programmer (mostly Perl 5 nowadays). My CPAN ID: SHARYANTO. I'm sedusedan on perlmonks. My twitter is stevenharyanto (but I don't tweet much). Follow me on github: sharyanto.