<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD-Dev] OpenMUD: bus-based communications -->
<!--X-From-R13: @vxynf Syzdivfg <q97ryzNqgrx.punyzref.fr> -->
<!--X-Date: Sun, 25 Oct 1998 01:39:09 -0700 -->
<!--X-Message-Id: Pine.SOL.3.96.981025091942.7481A-100000#licia,dtek.chalmers.se -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 98102422400508.12608@d185d1e96 -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] OpenMUD: bus-based communications</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:d97elm#dtek,chalmers.se">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">
<font size="+4" color="#804040">
<strong><em>MUD-Dev<br>mailing list archive</em></strong>
</font>
<br>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
Date:
[ <a href="msg00478.html">Previous</a>
| <a href="msg00480.html">Next</a>
]
Thread:
[ <a href="msg00473.html">Previous</a>
| <a href="msg00432.html">Next</a>
]
Index:
[ <A HREF="author.html#00479">Author</A>
| <A HREF="#00479">Date</A>
| <A HREF="thread.html#00479">Thread</A>
]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] OpenMUD: bus-based communications</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] OpenMUD: bus-based communications</LI>
<LI><em>From</em>: Niklas Elmqvist <<A HREF="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</A>></LI>
<LI><em>Date</em>: Sun, 25 Oct 1998 09:36:08 +0100 (MET)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Sat, 24 Oct 1998, James Wilson wrote:>
> On Sat, 24 Oct 1998, Niklas Elmqvist wrote:
> there are two ways I can see to interpret the above:
>
> 1. modules have various options for communicating with each other,
> which they have to negotiate. ("can you give me function pointers? oh.
> well, how about RPC?")
> 2. there is an abstract "send message to module" mechanism, which
> all modules use without knowing what it really does. This mechanism
> could be implemented in various ways.
I am thinking in terms of the second alternative. The module object
requests a communication channel with a specific module (using its ID or
anything). The core hands it a channel and tells it to "speak through this
thing". The module won't have to know whether the channel is in reality a
function pointer, a proxy object (like your CORBA example below) or a
distributed RPC mechanism.
> > - Messages passed between modules are serialized according to a
> >specification provided by the receiving module. That is, the magic module
> >might say: "I first want a byte containing the spell code, then an int for
> >the level of the caster, then a DB index for the target and caster." The
> >parser module would follow this format when passing messages to the magic
> >module.
>
> so everything would be serialized to bytes? or would this only be
> necessary in a distributed system? why should a system that runs on a
> single machine take the performance hit to serialize data it could simply
> pass in as parameters?
The thing is that the modules do not know of each other beforehand and
must communicate in some way. One alternative is to define a preset number
of function interfaces (like in Chris's post) which all modules must
adhere to. Another option is to use serialization, as I suggested, to pack
information into a "free-form" data structure. Oh, and there is no reason
why serialization must be done at both ends -- the receiving module may
know exactly what kind of a struct it expects and just cast the byte
stream to that. For a parser, however, there is no *way* for it to keep
track of the message passing structs of its clients (and there is no
reason why it should, since a parser should be general-purpose and
independent of game), so it would serialize the arguments according to the
wishes of the receiving modules.
> I am having trouble seeing the point of this system. If Module A needs
> to use functionality which resides in Module B, you don't need to
> resort to a bus. Module B can export some symbols, which A can then
> grab and use very happily (with direct method/function calls). If
> Module B really resides on some other machine, there's still no need
> for a bus: the process containing A can be supplied with a proxy, B',
> which pretends to be B but really marshals the calls and sends them over
> the network CORBA-style. Perhaps there's also a bit of reflection, so
> A can tell the difference and optimize the way it uses B or B'.
Well, in my thinking, the bus/pipe is an abstraction which collects direct
function calls, RPC mechanisms and CORBA proxies under one mechanism.
Since we may very well wish to support *all* these ways of communication,
it makes sense to use this architecture. Abstraction *is* good (okay,
maybe not to the point of inefficiency, but I would argue there is not
much added here -- if possible, the bus system will choose direct function
calls).
In addition, as Chris Gray stated in another post, the bus/pipe is as good
place as any for queued messages to wait while they await the attention of
their modules in a multi-threaded system.
> James
-- Niklas Elmqvist (d97elm#dtek,chalmers.se) ----------------------
"The trouble with being a god is that you've got no one to
pray to."
-- Terry Pratchett, Small Gods
</PRE>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00473" HREF="msg00473.html">[MUD-Dev] OpenMUD: bus-based communications</A></STRONG>
<UL><LI><EM>From:</EM> James Wilson <jwilson#rochester,rr.com></LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00478.html">[MUD-Dev] Re: CVS and LXR</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00480.html">[MUD-Dev] Re: PDMud, Gamora and Casbah</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00473.html">[MUD-Dev] OpenMUD: bus-based communications</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00432.html">[MUD-Dev] Re: UO: Second Age</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00479"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00479"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>[MUD-Dev] Re: PDMud, Gamora and Casbah</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00461" HREF="msg00461.html">[MUD-Dev] Re: PDMud, Gamora and Casbah</A></strong>,
Darrin Hyrup <a href="mailto:shades#mythicgames,com">shades#mythicgames,com</a>, Sat 24 Oct 1998, 21:46 GMT
</LI>
<LI><strong><A NAME="00464" HREF="msg00464.html">[MUD-Dev] Re: PDMud, Gamora and Casbah</A></strong>,
Niklas Elmqvist <a href="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</a>, Sat 24 Oct 1998, 23:31 GMT
<UL>
<LI><strong><A NAME="00467" HREF="msg00467.html">[MUD-Dev] Re: PDMud, Gamora and Casbah</A></strong>,
Adam J. Thornton <a href="mailto:adam#phoenix,Princeton.EDU">adam#phoenix,Princeton.EDU</a>, Sun 25 Oct 1998, 01:45 GMT
</LI>
<LI><strong><A NAME="00473" HREF="msg00473.html">[MUD-Dev] OpenMUD: bus-based communications</A></strong>,
James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Sun 25 Oct 1998, 02:51 GMT
<UL>
<LI><strong><A NAME="00479" HREF="msg00479.html">[MUD-Dev] OpenMUD: bus-based communications</A></strong>,
Niklas Elmqvist <a href="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</a>, Sun 25 Oct 1998, 08:39 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</LI>
<LI><strong><A NAME="00432" HREF="msg00432.html">[MUD-Dev] Re: UO: Second Age</A></strong>,
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Fri 23 Oct 1998, 23:37 GMT
<LI><strong><A NAME="00423" HREF="msg00423.html">[MUD-Dev] Re: OT, kinda, but yay :)</A></strong>,
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Fri 23 Oct 1998, 21:29 GMT
<UL>
<li><Possible follow-up(s)><br>
<LI><strong><A NAME="00442" HREF="msg00442.html">[MUD-Dev] Re: OT, kinda, but yay :)</A></strong>,
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 24 Oct 1998, 01:35 GMT
<UL>
<LI><strong><A NAME="00457" HREF="msg00457.html">[MUD-Dev] Re: OT, kinda, but yay :)</A></strong>,
Jo Dillon <a href="mailto:emily#thelonious,new.ox.ac.uk">emily#thelonious,new.ox.ac.uk</a>, Sat 24 Oct 1998, 10:37 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>
</ul>
<hr>
<center>
[ <a href="../">Other Periods</a>
| <a href="../../">Other mailing lists</a>
| <a href="/search.php3">Search</a>
]
</center>
<hr>
</body>
</html>