Modular software deployed on mini compute units in controlled distributed environments often needs two messaging paths: low-overhead in-process coordination and selective cross-node distribution. In practice, event identity, serialization, and transport bridging are frequently implemented as ad hoc glue, which complicates inter-process communication (IPC), structured routing, and shutdown behavior. This paper presents CNS, a lightweight local-first hybrid event fabric centered on asynchronous fire-and-forget messaging. CNS combines a typed event key, per-family serialization and validation, a local publish/subscribe context for in-process coordination, and a NATS-backed distributed context for inter-node distribution. A bridge runtime moves events between the two contexts while preserving a common routing vocabulary. The primary operating model is fire-and-forget publication and subscription; bidirectional request-reply remains available as a secondary extension on the same subject space. A Python prototype and single-machine measurements are reported. Local-only delivery averaged about 30 $μ$s. Distributed-only delivery averaged 1.26-1.37 ms, and the hybrid bridge averaged 1.64-1.89 ms. Validation introduced modest overhead relative to serialization choice. The resulting artifact is suited to structured IPC and practical message movement within modular services and across bounded sets of controlled nodes.


翻译:在受控分布式环境中部署于微型计算单元的模块化软件通常需要两种消息传递路径:低开销的进程内协调与选择性跨节点分发。实践中,事件标识、序列化及传输桥接常以临时胶合代码实现,这导致进程间通信(IPC)、结构化路由和关闭行为复杂化。本文提出CNS——一种以异步即发即忘消息传递为核心的轻量级本地优先混合事件框架。CNS融合了类型化事件键、按类族序列化与验证、用于进程内协调的本地发布/订阅上下文,以及基于NATS的分布式上下文用于跨节点分发。桥接运行时在保持公共路由词汇表的同时在两种上下文间移动事件。其核心操作模型为即发即忘发布/订阅;同一主题空间上的双向请求-回复作为次级扩展仍可用。本文报告了一个Python原型及单机测量结果。仅本地投递平均耗时约30微秒。仅分布式投递平均耗时1.26-1.37毫秒,混合桥接平均耗时1.64-1.89毫秒。验证引入的开销相对于序列化选择较为适度。该成果适用于结构化IPC以及模块化服务内部和有限受控节点集之间实用的消息移动。

0
下载
关闭预览

相关内容

《面向军事网络的下一代云事件响应》
专知会员服务
15+阅读 · 2025年11月2日
基于数字中台的军事物流数字化架构设计∗
专知会员服务
32+阅读 · 2024年12月3日
智能化分布式协同作战体系发展综述
专知会员服务
193+阅读 · 2022年6月10日
专知会员服务
48+阅读 · 2021年2月2日
耶鲁大学《分布式系统理论》笔记,491页pdf
专知会员服务
46+阅读 · 2020年7月29日
【数据中台】数据中台技术架构方案
产业智能官
15+阅读 · 2020年5月26日
【数据中台】什么是数据中台?
产业智能官
18+阅读 · 2019年7月30日
工行基于MySQL构建分布式架构的转型之路
炼数成金订阅号
15+阅读 · 2019年5月16日
【CPS】社会物理信息系统(CPSS)及其典型应用
产业智能官
16+阅读 · 2018年9月18日
今日头条推荐系统架构演进之路
QCon
32+阅读 · 2017年6月21日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
VIP会员
相关主题
最新内容
认知战与交战性质的改变:神经战略视角
专知会员服务
5+阅读 · 5月8日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员