The Pragmatic Studio

Web Sockets Module Added To Elixir/OTP Course

July 19, 2017

It’s summertime here and picking the right tool for the job is crucial to having more time for outside fun in the sun. 😎

In our Elixir/OTP course, it’s time to write a TCP socket server so that any HTTP client can interface with our application. That’s exactly what we do in module #20 Web Server Sockets.

Here’s the cool part: Elixir is compatible with all existing Erlang libraries.

Talk about a big tool to leverage! Because Elixir code is compiled into byte code that runs on the Erlang VM, you can call any Erlang library from Elixir.

This proves immensely helpful for the current app in our Elixir course. We have a fully-functioning HTTP request handler and we now want to write a TCP socket server so that any HTTP client can interface with our application. Erlang’s gen_tcp library to the rescue!

Being able to confidently transcode Erlang to Elixir is an essential skill that should be in the toolbox of every Elixir developer.

Enjoy!