[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Removing attributes, was Re: [lemonade] Taking the knife to METADATA
--On March 14, 2008 7:17:47 AM -0700 Randall Gellens <randy@xxxxxxxxxxxx>
We were trying to maintain some level of similarity with ANNOTATE, and
also provide the client with a way to see the size before fetching
Well ANNOTATE is only experimental and I'm not sure anyone (except perhaps
Ken @ CMU) has done anything with it. So limiting ourselves to ANNOTATE
syntax should not be a requirement IMHO.
As far as the size goes, we could easily add an option to GETMETADATA that
would allow a client to limit the size of data returned and add an option
to the response to indicate when a truncation has occurred, e.g.:
C: a GETMETADATA (MAXSIZE 1024) /comment
S: * METADATA (TRUNCATED 2048) /comment "My comment ...."
S: a OK GETMETADATA complete
So in this example the client asks the server to return no more than 1024
octets. The /comment value returned is truncated at 1024 octets, and the
server also tells the client that the actual size of /comment is 2048.
I think this is more efficient if you make the assumption that for the most
part annotations are going to be small. i.e. the client doesn't have to do
two roundtrips to get an annotation (one to check the size, the other to
get the data). Instead it just does one with MAXSIZE and then, only if
there was truncation, can do another get if it really want to.