Skip to content

aregtech/areg-sdk

Latest release GitHub commits Stars Fork Watchers Wiki Pages


Most C++ projects don’t fail on algorithms — they fail on threads, IPC, and fragile wiring. Unlike traditional frameworks, Areg SDK automates communication, unifying async RPC, Pub/Sub, and service discovery. Its self-managed service mesh enables scalable, fault-tolerant systems across threads, processes, and devices — with no boilerplate, no fragile wiring.

Areg SDK is a lightweight C++17 framework that automates communication in distributed applications.


Project Status

CMake build MS Build CodeQL
C++ solution Operating systems CPU Architectures

Table of Contents

Important

Full technical guidance for building, using, and integrating Areg SDK is available in the documentation.


Why Areg SDK: Benefits and Compare

Areg SDK is a lightweight framework with built-in middleware that automates threading, service discovery, and inter-node messaging, so teams can build distributed systems without boilerplate or fragile wiring. Unlike gRPC, DDS, or ZeroMQ, it provides a self-managed mesh and a unified API across threads, processes, and devices.
Result: scalable, fault-tolerant systems — faster, simpler, safer.

Top 5 Benefits

  1. No manual threading
    Threads, components, and watchdogs are auto-created — preventing subtle concurrency bugs and saving time.

  2. Unified API
    Services are called the same way locally or remotely — always async, non-blocking, and consistent.

  3. Self-managed mesh
    Automatic service discovery and routing across threads, processes, and devices — no manual wiring.

  4. Resilient by design
    Components can join or leave dynamically; watchdogs restart failed threads for fault-tolerant systems.

  5. Built-in observability
    Integrated logging and scopes help per-method duration measurement to monitor and optimize efficiently.

💡 When to use: Linux & Windows, embedded and desktop C++ apps, scaling from prototype to multi-node.
⚠️ When not to use: RTOS (at the moment), web, or non-C++ apps — use web/RTOS-specific tools instead.

Compared to Alternatives

Feature Areg SDK Competitors (gRPC, DDS, ZeroMQ)
Ease of Use ✅ Automated setup ⚠️ Manual, boilerplate, complex
Automation ✅ Codegen, modeling, dispatch ⚠️ Manual setup, stubs only
Auto-Discovery ✅ Self-organizing service mesh ✅ DDS: built-in, ⚠️ gRPC/ZeroMQ: external
Fault-Tolerance ✅ Watchdog & auto-restart ✅ DDS: QoS, ⚠️ gRPC/ZeroMQ: Retries/Manual
Request-Reply ✅ Native Object RPC in service ✅ gRPC: RPC, ⚠️ DDS/ZeroMQ: Over topics/patterns
Pub/Sub ✅ Native, built-in in service ✅ DDS: Topics, ⚠️ Add-ons/Manual
Built-in Logging ✅ Integrated, dynamic + viewer ⚠️ Vendor-specific (DDS) or External
Dev Time Saved ✅ Faster, via automation ⚠️ Limited, external tooling

Decision Checklist

  • Do threading and synchronization issues slow your progress?
  • Does debugging across threads, processes, or components take excessive time?
  • Is setting up communication across processes or nodes complex and error-prone?
  • Do remote failures and reconnections create delays and extra work?
  • Would a unified communication model across threads, processes, and devices simplify development?

💡 If you answer Yes to 3+ questions, Areg SDK is likely a good fit.


Getting Started: Build and Integration

Prerequisites

  • C++17-compatible compiler: GCC, Clang/LLVM, MSVC, MinGW
  • CMake ≥ 3.20
  • Java ≥ 17 (required for code generation tools)

Supported OS: Linux, Windows
Supported Hardware: x86, x86_64, ARM, AArch64

See CMake Configuration Guide and README Wiki for compiler options, setup instructions, and troubleshooting.

Quick Start

  1. Clone and build the SDK:
git clone https://GitHub.com/aregtech/areg-sdk.git
cd areg-sdk
cmake -B build
cmake --build build -j 12
  1. Run the pre-built minimal RPC example:
./product/build/<compiler>/<os>-<hw>-<build-type>-<lib-type>/bin/01_minimalrpc

Tip

Complete example source code demonstrates a fully working minimal RPC:

  • Provider & Consumer run in separate threads
  • Consumer calls Provider when connected
  • Provider prints a message
  • Application exits after completion

Message Flow:

🟢 main() → 🏗 load model → 🔗 auto-connect → 📤 Consumer requests → 🖨 Provider prints → ✅ quit

Learning Path

  1. 01_minimalrpc – minimal RPC example between 2 components.
  2. 02_minimalipc – minimal IPC example across processes, requires mtrouter.
  3. 03_helloservice – multithreaded RPC + IPC using the same components, requires mtrouter.
  4. More Examples – additional samples demonstrating simple and advanced Areg SDK features.

Important

For IPC, mtrouter must be running. See mtrouter documentation.

Integration

💡 Advanced builds (IDE setup, cross-compilation, disabling tests/examples) are documented in Wiki.


Core Modules and Architecture

Module Purpose
Areg Framework (areg) Cross-platform C++17 framework with middleware layer: automated, service-oriented Object RPC (ORPC) and IPC for distributed computing.
Multitarget Router (mtrouter) Required for IPC — routes messages across processes/devices to form a service mesh. Runs as console app or system service.
Log Collector (logcollector) Centralized log collection for distributed apps — helps monitoring and analysis. Runs as console app or system service.
Log Observer (logobserver) CLI tool to receive, filter, and save runtime logs — useful for debugging.
Code Generator (codegen.jar) Generates stubs, proxies, and serialization from service object API (SIML) — eliminates boilerplate.
Lusan (UI Tool) GUI app to design service APIs, visualize and filter logs, and analyze performance.
Examples Sample projects (RPC, Pub/Sub, IPC, FSM, auto-discovery, etc.) — the fastest way to validate Areg in action.

Areg implements an interface-centric Object RPC (ORPC) model. Applications expose Service Providers and interact via Service Consumers with auto-generated Stubs, Proxies & Rules, communicating through the Multitarget Router. Services (logical micro-servers) need not know physical network locations — enabling portable C++ microservices and scalable service-oriented architecture (SOA).

Interface-centric communication diagram

Supports Client-Server (Request-Reply) and Publish-Subscribe (Pub/Sub) patterns, designed for multithreading, multiprocessing, and distributed systems with low-latency requirements.


Use Cases: Distributed, RPC and IPC

IoT: Mist-to-Cloud

Edge devices often stream raw data to central servers, creating latency, network load, and privacy issues. With Areg, services run on devices, forming a mist network of micro-servers that process and aggregate data locally.

IoT Mist-to-Cloud network diagram

Benefit: Low-latency, autonomous edge mesh; sensitive data remains on-device; reduced cloud traffic.


Beyond Embedded

Many small devices lack scalable infrastructure. Areg transforms embedded applications into distributed modules that scale across remote nodes and platforms, orchestrating multithreaded and multiprocess C++ services.

Service types and message handling diagram
  • Local Services – multithreaded within a device
  • Public Services – accessible across processes and applications

Benefit: Seamlessly expose services to other apps and devices without modifying code.


Driverless Devices

Device drivers are often slow, complex, and platform-specific. Areg lets you expose hardware as portable, service-enabled components, making devices platform-independent.

Areg driverless service-enabled diagram

Benefit: Accelerates prototyping, testing, and development; enables early bug detection; devices are network-accessible.


Simulation & Testing

Validating distributed systems is expensive and hardware-dependent. Areg allows simulation of Data Layer services in external applications, providing realistic environments to test behavior, performance, and fault-tolerance. Services appear location-transparent to higher layers.

Software 4 Layer Architecture: Simulate Data Layer

Benefit: Transparent service location enables testing of higher-layer logic without real hardware dependencies.


Roadmap

Areg SDK continues to evolve for Desktop and Embedded, focusing on automation, reliability, and performance.

Planned work:

  • Multi-channel support for multiplexed communications
  • RTOS support (Zephyr OS) to bring Areg into real-time environments
  • Lusan app improvements: performance, stability, and usability (Areg SDK Tools)

Documentation


License

Areg SDK is released under the Apache License 2.0 — permissive and suitable for open-source and commercial use.

Commercial licensing & services: Dedicated support, training, and tailored licensing options are available for enterprise customers. Visit Aregtech or email info[at]aregtech[dot]com for details.


Call to Action

🚀 Join the Areg SDK community — contribute, discuss, and help shape the future of distributed apps.

  • Explore open issues and contribute
  • Share ideas or request features via issues or discussions
  • Submit pull requests (see project contribution guidelines)
  • ⭐ Star Areg SDK to accelerate discovery of distributed C++ solutions

Follow us:
X Follow LinkedIn Gitter