December 2019
Intermediate to advanced
248 pages
5h 34m
English
In this chapter, we left our safe bubble of the functional core and ventured out to the real world to deal with state, processes, and communication between components. Here’s how we did it.
To begin our exploration, we dove into some techniques to handle composition with inputs and outputs that were less certain. We looked at ways to transform executing errors to data. We also encountered composition using with.
Next, we built a server layer in two pieces, the QuizManager and the QuizSession. We used a GenServer to build a quiz and another to let a user take a quiz. The server layer used start_link and handle_call functions to encapsulate state and handle communication between processes. We eschewed handle_cast ...
Read now
Unlock full access