Interactive applications using channels

Up to this point, we've been exploring how to use Phoenix to build traditional web applications, where the server receives a request and returns a response. Requests are isolated from one another, and it is the responsibility of the server to keep the state of the conversation with each client. This has been the way most web applications are built because it allows us to scale them easily. Since each request is stateless, the server can always treat them as a new one, giving us the ability to horizontally scale our applications.

In this section, we'll focus on adding channels to our application, which, as we'll see during this chapter, significantly simplifies the implementation of interactive applications. ...

Get Mastering Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.