This is one of those wishy-washy questions but hopefully will lead to some good answers as I think the issues comes up often. I am building a subscription based platform/site where people are able to setup their own services with unique rules. There are millions of combinations of these rules that make up the essence of a specific subscription.
For example: A dude owns some club and sets up a service with a rule that allows any member to access facilities only once a day, thereafter access is denied. A user subscribed to that service will have these rules imposed on him/her. Is there a clean way to make this configurable without over-engineering it?
Some of the options I have considered:
Hierarchical database acting as a decision tree.
Saving rules in a table like [id, name, expression, value] where the expression could be a set of well defined operators or even regex and the value would be used in testing against input. eg: [1, visitations, < , 20] some fancy (and probably very unsave eval code can then be used to resolve the rule)
bobthecow/Ruler
Anyways, just in case there are specific implementations for this kind of problem, i'm using php with the laravel framework.