It has been several months since the launch of Citus Cloud, and we’d like to share one part of its design with you. In particular, the fundamental unit of organization for our hosted service on top of AWS is concurrent state machines. In what follows we’ll walk through their use and implementation for Citus Cloud.
First, we’d be remiss if we didn’t acknowledge the great influence that working on Heroku Postgres had on the team. There are also a few talks on Heroku Postgres’s design that you may find as interesting and useful information.
Citus Cloud is recently written from scratch. Because of this, it’s a good time to provide guidance in how one can start writing similar systems.
An Example: A Server that Restarts
To orient ourselves, the following is pseudo-code of an abstract state machine, called
Server. This state machine is for creating and restarting servers in some cloud provider:
if not offline?