1998Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: atomic functions -->
<!--X-From-R13: Eunja Vnycraal <znynpunvNvanzr.pbz> -->
<!--X-Date: Thu, 7 May 1998 07:12:20 &#45;0700 -->
<!--X-Message-Id: 19980507101056.C9025#sun104,humb.nt.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199805061934.VAA10168#xs1,simplex.nl -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: atomic functions</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:malachai#iname,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="msg00457.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00460.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00433.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00558.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00459">Author</A>
&nbsp;|&nbsp;<A HREF="#00459">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00459">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: atomic functions</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: atomic functions</LI>
<LI><em>From</em>: Shawn Halpenny &lt;<A HREF="mailto:malachai#iname,com">malachai#iname,com</A>&gt;</LI>
<LI><em>Date</em>: Thu, 7 May 1998 10:10:56 -0400</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: "Petidomo List Agent -- Kanga.Nu version" &lt;<A HREF="mailto:petidomo#kanga,nu">petidomo#kanga,nu</A>&gt;</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Wed, May 06, 1998 at 09:34:27PM +0200, Felix A. Croes wrote:
&gt; J C Lawrence &lt;claw#under,engr.sgi.com&gt; wrote:
&gt; 
&gt; &gt; Delving futher into the FAIL state semantics, if the caller is to also
&gt; &gt; FAIL because of the atomic function's failure, then the only gain from
&gt; &gt; the atomic function overhead is is that it may get earlier
&gt; &gt; notification of its impedending C&amp;C failure via the atomic function
&gt; &gt; than it would have otherwise.  This can be a notable performance
&gt; &gt; enhancement, but comes at significant cost in complexity of the
&gt; &gt; execution environment (which is now heirarchial as vs flat) and in
&gt; &gt; code.  Additionally the benefit is only gained for callers of atomic
&gt; &gt; functions -- all other events suffer the penalty of the more complex
&gt; &gt; environment without any gain.  
&gt; 
&gt; In my design, events are only cancelled if they fail to commit their
&gt; changes.  Uncaught errors cause the event to terminate, but do not
&gt; make it skip the commit phase.

I do not understand how that can work.  A careless builder who forgets a
range check on some value could corrupt objects and the results are not
easily traceable.  Perhaps I'm using a different definition of "error"?
Simplistic example:

function SetMaxDamage(n)
{
	if (n &lt; 0)
		throw out_of_range

	max_damage = n
}

SetMaxDamage(-1) is called in context of an event.  The exception is what I
term an error:  throw out all local data and forget this event.  There is
no other clause to catch that exception and recovery is not possible, so it
must terminate the event.  Letting it continue on and commit changes, let
alone schedule other events because it is allowed to commit, isn't
acceptable.

&gt; &gt; It is only when the calling function is intended to continue execution
&gt; &gt; despite the failure of the atomic function (at the C&amp;C level), that
&gt; &gt; the execution pattern is different.  However the functional gain here
&gt; &gt; I find (and found, I implemented somethign like this for a while)
&gt; &gt; to be illusionary.  There just is no practical use for the feature.
&gt; 
&gt; I contest this :)  I claim that it is very useful indeed, and not
&gt; at all illusionary.  I frequently find that actions which have to
&gt; be atomic -- for instance, moving a hungry dragon into a room,
&gt; which changes both the environment of the dragon and the inventory
&gt; of the room -- are part of a larger event, the actions of which
&gt; I want to be executed precisely in that other without other
&gt; events intervening.

Moving the hungry dragon into the room does not have to be an atomic
action.  Removing the dragon from its current room is one event, putting it
into the next room is another.  This is an attempt to minimize the number
of C&amp;C collisions if you have a lot of these things going on (get rid of the
container-room ideology and this is even less a factor--something I'll
probably end up going with).  The movement events will be executed in the
correct order, since the dragon removal event posts the dragon insertion
event only if it successfully C&amp;C's.

-- 
Shawn Halpenny

I know that you believe you understand what you think I said, but,
I am not sure you realize that what you heard is not what I meant.  

-- 
MUD-Dev: Advancing an unrealised future.

</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="00559" HREF="msg00559.html">[MUD-Dev] Re: atomic functions</A></strong>
<ul compact><li><em>From:</em> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</li></ul>
<li><strong><A NAME="00558" HREF="msg00558.html">[MUD-Dev] Re: atomic functions</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="00433" HREF="msg00433.html">[MUD-Dev] Re: atomic functions</A></STRONG>
<UL><LI><EM>From:</EM> "Felix A. Croes" &lt;felix#xs1,simplex.nl&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00457.html">[MUD-Dev] Re: atomic functions</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00460.html">[MUD-Dev] Re: atomic functions</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00433.html">[MUD-Dev] Re: atomic functions</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00558.html">[MUD-Dev] Re: atomic functions</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00459"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00459"><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: atomic functions</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00557" HREF="msg00557.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Wed 13 May 1998, 21:32 GMT
</LI>
</ul>
</ul>
<LI><strong><A NAME="00386" HREF="msg00386.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Felix A. Croes <a href="mailto:felix#xs1,simplex.nl">felix#xs1,simplex.nl</a>, Tue 05 May 1998, 06:25 GMT
<UL>
<LI><strong><A NAME="00464" HREF="msg00464.html">[MUD-Dev] Re: atomic functions</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 07 May 1998, 22:58 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00433" HREF="msg00433.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Felix A. Croes <a href="mailto:felix#xs1,simplex.nl">felix#xs1,simplex.nl</a>, Wed 06 May 1998, 19:37 GMT
<UL>
<LI><strong><A NAME="00459" HREF="msg00459.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Shawn Halpenny <a href="mailto:malachai#iname,com">malachai#iname,com</a>, Thu 07 May 1998, 14:12 GMT
<UL>
<LI><strong><A NAME="00558" HREF="msg00558.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Wed 13 May 1998, 21:41 GMT
<UL>
<LI><strong><A NAME="00584" HREF="msg00584.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Shawn Halpenny <a href="mailto:malachai#iname,com">malachai#iname,com</a>, Thu 14 May 1998, 20:00 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00559" HREF="msg00559.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Wed 13 May 1998, 21:46 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00511" HREF="msg00511.html">[MUD-Dev] Re: atomic functions</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Tue 12 May 1998, 01:17 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>