RuleGo
About
⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Details
- License
- Apache-2.0
Explore
Lightweight: No external middleware dependencies, efficient data processing and linkage on low-cost devices, suitable for IoT edge computing.
High Performance: Thanks to Go's high-performance characteristics, RuleGo also employs technologies such as coroutine pools and object pools.
Dual Mode: Embedded and Standalone Deployment modes. Supports embedding RuleGo into existing applications. It can also be deployed independently as middleware, providing rule engine and orchestration services.
Componentized: All business logic is component-based, allowing flexible configuration and reuse.
Rule Chains: Flexibly combine and reuse different components to achieve highly customized and scalable business processes.
Workflow Orchestration: Supports dynamic orchestration of rule chain components, replacing or adding business logic without restarting the application.
Easy Extension: Provides rich and flexible extension interfaces, making it easy to implement custom components or introduce third-party components.
Dynamic Loading: Supports dynamic loading of components and extensions through Go plugins.
Nested Rule Chains: Supports nesting of sub-rule chains to reuse processes.
Built-in Components: Includes a large number of components such as Message Type Switch, JavaScript Switch, JavaScript Filter, JavaScript Transformer, HTTP Push, MQTT Push, Send Email, Log Recording, etc. Other components can be extended as needed.
Context Isolation Mechanism: Reliable context isolation mechanism, no need to worry about data streaming in high concurrency situations.
AOP Mechanism: Allows adding extra behavior to the execution of rule chains or directly replacing the original logic of rule chains or nodes without modifying their original logic.
- Data Integration: Allows dynamic configuration of Endpoints, such as
HTTP Endpoint,MQTT Endpoint,TCP/UDP Endpoint,UDP Endpoint,Kafka Endpoint,Schedule Endpoint, etc.
Install RuleGo using the go get command:
```bash
go get github.com/rulego/rulego
RuleGo is a lightweight, high-performance, embedded, orchestrable component-based rule engine built on the Go language.
It can help you quickly build loosely coupled and flexible systems that can respond and adjust to changes in business requirements in real time.
RuleGo also provides a large number of reusable components that support the aggregation, filtering, distribution, transformation, enrichment, and execution of various actions on data, and can also interact and integrate with various protocols and systems.
It has a wide range of application potential in low-code, business code orchestration, data integration, workflows, large model intelligent agents, edge computing, automation, IoT, and other scenarios.
Features
Lightweight: No external middleware dependencies, efficient data processing and linkage on low-cost devices, suitable for IoT edge computing. High Performance: Thanks to Go's high-performance characteristics, RuleGo also employs technologies such as coroutine pools and object pools. Dual Mode: Embedded and Standalone Deployment modes. Supports embeddingRuleGo into existing applications. It can also be deployed independently as middleware, providing rule engine and orchestration services.
Componentized: All business logic is component-based, allowing flexible configuration and reuse.
Rule Chains: Flexibly combine and reuse different components to achieve highly customized and scalable business processes.
Workflow Orchestration: Supports dynamic orchestration of rule chain components, replacing or adding business logic without restarting the application.
Easy Extension: Provides rich and flexible extension interfaces, making it easy to implement custom components or introduce third-party components.
Dynamic Loading: Supports dynamic loading of components and extensions through Go plugins.
Nested Rule Chains: Supports nesting of sub-rule chains to reuse processes.
Built-in Components: Includes a large number of components such as Message Type Switch, JavaScript Switch, JavaScript Filter, JavaScript Transformer, HTTP Push, MQTT Push, Send Email, Log Recording, etc. Other components can be extended as needed.
Context Isolation Mechanism: Reliable context isolation mechanism, no need to worry about data streaming in high concurrency situations.
AOP Mechanism: Allows adding extra behavior to the execution of rule chains or directly replacing the original logic of rule chains or nodes without modifying their original logic.
Data Integration: Allows dynamic configuration of Endpoints, such as HTTP Endpoint, MQTT Endpoint, TCP/UDP Endpoint, UDP Endpoint, Kafka Endpoint, Schedule Endpoint, etc.
Use Cases
RuleGo is an orchestrable rule engine that excels at decoupling your systems.
- If your system's business is complex and the code is bloated
- If your business scenarios are highly customized or frequently changing
- If your system needs to interface with a large number of third-party applications or protocols
- Or if you need an end-to-end IoT solution
- Or if you need centralized processing of heterogeneous system data
- Or if you want to try hot deployment in the Go language...
Then the RuleGo framework will be a very good solution.
Typical Use Cases
Edge Computing: Deploy RuleGo on edge servers to preprocess data, filter, aggregate, or compute before reporting to the cloud. Data processing rules and distribution rules can be dynamically configured and modified through rule chains without restarting the system. IoT: Collect device data reports, make rule judgments through rule chains, and trigger one or more actions, such as sending emails, alarms, and linking with other devices or systems. Data Distribution: Distribute data to different systems using HTTP, MQTT, or gRPC based on different message types. Application Integration: Use RuleGo as glue to connect various systems or protocols, such as SSH, webhook, Kafka, message queues, databases, ChatGPT, third-party application systems. Centralized Processing of Heterogeneous System Data: Receive data from different sources (such as MQTT, HTTP, WS, TCP/UDP, etc.), then filter, format convert, and distribute to databases, business systems, or dashboards. Highly Customized Business: Decouple highly customized or frequently changing business and manage it with RuleGo rule chains. Business requirements change without needing to restart the main program. Complex Business Orchestration: Encapsulate business into custom components, orchestrate and drive these custom components through RuleGo, and support dynamic adjustment and replacement of business logic. Microservice Orchestration: Orchestrate and drive microservices through RuleGo, or dynamically call third-party services to process business and return results. Decoupling of Business Code and Logic: For example, user points calculation systems, risk control systems. Automation: For example, CI/CD systems, process automation systems, marketing automation systems. Low Code: For example, low-code platforms, iPaaS systems, ETL, LangFlow-like systems (interfacing with large models to extract user intent, then triggering rule chains to interact with other systems or process business).Architecture Diagram
<p align="center">RuleGo Architecture Diagram</p>
Rule Chain Running Example Diagram
More Running Modes
Installation
InstallRuleGo using the go get command:
```bash
go get github.com/rulego/rulegoSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



