Recent trends like the Internet of Things (IoT) suggest a vision of dense and multi-scale deployments of computing devices in nearly all kinds of environments. A prominent engineering challenge revolves around programming the collective adaptive behaviour of such computational ecosystems. This requires abstractions able to capture concepts like ensembles (dynamic groups of cooperating devices) and collective tasks (joint activities carried out by ensembles). In this work, we consider collections of devices interacting with neighbours and that execute in nearly-synchronised sense-compute-interact rounds, where the computation is given by a single program mapping sensing values and incoming messages to output and outcoming messages. To support programming whole computational collectives, we propose the abstraction of a distributed collective process, which can be used to define at once the ensemble formation logic and its collective task. We formalise the abstraction in the eXchange Calculus (XC), a core functional language based on neighbouring values (maps from neighbours to values) where state and interaction is handled through a single primitive, exchange, and provide a corresponding implementation in the FCPP language. Then, we exercise distributed collective processes using two case studies: multi-hop message propagation and distributed monitoring of spatial properties. Finally, we discuss the features of the abstraction and its suitability for different kinds of distributed computing applications.
翻译:近期物联网等发展趋势展示了计算设备在几乎所有环境中进行密集、多尺度部署的愿景。一个突出的工程挑战涉及编程此类计算生态系统的集体适应性行为。这需要能够捕获集体(协作设备的动态组)和集体任务(由集体执行的联合活动)等概念的抽象。在本工作中,我们考虑与邻居交互的设备集合,这些设备以近乎同步的感知-计算-交互轮次执行,其中计算由单个程序给出,该程序将感知值和传入消息映射到输出和传出消息。为支持对整个计算集体进行编程,我们提出了分布式集体过程的抽象,可用于同时定义集体形成逻辑及其集体任务。我们基于交换演算(XC)形式化该抽象,XC是一种基于邻居值(从邻居到值的映射)的核心函数式语言,其中状态和交互通过单一原语exchange处理,并在FCPP语言中提供相应实现。随后,我们通过两个案例研究(多跳消息传播和空间属性分布式监测)实践分布式集体过程。最后,我们讨论该抽象的特性及其对不同类型分布式计算应用的适用性。