<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: [MUD-Dev] C&C and Event Rescheduling --> <!--X-From-R13: pynjerapNphc.uc.pbz --> <!--X-Date: from scipio.globecomm.net [207.51.48.12] by in10.ibm.net id 869085220.31068-1 Wed Jul 16 20:33:40 1997 CUT --> <!--X-Message-Id: 199707162032.NAA22748#xsvr3,cup.hp.com --> <!--X-Content-Type: text/plain --> <!--X-Reference: 33C69FC6.41C67EA6#iname,com --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: [MUD-Dev] C&C and Event Rescheduling</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:clawrenc#cup,hp.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> [ <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="msg00151.html">Previous</a> | <a href="msg00153.html">Next</a> ] Thread: [ <a href="msg00151.html">Previous</a> | <a href="msg00200.html">Next</a> ] Index: [ <A HREF="author.html#00152">Author</A> | <A HREF="#00152">Date</A> | <A HREF="thread.html#00152">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: [MUD-Dev] C&C and Event Rescheduling</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI> <LI><em>Subject</em>: Re: [MUD-Dev] C&C and Event Rescheduling</LI> <LI><em>From</em>: <A HREF="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</A></LI> <LI><em>Date</em>: Wed, 16 Jul 97 13:11:34 -0700</LI> <LI><em>Reply-to</em>: <A HREF="mailto:claw#null,net">claw#null,net</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> In <<A HREF="msg00101.html">33C69FC6.41C67EA6#iname,com</A>>, on 07/11/97 at 02:07 PM, Shawn Halpenny <malachai#iname,com> said: >Roughly: >1. A client requests object O from the database. >2. Return OC (a client-only copy of O) to the client. >3. The client returns OC' after some munging. >4. If no changes have been made to O since the request was made > (a different client request may have committed changes to O > while OC' was being created), OC' is atomically committed to > the database and notification of success is returned to the > client. >5. If O has changed, OC' is thrown away and the client receives > notification that OC' could not commit. This is pretty well identical to my model. Concerns: Most events modify more than one object. eg Bubba (object X) moves from room A to room B. Minimally objects A, B, and X will be modified by this event (containment pointers/lists). How do you intend to handle the cases of an event requesting object Q just to check the value of a data member (ie no modification), where that data member has then been changed by the time the event commits (see the dragon's dinner example, and look at the door)? Do you have a concept of a "transaction" where a transaction is effectively synonymous with an event, and involves the possible requesting of read-only copies of N objects, and the possible modification of M objects where M is a subset of N? What I'm looking for here is the idea that a transaction or event can only commit if all of its component objects resolve correctly to their commit state (ie everything compares right). What about the case of an object with two attributes, say object A, with attributes A::X, and A::Y. Two events, Q and R, then occur. Q modifies the value of A::X. R modifies the value of A::Y. Both events run simultaneously and commit in arbitrary order. Should one event fail and be rescheduled? You can take this last case and instead of having both events modify the attributes, instead have one modify one value, and the other do a read-only check, or have one do a read-only check of A::X while the other modifies it. >An event is the client and if it finds out OC' couldn't commit, the >event is immediately rescheduled. >Now assume we have event A and B trying to commit object O. A and B >first occur at the same time. Event A's changes to O take twice as >long as B's changes to O, so B commits first, causing A to >reschedule. >Say that the system is generating event B's like a mad bastard. It >seems to me that in some cases, it would be possible (though >unlikely) that event A will never be able to commit its changes, >since the continuous committing of event B's changes prevents A from >ever finishing. This is a problem, and a not necessarily infrequent one. eg. Put 50 users in a room. Have them all move to the next room at the same time. Now consider that the source room, the target room, and each user's object is being touched by each event. >Is that possible? And if so, what's an elegant solution? (Timed >delay on B's next attempt at committing? Block B until A commits? >Reschedule A with higher priority?) I don't have a pure solution. I (rough memory) follow the following course: A rescheduled event is given a higher than default priority. All this means is that it gets first crack at getting a thread to execute on as versus a "normal" event which will have to wait until all higher-priority events have threads. A 5*rescheduled event forces the Executor to cease assigning events to threads until the 5*rescheduled event terminates. A 10*rescheduled event (I think its 10) forces the Executor to cease assigning events to threads until the 10*rescheduled event successfully terminates (ie it heads toward and finally goes into single-tasking mode). A 20*rescheduled event (have no idea what the real number is) signals all other executing events to block until this event has terminated. This just shuts down the multi-threading until the event has run. Note: Events have a very short maximum time they must execute within. Event's which take longer than that time are killed and not rescheduled. This maximum time is reduced as events are rescheduled and ascend the above priority list (ie I give them more chance to get their job done, but less time to do it). -- J C Lawrence Internet: claw#null,net (Contractor) Internet: coder#ibm,net ---------------(*) Internet: clawrenc#cup,hp.com ...Honorary Member Clan McFUD -- Teamer's Avenging Monolith... </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="00200" HREF="msg00200.html">Re: [MUD-Dev] C&C and Event Rescheduling</A></strong> <ul compact><li><em>From:</em> Shawn Halpenny <malachai#iname,com></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00101" HREF="msg00101.html">C&C and Event Rescheduling</A></STRONG> <UL><LI><EM>From:</EM> Shawn Halpenny <malachai#iname,com></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00151.html">Re: [MUD-Dev] META: C&C and Event Rescheduling</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00153.html">Re: [MUD-Dev] META: Making the list public?</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00151.html">Re: [MUD-Dev] META: C&C and Event Rescheduling</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00200.html">Re: [MUD-Dev] C&C and Event Rescheduling</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00152"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00152"><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>Re: [MUD-Dev] Virtual Chemistry</STRONG>, <EM>(continued)</EM> <ul compact> <ul compact> <ul compact> <LI><strong><A NAME="00338" HREF="msg00338.html">Re: [MUD-Dev] Virtual Chemistry</A></strong>, Matt Chatterley <a href="mailto:root#mpc,dyn.ml.org">root#mpc,dyn.ml.org</a>, Sat 02 Aug 1997, 23:31 GMT </LI> <LI><strong><A NAME="00369" HREF="msg00369.html">Re: [MUD-Dev] Virtual Chemistry</A></strong>, Adam Wiggins <a href="mailto:nightfall#user1,inficad.com">nightfall#user1,inficad.com</a>, Mon 04 Aug 1997, 15:33 GMT </LI> </ul> </ul> </ul> </LI> <LI><strong><A NAME="00101" HREF="msg00101.html">C&C and Event Rescheduling</A></strong>, Shawn Halpenny <a href="mailto:malachai#iname,com">malachai#iname,com</a>, Sat 12 Jul 1997, 04:04 GMT <UL> <LI><strong><A NAME="00151" HREF="msg00151.html">Re: [MUD-Dev] META: C&C and Event Rescheduling</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Thu 17 Jul 1997, 03:13 GMT </LI> <LI><strong><A NAME="00152" HREF="msg00152.html">Re: [MUD-Dev] C&C and Event Rescheduling</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Thu 17 Jul 1997, 03:33 GMT <UL> <LI><strong><A NAME="00200" HREF="msg00200.html">Re: [MUD-Dev] C&C and Event Rescheduling</A></strong>, Shawn Halpenny <a href="mailto:malachai#iname,com">malachai#iname,com</a>, Sat 19 Jul 1997, 03:13 GMT <UL> <LI><strong><A NAME="00204" HREF="msg00204.html">Re: [MUD-Dev] C&C and Event Rescheduling</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Sat 19 Jul 1997, 07:26 GMT <UL> <LI><strong><A NAME="00228" HREF="msg00228.html">Re: [MUD-Dev] C&C and Event Rescheduling</A></strong>, Shawn Halpenny <a href="mailto:malachai#iname,com">malachai#iname,com</a>, Thu 24 Jul 1997, 00:21 GMT <UL> <LI><strong><A NAME="00235" HREF="msg00235.html">Re: [MUD-Dev] C&C and Event Rescheduling</A></strong>, clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Fri 25 Jul 1997, 08:17 GMT </LI> </UL> </LI> </UL> </LI> </UL> </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>