1998Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] OpenMUD: bus&#45;based communications -->
<!--X-From-R13: @vxynf Syzdivfg <q97ryzNqgrx.punyzref.fr> -->
<!--X-Date: Sun, 25 Oct 1998 01:39:09 &#45;0700 -->
<!--X-Message-Id: Pine.SOL.3.96.981025091942.7481A&#45;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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00478.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00480.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00473.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00432.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00479">Author</A>
&nbsp;|&nbsp;<A HREF="#00479">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00479">Thread</A>
&nbsp;]

<!--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 &lt;<A HREF="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</A>&gt;</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:&gt; 
&gt; On Sat, 24 Oct 1998, Niklas Elmqvist wrote:

&gt; there are two ways I can see to interpret the above:
&gt; 
&gt; 1. modules have various options for communicating with each other,
&gt; which they have to negotiate. ("can you give me function pointers? oh. 
&gt; well, how about RPC?")
&gt; 2. there is an abstract "send message to module" mechanism, which 
&gt; all modules use without knowing what it really does. This mechanism 
&gt; 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.

&gt; &gt; - Messages passed between modules are serialized according to a
&gt; &gt;specification provided by the receiving module. That is, the magic module
&gt; &gt;might say: "I first want a byte containing the spell code, then an int for
&gt; &gt;the level of the caster, then a DB index for the target and caster." The
&gt; &gt;parser module would follow this format when passing messages to the magic
&gt; &gt;module. 
&gt; 
&gt; so everything would be serialized to bytes? or would this only be 
&gt; necessary in a distributed system? why should a system that runs on a 
&gt; single machine take the performance hit to serialize data it could simply
&gt; 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.

&gt; I am having trouble seeing the point of this system. If Module A needs
&gt; to use functionality which resides in Module B, you don't need to
&gt; resort to a bus. Module B can export some symbols, which A can then
&gt; grab and use very happily (with direct method/function calls). If 
&gt; Module B really resides on some other machine, there's still no need 
&gt; for a bus: the process containing A can be supplied with a proxy, B', 
&gt; which pretends to be B but really marshals the calls and sends them over 
&gt; the network CORBA-style. Perhaps there's also a bit of reflection, so 
&gt; 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.

&gt; 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 &lt;jwilson#rochester,rr.com&gt;</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>&lt;Possible follow-up(s)&gt;<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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>