Table of Contents
Acknowledgments
Introduction
Who This Book Is For
Who This Book Is Not For
About This Book
Online Resources
1.
Mapping Our Route
Lay the Foundation with Elixir
Add a Web Interface with Phoenix
Functional Web Development
The Game of Islands
Part I. Define the Functional Core in Elixir
2.
Model Data and Behavior
The Benefits
Let’s Build It
Discover the Entities and Model the Domain
Transforming Data
Putting the Pieces Together
Wrapping Up
3.
Manage State with a State Machine
A Quick Look at State
A Bit of History
State Machines
A Functional State Machine for Islands
Working Through the States
Wrapping Up
Part II. Add OTP for Concurrency and Fault Tolerance
4.
Wrap It Up in a GenServer
A Look at Micro-Services
OTP Solutions
Getting Started with GenServer
Initializing GenServer State
Customizing GenServer Behavior
Naming GenServer Processes
Wrapping Up
5.
Process Supervision for Recovery
Fault Tolerance
Linking Processes
Introducing the Supervisor Behaviour
Supervision Strategies
The Child Specification
A Supervisor for the Game
Starting the Supervision Tree
Starting and Stopping Child Processes
Putting the Pieces Together
Recovering State After a Crash
Wrapping Up
Part III. Add a Web Interface with Phoenix
6.
Generate a New Web Interface with Phoenix
Frameworks
Applications
Generate a New Phoenix Application
Adding a New Dependency
Call the Logic from the Interface
Wrapping Up
7.
Create Persistent Connections with Phoenix Channels
The Beauty of Channels
The Pieces That Make a Channel
Let’s Build It
Establish a Client Connection
Converse Over a Channel
Connect the Channel to the Game
Phoenix Presence
Authorization
Wrapping Up
A1.
Installing System Dependencies
Elixir
Erlang
Phoenix
Node.js and NPM
Bibliography
Copyright © 2018, The Pragmatic Bookshelf.