Sunday, December 30, 2007

Introduction and KioFuse

I'd like to introduce myself: my name is Vlad Codrea, and for the past four months I've been working on KioFuse, which allows files and directories that are remote or archived to be accessible transparently through the root filesystem to all POSIX-compliant applications. Actually I've been wanting to make KIO slaves more user-friendly for about 4 years, but I've just recently stopped complaining and started coding :) The main goals of KioFuse are as follows:

1) Organization: Give all files an "address" within the root filesystem hierarchy, so that users can arrange files in an order that makes sense to them. For example, I want all my documents saved in ~/Documents, but without KioFuse there's no way to make sftp://username:password@school.edu:22/home/username/thesis a subdirectory of the local ~/Documents folder.

2) Aesthetics: There's no reason to be reminded about the connection parameters (protocol type, username, password, server address, server port, etc) every time you're accessing a remote file. The only time you should need (or see) those parameters is when you're setting up the connection with KNetAttach.

3) KIO-slave chaining: The ability to have multiple KIO-slaves inside each other has been removed because the resulting URLs are ambiguous. This can be easily fixed through repeatedly "mounting" each component. Say you have a file essay.txt saved in bundle.tar compressed as surprise.bz2 saved on sftp://school.edu/home/username.

First you'd mount sftp://school.edu/home/username in ~/network/school. Then you'd mount ~/network/school/surprise.bz2 in ~/archives/surprise. Then you'd mount ~/archives/surprise/bundle.tar in ~/archives/bundle and your file will be accessible as ~/archives/bundle/essay.txt.

There's no URL ambiguity in ~/archives/bundle/essay.txt.

4) Command-line compatibility: Sometimes I need to run a bash script or another command-line tool that uses remote files as input and writes the output to a remote location. This is currently impossible, without laboriously copying the files back and forth by hand.

5) Inter-desktop compatibility: Open and save remote and compressed files from Firefox, OpenOffice, Gimp, etc without having to reconfigure the network or come up with application-specific solutions.

So far, listing directories and reading files works for KIO slaves that support seeking through FileJob. I'm now focusing on write support, which should be pretty straightforward since the framework is in place. There are two more essential tasks that I've not started yet:

1) Making KIO aware of KioFuse mounts so that it uses its native functions (as opposed to POSIX) to access those resources. This will ensure that KioFuse doesn't confer any performance penalty to KDE apps.

2) Setting up KioFuse mountpoints using KNetAttach gui. Currently, the mountpoints are created by running KioFuse from the command line.

1 comment:

Anonymous said...

I'm really glad that you're developing this. Linux DE's are currently a mess. KDE works well, but the lack of network support is becoming obvious with more people using a NAS. From what I can gather, your project still uses a commandline action. Do you have plans to also include a program such as Gigolo to use a graphical way of mounting the shares? Or perhaps a solution like Netrunner OS is attempting with samba-mounter?