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

Actors Make Better Observers

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

The Observer pattern causes temporal coupling in systems with synchronous message passing. This can lead to failure in Object-Oriented systems. Asynchronous messaging avoids the pitfalls. Actor-based implementations more accurately realize the original intent of the pattern. The intent of the Observer pattern is to “define a one-to-many dependency between objects so that when one object […]

Continue reading » 3 Comments

Message Passing, part 1 – Synchronous Rendezvous

Tags: , , , , , , ,

What do we mean when we say “message-passing”. For Object-Oriented developers from the Smalltalk tradition, message-passing involves a dynamic method lookup, invocation of that method with the target object as an implicit parameter, and return of a result object. By contrast, message-passing in synchronous communication models (such as Ï€-calculus) involves “rendezvous” between sender and receiver, […]

Continue reading » 3 Comments