[Twisted-Python] FTP / Common VFS Layer

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

On 4/22/05, Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
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

On Thu, Apr 21, 2005 at 02:41:01PM -0400, Itamar Shtull-Trauring wrote:
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.

On Fri, 22 Apr 2005 11:23:44 +1000, Andrew Bennetts <andrew-twisted@puzzling.org> 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. Using something like, say, IResource would be interesting, but I guess IResource isn't quite expressive enough to satisfy all the requirements. Jp

On Fri, Apr 22, 2005 at 01:47:33AM +0000, Jp Calderone wrote:
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.

Andrew Bennetts wrote:
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.

On Fri, 2005-04-22 at 01:47 +0000, Jp Calderone wrote:
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

Michael Kerrin wrote:
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.

On 4/22/05, Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
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

On Thu, Apr 21, 2005 at 02:41:01PM -0400, Itamar Shtull-Trauring wrote:
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.

On Fri, 22 Apr 2005 11:23:44 +1000, Andrew Bennetts <andrew-twisted@puzzling.org> 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. Using something like, say, IResource would be interesting, but I guess IResource isn't quite expressive enough to satisfy all the requirements. Jp

On Fri, Apr 22, 2005 at 01:47:33AM +0000, Jp Calderone wrote:
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.

Andrew Bennetts wrote:
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.

On Fri, 2005-04-22 at 01:47 +0000, Jp Calderone wrote:
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

Michael Kerrin wrote:
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