<!-- MHonArc v2.4.4 --> <!--X-Subject: [MUD-Dev] Re: atomic functions --> <!--X-From-R13: "Tryvk O. Qebrf" <sryvkNkf1.fvzcyrk.ay> --> <!--X-Date: Sat, 2 May 1998 16:26:14 -0700 --> <!--X-Message-Id: 199805022323.BAA14736#xs1,simplex.nl --> <!--X-Content-Type: text/plain --> <!--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:felix#xs1,simplex.nl"> </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> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00334.html">Previous</a> | <a href="msg00336.html">Next</a> ] Thread: [ <a href="msg00334.html">Previous</a> | <a href="msg00336.html">Next</a> ] Index: [ <A HREF="author.html#00335">Author</A> | <A HREF="#00335">Date</A> | <A HREF="thread.html#00335">Thread</A> ] <!--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>: "Felix A. Croes" <<A HREF="mailto:felix#xs1,simplex.nl">felix#xs1,simplex.nl</A>></LI> <LI><em>Date</em>: Sun, 3 May 1998 01:23:43 +0200 (MET DST)</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" <<A HREF="mailto:petidomo#kanga,nu">petidomo#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> Jon A. Lambert <jlsysinc#ix,netcom.com> wrote: > On 1 May 98 at 13:26, Shawn Halpenny wrote: > > > > So atomic fragments are akin to critical sections? For me, methods can > > execute in their own context (essentially the call stack of an event's > > processing is an entire critical section). Since they receive current > > copies of any data they touch, rather than having to wait for it to > > become available, though, there's no waiting upon entry. Given the way > > I've structured things, atomic fragments don't add much benefit (but see > > below). > > > > There are a couple of issues here, asynchronous event execution and > data currency/integrity. In looking at his model, it appears to be an > example of how data currency/integrity issues would be handled at the MPL > (or LPC) level. I'm not sure yet how his events are generated. My server is a rewrite from scratch of LPmud, so events can be generated in two different ways: a status change for a socket (connection available/input available/output done/connection lost) or with the infamous "call_out" function. I would like to rename the latter to something that makes more sense, but at this point I am bound to backward compatibility. I mean to have both asynchronous event execution and data currency/integrity. The interesting part is that the same code can be used for both. > > Explicitly defining an atomic function would require more programmer > > work. In a free user programming environment, I don't want to require > > people to decide whether the function they just wrote to make their > > sword talk needs to be atomic or have atomic sections within it. For > > now, I'm opting to leave it up to the server to decide the atomicity of > > things (which it does by way of the event and DB models). An > > experienced programmer can probably outdo the server if given the > > capability to declare atomic blocks, but a newbie would be more > > inclined to either not declare them at all (in which case, I'd have to > > rely on a system like I've already got in mind) or declare them poorly > > and result in performance worse than the server would obtain doing it > > itself. > > Exactly so. Providing for explicit data currency in the language makes > it a much more powerful tool, although there is the side-effect that > programming for data currency is more complex. > > I've taken a similar position to yours, where data currency is implicitly > linked to event atomicity (is that a word?). Atomicity? Atomicness? > My event method call() is > the explicit way of declaring that data currency is NOT important or > non-critical. Perhaps the semantic opposite of Felix's model? I don't understand this. > Thus an Event may be made up of many methods/functions, all of which must > succeed for the event to commit. Methods may schedule additional Events > and these events will be scheduled regardless of whether the generating > Event succeeds or not. So in many cases, Event calls will be obviously > be placed just before the successful return of the top-most method. > There is a caveat. A method/function which is called as an event > should ensure that it checks the state of the caller/callee for state > validity. Nothing comes for free. I have just shuffled the complexity > into another area of program design. I have a theory this might be > unavoidable. :( Hmm. That is one thing I mean to do differently: if the current event fails to commit, then any events generated by it are unscheduled. Felix -- 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="00336" HREF="msg00336.html">[MUD-Dev] Re: atomic functions</A></strong> <ul compact><li><em>From:</em> "Jon A. Lambert" <jlsysinc#ix,netcom.com></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00334.html">[MUD-Dev] Re: atomic functions</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00336.html">[MUD-Dev] Re: atomic functions</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00334.html">[MUD-Dev] Re: atomic functions</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00336.html">[MUD-Dev] Re: atomic functions</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00335"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00335"><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="00331" HREF="msg00331.html">[MUD-Dev] Re: atomic functions</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sat 02 May 1998, 18:16 GMT </LI> </ul> <LI><strong><A NAME="00420" HREF="msg00420.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 06 May 1998, 17:39 GMT </LI> <LI><strong><A NAME="00333" HREF="msg00333.html">[MUD-Dev] Re: atomic functions</A></strong>, Felix A. Croes <a href="mailto:felix#xs1,simplex.nl">felix#xs1,simplex.nl</a>, Sat 02 May 1998, 23:25 GMT </LI> <LI><strong><A NAME="00334" HREF="msg00334.html">[MUD-Dev] Re: atomic functions</A></strong>, Felix A. Croes <a href="mailto:felix#xs1,simplex.nl">felix#xs1,simplex.nl</a>, Sat 02 May 1998, 23:26 GMT </LI> <LI><strong><A NAME="00335" HREF="msg00335.html">[MUD-Dev] Re: atomic functions</A></strong>, Felix A. Croes <a href="mailto:felix#xs1,simplex.nl">felix#xs1,simplex.nl</a>, Sat 02 May 1998, 23:26 GMT <UL> <LI><strong><A NAME="00336" HREF="msg00336.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, 05:49 GMT </LI> </UL> </LI> <LI><strong><A NAME="00338" HREF="msg00338.html">[MUD-Dev] Re: atomic functions</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 03 May 1998, 17:16 GMT <UL> <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 </LI> </UL> </LI> </ul> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>