Migration of o.e.s.m.rule.runtime to o.e.s.automation.* [message #1719275] |
Wed, 06 January 2016 18:07 |
Karel Goderis Messages: 198 Registered: March 2014 |
Senior Member |
|
|
All,
Cfr a post elsewhere on the forum, I now have a bespoke CalDAV server running inside the ESH runtime. The CalDAV server can be used to inject Automation Rules into the runtime using a standard calendaring application like iCal or Outlook, but it also can expose for example Rules from the RuleRegistry.
The interconnect from the CalDAV servlet to the Rule back-end still has to be developed, and hence, my question: If I understand well we have currently two parallel rule engines in the core. The new Automation component, and the old Quartz-based engine driven by the DSL .rules model. In order to focus my efforts, I would like to understand what the migration roadmap is from the old to the new engine, e.g. if this the intention of course. Who can enlighten me?
I can perfectly listen for events emitted by the Quartz scheduler and track that way which rules are getting scheduled in the Quartz scheduler (and then expose them through CalDAV to the user; this is for the *rule.runtime stuff), but I can also listen for Events from the RuleRegistry of the Automation component. I would like to avoid do do both.
From the injection point of view, I would as well add some Trigger Module(s)/Handlers that support RFC 5545 scheduling. In fact, reading up on that matter, it seems that world+dog is in favour if RFC5545 over cron, but the + side is that by defining recurring events in any calendaring app, you would have a 1 on 1 match with the Trigger module that can adhere to such a schema since these days they all use RFC5545 anyways.
Karel
|
|
|
Re: Migration of o.e.s.m.rule.runtime to o.e.s.automation.* [message #1720005 is a reply to message #1719275] |
Wed, 13 January 2016 16:33 |
Kai Kreuzer Messages: 673 Registered: December 2011 |
Senior Member |
|
|
Hi Karel,
Sorry for the late reply!
Regarding the rule engine: Yes, we currently have two of them and the plan is to get rid off the old one. I would rather like to introduce a new RuleProvider, which reads the DSL rules and creates rules for the new rule engine (which will then also require an XbaseActionHandler that knows how to execute that stuff). Similar things are done here as well (for the Python rule support of openHAB 1): https://github.com/eclipse/smarthome/pull/813. Timewise, I cannot really tell when I could find time for this. If there are others who would be willing to work on this, it would be perfect...
For openHAB 2, I want to introduce the new rule engine as an experimental feature soon already. And as you have powerful enough hardware, I do not see a reason why you shouldn't even run both engines in parallel.
So coming back to your questions: You should definitely head for the new rule engine!
Regarding cron vs. RFC 5545: I have to admit that I hear for the first time about RFC 5545 - but looking at it, I agree that we could drop Quartz, since the main reason for it was its support for cron. Since we want to strip down ESH to Java 8 CP2 and Quartz is a major obstacle on this, I would be actually very happy to have an alternative. But when going for RFC 5545: Do you know about a good open source scheduler library that could be used for this?
Best regards,
Kai
|
|
|
|
|
|
Re: Migration of o.e.s.m.rule.runtime to o.e.s.automation.* [message #1730643 is a reply to message #1720005] |
Wed, 27 April 2016 10:26 |
Karel Goderis Messages: 198 Registered: March 2014 |
Senior Member |
|
|
Kai Kreuzer wrote on Wed, 13 January 2016 11:33Hi Karel,
Regarding the rule engine: Yes, we currently have two of them and the plan is to get rid off the old one. I would rather like to introduce a new RuleProvider, which reads the DSL rules and creates rules for the new rule engine (which will then also require an XbaseActionHandler that knows how to execute that stuff). Similar things are done here as well (for the Python rule support of openHAB 1): https://github.com/eclipse/smarthome/pull/813. Timewise, I cannot really tell when I could find time for this. If there are others who would be willing to work on this, it would be perfect...
For openHAB 2, I want to introduce the new rule engine as an experimental feature soon already. And as you have powerful enough hardware, I do not see a reason why you shouldn't even run both engines in parallel.
So coming back to your questions: You should definitely head for the new rule engine!
@kaikreuzer Found it back. Cfr the above, is there anything I can pick up / do?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03736 seconds