Posted in 2024

A Heisenbug in the Sieve

In Castle, one can dynamically connect components and send events over those connections. Typically, this is an action on an incoming message (see: The Actor Model). And depending on ‘The Machinery (ToDo)’, those events can be queued. It is this combination that can result in a beautiful Heisenbug.

First, let’s explain the Heisenbug, before we give an example. Then we analyze it, show how to improve the code, and finally formulate a requirement to prevent & detect this kind of bug in Castle.

Read more ...


The Sieve (basic variant)

To show some features of CCastle, I use ‘the Sieve’, short for the Sieve of Eratosthenes. An old, well-known, algorithm to find prime numbers; with implicit concurrency.

With an almost trivial implementation, many “CC concepts” can be shown; in only a handful of lines….

Read more ...