1998Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: PDMud thread summary -->
<!--X-From-R13: Xnzrf Ivyfba <wjvyfbaNebpurfgre.ee.pbz> -->
<!--X-Date: Sun, 25 Oct 1998 13:10:03 &#45;0800 -->
<!--X-Message-Id: 98102515585808.22929@d185d1e96 -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.SOL.3.96.981025200201.11778A&#45;100000#licia,dtek.chalmers.se -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: PDMud thread summary</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:jwilson#rochester,rr.com">
</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="msg00497.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00499.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00495.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00502.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00498">Author</A>
&nbsp;|&nbsp;<A HREF="#00498">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00498">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: PDMud thread summary</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] Re: PDMud thread summary</LI>
<LI><em>From</em>: James Wilson &lt;<A HREF="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</A>&gt;</LI>
<LI><em>Date</em>: Sun, 25 Oct 1998 15:35:52 -0500</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 Sun, 25 Oct 1998, Niklas Elmqvist wrote:

&gt;class Module {
&gt;	ModuleID mID;
&gt;	..
&gt;public:
&gt;	Module(Core *hCore); 	// Constructor
&gt;	~Module();
&gt;	..
&gt;	// The following are quite empty and to be overridden
&gt;	virtual void Init(..);
&gt;	virtual bool HandleEvent(..); 
&gt;	..
&gt;}
&gt;// Pipe abstract class: no functionality
&gt;class Pipe {
&gt;private:
&gt;	ModuleID *hNode1, *hNode2;
&gt;public:
&gt;	..
&gt;	virtual void Send(ModuleID hSrc, ModuleID hDst, Message *hMsg);
&gt;	virtual Msg *Recv(ModuleID hCurr); 
&gt;	..
&gt;}
&gt;(Not satisified about this, but am pressed for time.)

&gt;
&gt;class CallPipe : public Pipe {
&gt;private:
&gt;	FunctionPtr *hFun1, *hFun2;
&gt;public:
&gt;	..
&gt;	virtual void Send(ModuleID hSrc, ModuleID hDst, Message *hMsg);
&gt;	virtual void Recv(..)
&gt;	..
&gt;}
&gt;

[other kinds of Pipes snipped]

thanks for the example, it made things much clearer. the pattern
here is asynchronous message-passing, as found in, for instance, 
PVM, which is well-suited to highly decoupled parallel systems. 
If this is what people want, PVM already does this beautifully and
there's even a distributed FS for it. However, message-passing like 
this adds considerable programming complexity to simple operations. 
Every function call into other modules has to be done as Send and Recv 
pairs, where the next Message Recv'd isn't necessarily what you wanted:

/* try to get object 'foo' */

g_mainbus-&gt;Send (module_a, DB_MODULE, /* deliver foo or else! */);
Message *gotfoo = g_mainbus-&gt;Recv (module_a);

/* simultaneously, in some other meddling module... */

g_mainbus-&gt;Send (module_meddler, module_a, /* you go to hell! */);

so, back in module_a, we get 'you go to hell!' instead of 'foo'.
Checking this on EVERY FUNCTION CALL would get quite tedious
and add a performance hit. Moreover it's more prone to breakage
by newbie module-programmers for whom parallel systems are
mysterious.

I fully agree that abstractions are important. This seems like rather
an extreme way to do it though, which to me is only really justified
in a distributed system.

James


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00502" HREF="msg00502.html">[MUD-Dev] Re: PDMud thread summary</A></strong>
<ul compact><li><em>From:</em> Niklas Elmqvist &lt;d97elm#dtek,chalmers.se&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00495" HREF="msg00495.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
<UL><LI><EM>From:</EM> Niklas Elmqvist &lt;d97elm#dtek,chalmers.se&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00497.html">[MUD-Dev] Re: DevMUD - thoughts.1</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00499.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00495.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00502.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00498"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00498"><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 thread summary</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00463" HREF="msg00463.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
ApplePiMan <a href="mailto:ApplePiMan#aol,com">ApplePiMan#aol,com</a>, Sat 24 Oct 1998, 23:29 GMT
<UL>
<LI><strong><A NAME="00470" HREF="msg00470.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Sun 25 Oct 1998, 02:02 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00492" HREF="msg00492.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 25 Oct 1998, 17:28 GMT
<UL>
<LI><strong><A NAME="00495" HREF="msg00495.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Niklas Elmqvist <a href="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</a>, Sun 25 Oct 1998, 19:45 GMT
<UL>
<LI><strong><A NAME="00498" HREF="msg00498.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Sun 25 Oct 1998, 21:10 GMT
<UL>
<LI><strong><A NAME="00502" HREF="msg00502.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Niklas Elmqvist <a href="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</a>, Mon 26 Oct 1998, 00:09 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00499" HREF="msg00499.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 25 Oct 1998, 21:51 GMT
<UL>
<LI><strong><A NAME="00501" HREF="msg00501.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Niklas Elmqvist <a href="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</a>, Sun 25 Oct 1998, 23:08 GMT
<UL>
<LI><strong><A NAME="00506" HREF="msg00506.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Mon 26 Oct 1998, 02:54 GMT
</LI>
</UL>
</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>