Subject: RFC: User Ratios

From: Brad Waite <[email-masked]>
Date: Fri, 24 Oct 1997 13:02:17 -0600

Hi all.  It's me again.  With yet another question on user ratios.

I've implemented it so that after an ls, get or put the user receives a
report of his current dl credit.  However, that credit figure is based
off of the value read from the creditfile at the beginning of the
session plus any adds or subs from the current session.  If a user were
to log in twice, they'd get the same value.  I tried getting the value
from the file for every transaction, but then there's a lot of I/O even
for just a simple "ls".

The solution I came up with is to only do a verify when the user tries
to RETR a file, and when they upload for credit.  When the verify is
called, it sets the global credit value, so everything will report
correctly after that.  This seems to work relatively well.  However, if
a user has multiple sessions open, the report after a ls will probably
show an incorrect value.

I think the latter solution works well, as most people realize bandwidth
is bandwidth and there not much of a reason to open multiple sessions. 
Leeches will be disappointed, but that's fine by me.

Comments?  Even if you don't care about user ratios, I'd appreciate some
feedback.  I know a lot of people lurk on here, and I figure that I can
make this little part of the program better by taking advantage of our
combined brainpower.

Thanks,

Brad