Chapter 18Browsing with Websockets and Erlang

In this chapter, we will see how to build applications in the browser and extend the idea of using message passing to outside Erlang. This way, we can easily build distributed applications and integrate them with a web browser. Erlang thinks that the web browser is just another Erlang process, which simplifies our programming model, putting everything into the same conceptual framework.

We’re going to pretend that a web browser is an Erlang process. If we want the browser to do something, we’ll send it a message; if something happens within the browser that we need to attend to, the browser will send us a message. All of this is possible thanks to websockets. Websockets are part of the HTML5 standard ...

Get Programming Erlang, 2nd Edition 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.