Elixir by Example

Elixir by Example

A hands-on tour of Elixir, OTP and distributed systems through small, annotated programs, from your first IO.puts to supervised, concurrent services.

01

Core Elixir

The language itself: data, pattern matching, functions, modules and protocols.

  1. Hello World
  2. Values
  3. Atoms
  4. Strings and Binaries
  5. Lists and Tuples
  6. Maps
  7. Keyword Lists
  8. Pattern Matching
  9. case, cond and if
  10. Anonymous Functions
  11. Modules and Named Functions
  12. Guards
  13. Recursion
  14. The Pipe Operator
  15. Enum
  16. Comprehensions
  17. Streams
  18. Structs
  19. Protocols
  20. with
  21. Errors and Tagged Tuples
  22. Sigils
02

Processes and OTP

Concurrency the BEAM way: lightweight processes, messages, and supervision.

  1. Processes
  2. Sending and Receiving Messages
  3. Links and Monitors
  4. Task
  5. Agent
  6. GenServer
  7. Supervisors
  8. Registry
  9. ETS
03

Distributed Elixir

Many machines, one system: connected nodes, cluster-wide names and process groups.

  1. Nodes and Distribution
  2. Global Names with :global
  3. Process Groups with :pg
04

Deployment coming next

Releases, containers and Kubernetes: running a cluster in production.