用于集中和维护规则的规则引擎的替代方案
我正在尝试找到合适的解决方案/框架来集中和维护规则。规则数量巨大且经常变化。我已经使用过像 Drools 这样的规则引擎,但发现它们不适合,因为规则执行的复杂性会影响可维护性和规则集中开销(规则引擎通常需要另一个存储库系统来保存规则)。
我正在寻找的解决方案/框架理想地应该允许我用标准编程语言(例如 Java)编写规则,而集中和维护规则的开销很少。
非常感谢。
I'm trying to find an appropriate solution/framework to centralize and maintain rules. The number of rules is huge and they change frequently. I've gone through rules engines like Drools but find them unsuitable for reasons like the complexity of rules execution which affects maintainability and rules centralization overheads (rules engines often require another repository system to hold the rules).
The solution/framework I'm looking for should ideally allow me to write rules in standard programming languages such as Java with little overheads to centralizing and maintaining rules.
Big thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Drools 5.2.0 将拥有新的解析器 API,理论上,它允许您避免 DRL 并用 Java 编写规则引擎的左侧 (LHS),就像您使用 JPA 2.0 标准 API 编写 JPA 查询一样。
Drools 5.2.0 will have the new parser API, which - in theory - allows you to avoid DRL and write a rule engine's Left Hand Side (LHS) in Java, much like you'd write a JPA query with the JPA 2.0 criteria API.
您是否尝试过Spring对动态语言?您可以调用用 Groovy 或 JRuby 等语言编写的 bean(如果您关心的话,我不久前编写了 JavaScript 支持)。这些动态 bean 的源代码可以提取到单独的文件中,定期扫描这些文件以发现运行时的更改。
简单得多,但仍然强大。
Have you tried Spring support for dynamic languages? You can invoke beans written in languages like Groovy or JRuby (I wrote JavaScript support some time ago if you care). Source code of these dynamic beans can be extracted into separate files which are scanned periodically to discover changes at runtime.
Much simpler, yet still powerful.