I've written a #ruby library for database-backed production rules: https://sr.ht/~czan/active_record_rules
At $dayjob our main project is a #ruby on #rails project. We have a lot of callbacks on our ActiveRecord models with some complex logic behind them, which has generally been pretty painful. We tend to have three problems:
I've always been interested in using production rules as a tool for programmers to express business logic, in the vein of Clara Rules (https://www.clara-rules.org/). I've never been able to find one that works on top of a relational database, though, despite finding literature on the concept from the early 1990s.
ActiveRecordRules is my attempt to write a system to do this. I read about RETE/TREAT, and other algorithms for production systems, but in the end I just rely on Postgres to be smart. 🙂
My question is: does anyone know of other libraries that solve a similar problem? I'm interested in anything resembling a production rules system, no matter what language it's written in.
=> More informations about this toot | More toots from carlozancanaro@aus.social
text/gemini
This content has been proxied by September (3851b).