[tahoe-dev] version advertisement and negotiation

zooko zooko at zooko.com
Mon Oct 20 09:54:05 PDT 2008


Kind of along the lines of what Drew said, I've been thinking that  
when a future Tahoe storage server says "I support LAFS storage  
server protocol 2", then what it really means, and what the client  
really hears is "I support LAFS storage server protocol 1, plus large  
file support".  It could be expressed something like this:

supported LAFS storage server protocols:

{ 'LAFS storage server protocol 1': { 'large file support': True } }

This would have the same meaning, and it would be more explicit for  
implementors, debuggers, etc..  In particular, this would help people  
understand that they shouldn't compare storage server protocols  
numerically, such as the following subtly buggy code:

if server_supports_1:
     if server_supports_3:
         # Oh good, it supports 1 through 3, so we can use both 2 and  
3 in this client..
         ...
     else:
         # We know to use protocol 1 -- let's just fall back to that.
         ...

Regards,

Zooko


More information about the tahoe-dev mailing list