Skip to content

Conversation

@lukecarr
Copy link
Collaborator

@lukecarr lukecarr commented Apr 28, 2024

Currently, we only have one ruleset implemented within Mimir. This ruleset treats rules with more requirements as more "specific" and only evaluates the most specific rule.

This behaviour is desirable for performance because we can sort the ruleset in descending order of specificity and avoid iterating over the entire ruleset (breaking out early if we find a matching rule).

However, there are scenarios in which we might want to willingly evaluate all rules in a ruleset, irrespective of specificity. For example, suppose we use a ruleset to store the behaviour for unlocking achievements. In that case, we want to evaluate and find all achievements that should be unlocked, not just the achievement with the most requirements (this is the behaviour that would currently happen in Mimir).

With this in mind, we should refactor the codebase to replace the concrete implementation of the current ruleset with a trait-based approach to define rulesets.

@lukecarr lukecarr added the enhancement New feature or request label Apr 28, 2024
@lukecarr lukecarr self-assigned this Apr 28, 2024
@lukecarr lukecarr requested a review from a team April 28, 2024 20:32
@linear
Copy link

linear bot commented Apr 28, 2024

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 29, 2024

Deploying mimir with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3f029d8
Status:🚫  Build failed.

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants