arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

CloudMicroHaskell:通过运行时图序列化实现的直接风格分布式Haskell

CloudMicroHaskell: Direct-Style Distributed Haskell via Runtime Graph Serialisation

Robert Krook, Lennart Augustsson

arXiv 2607.10443首次发表:更新:

AI 中文总结

研究探索不同设计点,提出CloudMicroHaskell库,基于运行时图序列化实现直接风格分布式编程,描述其实现并评估,结果显示使编程模型更直接,但有一些变化需程序员注意。

AI 中文摘要

Cloud Haskell将Erlang风格的分布式编程引入Haskell,但在源级API中对移动代码的处理存在困难边界。远程进程必须表示为静态闭包,消息必须满足序列化约束,且参与节点需共享相关代码。本文探索了不同设计点,提出CloudMicroHaskell,它基于MicroHaskell构建,运行时将代码和数据表示为组合子图。当进程或消息跨越节点边界时,直接序列化可达图。这样远程生成可直接编写,进程体可捕获变量,消息可含普通值。描述了其节点运行时实现,包括远程生成、消息传递等。通过多种基准测试和案例研究评估系统,结果表明运行时图序列化使编程模型更直接,但一些由Cloud Haskell源级类型强制的保证变为动态检查,程序员在节点间移动图时需注意惰性和运行时拥有的资源。

英文摘要

Cloud Haskell brings Erlang-style distributed programming to Haskell, but its treatment of mobile code exposes a difficult boundary in the source-level API. Remote processes must be expressed as static closures, messages must satisfy serialisation constraints, and participating nodes are assumed to share the relevant code. This paper explores a different design point. We present CloudMicroHaskell, a Cloud Haskell-style library built on MicroHaskell, whose runtime represents both code and data as a combinator graph. When a process or message crosses a node boundary, CloudMicroHaskell serialises the reachable graph directly. As a result, remote spawning can be written in direct style: process bodies may capture variables from their surrounding scope, and messages may contain ordinary values, including functions, without programmer-written closure conversion. We describe the implementation of the CloudMicroHaskell node runtime, including remote spawn, message delivery, monitors, exit propagation, and library implementations of generic servers and supervisors. We evaluate the system with process/message benchmarks, a distributed work-pool benchmark, a file-synchronisation case study, and a heterogeneous deployment on microcontrollers. The results show that runtime graph serialisation makes the \ch{} programming model substantially more direct, while also making the tradeoff explicit: some guarantees enforced by \ch{}'s source-level types become dynamic checks, and programmers must be aware of laziness and runtime-owned resources when moving graphs between nodes.

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑