1998Q4/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: PDMud thread summary -->
<!--X-From-R13: @vxynf Syzdivfg <q97ryzNqgrx.punyzref.fr> -->
<!--X-Date: Sun, 25 Oct 1998 15:08:52 &#45;0800 -->
<!--X-Message-Id: Pine.SOL.3.96.981025233328.616A&#45;100000#licia,dtek.chalmers.se -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199810252149.OAA02941@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--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: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="msg00500.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00502.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00499.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00506.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00501">Author</A>
&nbsp;|&nbsp;<A HREF="#00501">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00501">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>: Niklas Elmqvist &lt;<A HREF="mailto:d97elm#dtek,chalmers.se">d97elm#dtek,chalmers.se</A>&gt;</LI>
<LI><em>Date</em>: Mon, 26 Oct 1998 00:05:39 +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 Sun, 25 Oct 1998, Chris Gray wrote:
&gt; [Niklas Elmqvist:]
&gt;  &gt;Okay. What I have in mind is this: Say we have a running system with one
&gt;  &gt;module loaded, call it A. A belongs to the ParserModule class which has
&gt;  &gt;been subclassed outside of the executable (external inheritance) and
&gt;  &gt;dynamically loaded into the running MUD.
&gt; 
&gt; OK. I *think* I've seen descriptions of "external inheritance", so I'll
&gt; ignore it for now. 

Thanks, I needed that :) And sorry. I guess I must sound sort of obsessed.
I'll be quiet on that issue from now on. 

&gt; However, if I am understanding correctly, doesn't using this technique
&gt; preclude using any implementation language other than C++, (and that
&gt; everyone use the same C++ compiler) since external inheritance requires
&gt; consistent object layout and virtual function table format?

Yes, it does. It works since the compilers I've come across don't do
anything funky with the virtual function tables of subclasses.

&gt; How would modules written in the MUD-language match this layout? The
&gt; MUD-language and virtual machine could force all entities manipulated by
&gt; the MUD-language to inherit from whatever base class is the one chose
&gt; for the external inheritance level. 

Hmm, not sure what you're getting at here, but yes, the base class in the
executable must be made adequate since it must be used for all accessing
of the objects (at least on the driver level). And are we sure we will
support MUD-language code modules on this level? IMHO, MUD-language is
better suited to in-world stuff.

&gt; Isn't that kind of restrictive? The net result of this, is "just another
&gt; C++ MUD" isn't it? 

Yes, but the alternative would be "just another C MUD", or what? Do you
refer to some specific phenomenon?

&gt; If that base class is changed in any way, *everything* has to be
&gt; rebuilt, possibly including all MUD-language code. Wouldn't that
&gt; completely invalidate any existing database? 

Well, my thinking is that external inheritance (sorry) would only be used
for modules and events -- I've been concerned mainly with the driver level
here. The database module(s) would build and use their own data
structures, and would not be affected by any change in the base classes.
Actually, trying to tie in database structures into the core would
needlessly narrow our options.

&gt; What are the benefits that balance these downsides? 

I think I've gone over some before, but the main reason I see is that this
is a neat way of using O-O concepts over shared lib boundaries with all
that entails. AFAIK, there does not exist a good mechanism for exporting
classes in shared libs. With this technique, we can have encapsulation,
polymorphism and inheritance all working the way we want them even though 
our main functionality may be imported in dynamically loaded modules.

Of course, since my scheme has met with some (!) resistance, I guess that
this is one vision I'll have to abandon. :) But why don't someone else
describe their own view at the DevMUD architecture and perhaps we can all
meet in the middle? (Yes, Chris Gray's thoughts have been duly noted :)

&gt; I'd like to see databases portable from system to system. E.g. one
&gt; created on say, a SPARC UNIX box is directly usable on an X86 WIN32 box.
&gt; Since MUD-language code is likely stored in that database, it should be
&gt; similarly portable.

Again, nothing in the core should affect anything in the databases. Sure,
the modules are themselves dependant on the base class in the core and
they all use inherited versions of the event class, but this does not have
an impact on the database. 

&gt;  &gt;3. The executable calls the function, passing it a pointer to the Core
&gt;  &gt;	class. This is the basic set of primitives the module may access.
&gt; 
&gt; Is that a pointer to a Core object, rather than class? I thought C++
&gt; classes had no externally visible representation.

It is a pointer to the Core object, of course.

&gt;  &gt;7. Object A (the parser module) receives this message on the broadcast
&gt;  &gt;	channel/pipe and decides that it is interested in CommandHandlers.
&gt;  &gt;	It calls Core::GetPipe() with the ModuleID it received from the
&gt;  &gt;	Message.
&gt;  &gt;8. The intermodule communication manager (CommManager) receives the
&gt;  &gt;	request and queries the module manager about the location of the
&gt;  &gt;	two ModuleIDs. If on the same system, it creates a CallPipe
&gt;  &gt;	(function pointers). If multi-threading is required, it creates a
&gt;  &gt;	QueuePipe, and so on. It returns the pipe to the calling module
&gt;  &gt;	(A).
&gt;  &gt;9. Module A receives the pipe and immediately calls B on it, telling it
&gt;  &gt;	that it is a parser and wants a command grammar and a way to
&gt;  &gt;	package data for passing it.
&gt;  &gt;10. Module B provides A with this and then sits idle until information
&gt;  &gt;	from A comes through the pipe.
&gt; 
&gt; This all sounds pretty good to me, but I'm a bit unsure of some of your
&gt; basic assumptions. Are you assuming in '10.' that each module has its
&gt; own thread? 

Hmm, no, I am saying that it will not be called at all until a message
propagates to it (understand that my own project is single-threaded, and I
have little experience with multi-threading). All modules are dormant
until they are called into play by an event -- this is the only way of
having work be done in the server. Of course, some modules will be woken
quite a lot by periodic events; the network I/O code would schedule its
own wake-up event in the Init() function and thus be called every so
often.

&gt; Are you assuming there can be only one parser module loaded at any given
&gt; time? If so, what happens when more than one does step 7.? 

No, I don't think I am assuming that. The individual parser modules need a
way of knowing if a command handler is applicable to their mode of
operation, and will thus decide at step 7 if they want to get in touch
with the module. If both want to, then fine! The command handler will get
two parsers sending it commands.

&gt; It also sounds like some of the things that have been discussed before
&gt; are assumed. 

Yep, but as I said at the top of my message, this were *my* own thoughts.
I am not saying we should use them (although I think it would be nice if
at least we were influenced by them), I only wanted to clarify a few
things about them. 

&gt; E.g. in order for your 'CallPipe' to work, the prototype used for a
&gt; given kind of communication must be pre-determined.

Yes, but since we will call some sort of structure here, the prototype can
be fixed to void IMCCall(Message *hMsg) or something. The Message class
can be subclassed to provide specific functionality. This is also where I
was talking about having the innards of Message be serialized if needed.

&gt; Chris Gray     cg#ami-cg,GraySage.Edmonton.AB.CA

-- 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>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00506" HREF="msg00506.html">[MUD-Dev] Re: PDMud thread summary</A></strong>
<ul compact><li><em>From:</em> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00499" HREF="msg00499.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
<UL><LI><EM>From:</EM> Chris Gray &lt;cg#ami-cg,GraySage.Edmonton.AB.CA&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00500.html">[MUD-Dev] Re: DevMUD - thoughts.1</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00502.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00499.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00506.html">[MUD-Dev] Re: PDMud thread summary</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00501"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00501"><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>
<ul compact>
<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><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
<UL>
<LI><strong><A NAME="00513" HREF="msg00513.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Alex Oren <a href="mailto:alexo#bigfoot,com">alexo#bigfoot,com</a>, Mon 26 Oct 1998, 10:05 GMT
<UL>
<LI><strong><A NAME="00535" HREF="msg00535.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 27 Oct 1998, 03:44 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00503" HREF="msg00503.html">[MUD-Dev] Re: PDMud thread summary</A></strong>, 
ApplePiMan <a href="mailto:ApplePiMan#aol,com">ApplePiMan#aol,com</a>, Mon 26 Oct 1998, 00:20 GMT
</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>