Background| stevana.github.io
Scheduling threads like Thomas Jefferson| stevana.github.io
Background| stevana.github.io
The history of| stevana.github.io
Motivation and inspiration| stevana.github.io
SVG viewer written in SVG Posted on Sep 9, 2023 This post is about how to write an SVG viewer / browser / “slideshow” which is itself a self-contained SVG. Motivation I’ve been working on a parallel processing pipeline. Each stage of the pipeline is running on a separate thread, and it takes some work items from a queue in front of it, processes them and then puts them in the queue in front of the next stage in the pipeline. In order to better understand what exactly is going on I thoug...| Stevan's notes
Elastically scalable thread pools| stevana.github.io
Motivation| stevana.github.io
hot-swapping-state-machines Posted on Feb 21, 2023 An experiment in implementing remote hot code swapping, or dynamic code upgrade, for state machines. Background In Erlang it’s possible to seamlessly hot swap the code on a running process. Consider the following gen_server implementation of a counter which can be incremented and have its current count value retrieved: -module(counter).-version("1").-export([start_link/0,incr/0,count/0]).-behavior(gen_server).-export([init/1,handle_call/3,h...| Stevan's notes
supervised-state-machines Posted on Feb 13, 2023 An experimental implementation of Erlang/OTP’s gen_server and supervisor behaviours that doesn’t use lightweight threads and message passing. Motivation What exactly is it that makes Erlang suitable for writing reliable distributed systems? I’ve previously argued that it’s Erlang’s behaviours rather than its lightweight processes and message passing. Behaviours can be thought of as generic building blocks for building reliable distrib...| Stevan's notes
Property-based testing stateful systems: a tutorial Posted on Feb 7, 2023 Property-based testing (PBT), i.e. generating random inputs and checking some property of the output, of pure programs is an established practice by now. It’s taught in introductory university classes and it’s part of test suites in industry. Most real world programs are not pure though, they are stateful. While it’s often possible to structure your program in such a way that the impure stuff is done in main, e.g...| Stevan's notes
Towards human-readable binary encodings Posted on Jan 11, 2023 Can we make binary encodings “human-readable”? This post explores this question by means of implementing a library inspired by Erlang’s bit syntax. Motivation JSON is probably the most commonly used format for serialising data today. A frequent argument for using it is that JSON is human-readable. What does that mean exactly? I suppose that people usually mean two things. First, it’s less verbose than XML, making it easier...| Stevan's notes
coroutine-state-machines| stevana.github.io
Towards zero-downtime upgrades of stateful systems| stevana.github.io