# frequent-rule-updates

Published articles for frequent-rule-updates.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Fact Evaluation in Millions: Scalable Rule Executor Service

DevFeed: [Fact Evaluation in Millions: Scalable Rule Executor Service](<https://devfeed.tech/articles/fact-evaluation-in-millions-scalable-rule-executor-service-20136.md>)

Original publisher: [Read original article](<https://medium.com/myntra-engineering/fact-evaluation-in-millions-scalable-rule-executor-service-921a2a19068e?source=rss----7484818e9f88---4>)

Author: Nikhil Anand

Published: 2024-10-01T13:47:49Z

Content type: article

Language: en

Sources: [Myntra](<https://devfeed.tech/sources/myntra.md>)

Topics: [rule-engine](<https://devfeed.tech/topics/rule-engine.md>), [sharding](<https://devfeed.tech/topics/sharding.md>), [performance-engineering](<https://devfeed.tech/topics/performance-engineering.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [Service-Level Agreements](<https://devfeed.tech/topics/service-level-agreements.md>)

Tags: [all](<https://devfeed.tech/tags/all.md>), [assessment](<https://devfeed.tech/tags/assessment.md>), [availability](<https://devfeed.tech/tags/availability.md>), [broker](<https://devfeed.tech/tags/broker.md>), [cases](<https://devfeed.tech/tags/cases.md>), [changes](<https://devfeed.tech/tags/changes.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [core](<https://devfeed.tech/tags/core.md>), [details](<https://devfeed.tech/tags/details.md>), [domain](<https://devfeed.tech/tags/domain.md>), [ecosystem](<https://devfeed.tech/tags/ecosystem.md>), [engine](<https://devfeed.tech/tags/engine.md>), [essential](<https://devfeed.tech/tags/essential.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [evaluations](<https://devfeed.tech/tags/evaluations.md>), [executor](<https://devfeed.tech/tags/executor.md>), [first](<https://devfeed.tech/tags/first.md>), [frequent-rule-updates](<https://devfeed.tech/tags/frequent-rule-updates.md>), [functional](<https://devfeed.tech/tags/functional.md>), [rule-engine](<https://devfeed.tech/tags/rule-engine.md>), [rules-in-millions](<https://devfeed.tech/tags/rules-in-millions.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [service](<https://devfeed.tech/tags/service.md>), [stateless](<https://devfeed.tech/tags/stateless.md>)

### AI overview

Myntra's Rule Executor Service combines Easy Rules with in-memory sharding and parallel execution to evaluate large rule and fact sets; the stated target is millions of each within 30 seconds. The excerpt says Drools used 60 GB of RAM for about 300,000 rules in preliminary testing and that changing rules required rebuilding knowledge bases across machines. Easy Rules accommodated millions of rules on one server in the proof of concept, but its evaluation latency was high, prompting the custom service. Clients can use repository-based onboarding, where the service fetches rules through a configured CRUD handler; client-based onboarding, where clients send rules; or a default mode without configured sharding, described as suitable only for limited rule and fact counts. Category priorities determine which results take precedence. Shard levels distribute rules and facts by configured keys, while separate I/O and computation thread pools handle dependent shard orchestration and evaluations to avoid deadlock. The excerpt states requirements for immediate reflection of confirmed rule changes and rule details in evaluation results.

### Source excerpt

Overview The Rule Executor Service at Myntra stands out as a pivotal tool in the domain of rule engine. While, at a glance, one might wonder what sets it apart from the myriad of rule engines available today, the difference is profound. In Myntra ecosystem, supporting numerous pricing use cases necessitated building a capability that is engineered to handle vast volumes of rules, processing millions of facts against similar scale in terms of rules for multiple tenants with high reliability, performance, availability and consistency. In order for the system to be performant and use as a broker for all Myntra systems preference was given to scalability, and ability to persist and evaluate large large number of rules with low latency evaluation window. Functional & Non-Functional Requirements Let's first delve into the functional and non-functional requirements that necessitate the creation of the Rule Executor Service. Functional Requirements Dynamic Rule Management: The rule engine should be designed with adaptability as a core principle, enabling administrators or users to effortlessly update, introduce, or dynamically remove rules through the user interface as the landscape evolves. Immediate Rule Reflection: Following any changes to the rule set, the rule engine should ensure that all future fact evaluations reflect the latest rule standards with high degree of consistency. Once the creation, updating, or deletion of a rule has been confirmed as successful for the user, no subsequent fact evaluations should be conducted with the outdated rules from that timestamp onwards. This necessitates the updates to be immediately reflected in the knowledge base of the rule engine. Fact Assessment Details: Each evaluated fact should be supplemented with essential details, including the associated rule's ID, name, and description against which it was evaluated. In the absence of configured rules for the provided fact, enrich the fact by incorporating pertinent details regardin