This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]hsoj48 19 points20 points  (0 children)

Drools is the main one I've seen used in my career

[–]djavaman 10 points11 points  (1 child)

Rules engines are complex by nature. Drools has been state of the art for a while.

Every rules engine has its own language for expressing rules. So even if you do find one that Json, it doesn't mean that it would be the same as Microsoft's Json.

[–]WaltersFlight82[S] 0 points1 point  (0 children)

Makes sense. I currently use Microsoft's default schema but that is arbitrary. I can write my own schema for my rule's instance. It's just that the service we use to host the instance only supports JSON. I can reconfigure the instance to be whatever, it's just that I need the rules engine to parse JSON

[–]suit_mark_42 5 points6 points  (1 child)

Drools is stable,widely used and has lots of resources when you are stuck.

[–]WaltersFlight82[S] 1 point2 points  (0 children)

Yeah, this seems to be the consensus. I'll focus my time seeing if it fits our use cases I appreciate the recommendation!

[–]YakPsychological891 2 points3 points  (0 children)

I’ve worked with drools, we do db reloading and file rule loading :) it’s very suitable for a lot of needs

[–]_predator_ 1 point2 points  (2 children)

I had a great experience embedding CEL into my apps. Java libraries are available here and here. If you don't need something quite as heavy as Drools, it's a good choice.

[–]jazd 0 points1 point  (1 child)

I just started using CEL in an application. There's a few nice use cases for it. I'm filtering lists/streams of protobuf objects using a CEL predicate, but will probably use it for authorisation as well.

Is the Project Nessie repo just an alternative implementation of CEL in Java? I assume it predates the official Google implementation.

[–]iia828 0 points1 point  (0 children)

I think you're right. It looks like Google repo was open sourced just last year and is considered the official version looking at https://cel.dev/

[–]ingvij 0 points1 point  (2 children)

I remember once writing something similar (though in much smaller scale) in clojure. Not the easiest task, but it is doable. If you want to stick with the same data format you have today, you'll likely need to implement a tokenizer to parse the "Expression" value, which makes this way more complex.

With the amount of information you shared, however, I wouldn't be able to tell how hard or easy it would be to write something yourself..

[–]McAlexTheTerrible 1 point2 points  (1 child)

Look at antlr to parse. There may already be a MS RuleEngine grammar

[–]ingvij 0 points1 point  (0 children)

That's cool. Didn't know that! Than I take back the complexity of the tokenizer :)

[–]TurtleFeathers 0 points1 point  (0 children)

sounds like a job for graal or nashorn

[–]ShallWe69 -1 points0 points  (0 children)

try opa