Inklings: a tumblelog

Suture: Supervisor Trees for Go

Supervisor trees are one of the core ingredients in Erlang’s reliability and let it crash philosophy. A well-structured Erlang program is broken into multiple independent pieces that communicate via messages, and when a piece crashes, the supervisor of that piece automatically restarts it.

This may not sound very impressive if you’ve never used it. But I have witnessed systems that I have written experience dozens of crashes per minute, but function correctly for 99% of the users. Even as I have been writing suture, I have on occasion been astonished to flip my screen over to the console of Go program I’ve written with suture, and been surprised to discover that it’s actually been merrily crashing away during my manual testing, but soldiering on so well I didn’t even know.