|
|
|
|
|
by susi22
4136 days ago
|
|
Has anybody in the client side community ever made the connection to rules engines?
This flow of logic is awfully close to how a rule engine works. I wonder if people will at some point arrive at it. There isn't a whole lot of rules engine in JS. Just nools [1] which is huge. I'd love to see a very simple forward chaining rule engine + Immutable + React and see how that would work out. My guess is that they aren't popular at all because they have the notion of being enterprisey (Drools/Jboss). I'm a big fan of them. They /can/ make life & code very nice and elegant. Maybe somebody writes an JS adapter to clara rules [2]. [1] https://github.com/C2FO/nools [2] https://github.com/rbrush/clara-rules |
|
The Rete algorithm (which is the underlying algorithm of most rule engines) trades off memory use for an O(1) execution time (where n==1 and n is the number of rules in the system). You really only gain any benefit once the number of rules grows significantly, and by then memory usage is significant enough that I wouldn't want it running in my browser. If I had a the need for a rule engine in the browser, I would invest most my effort on offloading rule processing to the server instead.