Let’s Build It

The big picture for this final chapter is that we’re opening up the public interface we created for the game server to the web. The game server is a stateful system. Modern web front ends are also stateful. We’re going to build a Phoenix channel as a stateful, persistent connection between these two stateful systems. This new channel’s public interface will become the mechanism clients will use to interact with the game.

Here’s the Plan

We’re going to build that channel function by function, and we’ll check its behavior at each step along the way by calling JavaScript code in the browser’s developer tools console. We want the new channel to communicate directly with an individual GenServer process for a game. Since channels multiplex ...

Get Functional Web Development with Elixir, OTP, and Phoenix now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.