打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Drools - Architectural Summary
userphoto

2005.10.27

关注

Drools is a forward chaining inference expert system implementation based on Charles Forgy‘s Rete algorithm. Drools is modular in design with each part of the system being treated as a self contained projects, tied together via a top level project - this is made possible via maven‘s multi-project ability. While Maven is the preferred build system we maintain an Ant build system in parallel.

The Rete algorithm is contained in the drools-core module, org.drools.reteoo, it is mostly package protected and is exposed via the [SPI] layer. drools-smf, Semantics Module Framework, facilitates the creation of rule-sets via a collection of factories providing implementations for the various spi interfaces; although it is possible to create rules directly as implementations of the spi interfaces, referred to as "native" rules. drools-smf is configured at runtime, where the various semantic modules are registered, using the given namespace for lookup, against the appropriate factory within the semantic module repository.

Drools Modules

Drools currently has four semantic implementations; python, groovy, java and pojo which all depend on drools-base for common functionality. To compliment this we have drools-io which is an XML driven system to create rule-sets. drools-io itself knows nothing about these semantic implementations instead it creates a Configuration object ,a hierarchical representation of the element, which is then passed to a looked up factory. The factory is determined by the local name of the semantic module which itself retrieved from the semantic repository via the namespace.

Drools also offers a certified JSR-94 compatible API which is a standardized way to access a rule system - it does not standardize the way in which the rules themselves are written. It mostly takes the form of wrappers and helper methods for the drools-core and drools-io.

To understand how the drools modules relate to the user its helps to think of it in terms of layers.

Drools Layers

The above diagram shows that drools-core is the root of the system and, as previously mentioned, exposes itself via the spi layer. Code can be written directly against the spi layer or it can leverage the smf layer - where the smf layer includes the various implementations shown below. The smf layer can then be driven by the currently provided xml driver or third party driver - as drools matures it is hoped that none-xml based drivers with less verbosity and closer alignment with java will be offered.

Drools Semantic Modules

Drools also has two modules for examples which are covered in Tutorials and Examples

  • drools-examples
  • drools-examples-jdk5
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
【新機能】AWS LambdaがPythonに対応しました #reinvent | Developers.IO
InfoQ: Eric Evans on Domain Driven Design
采用普通数字IO实现SPI通信的关键--一窍不通
STM32 开发板DIY测试第六步(续2)-JLINK调试TFT液晶 - 『ARM DIY...
spi_lcd_flash
R0: Preliminaries
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服