Samudra
Samudra

Reputation: 1233

Is there any rules engine implemented on NodeJS / in Javascript?

I need a lightweight rules engine. We have around 50 rules right now, but the rules keep changing frequently.

We could use Drools, but I figure that would be overkill. Are there any lighter, F/OSS implementations?

I am aware of the other similar question, but that is 2 years old and does not have a good answer. (and I do not have enough rep to comment on that question)

Upvotes: 40

Views: 36272

Answers (7)

joyrexus
joyrexus

Reputation: 400

For anyone needing a simple evaluation engine, rulepilot is ideal.

regent is another nice project, esp. if you want a straightforward interface for building your rulesets.

Upvotes: 0

Cache
Cache

Reputation: 328

I'm much later as well, but since you're asking for a lighter option, consider json-rules-engine. I authored this library in an attempt to create a simple, performant rules engine with easy rule persistence (rules are expressed in json).

It's not meant as an enterprise solution, and is less ambitious than nools. Many businesses have relatively basic needs when it comes to rules engines: boolean logic, comparison operators, and (ideally) human readable rules.

Your use case of having only 50 rules that change often(i.e. highly configurable), is really the target audience for this library.

Upvotes: 14

enriched
enriched

Reputation: 400

I am even later to the game, but if people are still looking, durable_rules is a great project that I have been using.

durable_rules stores state in redis and uses a Rete algorithm that Jesus Ruiz cooked up to do inference in a distributed way. The project is actively supported and even has TypeScript support if you are into that sort of thing.

Upvotes: 6

Fred Strauss
Fred Strauss

Reputation: 1475

I'm obviously very late to the game here but I've used node-rules with some success.

Upvotes: 5

Ivo Nascimento
Ivo Nascimento

Reputation: 53

I develop this one. Hope you found interesting to you needs.

From description:

Business Rules Engine is a kind of software developed to support environments where the rules changes in a regular base like risk evaluation, text analysis, data mining and others softwares designed to decision making.

Upvotes: 5

Johny Jose
Johny Jose

Reputation: 533

I've made a new node package called node-clips which allows you to integrate the popular CLIPS (C Language Integrated Production System) rule engine into your node applications.

https://github.com/atrniv/node-clips

CLIPS is a productive development and delivery expert system tool which provides a complete environment for the construction of rule and/or object based expert systems. Created in 1985, CLIPS is now widely used throughout the government, industry, and academia.

Checkout the official CLIPS documentation for more information : http://clipsrules.sourceforge.net/

Upvotes: 6

diversario
diversario

Reputation: 1014

There's also nools, give it a try.

Upvotes: 20

Related Questions