GoRules and Drools: Understanding the Differences

Speed or Complexity? Why GoRules.io is the Lightweight Alternative to Drools.

Aug 10, 2023
GoRules and Drools: Understanding the Differences

Selecting an appropriate rules engine is a crucial aspect of incorporating business rules into software applications. GoRules and Drools are two distinct options available for this purpose. While both engines provide similar functionality, they possess significant differences that affect their suitability for specific requirements.

GoRules is a lightweight no-code rules engine that uses a RESTful API or language bindings to execute rules. It offers a user-friendly and simple design, along with a web interface for managing rules.

Drools, on the other hand, is a Java-based rules engine that uses a rule-based approach to execute rules. Although it requires some technical expertise to use effectively, it is highly customizable and can handle complex rule processing.

In this comparison of GoRules and Drools, we'll take a closer look at the differences between these two rules engines. We'll examine factors such as ease of use, implementation, performance, customiztation you make an informed decision about which one is the right fit for your needs.

Ease of use

Ease of use is a crucial factor in the adoption and success of a rules engine for business applications. If the rules engine is too complicated to set up or operate, it can deter business users from using it, leading to low adoption rates and ultimately a waste of investment.

GoRules Decision Graph EditorGoRules - Graph Editor

GoRules provides a simple and user-friendly interface, making it easy to set up and configure. It's straightforward design requires minimal technical expertise to use, making it an excellent choice for businesses that lack technical resources.

Drools Decision Graph EditorDrools - Graph Editor

Drools requires a certain level of technical expertise to operate effectively. The learning curve for Drools is steeper due to its advanced features and customization options, and the rule creation process is more complex. However, Drools makes up for this with its high level of customization and extensibility, which allows businesses to create complex rules and tailor the engine to meet their unique requirements.

To compare usage of both editors visit DMN official editor and GoRules editor.

Implementation

When it comes to implementation flexibility, Drools and GoRules are very similar and either rules engine can be set-up pretty quickly depending on your deployment preference:

  • Micro-services (REST): Both options are supported, although running Drools in horizontally scalable environment can be difficult
  • Pub-sub (e.g. Kafka): Both options can be configured, and implemented in a way to support pub-sub model
  • Integration into existing services: GoRules supports Rust, Python and Node.js, whereas Drools supports JVM compatible languages (Java, Scala, Kotlin)
  • Serverless: Both options are supported, however, cold-starts with GoRules are much faster and lighter (as JVM + loading rules during start can add huge memory and processing overheads). To learn how to use GoRules in serverless refer to the following blog.

Overall, if you are using Java you are more likely to lean towards Drools, and if you are using other languages (e.g. Node.js, Python, Go, Rust) GoRules might be a better option for you.

Performance and Reliability

Both options offer great performance with some caveats.

Drools is written in Java and uses DMN files written in XML which are loaded in memory ahead of time and executed on-demand. GoRules is written in Rust and it uses JDM (JSON Decision Model) files which are stored in JSON file format.

GoRules rules engine has been specifically designed to handle live-loading of rules in real-time, making it a powerful choice for businesses that require dynamic rule processing capabilities. Drools has been known to struggle with live-loading rules, particularly in high-load environments. This can cause significant delays and performance issues, making it a less desirable option for businesses that require dynamic rule processing capabilities.

Breakdown

  1. Service boot time: GoRules is a winner here. It does not need to compile all rules before service is started, and instead does this on-demand. For reference in Drools it can take few seconds and sometimes minutes before service is ready (depending on number and size of rules).
  2. Reliability: GoRules provides you with ability to scale horizontally with ease, whereas Drools does not offer this out of the box. Additionally, slow start-up time can lead to unexpected downtime (as only 1 service is running).
  3. Execution performance: Drools is faster, because it utilises ahead-of-time approach. It sacrifices boot time for better runtime performance. To achieve similar performance with GoRules, you can save "hot" decision models in memory (using getDecision or createDecision method).
  4. Loading performance: GoRules is much faster when it comes to interpretation and parsing of the rules. This is why we can afford to do loading of rules just-in-time.
  5. Scalability: Both options are very scalable, but they use different approaches. Drools utilises vertical scalability, whereas GoRules uses horizontal.

Summary

Based on the breakdown above, here are a few reasons to try GoRules over Drools:

Microservices Architecture: GoRules is built on a lightweight microservice architecture, which emphasizes speed and scalability. It uses a RESTful API to provide seamless integration with other software applications. Drools, on the other hand, has a modular architecture that supports multiple languages, including Java and Kotlin. It leverages the JVM to provide cross-platform support and flexibility.

Scalability: Both engines offer scalability, but they approach it differently. GoRules.io is designed to be horizontally scalable, allowing businesses to add or remove processing nodes as needed to meet changing demands. Drools is designed to be vertically scalable, allowing businesses to add more resources to a single processing node to improve performance.

Deployment Options: GoRules and Drools offer different deployment options. GoRules can be deployed on-premises or in the cloud, providing businesses with flexibility in their deployment choices. Drools is primarily deployed on-premises, although it can be deployed in the cloud with some additional configuration.

Ease of Use: Both engines are designed to be easy to use, but they have different approaches. GoRules emphasizes simplicity and ease of integration with other software applications. Drools, on the other hand, is designed to be a comprehensive rules engine that provides flexibility and extensibility, but at the cost of increased complexity.

Get started with GoRules

Need help?

Get in touch for enterprise consultancy and support

Start integrating

Integrate in as little as 10 minutes with our evaluation API