On 27 July 2011 15:13, Edson Tirelli <ed.tirelli@gmail.com> wrote:
Hi Wolfgang,Thanks for the feedback. My comments.2011/7/27 Wolfgang Laun <wolfgang.laun@gmail.com>
On 26 July 2011 21:42, Edson Tirelli <ed.tirelli@gmail.com> wrote:
Drools (and most CEP products) do not enforce immutability because we are dealing with "representations of events" and not the events themselves. Representation of events are usually subject to data enrichment
In such scenarios, TMS for events become just an overhead.there is no need for truth maintenance;A fact derived from events exclusively would be an event and again immutable.
If the justification is immutable, there would be no need for TMS. On the other hand, if a justification contain non-events as part of it, it could be mutable, and in this case the justified fact should not be modeled as an event. If it is not an event, TMS should apply. The good thing about we discussing this is that it made me realize that some users might not be so strict when modeling their systems, and maybe instead of disabling TMS for "streams of events", this should be a per object type configuration?
Because of things like the ones above, I was considering creating an explicit concept for streams in Drools. They would be a first class concept in the engine and would be handled appropriately. They would be orthogonal to entry-points, and be used exclusively for events.
It's difficult (for me) to see what a "stream" should imply. Can you provide a concise definition? A "stream" should be for role event only, and its facts should be immutable (?) - what else?
Are there any good use cases for these "streams" that cannot be readily dealt with using events?Streams, from a user's perspective, are just a sequence of events that are channeled into the system, exactly like entry-points, but specialized for events. I am not convinced we should create this concept nor am I convinced that we should continue using entry points. The use of streams would only make explicit to users that they are exclusive for events (you can use any type of facts in entry-points) and the algorithms behind the scene are exclusive for events (entry points, if used like that, would select algorithms based on heuristics, transparently to users).