将基于 SQL 更新的应用程序转换为基于 java 规则的应用程序
我有一个以数据为中心的&数据敏感应用程序,使用java编写,但几乎所有业务逻辑都维护在.sql文件中。
这些sql文件被一一执行,临时表由这些sql文件创建和更新。
在内部,这些 sql 文件会在临时表上触发更新查询,并在各种条件下使用可用数据值。
最后将临时表转储到物理表中。
我们计划将其转移到基于 java 规则的应用程序,因为 SQL 脚本变得越来越大并且难以理解和维护。
计划使用 Lucene & 将所有数据存储在内存中它的 RAMDiirectory,什么是构建规则的首选(这些只不过是更新 sql 中的查询)
正在寻找 @ 脚本语言来拥有动态规则,但是脚本(rhino / groovy) 与 sql 文件具有相同的特征(难以编写和维护)
请发表您的建议。
提前致谢!!
I have an data centric & data sensitive application, which is written using java, but almost all the business logic is maintained in a .sql files.
These sql files are executed 1 by 1 , temporary table is created and updated by these sql files.
Internally these sql files fire update queries on temporary table with available data values on various conditions.
finally the temporary table is dumped into a physical table.
We are planning to move this to java rule based application as sql scripts are getting huge and hard to understand as well as maintain.
Planning to have all the data in memory using Lucene & its RAMDiirectory, what would be the preferred choice for building rules (these are nothing but update queries in sql)
Was looking @ scripting languages to have dynamic rules, but scripts (rhino / groovy)
have same characteristics as that of sql files (hard to write & maintain)
Please post your suggestions.
Thanks in advance!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们公司使用 Drools。对我们来说真的很棒。 Drools 通常让您以基于 XML 的格式编写规则,但我们只是扩展了它们的一些类,以便我们可以用 Java 编写规则(允许我们在运行时调试规则)。
Our company uses Drools. Works really great for us. Drools normally has you write your rules in an XML-based format, but we just extended some of their classes so we could write our rules in Java (allows us to debug the rules at runtime).
我们还使用 JBoss Rules / Drools。较新的版本(> 4.0.0)有一个很好的 DSL,完全可读和可维护。不再需要 XML。
We also use JBoss Rules / Drools.The newer version (> 4.0.0) has a nice DSL that is perfectly readable and maintainable.No more XML is needed.