Serializers Revisited

Tags: , , , , , , , , , , ,

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”. […]

Continue reading » 1 Comment

Producer/Consumer Rate-Matching

Tags: , , , , , , , , , , , , , , ,

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 […]

Continue reading » No comments

“Sleeping Barber” in Humus

Tags: , , , , , , , , , ,

The “Sleeping Barber” problem is another classic concurrency example. As with our previous discussion of “Dining Philosophers”, actors allow a novel approaching to solving this problem. We will adjust a few of the details to enhance the metaphor and have a bit of fun with it. Our metaphorical barber provides yak shaving services. Yaks arrive […]

Continue reading » 5 Comments

Circuit Breaker Stability Pattern

Tags: , , , , ,

[Update 2014-02-02: I’ve posted a video showing a visualization of this pattern at http://www.youtube.com/watch?v=WEXh1WoppMU] In a loosely-coupled system connected with asynchronous messages, a flood of client requests can exceed the capacity of a service. When this happens, we would prefer that the service respond with an indication of the overloaded condition, rather than making us […]

Continue reading » No comments

Evaluating Expressions, part 6 – Actor Primitives

Tags: , , , , , , , , , , ,

In part 6 of our series implementing programming language constructs with actors, we explore meta-circular definition of imperative actor primitives. We have now moved beyond expressions which yield values, and focus on statements which cause effects. The constructs explored here are the heart of any actor-based system. In order to support actor primitive statements, our […]

Continue reading » 5 Comments

“Dining Philosophers” in Humus

Tags: , , , , , , ,

The “Dining Philosophers” problem is a classic example used to illustrate various challenges with concurrency. We will approach this problem by incrementally designing the actors which model the problem and its solution in Humus. Through this example we will explore the avoidance of deadlock and starvation in the design of actor-based systems. Basic Thinking/Eating Cycle […]

Continue reading » 2 Comments

Composing Actors

Tags: , , , , , ,

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 […]

Continue reading » 16 Comments