Skip to content

ccwxl/LiteRule4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiteRule4j

LiteRule4j is a lightweight rule engine written in Java, built on Akka Actor.
It is designed for IoT message processing, rule chains, and event-driven workflows.


🔍 Features

  • Built on Akka Typed / Actor Model, supports async & concurrency
  • Supports Rule Chains: multiple RuleNode executed in sequence or parallel
  • Flexible Connections (Metadata) between nodes
  • Fault tolerance with SupervisorStrategy
  • Easy to integrate and extend

📦 Project Structure (Simplified)

Module / Package Description
actor Core Akka actors (AppActor, RuleChainActor, RuleNodeActor)
actor.lifecycle Message definitions (RuleChinaInitMessage, RuleEngineMessage, etc.)
api.metadata Rule chain data model (RuleChinaDefinition, Node, Connection, Metadata)
api Context support (RuleNodeCtx, ActorSystemContext)

🚀 Getting Started

  1. Clone the repo

    git clone https://github.com/ccwxl/LiteRule4j.git
    cd LiteRule4j
  2. Build

    mvn clean package
  3. Import into your project

  4. Define a RuleChain and initialize actors

     RuleMessage message = RuleMessage.builder()
                         .ruleChainId("chain_has_sub_chain_node")
                         .msgType("rule_chain_init")
                         .putData("index", i)
                         .build();
     controller.exec(message);

⚙️ Extensions

  • Router (RoundRobin, PoolRouter) for parallelism
  • SupervisorStrategy for fault recovery
  • Dispatcher, mailbox configs (TODO)
  • Cluster (TODO)

🧩 Use Cases

  • IoT device message processing
  • Alerting and monitoring rules
  • Dynamic rule chain execution

📄 License

See LICENSE file.

About

LiteRule4j is a lightweight rule engine for Java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages