[PEAK] Heads-up: new Trellis algorithm arriving in SVN soon
Phillip J. Eby
pje at telecommunity.com
Tue Nov 27 22:10:39 EST 2007
FYI, folks, if you're doing development against the SVN version of
the Trellis, please be aware that a couple of major changes in
semantics are coming soon, like in the next day or so.
A quick summary of the major changes:
* Rules can now make changes to other cells
* Rules and modifiers can see the immediate effects of their changes
(but still cannot see the calculated effects)
* @trellis.action is no more: you will have to switch to @rule or
@observer instead (where @observer is for communicating with
non-trellis software and is not allowed to make changes)
* non- at observer rules can be run more than once, and so must either
be safe to re-run, or log their changes so the trellis can undo them
* recalculation errors roll back all changes to the trellis
* circular rules that would've led to an infinite loop can now be
detected, with a complete report of the rules involved
* @task rules now require an EventLoop to run, and they are no longer
guaranteed to see all changes to the trellis. In particular, they
can no longer see receiver or discrete values, because those cells
will reset before the eventloop can run. On the other hand, because
of this change, it is now potentially possible for code in one thread
to trigger the resumption of a task running in another thread. (The
new algorithm has hooks for multi-thread locking, but it is not yet
implemented.)
This isn't a complete list of changes, but I believe it covers most
of the big things. I'm bumping the version from 0.5b2dev to 0.6a1dev
to reflect the differences. There will need to be some major
documentation overhauls in the near future, as I have done almost no
doc updates for the above, or to add information about the new STM
(Software Transactional Memory) and recalculation controller objects
and their APIs, or how to implement advanced data structures and
specialized cell types under the new regime.
Last, but far from least, my initial checkin isn't going to support
undo for List, Dict, Set, etc., and so your code may act funny if a
rule that modifies one of those structures needs to be undone due to
an ordering issue.
Hopefully, we'll have some stability on the trunk relatively soon,
but the docs may take longer. With luck -- and especially testing --
perhaps we will have a solid 0.6 beta by year end. If you'd like to
help, please try your existing Trellis code bases against the new
trunk once I announce the first checkin, and let me know of any
issues, quirks, glitches, or oddities you may run into. Thanks!
More information about the PEAK
mailing list