A couple years ago I wrote about how to avoid losing your ets tables if the Erlang processes that own those tables crash. The original post resulted from accidentally losing an ets table full of video subscriber data during a debug session on a live customer production site. Oops.

If you’re looking for some code that implements what that post describes, look no further than DeadZen‘s etsgive repository. DeadZen is a very experienced Erlang developer, so it’s no surprise that his example code is straightforward and clean.

Just as described in my post, DeadZen’s supervisor code starts two workers, one that manages the table and one that uses it. The table manager process takes the following steps: