tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fs-independent quotas

On Sun, Oct 30, 2011 at 01:28:18PM -0400, James K. Lowden wrote:
 > > - We still need suggstions for better terminology than "quota classes"
 > > and "quota types".
 > Our last words on that subject were on 20 October:


 > >  > Two pairs that strike me as more mnemonic:
 > >  > 
 > >  >         id, target
 > >  >         principal, securable
 > > 
 > > There's already an id column in the table. The "class" is the type of
 > > id, not the id itself. And similarly, the "type" is the type of
 > > target, not the target itself.
 > > 
 > > Maybe "idtype" and "targettype"?
 > If I understand the problem correctly, some of the naming difficulty
 > arises from a normalization error.  Thinking in relational terms, 
 > id_type is a property of id, and target_type a property of the target.
 > Those are both independent of the id-target pair, so you really have
 > three relations, not one, i.e.: 
 >      id, type
 >      target, type
 >      id, target
 > I don't know if it's feasible or desirable to separate them that way,
 > but it would make naming them easier.  

No - if the IDs were oids this would be true (e.g. "oid 123456 is a
user") but they aren't. If the id is 6, the id type field is there to
tell you whether it's uid 6 or gid 6. That can't be normalized out;
you might well have quota info for both uid 6 and gid 6.

The same is true for the target; the limit value is "300" and the
target type says whether this is supposed to be 300 blocks or 300
files or 300 wombats. It's not a property of the value "300".

the pair (id, idtype) is really the whole key. It's not that the type of
the ID is metadata about the ID number

 > Restricting the discussion to the names in the existing structure, if
 > "idtype" classifies the existing id column, then that's a good name.
 > I'd use "id_type", sacrificing brevity for clarity, unless there are
 > other names with unseparated words.  

I'm starting to think that "idtype" is in fact best for this. And I
think it should be one word, at least in identifiers (perhaps not in
text, where it should be "quota ID type") because that way symbols
like QUOTA_IDTYPE_USER, which is most of the usages that are going to
appear, are delimited neatly.

 > That's the easy one.  The other one means "kind of thing to which the
 > quota applies".  I can't think of an English word that means
 > "limited thing", but we really want such a word so that the name can be
 > "limited_thing_type".   
 > target_type is defensible; that gives us "type of thing thing the quota
 > is aimed at".  But it's still a bit generic, and it's hard to reason a
 > priori about the "target" of a quota: is a quota aimed at the account
 > or the storage?  
 > Unless someone suggests a good word for "limited thing", maybe the best
 > option is to invent a term of art and *define* it to mean what you
 > want, after the manner of Humpty Dumpty.  To that end I suggest
 > "quotar" or "quoton".   They're both short, easy to remember, and mean
 > nothing obvious.   The latter kinda sorta sounds like "quota on", which
 > might be helpful.  

Or "quotee" or "quotand"; the problem is that none of these are
particularly clear.

Maybe it should be "restype" for resource type.

David A. Holland

Home | Main Index | Thread Index | Old Index