State Transitions in Complex Systems

Marijn Haverbeke

Playlists: 'bobkonf2023' videos starting here / audio

In systems whose state consists of a non-trivial number of separate
but related pieces, updating this state in a way that keeps everything
coherent requires some discipline. In extensible systems, where the
different pieces may not even be aware of each other, this becomes
even more challenging.

A good example of such a system is a modular code editor. It involves
a number of constantly-changing pieces of state (the document,
selection, scroll position, and so on) and a lot of non-core state
intimately entangled with those (syntax highlighting, linting,
completion), and possibly with each other.

This presentation discusses the set of principles we arrived at in
designing such an editor (), and
compares it to the more traditional event-style architectures. The
editor uses persistent state values and first-class transactions, both
of them extensible by 3rd-party code, to make it straightforward by
construction to keep the zoo of interdependent data involved in a
full-featured editor coherent.

Download

Embed

Share:

Tags