Skip to content

robotiko/rules

 
 

Repository files navigation

Under construction - just finishing c implementation with two objectives

  • boost performance 3x to 10x depending on the scenario
  • support polyglot platfrom

Durable Rules

Durable Rules provides real-time, consistent and scalable coordination of events. With Durable Rules you can track and analyze information about things that happen (events) by combining data from multiple sources to infer more complicated circumstances.

A forward chaining algorithm (A.K.A. Rete) is used to evaluate massive streams of data. A simple, yet powerful meta-liguistic abstraction lets you define simple and complex rulesets. Below is an example on how easy it is to define a couple of rules that act on incoming web messages.

var d = require('durable');
d.run({
    approve: {
        r1: {
            when: { $lt: { amount: 1000 } },
            run: function(s) { s.status = 'pending' }
        },
        r2: {
            whenAll: {
                $m: { subject: 'approved' },
                $s: { status: 'pending' }
            },
            run: function(s) { console.log('approved'); }
        }
    }
});

Durable Rules relies on state of the art technologies:

  • Node.js is used as the host. This allows leveraging the vast amount of available libraries.
  • Inference state is cached using Redis, which lets scaling out without giving up performance.
  • A web client based on D3.js provides powerful data visualization and test tools.

Resources

To learn more:

Blog posts:

About

Durable Rules Engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published