[AFS3-std] More than 13 sites for volume locations

Jeffrey Hutzelman jhutz@cmu.edu
Sat, 13 May 2006 17:41:57 -0400



On Monday, April 24, 2006 03:11:52 PM -0400 Jeffrey Altman 
<jaltman@secure-endpoints.com> wrote:

> The way AFS has implemented data structure extensions in the past is
> by implementing a new RPC with a new data structure.  It would be
> reasonable for the new RPC to be a multi-roundtrip implementation
> which includes the total number of servers available and the client
> would ask for up to NMAXNSERVERS starting at a particular index
> value.

Ew, why?  While I know 13 is somewhat low, I don't expcet the number of 
sites for a given volume to ever be unreasonably huge.  Use a vector 
instead of an array, set a reasonable limit, and fetch them all at once. 
You can increase the limit later and the procedure remains wire-compatible. 
If you're concerned about giving a client more responses than it's prepared 
to handle, have the client pass an IN parameter indicating the maximum 
number of sites to be listed in the reply.

OTOH, the whole "make the RPC again and expect different results" idea is 
entirely unacceptable.  It changes the semantics of an existing interface 
and requires the vlserver to become stateful, all totally unnecessarily.


It's also worth noting that you can't just add things on to the end of a 
structure that's part of an RPC argument and expect things to work.  These 
aren't data structures in memory that you pass a pointer to; they're 
marshalled onto the wire element-by-element.  Structures defined in xg 
files are part of the wire protocol and cannot be changed.


-- Jeff