[Twisted-Python] FTP / Common VFS Layer
![](https://secure.gravatar.com/avatar/8398b3d6fb707e5fc5be23b33da142bd.jpg?s=120&d=mm&r=g)
Hi, I am interested in integrating Twisted's FTP server and Zope 3. I have seen the bug report http://twistedmatrix.com/bugs/issue983 and it mentions work that was done on a common VFS layer for Twisted. I am wondering if this is available anywhere has I would be very interested in seeing it. Thanks -- Michael Kerrin 55 Fitzwilliam Square, Dublin 2 Ireland Tel: 353 (0) 87 688 3894
![](https://secure.gravatar.com/avatar/d7875f8cfd8ba9262bfff2bf6f6f9b35.jpg?s=120&d=mm&r=g)
On Thu, 2005-04-21 at 16:44 +0000, Michael Kerrin wrote:
I have seen the bug report http://twistedmatrix.com/bugs/issue983 and it mentions work that was done on a common VFS layer for Twisted. I am wondering if this is available anywhere has I would be very interested in seeing it.
Probably best to ignore the VFS bit for now and just concentrate on fixing FTP. When and if the VFS layer is ever finished, hooking it up should be easy.
![](https://secure.gravatar.com/avatar/46f609c9bea026767ebae519e0656656.jpg?s=120&d=mm&r=g)
On 4/22/05, Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
On Thu, 2005-04-21 at 16:44 +0000, Michael Kerrin wrote:
I have seen the bug report http://twistedmatrix.com/bugs/issue983 and it mentions work that was done on a common VFS layer for Twisted. I am wondering if this is available anywhere has I would be very interested in seeing it.
Probably best to ignore the VFS bit for now and just concentrate on fixing FTP. When and if the VFS layer is ever finished, hooking it up should be easy.
Itamar is right about that. However, just for future reference, the VFS code is available at svn://svn.twistedmatrix.com/svn/VFS/trunk -- Twisted | Christopher Armstrong: International Man of Twistery Radix | -- http://radix.twistedmatrix.com | Release Manager, Twisted Project \\\V/// | -- http://twistedmatrix.com |o O| | Founding Member, Hobart Hacking Society w----v----w-+ -- http://hackingsociety.org/chapters/hash
![](https://secure.gravatar.com/avatar/b3407ff6ccd34c6e7c7a9fdcfba67a45.jpg?s=120&d=mm&r=g)
On Thu, Apr 21, 2005 at 02:41:01PM -0400, Itamar Shtull-Trauring wrote:
On Thu, 2005-04-21 at 16:44 +0000, Michael Kerrin wrote:
I have seen the bug report http://twistedmatrix.com/bugs/issue983 and it mentions work that was done on a common VFS layer for Twisted. I am wondering if this is available anywhere has I would be very interested in seeing it.
Probably best to ignore the VFS bit for now and just concentrate on fixing FTP. When and if the VFS layer is ever finished, hooking it up should be easy.
FTP in SVN isn't too bad... it's not completely broken, at least ;) And it now has a halfway-decent test suite, although more would really be a good idea (as using the --coverage option of trial will show). The code isn't particularly elegant, but it's readable enough. So, I don't think it's too early to start improving the IFTPShell stuff (which I had been consciously ignoring until now). The other work that needs doing shouldn't tend to get in the way very much, because the basics have been fixed. -Andrew.
![](https://secure.gravatar.com/avatar/7ed9784cbb1ba1ef75454034b3a8e6a1.jpg?s=120&d=mm&r=g)
On Fri, 22 Apr 2005 11:23:44 +1000, Andrew Bennetts <andrew-twisted@puzzling.org> wrote:
On Thu, Apr 21, 2005 at 02:41:01PM -0400, Itamar Shtull-Trauring wrote:
On Thu, 2005-04-21 at 16:44 +0000, Michael Kerrin wrote:
I have seen the bug report http://twistedmatrix.com/bugs/issue983 and it mentions work that was done on a common VFS layer for Twisted. I am wondering if this is available anywhere has I would be very interested in seeing it.
Probably best to ignore the VFS bit for now and just concentrate on fixing FTP. When and if the VFS layer is ever finished, hooking it up should be easy.
FTP in SVN isn't too bad... it's not completely broken, at least ;)
And it now has a halfway-decent test suite, although more would really be a good idea (as using the --coverage option of trial will show). The code isn't particularly elegant, but it's readable enough.
So, I don't think it's too early to start improving the IFTPShell stuff (which I had been consciously ignoring until now). The other work that needs doing shouldn't tend to get in the way very much, because the basics have been fixed.
I think a good direction to take with IFTPShell is to drop it entirely and use an entirely new and different interface. If anyone complains about compatibility later (which no one will because ftp was too broken to use until the work you did on it, and the interface is too specific to have been usefully implemented differently anyway), we can always write an adapter from the new to the old. Using something like, say, IResource would be interesting, but I guess IResource isn't quite expressive enough to satisfy all the requirements. Jp
![](https://secure.gravatar.com/avatar/b3407ff6ccd34c6e7c7a9fdcfba67a45.jpg?s=120&d=mm&r=g)
On Fri, Apr 22, 2005 at 01:47:33AM +0000, Jp Calderone wrote:
On Fri, 22 Apr 2005 11:23:44 +1000, Andrew Bennetts wrote: [...]
So, I don't think it's too early to start improving the IFTPShell stuff (which I had been consciously ignoring until now). The other work that needs doing shouldn't tend to get in the way very much, because the basics have been fixed.
I think a good direction to take with IFTPShell is to drop it entirely and use an entirely new and different interface. If anyone complains about compatibility later (which no one will because ftp was too broken to use until the work you did on it, and the interface is too specific to have been usefully implemented differently anyway), we can always write an adapter from the new to the old.
Yeah. I'm not at all concerned about backwards-compatibility for code that never worked.
Using something like, say, IResource would be interesting, but I guess IResource isn't quite expressive enough to satisfy all the requirements.
IResource lacks quite a lot in terms of a read/write filesystem with metadata like modification times and permission bits. In the Twisted tree, something like twisted.conch.interfaces.ISFTPServer (as implemented by e.g. twisted.conch.unix.SFTPServerForUnixConchUser) is much closer to what FTP needs. I think the VFS stuff is closer again. I think there may be some point in having an IFTPShell-like interface that maps closely to what the FTP protocol needs, and adapters to map VFS stuff (and even IResource for simple read-only trees) to that, but I haven't thought deeply about it. -Andrew.
![](https://secure.gravatar.com/avatar/2e9b5cb8fcf834ddf8be44a450efe97f.jpg?s=120&d=mm&r=g)
Andrew Bennetts wrote:
I think there may be some point in having an IFTPShell-like interface that maps closely to what the FTP protocol needs, and adapters to map VFS stuff (and even IResource for simple read-only trees) to that, but I haven't thought deeply about it.
For what it's worth, there's an adaptor from the sprint VFS interface for IFTPShell, and it works ok for the bits of IFTPShell ftp is using and not broken. It's probably easier to adapt against IFTPShell than ISFTPServer. I guess the most important thing is working FTP. So long as it uses an interface for filesystem access, whatever that is, the VFS stuff should be able to work in with it. Andy.
![](https://secure.gravatar.com/avatar/2e9b5cb8fcf834ddf8be44a450efe97f.jpg?s=120&d=mm&r=g)
Itamar Shtull-Trauring wrote:
Probably best to ignore the VFS bit for now and just concentrate on fixing FTP. When and if the VFS layer is ever finished, hooking it up should be easy.
Andy Gayton wrote:
I guess the most important thing is working FTP. So long as it uses an interface for filesystem access, whatever that is, the VFS stuff should be able to work in with it.
so, er yeah, what Itamar said :)
![](https://secure.gravatar.com/avatar/d7875f8cfd8ba9262bfff2bf6f6f9b35.jpg?s=120&d=mm&r=g)
On Fri, 2005-04-22 at 01:47 +0000, Jp Calderone wrote:
I think a good direction to take with IFTPShell is to drop it entirely and use an entirely new and different interface. If anyone complains about compatibility later (which no one will because ftp was too broken to use until the work you did on it, and the interface is too specific to have been usefully implemented differently anyway), we can always write an adapter from the new to the old.
The bug Stephan Richter and I opened this weekend while looking at FTP does indeed specifically request the interface be changed, since it is broken now. No point in any backwards compat at all in this case. It explains most of the basic changes that need to be made: http://twistedmatrix.com/bugs/issue983
![](https://secure.gravatar.com/avatar/2e9b5cb8fcf834ddf8be44a450efe97f.jpg?s=120&d=mm&r=g)
Michael Kerrin wrote:
Hi,
I am interested in integrating Twisted's FTP server and Zope 3.
I have seen the bug report http://twistedmatrix.com/bugs/issue983 and it mentions work that was done on a common VFS layer for Twisted. I am wondering if this is available anywhere has I would be very interested in seeing it.
I've had a very quick glance at Stephan Richter's Zope3 book - if I glanced right, it looks like Zope3 has it's own ftp server? - which accesses the file system through an interface(s). Just mentioning as while someone is looking at both frameworks in this area, it might be worth stealing from Zope3 for the Twisted VFS interface. Though, the biggest hole with the sprint VFS interface is asynchronous data transfers - which wouldn't be an issue for Zope. Andy.
participants (6)
-
Andrew Bennetts
-
Andy Gayton
-
Christopher Armstrong
-
Itamar Shtull-Trauring
-
Jp Calderone
-
Michael Kerrin