[Twisted-Python] VFS

Andrea Arcangeli andrea at cpushare.com
Mon Jan 24 11:42:20 EST 2005

On Mon, Jan 24, 2005 at 11:47:15AM +1100, Timothy Stebbing wrote:
> no I'm saying that at 'some stage this year' I'll be doing this stuff
> for work, The plan was to implement webdav on top of twisted.web2 when
> it settled down, but if akaDAV does webDAV for twisted already we will
> just use that :) (I hadn't heard of akaDAV till today, and our focus is
> VFS not DAV so YAY for whoever wrote this for me)

Only one hint for you, please make sure to run all fs calls with a
thread pool, and never do a vfs call that doesn't support poll(2) within
the main twisted thread. All I/O calls are synchronous and they block
the main thread completely. Best would be to support kernel
asynchronous I/O natively in the reactor, but that depends on linux at
least, so having a posix threaded abstraction for aio would be ok even
if lower performant than kernel aio (note that the kernel is going to
use threads too for aio, the only advantage is that they're kernel
threads instead of user threads, so with multiple apps and not only
twisted running, they can save some tlb flush, plus there is some other
advantage, but having threaded aio inside twisted without kernel support
would be already pretty good).

More information about the Twisted-Python mailing list