[MUD-Dev] Re: PDMud (was Re: Bruce Sterling on Virtual Community goals)
Niklas Elmqvist
d97elm at dtek.chalmers.se
Fri Oct 23 09:32:43 CEST 1998
[Chris Gray:]
> Efficient modules isn't enough to make the whole system efficient. You
> also need efficient intermodule interaction. You don't want to be
> spraying lots of random things all over. The modules should advertise
> what they can handle, and the associations should be made once, at the
> load time of the added module. Then data (commands, output, etc.) flows
> in a directed manner. We want pipes, not a water sprinkler!
Hmm, you're right. But we also need some way for new modules to broadcast
their capabilities at the load time. So the water sprinkler at load time,
then pipes henceforth. Maybe we could use a handshaking protocol like
this:
1. module is loaded into memory, either at boot-strap time or through
other means (an admin adding new functionality to the game or
replacing buggy parts)
2. module connects to the broadcast channel and bellows "here I am, and I
am capable of this..."
3. existing modules will silently process the broadcast message (everyone
listens to the broadcast channel) and may decide to ignore the new
module
4. if not, the interested modules request a pipe/channel to the new module
from the core, which they receive
5. the modules may, if applicable, send information about themselves
through their new pipes to the originating new module (if the new
module for example is a new parser which requests grammars from all
command handlers)
I am thinking that we could use one-to-many pipes here... Or maybe even
many-to-many pipes (not sure about that, though). That is, using the above
handshaking sequence, a parser module would get a single output pipe which
branches out to all command handlers since they are all interested in the
parser "in the same way". It would also receive an input pipe from the
network I/O module. This way, the parser would receive raw input from the
input pipe, parse it and then emit the processed data to the output pipe,
not caring who is listening. The processed data is propagated to all
Maybe one-to-one pipes would be better since it would minimize the traffic
flow and "water sprinkling". However, it would also force central modules
such as the parser to become much more complicated since they would have
to keep track of where different pipes lead and what to send on them. Not
sure about it myself.
We will also need a defined sequence for modules to disengage themselves
from the module community and be unloaded.
Or is there a better alternative to a message-based communication system
like this? Anyone with more experience in these things than I?
> Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
-- Niklas Elmqvist (d97elm at dtek.chalmers.se) ----------------------
"The trouble with being a god is that you've got no one to
pray to."
-- Terry Pratchett, Small Gods
More information about the mud-dev-archive
mailing list