On Aug 25, 9:20am, Alex Oren wrote:
> On Thu, 22 Aug 1996 15:39:31 -0700, ChrisL wrote:
> } Diagrammed:
> }
> } Event #1 starts processing.
> } Event #1 creates $Bubba.
> } Event #1 calls $Bubba.haircolour("brown")
> } Event #1 sets up Event #2 in its C&C success list.
> } Event #1 (eventually) C&C's successfully.
> } $Bubba is committed with brown hair.
> }
> } Event #2 ripens and starts processing.
> } Event #1 calls $Bubba.haircolour("white")
> } Event #2 (eventually) C&C's successfully.
> } $Bubba is committed with white hair.
> }
> } The basic idea is that an event can define a number of other events
> } whihc are to be logged if the current event suceeds or fails.
>
> Does it done automatically or does the coder have to explicitly write
> something like:
>
> if Event_Successful then ...
Largely semantic details, but my current implementation is of the form:
at_exit (E_SUCCESS, object.method, args...)
at_exit (E_FAILURE, object.method, args...)
Where multiple events can be queued for each state.
> So, the stuff that has to be buffered until the successful C&C is:
> - I/O (outbound)
> - Starting of new events
Anything done to an object (create, change, destroy)
Any IO (I send IO as seperate events chained off E_SUCCESS as above)
Dependant events (ie the at_exit stuff above)
> Did I miss any?
That seems pretty compleat.
> (I think that no special treatment is needed for creating/destroying objects,
> since they may be created in the cache and written tto tthe DB along with the
> other C&C changes).
That is my assumption, tho the DB needs to be explicitly tailored to handle
this, and to temporarily assign and reserve valid ObjectIDs. Object creates
and destroys are really of a different class of DB-level events than object
content changes.
--
J C Lawrence Internet: coder@ibm.net
---------------(*) Internet: clawrenc@cup.hp.com
...Honorary Member Clan McFUD -- Teamer's Avenging Monolith...