| Ticket UUID: | 462309 | ||
| Title: | Make tcl 'reporting fs' official | ||
| Type: | RFE | Created on: | 2001-09-17 18:32:33 |
| Submitter: | andreas_kupries | Assigned to: | andreas_kupries |
| Subsystem: | 37. File System | Severity: | |
| Priority: | 5 Medium | Last modified: | 2003-02-25 16:31:09 |
| Status: | Open | Closed by: | |
| Resolution: | None | Closed on: | |
| Version: | None | ||
| Description: | ||||
The current testsuite uses a tcltest command to access the internals of the VFS code and lift it the script level. It is proposed to make this an official command so that VFS implementations can be written in Tcl itself. | ||||
| User Comments: | ||||
nobody added on 2001-09-18 16:05:18:
Logged In: NO The summary isn't quite correct. The testsuite contains a 'testfilesystem' command which enables a 'reporting' filesystem, but this is not quite the same as allowing you to write vfs's in Tcl (but is still very useful for debugging any fs activity). The code to expose VFS to Tcl is given by the 'tclvfs' project on sourceforge, which creates a command 'vfs::filesystem' and provides Tcl implementations of zip, ftp, http, mk, namespace filesystems. The problem is that this 'vfs' extension has not had much use yet. We need some people to pound on it and say "I don't like how X works". Admittedly, it seems to work perfectly in tclkit. Also, almost all vfs's I've written require the Memchan extension to handle 'open' commands. Therefore we'd really want to include Memchan (or some variant of it) as an official command as well. Again the vfs-memchan combination has not been used enough to really determine whether either or both could do with some modification for truly seamless interaction. Having said the above, I'm perfectly happy for anyone to take any of tclvfs, the testfilesystem, etc and do whatever official things they like. Certainly including tclvfs in a Batteries Included release would seem a good idea. I believe it should compile out of the box on *nix and Windoze. Vince (some problem logging in today). vincentdarley added on 2001-09-18 16:09:46:
Logged In: YES user_id=32170 (Now I can log in..) One more comment on the 'vfs-memchan' front... For open operations on remote filesystems (ftp, http) it seems as if it should be possible _not_ to use a memchan, and write/read directly to/from a socket provides by the ftp/http packages. This does not happen in the current code, which means something like: file copy ftp://ftp.foo.com/megaBytes.zip . will actually create an enormous memchan (and read into that and then write to disk), rather than stream the copy slowly over a socket. Again, it would be nice to make the changes (possibly no C changes required, just changes to the ftp vfs in Tcl) so that this is better. Same with http. andreas_kupries added on 2001-09-19 01:08:11:
Logged In: YES user_id=75003 Depending on what people want to do with a ftp-file a memchan might still be required to allow arbitrary seeking, which is not possible for a socket. And thanks for the correction about my summary. So, should I withdraw this item and/or file a different FR for the 'Reporting FS' ? nobody added on 2001-09-19 01:14:59:
Logged In: NO No need to withdraw this one; it's still pretty clear. I was wondering about that issue with 'seek'. Might it be possible to have a solution which works both ways? One approach would be that 'seek' throws an error. Another would be that we create a 'flowthroughchannel' which simply acts as a small buffer between the socket and tcl. As long as we don't seek that code is pretty simple, but when we do a 'seek', the flow-through buffer takes some cleverer action... Is this possible? p.s. What do you really mean by "make a tcl vfs official"? Do you want to write a TIP to put tclvfs in the core (like 'incr tcl', dde, registry, thread are in the core)? vincentdarley added on 2001-09-19 15:32:49:
Logged In: YES user_id=32170 Oh, I misread your msg. You actually want to make the 'Reporting FS' official, not the VFS? I'm perfectly happy with that idea (probably want to change the command so 'puts stderr' is a configurable action), and since that code is pretty straightforward, we could definitely add it now, rather than waiting for serious use. filesystem report -command "puts stderr" (and in the future we can add 'filesystem mount', 'filesystem unmount' etc). I've changed the summary line --- is that what you wanted? andreas_kupries added on 2001-09-21 01:24:23:
Logged In: YES user_id=75003 I misunderstood that I heard about the vfs stuff in the testsuite. I thought it would lift vfs into the scriptlevel. Still, making the reporting fs officially available would help others as it can be an example of a fs implementation and it will also help in the debugging of the vfs stuff for people creating new fs. So this FR can stand as it is. andreas_kupries added on 2001-09-21 01:28:55:
Logged In: YES user_id=75003 The problem with the flowthroughchannel is that we do not know how far back the application will (want to) seek. This channel will have to buffer up everything coming in to allow a full seek to the beginning if the application wishes to do so. Placing tclvfs into (or even distributing it alongside) the core is, IMHO, not a good thing. It can stay perfectly separate and I believe it should do so. Encouragement for others that packages need not have to be in the core to be useful and to be used. | ||||
