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.
翻译:物联网(IoT)等近期发展趋势预示着计算设备将在几乎所有环境中实现密集且多尺度的部署。一个突出的工程挑战围绕如何对此类计算生态系统的集体自适应行为进行编程。这需要能够捕捉如集合体(协作设备的动态群组)和集体任务(由集合体执行的联合活动)等概念的抽象机制。在本工作中,我们考虑设备集合,这些设备与邻居交互,并以近乎同步的感知-计算-交互轮次执行,其中计算由单个程序给出,该程序将传感值和传入消息映射到输出和传出消息。为支持对整个计算集体进行编程,我们提出了分布式集体过程的抽象,该抽象可用于一次性定义集合体形成逻辑及其集体任务。我们在eXchange演算(XC)中形式化了这一抽象,XC是一种基于邻居值(从邻居到值的映射)的核心函数式语言,其中状态和交互通过单一原语——交换(exchange)——进行处理,并在FCPP语言中提供了相应的实现。随后,我们通过两个案例研究来实践分布式集体过程:多跳消息传播和空间属性的分布式监测。最后,我们讨论了该抽象的特性及其对不同类型分布式计算应用的适用性。