What you will learn in Elixir in Action, Third Edition
Chapter by chapter
Concepts explained in this book
- BEAMThe Erlang runtime system is the execution environment that runs Erlang and BEAM-based applications.
- server processA server process is a concurrent process that encapsulates private state and communicates with other processes through messages.
- child specificationchild_spec/1 returns a supervision child specification describing how a process should be started and supervised.
- SupervisorA supervisor process is a concurrent process that monitors and manages worker processes, restarting or otherwise handling them when they fail.
- ErlangErlang is a general-purpose development platform for building scalable, concurrent, distributed, fault-tolerant, and highly available systems.
- resilienceFault tolerance is the ability of a system to continue providing acceptable service when components fail or errors occur.
- concurrencyConcurrency is the capability for multiple computational activities to make progress during overlapping periods of execution.
- moduleA module is a named unit of Elixir code that groups functions and other definitions for compilation and loading.
- ETS tableETS is Erlang Term Storage, an in-memory table facility and Erlang module for storing and retrieving Erlang terms within a BEAM instance.
- pattern matchingPattern matching is a language mechanism that compares a value with a pattern and succeeds when their structure and contents conform, binding variables in the pattern.
- ElixirElixir is a functional programming language that runs on the Erlang virtual machine and supports concurrent, distributed, fault-tolerant software.
- distributed systemA distributed system is a system whose components execute across multiple networked machines or runtime environments.
- process registryA process registry is a component that associates application-defined names or keys with process identifiers for registration and lookup.
- :global:global is an Erlang runtime module that provides globally visible process registration and discovery across connected nodes.
- workerA worker process is a supervised process that performs part of a service's operational work rather than organizing other processes.
- GenServerThe :gen_server module is the Erlang standard-library implementation that provides the underlying generic server behavior for GenServer.
- local process nameLocal process registration is the act of associating a process with an atom name that is resolvable only within the current BEAM instance.
- exit trappingExit trapping is a process behavior in which linked-process termination signals are converted into messages instead of terminating the receiving process.
- castA cast is an OTP asynchronous request that delivers a message to a server without returning a response to the caller.
- uptimeA high-availability system is a system designed to provide service continuously with minimal downtime.
- message passingMessage passing is interprocess communication in which processes exchange data through runtime messages rather than shared memory.
- callback moduleA callback module is a module that exports functions invoked by a generic component to provide application-specific behavior.
- receive expressionA receive expression removes and pattern-matches messages from the current process's mailbox, optionally waiting for a matching message or timing out.
- global registrationGlobal registration is the association of a process with a name that is visible and resolvable across all nodes in a cluster.
- listA list is an ordered Elixir data structure whose elements can be traversed and combined through list operations.
- init/1init/1 is the callback that receives startup data and returns a supervisor's child specifications and options.
- process linkA process link is a bidirectional association between exactly two processes that propagates abnormal termination notifications between them.
- structAn Elixir struct is a map-like data structure associated with a module and containing a defined set of fields.
- supervision treeA supervision tree is a hierarchical arrangement of supervised processes in which supervisors monitor and restart child processes.
- immutable collectionImmutable data is data whose value cannot be changed after it has been created, so modifications produce new versions instead of altering existing values.
- restart strategyA restart strategy specifies which supervised child processes a supervisor terminates and restarts after a child failure.
- schedulerA scheduler is a runtime component that selects runnable processes and allocates execution time to them.
- OTP releaseAn OTP release is a self-contained package of an Erlang or Elixir application together with the runtime components and configuration needed to run it.
- exitAn exit signal is a BEAM runtime notification that communicates process termination and can cause the receiving process to terminate.
- macroA macro system is a language facility that transforms code during compilation or another pre-execution phase.
- AgentAgent is an Elixir module and OTP abstraction for managing state through a process and exposing synchronous or asynchronous state operations.
- recursionRecursion is a technique in which a computation invokes itself on a smaller, simpler, or continuing input until reaching a terminating or deliberately nonterminating case.
- streamStream is the Elixir standard-library module that provides lazy operations and stream constructors for enumerable data.
- Mix projectA Mix project is an Elixir project organized with configuration, source files, compiled artifacts, and related development resources managed by Mix.
- otp-compliant processAn OTP-compliant process is a process that follows Open Telecom Platform conventions and can participate in supervision trees with OTP-oriented lifecycle behavior.
- process-level isolationProcess isolation is the separation of processes so that they do not share mutable memory and failures in one do not directly corrupt another.
- multiclause functionA multiclause lambda is an anonymous function composed of multiple clauses selected according to their patterns and optional guards.
- TaskTask is an Elixir module and OTP abstraction for running asynchronous computations, with support for awaiting results and supervision.
- concurrency modelA concurrency model is the set of abstractions and rules a programming language uses to represent and coordinate simultaneous computation.
- recoveryError detection and recovery is a set of mechanisms for identifying failures and restoring affected computation or service.
- application resource fileAn application resource file is a plain-text Erlang-term file that describes an OTP application, including its metadata, modules, dependencies, and startup callback module.
- mix environmentThe prod environment is the Mix configuration intended to produce a build close to the deployed production version, independently of the machine where it runs.
- responsivenessResponsiveness is the ability of a system to handle requests within an acceptably short time under normal or adverse conditions.
- after clauseAn after clause is a receive construct that specifies an alternative branch to execute when no matching message arrives before a timeout.
- deep copyA deep copy is a recursive copy of a value that duplicates the complete hierarchy of nested terms rather than sharing its mutable parts.
- IEx applicationIEx is Elixir's interactive command-line shell for evaluating code and inspecting runtime values.
- interface functionAn interface function is a public function that exposes a component's operations while hiding its process creation and communication details.
- atomAn atom is an Elixir named constant whose text is stored in the runtime atom table and whose value is a reference to that text.
- Enum.reduce/3Enum.reduce/3 traverses an enumerable while repeatedly applying a function to each element and an accumulator, returning the final accumulator.
- remote shellA remote shell is an interactive shell session that executes expressions in the context of another running runtime node.
- lockingA cluster-wide lock is a distributed mutual-exclusion mechanism that prevents competing operations on different nodes from proceeding simultaneously.
- try-catch statementA try construct is an Elixir control-flow construct for explicitly catching and handling exceptions and other error outcomes.
- higher-order functionA higher-order function is a function that accepts one or more functions as arguments, returns one or more functions, or both.
- PlugPlug is an Elixir library for composing web application connection adapters and middleware behind a unified interface.
- releaseA release is a self-contained deployment artifact containing an application, its dependencies, compiled code, and the runtime needed to execute it.
- graceful shutdownGraceful termination is the controlled shutdown of a process that allows it to perform final cleanup before exiting.
- temporary workerA temporary worker is a supervised worker process that is not restarted after termination.
- transient workerA transient worker is a supervised worker process that is restarted only when it terminates abnormally.
- binary stringA binary is a contiguous sequence of bytes used by Elixir to represent binary data and strings.
- module attributeA module attribute is metadata or a compile-time value associated with an Elixir module.
- import aliasAn alias is an Elixir directive that binds an alternate name to a module for use in references.
- one_for_one strategyA one-for-one supervisor is a supervisor that restarts a failed child independently without restarting its sibling children.
- consistent hashingConsistent hashing is a key-to-node mapping technique that limits remapping when nodes are added to or removed from a distributed system.
- synchronization pointA synchronization point is a component or operation through which competing executions are coordinated to enforce a required ordering.
- connection poolingA database connection pool is a bounded collection of reusable database connections managed to constrain simultaneous database operations.
- process discoveryProcess discovery is the identification of a process so that other processes can communicate with it.
- DETSDETS is Erlang's disk-based term storage facility that organizes terms in tables backed by individual files.
- match patternAn ETS match pattern is a tuple-shaped descriptor that specifies which table rows should match, with wildcard atoms representing unconstrained fields.
- match specificationAn ETS match specification is a structured query containing a row pattern, guard filters, and a result expression.
- MnesiaMnesia is an embedded Erlang database supporting in-memory and disk-based tables, transactions, indexing, sharding, and replication.
- state persistenceData persistence is the retention of data beyond the lifetime of the computation that created or processed it.
- mix runmix run is a Mix command that runs Elixir code within a Mix project.
- enumerable propertyAn enumerable is a data structure or abstraction that implements the contract required for traversal by Enum operations.
- lazy enumerableA lazy enumerable is an enumerable that computes and produces its values only when a consumer requests them.
- remote processA remote registered process is a registered BEAM process located on another node and addressable by a name together with that node's identity.
- tail-call optimizationTail-call optimization is a compiler or runtime optimization that reuses a caller's stack frame when its final operation is a function call.
- maximum restart frequencyRestart intensity is the limit on how many child-process restarts a supervisor permits within a configured time interval before terminating itself and its children.
- global aliasA global alias is a name associated with a process and made resolvable across all nodes in a cluster.
- defstruct macroThe defstruct macro defines the fields and initial values of a struct in an Elixir module.
- MixMix is Elixir's build tool for creating, compiling, testing, and managing Elixir projects and their dependencies.
- remote procedure callA remote procedure call, or remote function call, is an invocation of an operation on another process or machine presented as though it were a local function call.
- closureA closure is a function value that retains access to variables from the lexical scope where it was created.
- tupleA tuple is an Elixir data structure containing a fixed number of terms in positional order.
- database processA database process is a concurrent process that handles requests to store and retrieve application data.
- MapSetMapSet is an Elixir collection implementing a set of unique values of any type.
- OTP behaviorAn OTP behavior is a standardized callback contract and supporting framework for implementing recurring process patterns in Erlang and Elixir.
- tail recursionTail recursion is recursion in which each recursive call is the final operation of the current function invocation.
- :pg:pg is an Erlang library module for creating cluster-wide process groups and managing their membership.
- process groupA process group is a named cluster-wide collection of processes that can be queried as a set for communication or coordination.
- exit reasonAn exit reason is an Elixir term describing why a process terminated, including the atom :normal for normal termination.
- handle_info/2handle_info/2 is a GenServer callback that processes ordinary messages and system notifications not handled as calls or casts.
- separation of concernsSeparation of concerns is a design technique that divides a system into components with distinct responsibilities.
- IO.inspect/1IO.inspect is an Elixir standard-library function that prints an inspected representation of a value and returns that value unchanged.
- network partitionA netsplit is a network partition that breaks communication between previously connected nodes in a distributed system.
- truthinessA truthy value is a value that Elixir treats as true in truthiness evaluation.
- catch clauseA catch clause is a clause of a try expression that pattern-matches and handles an error, exit, or throw.
- pipe operatorThe Elixir pipe operator passes the result of an expression to the next function call as that call's first argument.
- serializationSerialization is the handling of competing operations one at a time in a defined sequential order.
- serviceA service is a part of a system that runs in a separate operating-system process.
- key-value storeA key-value store is a data structure that associates each key with a corresponding value.
- PoolboyPoolboy is an Erlang/Elixir library that manages pools of worker processes through checkout and checkin operations.
- mix testmix test is a Mix command that runs the tests of an Elixir project.
- arityArity is the number of arguments that a function receives.
- dependencyA dependency is a component, resource, or prerequisite that another software component relies on.
- BEAM concurrencyThe BEAM concurrency model is the set of abstractions and scheduling rules through which the BEAM virtual machine executes concurrent processes.
- Open Telecom PlatformOTP is Erlang's collection of libraries, design principles, and runtime components for building concurrent and fault-tolerant applications.
- memory boundA bottleneck is a component or operation whose limited processing capacity constrains the throughput of a larger system.
- dbgKernel.dbg/2 is an Elixir debugging macro that prints an expression, its value, and related evaluation information while returning the value.
- via tupleA via tuple is a three-element tuple that connects an OTP process name to a custom process registry and its registry-specific lookup data.
- GenServer.start/2GenServer.start is an Elixir API function that starts a GenServer process from a callback module and initialization argument.
- tail callA tail call is a function call that is the final operation performed by its caller, allowing the caller's execution frame to be reused.
- Supervisor.child_spec/2Supervisor.child_spec/2 is an Elixir function that derives or modifies a child specification for a supervised process.
- collectableThe Collectable protocol is an Elixir protocol that defines how values are repeatedly added to a resulting data structure.
- :global.trans/2:global.trans/2 is an Erlang function that acquires a distributed lock, executes a function, and releases the lock.
- :rex process:rex is a locally registered Erlang kernel process that receives and executes remote procedure call requests.
- :rpc.call/4rpc.call/4 is an Erlang remote procedure call function that invokes a specified function on a remote node.
- :net_kernel.monitor_nodes:net_kernel.monitor_nodes/1 is an Erlang function that subscribes a process to notifications when remote nodes connect or disconnect.
- DynamicSupervisorDynamicSupervisor is an OTP and Elixir supervisor implementation that starts and supervises child processes dynamically at runtime.
- observerobserver_cli is a command-line monitoring frontend for displaying information about a running Erlang or Elixir system.
- intermediate processAn intermediate process is a coordinating process that accepts requests, queues or processes them, and later reports their status.
- DateDate is an Elixir standard-library abstraction for calendar dates without a time of day.
- keyword listA keyword list is an Elixir list whose elements are two-element tuples with atom keys and arbitrary values.
- NaiveDateTimeNaiveDateTime is the Elixir standard-library type and module for representing date-times without time-zone information.
- intervalA range is an Elixir abstraction representing a sequence of values bounded by a start and an end.
- TimeTime is the Elixir standard-library type and module for representing times of day with subsecond precision.
- stringString is the Elixir standard-library module providing functions for working with UTF-8 encoded binaries and related textual data.
- split-brainSplit-brain is a distributed-system condition in which mutually disconnected clusters independently continue serving clients as though they were authoritative.
- preemptionPreemptive scheduling is a scheduling method that interrupts running processes to switch execution to other runnable processes.
- Node.monitor/1Node.monitor/2 is an Elixir function that monitors a particular remote node and reports its connection or disconnection.
- tick messageA tick message is a periodic liveness probe sent between nodes to check whether a peer responds.
- GenServer.reply/2GenServer.reply/2 sends a deferred reply from a GenServer process to the caller of a synchronous request.
- singleton database processA singleton database process is one central process through which all operations on a database resource are serialized.
- recursive data structureA recursive data structure is a structure whose elements or parts can contain structures of the same form.
- application environmentAn application environment is an in-memory key-value store associated with an OTP application, where atom keys map to Elixir terms.
- deployable systemA deployable system is a self-contained software system assembled with the applications and runtime components required to run it.
- MapA map is an Elixir data structure that associates keys with values, with both keys and values allowed to be any term.
- def macroThe def macro is an Elixir compile-time macro that defines a named function from its name, arguments, and body.
- consistencyConsistency is the property that a system's observed state and operation outcomes remain coherent according to its intended rules.
- node nameA node name is an identifier consisting of a name prefix and host name that identifies a BEAM instance for distributed connections.
- unless expressionAn unless expression conditionally evaluates one branch when its condition is false and another branch otherwise.
- Plug.RouterPlug.Router is a Plug module that provides a routing DSL for dispatching HTTP requests to handler code.
- interactive shellAn interactive shell is a command-line environment that reads, evaluates, and displays the results of expressions interactively.
- debuggingDebugging is the process of examining program execution and data to locate or understand faults.
- DynamicSupervisor.start_child/2DynamicSupervisor.start_child/2 starts a new child process under a DynamicSupervisor and reports whether the start succeeded or conflicted with an already running child.
- :rpc.multicall/4:rpc.multicall/4 invokes a specified function on multiple nodes and returns their results together with the nodes that did not respond before the timeout.
- conditional logicA conditional expression evaluates one of multiple branches according to a condition or a matched pattern.
- long nameA long node name identifies a distributed Erlang node using a fully qualified host name.
- short nameA short node name identifies a distributed Erlang node using a host name without a fully qualified domain name.
- dynamic typingA dynamic language is a programming language in which important type checks or type determinations occur at runtime rather than being fully enforced statically.
- pure functional data structureA pure functional data structure is an immutable data structure whose operations produce new values without modifying existing values.
- runtime config fileruntime.exs is an Elixir configuration script evaluated at runtime before an application starts so runtime-specific settings can be loaded.
- linked listA singly linked list is a sequence of nodes in which each node refers to the next node and traversal proceeds in one direction.
- linear time complexityLinear time complexity is asymptotic running time that grows proportionally with the size of the input.
- tailThe tail of a list is the remainder following its first element in a head-and-tail representation.
- timeoutA timeout is a duration limit after which a waiting operation raises an error if its expected response has not arrived.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
