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:09:03 &#45;0700 -->
<!--X-Message-Id: 19980507100739.B9025#sun104,humb.nt.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 19980505170101.C8490#sun104,humb.nt.com -->
<!--X-Reference: Pine.SGI.3.96.980505184421.10203C&#45;100000#red,angel.com -->
<!--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="msg00456.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00459.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00411.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00542.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00457">Author</A>
&nbsp;|&nbsp;<A HREF="#00457">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00457">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:07:39 -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 Tue, May 05, 1998 at 06:46:58PM -0700, Adam Wiggins wrote:
&gt; On Tue, 5 May 1998, Shawn Halpenny wrote:
&gt; &gt; I want a method to do this without having to write the code in a
&gt; &gt; special way, though:  I don't want the scriptor to have to think
&gt; &gt; about breaking his "add 10 to the max_damage of every adamantine
&gt; &gt; sword whose name begins with the letter 'Q'" event into a chain of
&gt; &gt; events (one per sword, by the time all is said and done), just to
&gt; &gt; make sure that an update of that breadth will commit in timely
&gt; &gt; fashion.  Roughly, I want the scriptor to be able to write
&gt; &gt; something like:  
&gt; &gt; 
&gt; &gt; function foo()
&gt; &gt; {
&gt; &gt; 	foreach obj (obj_in_world.type == "admantine sword")
&gt; &gt; 	{
&gt; &gt; 		... some stuff ...
&gt; &gt; 
&gt; &gt; 		obj.max_damage += 10;
&gt; &gt; 
&gt; &gt; 		... more stuff ...
&gt; &gt; 	}
&gt; &gt; }
&gt; &gt; 
&gt; &gt; and not have the server handle foo() single-threadedly.
&gt; 
&gt; Hrm - perhaps everything between ANY set of braces should be considered
&gt; a function?

And by that you mean scheduled as its own event?  I was thinking about that
too.  Currently, that event will not be scheduled to run until the event
that called foo() successfully C&amp;C's, so there isn't a gain in putting the
loop guts into its own event (in fact, if post-loop processing were done in the
foo() event that depended on something that happened within the loop,
object state would be inconsistent based on the order of events).

&gt; &gt; Is breaking that loop into an event chain as simple as scheduling
&gt; &gt; an event to execute the guts of the loop on each iteration?  I
&gt; &gt; think you'd still end up with a lot of failed C&amp;C's as those new
&gt; &gt; events ripened, since the foo() event hasn't completed looping yet.
&gt; &gt;  
&gt; &gt; 
&gt; &gt; Would the effect be less drastic if the attributes were stored as
&gt; &gt; distinct objects in the DB, rather than considering mud objects as
&gt; &gt; the base storage unit?  That way, the only time C&amp;C would fail is
&gt; &gt; if some other event had touched the exact same attribute, as
&gt; &gt; opposed to just touching the object.  (I'm particularly hoping
&gt; &gt; someone (like JCL!) will have tried something like that and can
&gt; &gt; feedback here).  
&gt; 
&gt; Do an archive search for C&amp;C.  You'll pull up a ton of stuff, probably
&gt; most of it from JCL.  Then if you have questions/things to add you can do
&gt; a followup.  We love resurrecting ancient threads here!

Aye (I had resurrected it that time).  The thread petered out
eventually after a few of us had tossed about methods for object
comparison at C&amp;C time, event sequencing, and breaking objects into
their component attributes for storage.  Above, I'd mentioned JCL
explicitly since back then he had dropped that he might try such an
object breakdown and see how it performed.  I suppose we'll have to
forgive him his day job and wait until he catches up to this message.  

-- 
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="00542" HREF="msg00542.html">[MUD-Dev] Re: atomic functions</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00399" HREF="msg00399.html">[MUD-Dev] Re: atomic functions</A></STRONG>
<UL><LI><EM>From:</EM> Shawn Halpenny &lt;malachai#iname,com&gt;</LI></UL></LI>
<LI><STRONG><A NAME="00410" HREF="msg00410.html">[MUD-Dev] Re: atomic functions</A></STRONG>
<UL><LI><EM>From:</EM> Adam Wiggins &lt;adam#angel,com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00456.html">[MUD-Dev] Re: regulating player-created objects</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00459.html">[MUD-Dev] Re: atomic functions</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00411.html">[MUD-Dev] Re: atomic functions</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00542.html">[MUD-Dev] Re: atomic functions</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00457"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00457"><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>
<LI><strong><A NAME="00344" HREF="msg00344.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 03 May 1998, 15:19 GMT
</LI>
<LI><strong><A NAME="00399" HREF="msg00399.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Shawn Halpenny <a href="mailto:malachai#iname,com">malachai#iname,com</a>, Tue 05 May 1998, 14:32 GMT
<UL>
<LI><strong><A NAME="00410" HREF="msg00410.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Tue 05 May 1998, 19:18 GMT
<UL>
<LI><strong><A NAME="00411" HREF="msg00411.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Tue 05 May 1998, 19:33 GMT
</LI>
<LI><strong><A NAME="00457" HREF="msg00457.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:09 GMT
<UL>
<LI><strong><A NAME="00542" HREF="msg00542.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>, Wed 13 May 1998, 18:23 GMT
<UL>
<LI><strong><A NAME="00560" HREF="msg00560.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, 22:14 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="00339" HREF="msg00339.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Felix A. Croes <a href="mailto:felix#xs1,simplex.nl">felix#xs1,simplex.nl</a>, Sun 03 May 1998, 17:45 GMT
<UL>
<LI><strong><A NAME="00345" HREF="msg00345.html">[MUD-Dev] Re: atomic functions</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 03 May 1998, 16:50 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>