arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.20534cs.PL
收藏

具有回溯计算的一致分布式反应式编程

Consistent Distributed Reactive Programming with Retroactive Computation

Tetsuo Kamina, Tomoyuki Aotani, Hidehiko Masuhara

AI总结:

本文提出一种混合反应式/回溯式与命令式计算的编程语言核心演算,支持分布式信号源及数据丢失恢复,并通过定理和微基准测试保证时间一致性,为物联网分析提供基础。

摘要:

背景:许多系统需要从多个信息源接收数据,这些信息源作为分布式网络设备,以各自的速度异步发送最新数据,以概括各种设备和连接,即物联网(IoT)。这些系统通常对从信息源接收的信息进行**反应式**和**回溯式**计算,分别用于监控和分析目的。\n问题:设计一种能够以高抽象级别描述此类系统的编程语言具有挑战性,原因有二:(1)这些系统中的反应式和回溯式计算与其他应用程序逻辑的执行并行进行;(2)信息源可能是分布式的,来自这些源的数据可能延迟到达或完全丢失。解决这些困难是我们的根本问题。\n方法:我们提出了一种支持以下特性的编程语言。首先,我们的语言将反应式时变值(也称为信号)嵌入到命令式语言中。其次,它支持多个分布式信息源,这些信息源被表示为信号,意味着它们可以被声明式地组合以形成其他时变值。最后,它允许对从信息源收集的过去值进行计算,并从数据包丢失引起的不一致中恢复。为了解决上述困难,我们为所提出的语言开发了一个核心演算。\n知识:该演算是反应式/回溯式计算与命令式计算的混合体。由于这种混合性质,该演算本质上很复杂;然而,我们已尽可能简化了它。首先,其语义被建模为基于无类型对象演算的简单单线程抽象。同时,并行执行的反应式计算使用简单进程演算建模,并与对象演算集成,确保计算结果始终被序列化。具体来说,我们证明了该演算中时间一致性得到保证;换言之,可以在任何检查点恢复一致性。\n基础:这项工作通过正式陈述和证明关于时间一致性的定理得到支持。我们还进行了微基准测试实验,以证明所实现的恢复过程在我们假设的应用场景中是可行的。\n重要性:确保的时间一致性为对从分布式信息源获得的计算结果进行分析提供了严格的基础,即使这些源经历延迟或数据包丢失。

英文摘要:

Context: Many systems require receiving data from multiple information sources, which act as distributed network devices that asynchronously send the latest data at their own pace to generalize various kinds of devices and connections, known as the Internet of Things (IoT). These systems often perform computations both **reactively** and **retroactively** on information received from the sources for monitoring and analytical purposes, respectively. Inquiry: It is challenging to design a programming language that can describe such systems at a high level of abstraction for two reasons: (1) reactive and retroactive computations in these systems are performed alongside the execution of other application logic; and (2) information sources may be distributed, and data from these sources may arrive late or be lost entirely. Addressing these difficulties is our fundamental problem. Approach: We propose a programming language that supports the following features. First, our language incorporates reactive time-varying values (also known as signals) embedded within an imperative language. Second, it supports multiple information sources that are distributed and represented as signals, meaning they can be declaratively composed to form other time-varying values. Finally, it allows computation over past values collected from information sources and recovery from inconsistency caused by packet loss. To address the aforementioned difficulties, we develop a core calculus for this proposed language. Knowledge: This calculus is a hybrid of reactive/retroactive computations and imperative ones. Because of this hybrid nature, the calculus is inherently complex; however, we have simplified it as much as possible. First, its semantics are modeled as a simple, single-threaded abstraction based on typeless object calculus. Meanwhile, reactive computations that execute in parallel are modeled using a simple process calculus and are integrated with the object calculus, ensuring that the computation results are always serialized. Specifically, we show that time consistency is guaranteed in the calculus; in other words, consistency can be recovered at any checkpoint. Grounding: This work is supported by formally stating and proving theorems regarding time consistency. We also conducted a microbenchmarking experiment to demonstrate that the implemented recovery process is feasible in our assumed application scenarios. Importance: The ensured time consistency provides a rigorous foundation for performing analytics on computation results obtained from distributed information sources, even when these sources experience delays or packet loss.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑