clara-rules icon indicating copy to clipboard operation
clara-rules copied to clipboard

Transaction queue support

Open dspiteself opened this issue 11 years ago • 4 comments

Is there a way to get the set of all the novel tuples after the match resolve act cycles have resolved?

dspiteself avatar Jan 21 '14 20:01 dspiteself

Not yet, but this is something I'm planning on tackling soon (probably mid or late February, after I get 0.4 release out. I made some comments on how I might do this at the link below, basically exposing a sequence of state changes that would include all newly derived information after a set of facts get inserted. I haven't figured out how to expose this quite yet, but I'd imagine a sequence of some well-defined structure that could be used to inspect novelty, and to persist state changes to a sort of write-ahead log that could be replayed to recover from a failure.

So far this is little more than a collection of ideas, though. Was there some use case you had in mind for this? I'd like to at least understand it so they can be accommodated in a general change log.

https://github.com/rbrush/clara-rules/issues/16#issuecomment-28105373

rbrush avatar Jan 22 '14 04:01 rbrush

Is a tx queue going to be added soon?

den1k avatar Nov 17 '17 02:11 den1k

I think I added something like a tx report queue in Precept that leverages the clara.listeners namespace and core.async.

I've been working on a devtool for Precept that tracks changes in greater detail and can also send change events over a socket. The greater detail is just information Clara uses for its rule explanations. Those changes are here I think: https://github.com/alex-dixon/clara-rules/tree/issue-307

Each change event is assigned a state index (which corresponds to number of fire rules calls) and an event index (which corresponds to an individual rule inserting or retracting a fact).

Not sure if any of this would be totally relevant to a tx-report-queue implementation in Clara, or for your use case. I'm happy to provide more information if it would help though.

alex-dixon avatar Nov 17 '17 15:11 alex-dixon

https://github.com/CoNarrative/precept

blak3mill3r avatar Mar 30 '20 01:03 blak3mill3r