百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

areg-sdk

> 数据库
开源

从嵌入式到企业级的分布式 C++ 服务

359 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

从嵌入式到企业级的分布式 C++ 服务

High-throughput, service-oriented C++ middleware
From embedded systems to high-performance distributed applications

Building an application with AREG using an AI agent? Start at AGENTS.md. The task pages for agents are in docs/agent/, and complete copyable projects in docs/agent/recipes/.

Project Status


Most C++ projects don't fail on algorithms. They fail on threads, IPC, and brittle integration code.
Areg SDK eliminates that category of failure – and does it without sacrificing throughput.


Table of Contents

  • Why Areg SDK
  • What You Get
  • How It Works
  • Performance
  • Areg SDK vs. Alternatives
  • Getting Started
  • Architecture
  • Network Deployment Model
  • Use Cases
  • Roadmap
  • Documentation
  • License
  • Community

Why Areg SDK

Ask yourself these questions:

  • Do threading and synchronization issues slow your development velocity?
  • Is your IPC integration fragile, hard to test, or hard to extend?
  • Does moving a component from in-process to out-of-process require rewriting its interface?
  • Do you lose hours debugging silent failures when a service restarts unexpectedly?
  • Is your distributed system difficult to monitor and diagnose in production?
  • Are you building a data-intensive pipeline where framework overhead must be near zero?

If you answered yes to three or more – Areg SDK is worth your time.

Areg SDK is a C++ service framework that automates threading, inter-process communication, service discovery, fault recovery, and message dispatch – across thread boundaries, process boundaries, and network boundaries – using a single consistent programming model.

The same service code runs:

  • Multithreaded (components in the same process)
  • Multiprocessing (components on the same machine)
  • Multi-device (components across a network)

No code changes. Configuration only.

[!NOTE] Best for: C++ applications requiring reliable service communication, automated threading, high-throughput IPC, or location-transparent services – from embedded edge devices to high-performance distributed systems.

Not for: RTOS hard real-time targets (planned), web services, or non-C++ ecosystems.


What You Get

If you build C++ systems with threads, processes, or networked devices – embedded, edge, or enterprise – here is what changes when you use Areg SDK.

  • Weeks of infrastructure work removed: threading, IPC, service discovery, and reconnection logic are generated and managed, not hand-built on every project. (Development Time Savings)
  • Race conditions structurally eliminated: no shared state to lock, audit, or get wrong – raw bytes route to the owning thread before any deserialization.
  • No startup-order or boot sequencing logic: services find each other by name regardless of thread, process, or machine, with no manual retry loops.
  • #1 TCP framework by latency and data rate: full service dispatch included, not a stripped transport benchmark – ~9.9 µs one-way, 6.0–8.0 GB/s sustained to peak. (rankings, raw latency data)
  • Automatic recovery: failed components restart and dependent consumers reconnect with no operator intervention.
  • One codebase, any scale: the same code runs as threads, processes, or networked services; moving from prototype to production is a deployment change, not a rewrite.
  • Test before hardware exists, deploy unchanged: register a simulation under the same service name and the rest of the system never notices – no conditional compilation, no mock frameworks, zero code changes when real hardware arrives.

How It Works

Areg SDK implements Object RPC (ORPC) – a service model where components expose typed interfaces and communicate through generated proxies, regardless of where they run. Unlike gRPC or ZeroMQ, the same proxy code calls a thread, a process, or a networked device – the framework resolves the location at runtime with no API changes.

┌─────────────────────────────────────────────────────────┐
│  Same code. Same interface. Different deployment.       │
│                                                         │
│  Thread A ──────────────── Thread B      (in-process)   │
│  Process A ─── mtrouter ── Process B     (same machine) │
│  Device A  ─── mtrouter ── Device B      (network)      │
└─────────────────────────────────────────────────────────┘

Consumers reference services by name, not by network address or endpoint. The framework connects a consumer to the named service wherever it runs – whether in the same process, on the same machine, or on a remote node.

What the framework handles automatically:

  • Thread lifecycle and synchronization
  • Service discovery and registration
  • Request and response routing and dispatching
  • Fault detection and watchdog restart
  • Connection management and reconnection

What you write:

  • A service interface definition (.siml file) – designed visually with Lusan or edited as XML
  • Extend generated provider and consumer classes with business logic

The code generator produces all RPC infrastructure – serialization, proxies, events, and service provider and consumer base classes. You fill in the logic.

Service Interface and Code Generation

Full definitions of service interface, service, and consumer are in Service Identity Model. The workflow from interface definition to running code:

MyService.siml  ──►  codegen.jar  ──►  MyServiceProviderBase.hpp
  (design in Lusan)        │           MyServiceConsumerBase.hpp
                           │           MyServiceProxy.hpp
                           │           Serialization code
                           |           Event objects

CMake integration – one line generates and links all infrastructure:

cmake
addServiceInterface(MyServiceLib ./services/MyService.siml)

For full details, see the Service Interface Guide.


Performance

Measured on mobile-class consumer hardware, full stack active – data serialization, event dispatching, and multithreading. These are not raw socket numbers. Raw benchmark output is published alongside the full methodology for independent verification: current latency dataset (bare TTY) · earlier round (gnome-terminal).

Throughput – TCP localhost, 1:1, measured at mtrouter

Platform CPU Type ~3 MB, GB/s ~0.5 KB, msg/s
Linux Ubuntu ¹ i7-13700H (DDR4) ~6.5 sust. / ~8.0 peak ~2.0M sust. / ~2.5M peak
macOS native ² M3 Pro (LPDDR5) ~6.5 sust. / –7.0 peak ~2.5M sust. / ~3.0M peak
Windows 11 ³ i7-13700H (DDR4) ~2.2 sust. / ~3.0 peak ~1.8M sust. / ~2.5M peak
WSL2 Ubuntu ⁴ i7-13700H (DDR4) ~4.0 sust. / –4.5 peak ~1.0M sust. / ~1.5M peak

¹ Ubuntu 26.04, Performance power mode. Peak = best short-run measure; sustained = 5+ min run.
² No network tuning; M4 chip (separate supplementary test) reached up to 3.0M msg/s.
³ Stable dispatch is ~1.8M msg/s; above that, the dispatch thread becomes the bottleneck.
⁴ With network tuning, up to ~5.0–5.6 GB/s.

Latency – TCP localhost, full stack, 204-byte messages

Timestamps span the full call path: before serialization (sender) to after deserialization and dispatch (receiver). OWT = one-way (2-hop). RTT = round-trip through mtrouter (4-hop). Linux figures are measured from a bare TTY session (no desktop GUI) with mtrouter, provider, and consumer each pinned to a dedicated CPU core via taskset – see the raw data and methodology.

Platform CPU OWT Min OWT P50 RTT Min RTT P50
Linux Ubuntu ¹ i7-13700H (DDR4) 9.6 μs ~9.9 μs 19.1 μs ~19.6 μs
macOS M3 Pro Apple M3 (LPDDR5) 21.6 μs 31.4 μs 46.0 μs 62.5 μs
Windows 11 i7-13700H (DDR4) 32.5 μs 40.3 μs 64.0 μs 82.5 μs

¹ Ubuntu 26.04, Performance power mode, bare TTY, cores pinned via taskset. The single lowest sample observed to date is 9.14 μs (OWT) / 18.34 μs (RTT). A desktop gnome-terminal session reads ~0.9–1.4 μs higher; not pinning cores adds a further ~2–4 μs on top of either – still the fastest measured TCP framework in its class either way (see framework rankings).

For comparison: gRPC C++ sequential RTT ~116–167 μs over Unix domain socket – despite fewer hops and no service dispatch (MPI-HD, F. Werner, 2021). Latency is payload-insensitive up to 4 KB – Min rises only 1.0 μs across a 20× size increase; framework overhead dominates.

Real-world fit: covers the software pipeline layer of scientific imaging (laser microscopy, X-ray, electron microscopy) and industrial machine vision on a standard laptop.

Measure your own hardware: 23_pubdatarate (throughput) · 30_publatency (latency)
Read full data & methodology · vs ZMQ/NanoMsg/NNG · framework rankings


Areg SDK vs. Alternatives

Feature Areg SDK gRPC / DDS / ZeroMQ
Setup Complexity ✅ Automated, zero boilerplate ⚠️ Manual configuration, verbose setup
Threading ✅ Automated threading ⚠️ Manual threading and synchronization
Code Generation ✅ Full ORPC automation ⚠️ Stubs only, manual

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++cppcross-platformdistributed-systemsedge-computing

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库