continued: Common-VFS proposal

Waldo Bastian bastian at suse.com
Thu Jan 20 18:38:12 EET 2005


On Thursday 20 January 2005 03:24, Sean Middleditch wrote:
> A client library is provided that offers basic VFS operations: open,
> read, write, rename, move, setattr, getattr, setaccess, getaccess, etc.
> The idea is to *not* model POSIX but instead model what real
> applications do.  There's no "move" function in POSIX (rename is very
> different than a real move operation), but apps want to be able to move
> files.  Therefor, move should be provided an actual function.

You may want to look at the API for KIO-slaves, attached for your convenience, 
the virtual functions are the ones you are interested in.

As for multithreaded versus out of process. The nice thing about 
out-of-process is that you can kill the process and everything gets cleaned 
up for you. You will also have less interference between the main application 
and whatever your VFS-handler is doing. If your VFS-handler is self-contained 
it's usually not a problem, but if your VFS-handler needs to pull in 
something like the samba libraries you suddenly start to add a lot of code 
and extra symbols into the address space of random applications.

A drawback of out of process is that you lose some performance due to the IPC 
overhead, with gigabit network speeds that becomes noticable. In practice 
it's only an issue when you download files, so you should be cool if you let 
the process handle saving to disk itself.

An interesting issue with Konqueror is that we want to initiate a file 
transfer with Konqueror, but once we know the filetype we may decide to let 
another application open the file. In such case we want to let the 
application take over the file transfer that was initiated by Konqueror. Our 
out-of-process approach makes that somewhat easy since we can just let the 
download process disconnect from Konqueror and reconnect to the application.

Cheers,
Waldo
-- 
bastian at kde.org   |   Free Novell Linux Desktop 9 Evaluation Download
bastian at suse.com  |   http://www.novell.com/products/desktop/eval.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slavebase.h
Type: text/x-c++hdr
Size: 27089 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20050120/78aaa4b7/attachment.hpp 


More information about the xdg mailing list