[Twisted-Python] FUSE (Was: Re: How to achieve a reliable "connection" over UDP?)

glyph at divmod.com glyph at divmod.com
Wed Jul 25 04:58:51 EDT 2007


On 05:33 am, iny+news at iki.fi wrote:
>glyph at divmod.com writes:
>>Oh man.  This is *exactly* what I wanted to do with Vertex.  Of
>>course, you need a good Twisted-integrated version of FUSE first, but
>>that shouldn't be too hard ;).
>
>Is there a better way to integrate FUSE and Twisted than use one
>thread for FUSE and one for Twisted reactor without signal handlers?
>(Using the FUSE Python bindings of course.)

FUSE just gives a file descriptor to userspace.  A better way to 
integrate with Twisted would simply be to put that file descriptor into 
the reactor and parse it asynchronously, just like any other protocol. 
The Python FUSE bindings obscure the issue because, unlike the C 
libfuse, they assume that your filesystem I/O is blocking, which 
severely limits the performance of python-based filesystems.  (You 
cannot receive more requests for I/O in your filesystem until the 
previous one has been completed with the pyfuse bindings, but you can in 
C.)
>I have one filesystem for personal use done this way and it does seem
>to work. (A simple filesystem for browsing zip contents,)

It certainly works well enough for simple cases.  But it would be more 
robust and higher performance to do it the "normal" Twisted way :).




More information about the Twisted-Python mailing list