eigr / massa

A Stateful Serverless framework on the BEAM VM
https://eigr.io
Apache License 2.0
54 stars 5 forks source link

Activate entities by Rules #119

Open sleipnir opened 2 years ago

sleipnir commented 2 years ago

This is a feature proposal.

We can add activation rules processing for entities, so we could assess whether a given entity should be activated (called) only if it meets the requirements proposed by the rules.

What should we change for this to work?

  1. Add a rule evaluation engine (options: Drools, Retex, Ruler)
  2. Add a CRD where the user can describe the rules in some kind of language/DSL.
  3. Add the call to the rule evaluation engine to the message dispatching engine, passing the entity as an argument.
marcellanz commented 2 years ago

Interesting option. This could even be "asked" and a function itself can evaluate to the result of the decision. This way any languages or stacks rule evaluation library can provide an implementation.

sleipnir commented 2 years ago

Interesting option. This could even be "asked" and a function itself can evaluate to the result of the decision. This way any languages or stacks rule evaluation library can provide an implementation.

Yes, we can provide it as an adapter.