2021-06-08 EDIT: Added serializer implementation using only the actor message-event queue. One of the earliest concepts explored on this blog was the Serializer, which is a mechanism for providing exclusive access to a group of actors [1]. More recently, Carl Hewitt has referred to an extended version of this mechanism (with holes) as “Swiss Cheese”. […]
Serializers Revisited
Producer/Consumer Rate-Matching
Flow control is a critical feature in a network of asynchronous communicating processes. Our fanciful exploration of a yak-shaving barber’s shop provided us with patterns we can apply to more general problems. The bounded-buffer mechanism is a generalization of our barber’s waiting room. It mediates between producers and consumers, matching the rate of production with […]
Mutable Objects in Kernel
One important difference between Kernel and traditional LISP/Scheme is Kernel’s pervasive use of encapsulated types [1]. There is a clear distinction in Kernel between decomposable structures and opaque objects. Encapsulated types are a significant contributor toward smooth extensibility. They allow the definition of objects, and operations on those object, that are indistinguishable from primitives. We […]
Semantic Extensibility with Vau
John Shutt has reformulated the foundations of LISP/Scheme [1]. Observing that Lambda is a primitive applicative constructor, he proposes Vau as a primitve operative constructor instead. This changes our focus from implicit evaluation to explicit evaluation. Applicatives evaluate their operands before evaluating the combination. Operatives act directly on their (unevaluated) operands, possibly evaluating them selectively. […]
High Availability for Mutable Shared State
Mutable shared state is the root of all evil in concurrent systems. The history of concurrent computation is a basically the story of approaches to managing mutable shared state. The thread model, which has long held the dominant position, leads to intractable complexity [1]. The actor model captures state in the behavior of an actor. […]
Erlang-style Mailboxes
One significant difference between message-passing in Erlang and the pure Actor Model is the Erlang concept of mailboxes. Actors don’t have mailboxes, at least not in the sense that they can be queried. Messages simply arrive at some non-deterministic time after they are asynchronously sent, invoking the current behavior of the actor. However, in Erlang, […]
Finger Tree: A Functional Value Object
A Finger Tree is a data-structure that supports amortized O(1) addition and removal of elements from either end [1]. It also can support a large number of common sequence operations, including concatenation, very efficiently. Our implementation is based on the Hinze-Paterson structure [2], simplified for use as a Deque. It is possible to implement a […]
Composing Actors
A significant challenge in developing concurrent systems is the problem of composability. We create a solution that works properly in isolation, but when composed with other solutions leads to interference. The actor model ensures that individual actors may be composed without changing their behavior. Interference is prevented by definition, keeping the system consistent. In order […]