Erlang course

Erlang Level 9: State & Storage

State & Storage is level 9 of 17 of the LoWisa Erlang course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-25

ETS

  • ETS tables. ETS is in-memory term storage: millions of reads per second, owned by a process, surviving it optionally.
  • Table types. Tables come as set, ordered_set and bag: key semantics chosen per table.
  • Concurrent access. ETS reads run concurrently across schedulers: the shared-data escape hatch that stays safe.

DETS and Mnesia Concepts

  • DETS. DETS persists ETS-style tables to disk: bounded, simple, honest about its limits.
  • Mnesia. Mnesia is Erlang’s built-in distributed database: transactions and replication over Erlang terms.
  • Choosing storage. Choose by need: ETS for speed, DETS for simple persistence, Mnesia for replicated state: externals beyond.

Concurrent State Design

  • Process-owned state. Default design: state lives inside a process: serialised access by mailbox, no locks.
  • ETS for hot reads. When thousands read one dataset, a process bottlenecks: ETS serves hot reads beside an owning writer.
  • Ownership and heirs. ETS tables die with their owner unless an heir is named: state lifetime designed, not assumed.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Erlang Level 9: State & Storage cover?

ETS, DETS and Mnesia Concepts, Concurrent State Design: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 8: OTP Applications, which covers Applications, Configuration, Dependencies and Releases.

Learn Erlang on your phone

The first level is free. LoWisa is on Google Play and the App Store.