Fault tolerance, storage and distribution
This part is why Erlang exists: a process that crashes is restarted, a table that outlives it keeps the state, and a node that joins another one shares the work. The lessons put a supervisor, an ETS table and a timer next to the crash they are meant to survive.
ETS and DETS are part of the runtime, mnesia is an OTP application, and distribution needs two nodes and a cookie. Every example is run in the container, with the second node started on the same machine where the lesson says so. The last lessons go deeper into each store and into what a running node reports about itself.
11.1
Let it crash: error handling
a failure that stays local, a supervisor that restarts, and when to catch
Open
11.2
ETS tables
an ordered table, insert and lookup, and the process that owns it
Open
11.3
Timers and timeouts
send_after, a receive timeout, and the timer a server keeps
Open
11.4
Code loading
code:load_file, the code path, and the two versions of a module
Open
11.5
Hot code upgrades
code_change, the release handler, and a swap without a restart
Open
11.6
Distributed Erlang
a node name, a cookie, and a call to a process on another node
Open
11.7
ETS in depth
the keypos, update_counter, a match spec with several clauses, and the heir of a table
Open
11.8
DETS
a table in a file, sync and close, a read only handle, and the data that survives a crash
Open
11.9
Mnesia
the schema, a transaction, disc_copies, and a table that outlives the VM
Open
11.10
Distribution in depth
rpc with a timeout, monitor_node, a remote spawn, pg groups and a partition
Open
11.11
Observability and logging
the logger and its handlers, the mailbox, tracing, and the system monitor
Open