Using TopCoder

Java

Rule Engine Version 1.0

STATUS KEY : Specification Design and Architecture Development and Testing Complete
  • Overview

    The Rule Engine is the complete set of code necessary to run the TopCoder Rules Engine.

  • Functionality

    A rule engine is a system that supports declarative programming through a system of rules and facts. The facts represent the state of the system. The rules are if-then statements about the facts in the system. Rules may cause new facts to be asserted or existing facts retracted when the current set of facts satisfies some criteria. Rules may also cause observable Java events to occur. The rule engine uses the Rete algorithm to quickly process the changes caused by changes to the set of facts, sacrificing storage space for execution speed.

    The TCS rule engine consists of multiple components. This component is responsible for compiling the Rete network from a set of rules created by the Rule Engine Persistence component. This component will return the root node of the compiled network.

    A rule engine could be useful in implementing an e-commerce site that offers a variety of discounts based on the size of an order, preferred shopper status, and seasonal offers. In such a system, the business logic for determining exactly what the correct discount should be can be complex, and can change from day to day with special promotions. Implementing this logic in Java would be a recurring, error-prone chore. Instead, this logic can be formulated as a set of rules in a rule engine, making it manageable and comprehensible, yet still scriptable.
  • Technologies

    Availability

    Version 1.0
Adobe Acrobat is required to view TopCoder Software specification documentation.
  Java Base Exception 20080227 Encapsulates custom exception functionality. more Download
  Java Complex Boolean Expression Evaluator 20080913 Provide complex Boolean expression evaluation allowing for pluggable expression statements. more Download
  Java Configuration API 20110518 Provides an API for configuration objects. more Download
  Java Configuration Manager 20110518 Centralizes the management of and access to application level configuration files. more Download
  Java DB Connection Factory 20070727 This component abstracts the use of DataSources and JDBC URLs in the creation of SQL Connections. more Download
  Java ID Generator 20071206 Provides high performance key generation services. more Download