Go Back   FlashFXP Forums > > > >

Suggestions Post suggestions for upcoming versions

 
 
Thread Tools Display Modes
Old 12-29-2002, 03:23 PM   #1
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Lightbulb Directory caching

Most graphical ftp clients are supporting directory caching nowdays (It's a great feature, as it reduces work/traffic done by both server & client) - However due lack of one simple ftp command, caching is currently very inaccurate.
What I'm suggesting is to add 'DATE' command (similar to SIZE) to read file's/directory's timestamp via control channel. This would allow client to determinate with simple check, wheter contents of directory have changed since last cache update.

Client Command: DATE <filename>
Server Response: 213 <file time low-order dword> <ft high-order dword> <system time low-order dword> <st high-order dword>

Client should turn caching off, if server replies with error on the first try (same as with REST).


Here are examples how it could/should be implemented:

Client enters directory for the first time:

CLIENT => SERVER: DATE . ("." = current directory)
SERVER => CLIENT: 213 0 0 0 1
... Client requests for directory list ...

Client enters cached directory (unmodifed):

CLIENT => SERVER: DATE .
SERVER => CLIENT: 213 0 0 0 2 (Client compares cached values to with new values - and notices directory has not changed)
... Client waits for next command ...

Client enters cached directory (modified):

CLIENT => SERVER: DATE .
SERVER => CLIENT: 213 1 0 0 2
... Client requests for directory list ...

*Note* Directory should not be cached, if 'System time' in server response is equal to or less than 'File time' - as it's possible (not very likely) that contents have changed since.

Server that doesn't support 'DATE':

CLIENT => SERVER: DATE .
SERVER => CLIENT: 500 'DATE': Command not understood
... Client requests for directory list ...


Any questions/comments?
darkone is offline  
Old 01-03-2003, 02:02 PM   #2
Hetfield
Senior Member
FlashFXP Scripter
 
Join Date: Nov 2002
Posts: 334
Default

Yup, i totally agree with your suggestion. For me the directory caching is pretty much useless now
Hetfield is offline  
Old 01-03-2003, 09:29 PM   #3
bigstar
FlashFXP Developer
FlashFXP Administrator
ioFTPD Beta Tester
 
bigstar's Avatar
 
Join Date: Oct 2001
Posts: 8,012
Default

I've never heard of DATE before. I wonder how many servers support it. Sounds like a good idea for our second generation caching.
bigstar is offline  
Old 01-07-2003, 09:23 PM   #4
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

Heh, it actually doesn't exist in any rfc (atleast yet). Adding this feature is only ~10lines of code (on server side), so I'm quite confident that nearly all daemons that are still under development will support it. (I'll email wu-ftpd's development team asap, and ask what they think of it)
darkone is offline  
 

Tags
client, command, date, directory, server

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:48 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)