viatra / EMF-IncQuery

This repository is only kept for historic reasons. All development happens on eclipse.org
http://eclipse.org/viatra
13 stars 4 forks source link

Trigger engine code review #357

Closed ujhelyiz closed 11 years ago

ujhelyiz commented 11 years ago

Trigger engine needs review. Issues:

szabta89 commented 11 years ago

For the record: this first attempt deals with the current state of matcher callbacks. An updated version will be available later which uses the callback branch.

szabta89 commented 11 years ago

@abelhegedus Please review the changes and if you find it ok, I will start trying out the callback branch.

szabta89 commented 11 years ago

@abelhegedus You will see that I have created an interface for the RuleFactory, but in my opinion it can not be assigned to the RuleEngine itself as it needs the corresponding IncQueryEngine of the Agenda to instantiate rules.

abelhegedus commented 11 years ago

Okay, I think your implementation with the RuleFactory is OK.

Next step, please look at the violations in Sonar and correct them (e.g. using proper loggers):

I also think that the API classes should be put in an .api package.

szabta89 commented 11 years ago

@abelhegedus Please take a look at the new code and on the TriggeredQueryResultMultiMap class, because there were major modifications in the code of the Rule Engine. Please also check whether the JavaDoc is fine now.

abelhegedus commented 11 years ago

Thanks, the new code looks fine. Some comments:

szabta89 commented 11 years ago

Please place the TRQM class wherever you want. The afterUpdateCallback was commented out because there is no such method anymore. The Agenda is automatically refreshed by the rules and the agenda has a register method which can send the notifications for the first time to the observer. See the interaction between the Rules and Agenda for an example.

abelhegedus commented 11 years ago

Further considerations: the trigger engine uses the managed engine at the moment. Which means that a wipe or dispose will stop the triggerengine from functioning. Thus, the following should be decided:

Since the constructors of Agenda are protected, we will only need to ensure the proper engine handling in the RuleEngine.

Related:

ujhelyiz commented 11 years ago

Meeting log: we should use a managed engine. Further related todos are described in #365.

abelhegedus commented 11 years ago

Some more questions:

abelhegedus commented 11 years ago

As discussed on the meeting, the current state of the trigger engine code will be moved, and other issues will be created for further changes required before making the API public.