Last year, I was part of a team building a small autonomous sailing boat. This year, I started working at European XFEL, a research facility built around a 3km long X-ray laser. Both projects use Python in their control systems, and despite the vastly different size and budget, they have surprisingly similar architectures, with separate processes sending data to each other using sockets.
We wrote the code for our sailing boat using an open source framework called the Robot Operating System, or ROS. ROS is built around the concept of communicating nodes: a node can publish messages on a named topic, and any other nodes subscribed to that topic will receive the message. Our boat runs about 15 nodes (the precise number depends on what task it’s doing). This isn’t the only way to drive a robot boat: the team from Aberystwyth, whose code is also open, use a very different architecture.
European XFEL, in Hamburg, is a new €1.2 billion collaboration between 12 countries. The control and data analysis systems are built on a framework called Karabo, developed in-house. Karabo ‘devices’ - which can encapsulate hardware interfaces or software processing - communicate using both a central message broker and point-to-point channels.
I’ll describe each of these projects, and the similarities and differences between their software systems. Then I’ll talk about what has been good and bad on each project, and what patterns and ideas we can take from them for designing other systems, including systems that don’t control hardware.