Tag Archives: domains

Domains: Sharing State in the Communicating Event-Loop Actor Model

It has been a while since we started working on how to extended the Actor model with mechanisms to safely share state. Our workshop paper on Tanks was published in 2013. And now finally, an extended version of this work was accepted for publication. Below you can find the abstract with a few more details on the paper, and of course a preprint of the paper itself.

Abstract

The actor model is a message-passing concurrency model that avoids deadlocks and low-level data races by construction. This facilitates concurrent programming, especially in the context of complex interactive applications where modularity, security and fault-tolerance are required. The tradeoff is that the actor model sacrifices expressiveness and safety guarantees with respect to parallel access to shared state.

In this paper we present domains as a set of novel language abstractions for safely encapsulating and sharing state within the actor model. We introduce four types of domains, namely immutable, isolated, observable and shared domains that each are tailored to a certain access pattern on that shared state. The domains are characterized with an operational semantics. For each we discuss how the actor model’s safety guarantees are upheld even in the presence of conceptually shared state. Furthermore, the proposed language abstractions are evaluated with a case study in Scala comparing them to other synchonisation mechanisms to demonstrate their benefits in deadlock freedom, parallel reads, and enforced isolation.

  • Domains: Sharing State in the Communicating Event-Loop Actor Model; Joeri De Koster, Stefan Marr, Tom Van Cutsem, Theo D’Hondt; Computer Languages, Systems & Structures (2016)
  • Paper: PDF
  • BibTex: BibSonomy

Domains: Safe Sharing Among Actors

The actor model is a pretty nice abstraction to reason about completely independent entities that interact purely by exchanging messages. However, for software development, some see the pure actor model as too fine-grained and too restrictive exposing many of the low-level issues such as data races again on a higher level again, and thereby forgoing some of its conceptual benefits.

We see the actor model also as a nice way to think about problems. However, we consider them in a more coarse-grained version. For us, actors are not on the level of objects but rather on the level of groups of objects like in the communicating event loop model as proposed by the E language and AmbientTalk. On this level, actors represent larger components, or subsystems if you will, and on multicore systems the question arises how parallelism and resource sharing can be achieved in a safe and efficient manner, without sacrificing the actor model’s (and communicating event loop model’s) nice properties such as freedom of deadlocks and low-level data races.

With the recently published paper below, Joeri took the lead on developing a first idea in the direction of managing shared state in the context of a language based on communicating event loops. The paper is an extension of an earlier workshop paper, and since then, we developed the ideas already further and devised complementary solutions to cover a wider set of uses cases. Still, I think the paper is interesting in its own right, and also defines the semantics of the approach in a formal, and thereby less ambiguous manner.

Abstract

The actor model is a concurrency model that avoids issues such as deadlocks and data races by construction, and thus facilitates concurrent programming. While it has mainly been used for expressing distributed computations, it is equally useful for modeling concurrent computations in a single shared memory machine. In component based software, the actor model lends itself to divide the components naturally over different actors and use message-passing concurrency for the interaction between these components. The tradeoff is that the actor model sacrifices expressiveness and efficiency with respect to parallel access to shared state.

This paper gives an overview of the disadvantages of the actor model when trying to express shared state and then formulates an extension of the actor model to solve these issues. Our solution proposes domains and synchronization views to solve the issues without compromising on the semantic properties of the actor model. Thus, the resulting concurrency model maintains deadlock-freedom and avoids low-level data races.

  • Domains: Safe Sharing Among Actors; Joeri De Koster, Stefan Marr, Theo D’Hondt, Tom Van Cutsem; Science of Computer Programming, 2014, to appear.
  • Paper: PDF
  • BibTex: BibSonomy