基于数据空间与切面的会话式并发
Conversational Concurrency with Dataspaces and Facets
AI总结:
针对纯消息传递模型难以处理会话上下文和并行子对话的问题,本文提出语言Syndicate,通过数据空间共享上下文和切面组织参与者,减少复杂设计模式,支持健壮的并发应用。
摘要:
背景:开发者已经逐渐认识到消息传递型参与者(actor)在并发编程任务中的简洁性。参与者计算模型易于理解;它仅仅是参与者之间围绕共同目标进行的对话。重要的是,它消除了占主导地位的共享内存模型的一些基本缺陷,尤其是数据竞争。\n问题:然而,仔细观察现实世界中的对话可以发现,它们不仅仅是消息的交换。参与者必须牢记对话上下文,而后来加入的参与者能够且通常必须获取部分上下文。此外,某些场景要求并行参与多个对话;在其他场景中,参与者会进行临时受限的子对话以澄清某一点。现有的参与者代码表现出复杂的设计模式,这些模式绕过了纯消息传递模型的潜在局限性。\n方法:这些模式暗示了编程会话式计算所涉及的若干元素。转化为语言设计的术语,它们需要两类设施:(1)一种用于共享对话上下文,(2)另一种用于围绕正在进行的对话及其上下文组织单个参与者。\n知识:本文介绍了Syndicate,一种旨在直接支持会话式参与者编程的语言。除了消息传递之外,它还提供了(1)数据空间(dataspace),允许参与者做出公开断言、撤回断言以及查询其他参与者已断言的内容;(2)切面(facet)表示法,使程序员能够将单个参与者表达为正在进行的对话的反映。\n验证:一个完整的示例介绍了这些概念,并展示了Syndicate中的会话式编程。与其他研究和工业并发语言的比较证明了Syndicate提供的独特支持。\n重要性:Syndicate通过解决底层模型的一些已观察到的局限性,推进了并发参与者编程。虽然消息传递简化了并发编程,但它在处理实际计算对话的复杂性方面存在不足。通过引入用于共享对话上下文的数据空间参与者以及用于围绕正在进行的对话组织参与者的切面表示法,Syndicate使开发者能够自然地表达和管理并发系统中通常需要的细微交互。这些创新减少了对复杂设计模式的需求,并为构建健壮的、上下文感知的并发应用程序提供了独特支持。
英文摘要:
Context: Developers have come to appreciate the simplicity of message-passing actors for concurrent programming tasks. The actor model of computation is easy to grasp; it is just a conversation among actors with a common goal. Importantly, it eliminates some basic pitfalls of the dominant shared-memory model, most critically data races. Inquiry: A close look at real-world conversations suggests, however, that they are not mere exchanges of messages. Participants must keep in mind conversational context, and participants joining late can and often must acquire some of this context. In addition, some settings call for engaging in several conversations in parallel; in others, participants conduct temporarily limited sub-conversations to clarify a point. Existing actor code exhibits complex design patterns that get around the underlying limitations of the pure message-passing model. Approach: These patterns suggest a number of elements involved in programming conversational computations. Translated into terms of language design, they call for two kinds of facilities: (1) one for sharing conversational context and (2) another one for organizing individual actors around on-going conversations and their contexts. Knowledge: This paper presents Syndicate, a language designed to directly support the programming of conversing actors. Beyond message passing, it supplies (1) a dataspace, which allows actors to make public assertions, to withdraw them, and to query what other actors have asserted; and (2) the facet notation, which enables programmers to express individual actors as a reflection of the on-going conversations. Grounding: A worked example introduces these concepts and illustrates conversational programming in Syndicate. A comparison with other research and industrial concurrent languages demonstrates the unique support Syndicate provides. Importance: Syndicate advances concurrent actor programming with enhancements that address some observed limitations of the underlying model. While message-passing simplifies concurrent programming, it falls short in handling the complexities of actual computational conversations. By introducing a dataspace actor for sharing conversational context and the facet notation for organizing actors around ongoing conversations, Syndicate enables developers to naturally express and manage the nuanced interactions often required in concurrent systems. These innovations reduce the need for complex design patterns and provide unique support for building robust, context-aware concurrent applications.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。