Skip to content

Releases: OpenArkStudio/arknet

arknet 0.2.1

Choose a tag to compare

@nick2781 nick2781 released this 16 Oct 01:37
7685e24

arknet 0.2.1

This release improves shutdown reliability for database clients and TCP-based protocols, and adds application-driven IO execution.

Features

  • MySQL connections, Redis clients and both pools provide close_and_wait(): permanent closure rejects new requests and waits for accepted operations and callbacks. Retained leases and statement handles become inert.
  • manual_runtime lets application update loops drive poll(), with a standard Asio executor for awaitable and co_spawn. Dedicated coroutine protocol APIs remain TODO.

Fixes

  • TCP, TLS TCP, HTTP and WebSocket shutdown waits cover outstanding IO and callbacks, preventing premature resource release and long timer rearming. Explicit restart and normal reconnect remain available.
  • Fix database-pool shutdown while requests are waiting for connections. Redis pools preserve diagnostics and recover capacity after lease-return submission failures, without replaying commands or changing successful results.

Upgrade notes

Stop application producers before waiting; keep external contexts running until completion. Network shutdown does not establish business-task drainage, plugin unload safety or deployment capacity. See lifecycle and validation.

Performance note: the five-second comparison records 6.51% lower median throughput and 13.29% higher P99 for 4 KiB WebSocket. Five-run throughput ranges overlap; cause is unconfirmed. Measurements use 2aa5bc0, before the final pool-shutdown correction.

Release source: 7685e241.


中文

此版本完善数据库客户端与 TCP 系列协议的关闭等待,并提供由应用驱动的 IO 执行方式。

新增能力

  • MySQL 连接、Redis 客户端及两者的连接池提供 close_and_wait():永久关闭后停止受理新请求,等待已受理操作与回调结束;保留的租约和语句句柄失效。
  • manual_runtime 允许应用在更新循环中调用 poll(),并提供支持 awaitable 与 co_spawn 的标准 Asio 执行器。公共协议的专用协程接口仍为 TODO。

修复

  • TCP、TLS TCP、HTTP 和 WebSocket 关闭时等待未完成的 IO 与回调,避免提前释放资源,关闭期间不能重新设置长定时器。显式重启和正常重连保留。
  • 修复仍有请求等待连接时的数据库连接池关闭问题。Redis 连接池归还任务投递失败时保留诊断并恢复额度,不重放命令或改写成功结果。

升级注意

等待关闭前,需要停止应用生产者,并保持外部 context 运行至关闭完成。网络关闭不保证业务任务已排空、插件可以安全卸载或部署容量,详见生命周期与验证记录。

性能说明:5 秒负载对照中,4 KiB WebSocket 的吞吐中位数下降 6.51%,P99 上升 13.29%;五轮吞吐范围重叠,原因尚未确认。测量使用 2aa5bc0,早于最后的连接池关闭修复。

发行源码:7685e241。

Downloads / 下载

Raw measurements and validation logs remain release attachments. / 原始测量与验证日志保留为 Release 附件。

Archive / 归档 SHA256
arknet-0.2.1-benchmark-comparison.tar.gz · SHA256 file 1087dab17d8a8a48d0c5c4b5427cf97bd7b5eb48679a46f14e0550149c32f324
arknet-0.2.1-validation-logs.tar.gz · SHA256 file 6fa4368dc4f0b1d9e8171a6cd1e229bf783148809bb2c345b35fa8884fc17a14

arknet 0.2.0

Choose a tag to compare

@nick2781 nick2781 released this 15 Oct 15:15
25fe2e5

arknet 0.2.0 adds native single-node MySQL and Redis clients and connection pools while remaining a C++20 header-only library.

  • MySQL: queries, typed prepared statements, transactions, supported password authentication and verified TLS.
  • Redis: binary-safe RESP2/RESP3 commands, pipelines, authentication, TLS/mTLS and separate push callbacks.
  • Pools: exclusive leases, bounded acquisition queues and session reset before reuse.
  • Request control: limits, deadlines, cancellation and explicit uncertain write outcomes; no automatic command replay.
  • Dependencies: Boost.Asio and Boost.Beast are now the default. Standalone Asio supports TCP, UDP, RUDP, TLS and the database clients. Bundled BHO headers are removed.
  • Runtime: orderly owned-runtime cleanup, safe listener metadata queries during shutdown, and MySQL resource ownership through asynchronous submission when callbacks destroy the connection.
  • Documentation: bilingual examples, configuration, limits and local performance reports with SVG charts.

Migration and supported scope are covered in the release notes. MySQL requires OpenSSL and ARKNET_ENABLE_SSL. Database close operations are asynchronous; application callbacks must retain their required state. Local correctness and performance results do not establish production deployment capacity.

arknet v0.1.0

Choose a tag to compare

@nick2781 nick2781 released this 13 Oct 11:20
5aa9b21

English

arknet's first regular release is an independent C++20 header-only networking library.

  • TCP, native UDP, RUDP, WebSocket/WSS and HTTP/HTTPS with routing.
  • Optional TLS/mTLS, Standalone Asio and Boost.Asio backends.
  • RUDP with ARQ-only, fixed Reed-Solomon FEC and adaptive FEC policies; legacy ARQ interoperability with FEC disabled.
  • Reconnection, bounded send queues, timers, custom sessions and external io_context/strand execution.
  • HTTP request deadlines/cancellation and atomic lifecycle status queries.
  • Permanent doctest cases, standalone C++ benchmarks, bilingual Nimbus documentation and recorded local performance results.

Local Release + TLS validation passes 56/56 checks and 221 doctest cases on each backend, including installed consumers and 12 legacy RDP interoperability scenarios. Standalone Asio records 1,836,538 assertions; Boost.Asio records 1,799,675. Stress-loop iteration counts account for the difference. The attached validation archive records the source revision, machine and complete logs.

ThreadSanitizer lifecycle regressions and ARK integration also pass: ARK records 29 network cases with 829 assertions under both backends, ASan/UBSan and TSan. All 14 required checks pass in the protected release PR, including Linux/macOS/Windows, both backends, sanitizers, formatting and documentation.

Documentation · Performance reports

Cross-host capacity, production-duration endurance and ARK business acceptance remain deployment requirements. Cluster capacity of 100,000-200,000 PCU has not been measured. HTTP/2, HTTP/3, named pipes, Unix domain sockets and RPC remain planned features.

简体中文

arknet 首个正式发行版是独立的 C++20 header-only 网络库。

  • TCP、原生 UDP、RUDP、WebSocket/WSS,以及带路由的 HTTP/HTTPS。
  • 可选 TLS/mTLS,支持 Standalone Asio 和 Boost.Asio 两种后端。
  • RUDP 提供仅 ARQ、固定 Reed-Solomon FEC 和自适应 FEC 三种策略;关闭 FEC 时支持旧 ARQ 对端互通。
  • 自动重连、有上限的发送队列、定时器、自定义 Session,以及外部 io_context/strand 执行模型。
  • HTTP 请求截止时间与取消操作,以及使用原子状态的生命周期查询。
  • 正式 doctest 用例、可独立编译运行的 C++ 基准程序、双语 Nimbus 文档和本机性能报告。

本机 Release + TLS 验证中,两种后端各通过 56/56 项检查和 221 个 doctest 用例,包含安装后的消费者构建与 12 组旧 RDP 对端互通。Standalone Asio 通过 1,836,538 条断言,Boost.Asio 通过 1,799,675 条断言;差异来自压力循环的实际迭代量。验收附件保留源码版本、测试机器和完整日志。

TSan 生命周期回归与 ARK 集成检查也已通过。ARK 的两种后端、ASan/UBSan 与 TSan 均通过 29 个网络用例、829 条断言。发布 PR 的 14 项必需检查全部通过,覆盖 Linux/macOS/Windows、两种后端、sanitizer、格式与文档。

文档 · 性能报告

部署前仍需进行跨主机容量、生产时长耐久和 ARK 完整业务验收。集群 10 万至 20 万 PCU 尚未实测。HTTP/2、HTTP/3、named pipe、Unix domain socket 和 RPC 保留为计划功能。

arknet v0.1.0-rc.1

arknet v0.1.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@nick2781 nick2781 released this 12 Oct 09:35

arknet 0.1.0 Release Candidate 1

First public prerelease of OpenArkStudio's C++20 header-only networking library.

Included

  • TCP and native UDP clients, servers, sessions, and UDP cast.
  • WebSocket/WSS and HTTP/HTTPS, including HTTP routing.
  • Optional TLS and mutual TLS through OpenSSL.
  • IPv4 and IPv6, reconnect, timers, post, bounded sends, and owned or external IO contexts.
  • CRTP extension and component composition.
  • Standalone Asio 1.38+ or Boost 1.90+ backends.
  • Bilingual documentation, doctest checks, and reproducible C++ benchmarks.

Validation

  • macOS Release builds with TLS: 41 checks and 134 doctest cases passed for each backend.
  • CI validation: all 13 jobs passed, including Windows, Linux, macOS, ASan/UBSan, and TSan.
  • Local performance reports include test hardware and measurements.

Prerelease Scope

APIs may change before 0.1.0. KCP/RDP, HTTP/2, HTTP/3, named pipes, Unix domain sockets, and RPC are not included in this release. ARK migration will follow completion and testing of its required capabilities.

Source commit: e1cdce5.