[MUD-Dev] Re: atomic functions
J C Lawrence
claw at under.engr.sgi.com
Mon May 11 18:14:34 CEST 1998
On Wed, 6 May 1998 21:34:27 +0200 (MET DST)
Felix A Croes<felix at xs1.simplex.nl> wrote:
> J C Lawrence <claw at under.engr.sgi.com> wrote:
>> On Thu, 30 Apr 1998 03:59:20 +0200 (MET DST) Felix A
>> Croes<felix at xs1.simplex.nl> wrote:
Its probably not worth replying to most of this as it was based on our
conflicting definitions and models for what an "atomic function" was.
> In my design, events are only cancelled if they fail to commit their
> changes. Uncaught errors cause the event to terminate, but do not
> make it skip the commit phase.
Ahh, my exception model treats uncaught exceptions identically to
commit failures with the sole exception that an event which failed due
to an unhandled exception will not be rescheduled, and the other will.
The reason is fairly simple: logical correctness. Allowing an event
which failed due to internal logical errors to commit its changed data
allows inconsistent data to be propagated to the DB. THis is
especially critical because the source of the rror or exception may be
remote (in code terms) from the source of the initial call (ie a call
to a function at the bottom of a long call tree, defined in a distant
object).
> Aside: an event that fails a number of times will eventually be
> rescheduled in (effective) single-threaded mode. Thus, it is not
> possible for scheduled events to disappear altogether, and the
> temporary failure of events is invisible from within the system.
Yes, this was discussed extensively earlier last year and in the CC
list days. I have a scale of priority changes I run thru to
gradiently accomplish this with minimal (ha!) impact.
One of these days I must run metrics to check whether a faster
progression to single-threading would be more efficient. Much along
the line of: try a couple times and if still failing, stop everything
and do it.
>> Note: ColdC has a similar construct with their exception handling
>> model (Miro or Brandon can probably expand better than I there).
> Critical sections in ColdC? I looked it up, and there does not
> appear to be any undoing of changes involved.
Nahh, an exception model with an operator to trap all exceptions.
--
J C Lawrence Internet: claw at null.net
(Contractor) Internet: coder at ibm.net
---------(*) Internet: claw at under.engr.sgi.com
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...
--
MUD-Dev: Advancing an unrealised future.
More information about the mud-dev-archive
mailing list