From: mmcg@cs.monash.edu.au (Mike  Mc Gaughey)
Subject: Re: Distributed lpmud
Organization: Computer Science, Monash University, Australia
Date: Thu, 17 Dec 1992 00:21:56 GMT

oreillym@tartarus.uwa.edu.au (Michael O'Reilly) writes:

>: [ A neat scheme for virtual objects + nice wiz security deleted. ]
>: [ Hope mike doesn't mind if I pinch that. :) Who should I credit ]
>: [ it too?? ]

>BTW: Any comments on seperating class definitions from the file
>system?? In Lpmud, the object name (usually) comes from the source
>file. In my system, the class names, and class libraries are othogonal
>to the file system. Any comments on the wisdom of this??

Well, the virtual directories were implemented (as a prototype)
*precisely* for this reason (yeah, pinch it, credit it to `frustration
at being locked into a directory structure when the target machine -
our multiprocessor - doesn't even understand the concept' :).  You can
have your code `directories' responding to both "code" filenames and
"interface" filenames; there's no reason why they can't get these
definitions from a central database (or from another server...).

>Quotas! How to handle these? The high level of security seems to beg for
>user level programming. Problem is resource allocation. How to limit it.
>Whhat happens when limits are reached. An object gets created, where do
>you credit the resource-usage?

Hee!  Build a concept of money into the kernal of your driver, and
give every wizard a cash allocation, which they spend on disk space,
CPU, memory, and (if you want instant game balance as well) items or
skills they give out within the game.  The model I am using is this:

CPU is charged at <N> units/10mS, where <N> is the %CPU the mud is taking.
This makes it supply/demand based.

Mem is charged at the space/time product, with modifiers for the
total memory in use in the game (the more memory in use, the more
expensive it is).

Disk is a basic space/time product.  Various other I/O operations might
be added to this - opening and closing files over NFS is mucho expensive.

All in-game things (monsters, weapons, skills, stats) are available
from the `ecology' at supply/demand prices.  I'm uncertain as to
whether wizards should be able to store these (play the stock market);
it appears that the most appropriate model is that of the international
fruit market - fruit spoils quickly, so follows supply/demand pricing
very closely.  This would make the global prices very responsive to
players' perceptions of how useful an item is (the aim is balance,
remember).  Significantly, the only full scale simulation of the
economy we've been prattling on about (besides the one Geoff
implemented in the mud) has been based on a non-storable commodity
model (it was implemented by one of the students of the guy who
designed the model).

Wizards get cash allocations based on how much they can (a) rip
off from players, (b) how much time and effort players expend in their
area, and (c) arts grants for interesting (though nonprofitable) areas.
The wiz-list is sorted based on money in the bank (and reflects who
is getting the most cash from players for the least investment of
resources :)

Ripping off players is not easy - there's a security system that comes
with this model (capability based, which is what I think *you* are
trying to do with your type handles - you can't perform an operation on
an object unless you are given a capability to it; capabilities can be
single-use, or revoked).  I'm pondering an interface to the driver's
security that'll free wizards from having to worry much about cash and
security (if they don't want to).

>Exceptions?

are a pain.  Ideally, one should eliminate them - but that'd mean
relying on other peoples' code being correct.  There are only a couple
of decent mechanisms for this - catch/throw (as in functional/lisplike
languages), signals (as in C), or ignore the problem (i.e. crash).
In a multithreaded system, you can have both (so implement both!).

Mike.
--
Mike McGaughey			AARNET:	mmcg@bruce.cs.monash.edu.au

"Head stompin', ass kickin', finger licking nastiness"
Newsgroups: rec.games.mud.lp