2000Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Orthogonality and invariants -->
<!--X-From-R13: ptNnzv&#45;pt.UenlEntr.Sqzbagba.OP.QO -->
<!--X-Date: Wed, 05 Apr 2000 21:52:37 &#45;0700 -->
<!--X-Message-Id: 200004060435.WAA01350@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Orthogonality and invariants</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">
</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="msg00069.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00071.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00069.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00057.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00070">Author</A>
&nbsp;|&nbsp;<A HREF="#00070">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00070">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Orthogonality and invariants</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>: Re: [MUD-Dev] Orthogonality and invariants</LI>
<LI><em>From</em>: <A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A></LI>
<LI><em>Date</em>: Wed, 5 Apr 2000 22:35:35 -0600</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#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>
[Miroslav Silovic &lt;silovic#zesoi,fer.hr&gt;:]

&gt; 	each path of control that contains mumble(object) must
&gt; 	contain unmumble(object) such that it executes after the
&gt; 	object has been mumbled, and such that there is no other
&gt; 	mumble or unmumble between it and the opening mumble.

That isn't going to work in a MUD. One of the first 'malloc' calls that
the server will see for a new client is that of creating a client
structure for the new connection. That structure doesn't get 'free'd
until the client disconnects. If you create a thread for that client,
then you can arrange to have a nice 'createClient' and 'freeClient'
pair, but not otherwise. Now that player speaks something. That
requires that the text of that speech be sent to all other characters
nearby. That is typically done by making queue elements of that text
that are queued to the output of each nearby player, and into the
input of MUD-run NPC's. Some of those queue elements may not be
processed until after the speaking player has left the game.

&gt; Again you can implement persistence library, one that places each
&gt; loaded object on a list that is guaranteed to get saved before the
&gt; process terminates.
&gt;
&gt; However, there is another, related issue: how to automate object
&gt; loads? If your objects are indirected (i.e. implemented via some
&gt; abstract reference type), you can just check for the load status each
&gt; time you transform the reference to the actual object pointer (Cold
&gt; and MOO do this). You can also use object pointers that point to
&gt; write-protected pages and then load the objects from segfault handler
&gt; (this is done by Texas Persistent Store, and despite the technical
&gt; coolness, it's unfortunately quite slow).

IMHO a better solution is to make your in-MUD programming language be
a persistent programming language. Then the persistence is automatic,
and the scenario programmer can typically ignore it (unless they want
some things to *not* be persistent). Also, it can be done once, in
a general fashion, in the language system and the DB.


&gt; 	for each container, the location of each object within the
&gt; 	container must be the container itself

One could add support for this kind of invariant to the in-MUD language
itself. Not something I've tried, but I don't off hand see any problem
with doing it (other than efficiency).

&gt; 	non-reentrant code should be protected by a mutex

Only if your server is multithreaded. Also, you normally protect data
structures (e.g. objects) with mutex's, rather than code.

-- 
Don't design inefficiency in - it'll happen in the implementation.

Chris Gray     cg#ami-cg,GraySage.Edmonton.AB.CA
               <A  HREF="http://www.GraySage.Edmonton.AB.CA/cg/">http://www.GraySage.Edmonton.AB.CA/cg/</A>



_______________________________________________
MUD-Dev mailing list
MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00069.html">Re: Uptime numbers (was Re: [MUD-Dev] Orthogonality and invariants)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00071.html">[MUD-Dev] Schmuse</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00069.html">Re: Uptime numbers (was Re: [MUD-Dev] Orthogonality and invariants)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00057.html">[MUD-Dev] MUD-Dev request rejected (fwd)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00070"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00070"><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><A NAME="00068" HREF="msg00068.html">Re: [MUD-Dev] Object and class heirarchies -- are they reallynecessary?</A></strong>, 
Brandon J. Rickman <a href="mailto:dr.k#pc4,zennet.com">dr.k#pc4,zennet.com</a>, Wed 05 Apr 2000, 21:32 GMT
<LI><strong><A NAME="00060" HREF="msg00060.html">[MUD-Dev] Orthogonality and invariants</A></strong>, 
Miroslav Silovic <a href="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</a>, Wed 05 Apr 2000, 15:27 GMT
<UL>
<LI><strong><A NAME="00065" HREF="msg00065.html">Uptime numbers (was Re: [MUD-Dev] Orthogonality and invariants)</A></strong>, 
Jay Carlson <a href="mailto:nop#mitre,org">nop#mitre,org</a>, Wed 05 Apr 2000, 20:06 GMT
<UL>
<LI><strong><A NAME="00069" HREF="msg00069.html">Re: Uptime numbers (was Re: [MUD-Dev] Orthogonality and invariants)</A></strong>, 
Ben Greear <a href="mailto:greearb#candelatech,com">greearb#candelatech,com</a>, Thu 06 Apr 2000, 03:16 GMT
</LI>
</UL>
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00070" HREF="msg00070.html">Re: [MUD-Dev] Orthogonality and invariants</A></strong>, 
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 06 Apr 2000, 04:52 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00057" HREF="msg00057.html">[MUD-Dev] MUD-Dev request rejected (fwd)</A></strong>, 
Matthew Mihaly <a href="mailto:the_logos#achaea,mudservices.com">the_logos#achaea,mudservices.com</a>, Wed 05 Apr 2000, 06:40 GMT
<UL>
<LI><strong><A NAME="00064" HREF="msg00064.html">Re: [MUD-Dev] MUD-Dev request rejected (fwd)</A></strong>, 
adam <a href="mailto:adam#treyarch,com">adam#treyarch,com</a>, Wed 05 Apr 2000, 18:45 GMT
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00062" HREF="msg00062.html">Re: [MUD-Dev] MUD-Dev request rejected (fwd)</A></strong>, 
Jeff Freeman <a href="mailto:SkeptAck#antisocial,com">SkeptAck#antisocial,com</a>, Wed 05 Apr 2000, 18:22 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00041" HREF="msg00041.html">[MUD-Dev] Re: J  (was: Re: 16K mud server competition !)</A></strong>, 
Cynbe ru Taren <a href="mailto:cynbe#muq,org">cynbe#muq,org</a>, Tue 04 Apr 2000, 19:48 GMT
</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>