The Little Elixir & OTP Guidebook [Review]

The Little Elixir & OTP Guidebook is an introduction to Elixir and OTP that focuses more on the OTP side of things in contrast to Programming Elixir and Elixir in Action. Whilst it does provide an introductory section on Elixir and the syntax, the real heart of the book is focused on OTP. The book […]

Continue reading...

Building a Casino in Elixir

Over the last couple of weeks we’ve covered many of the fascinating aspects of Elixir, Erlang, and OTP that allow us to build highly available, fault tolerant applications. First we looked at using Agents as a way to store state in server processes. Next we looked at understanding GenServer and how we can use the […]

Continue reading...

Elixir in Action [Review]

Despite being a relatively young language, Elixir already has a wealth of learning resources available including tutorials, screencasts, and books. A while ago we looked at Programming Elixir, which serves as an excellent introduction to the language. Written by Dave Thomas, Programming Elixir is probably one of the best ways you can get your feet […]

Continue reading...

Working with Supervisors in Elixir

Last week we looked at organising Elixir projects using Mix. Mix is a build tool for creating, compiling, and testing your Elixir projects. In Elixir, an “application” is a set of modules that can be started and stopped as a single unit. One of the most important characteristics of Elixir and Erlang is it’s fault […]

Continue reading...

Organising your Elixir project with Mix

We have already covered a lot of ground so far in this exploration of Elixir, but in just about every example we’ve been running our Elixir code either in iex or from a single file. This is fine for getting to grips with the language and for very simple examples, but we’re going to need […]

Continue reading...

Understanding GenServer in Elixir

Over the last couple of weeks we have started to explore probably the most interesting aspect of working with Elixir (and Erlang) in that applications are built around this idea of small, isolated processes. First we looked at Understanding Concurrency and Parallelism in Elixir and how we can run our code in isolation and make […]

Continue reading...

Using Agents in Elixir

In last week’s tutorial we looked at storing state in Elixir using processes. In functional programming languages, in order to maintain state you need to continuously pass it between functions. Processes allow us to store state in Elixir, possibly forever, by running an infinite loop of recursive function calls. We can then access this state […]

Continue reading...

Working with State and Elixir Processes

A couple of weeks ago we looked at working with Elixir processes. Processes are the basic unit of concurrency in Elixir. They provide isolation and allow us to build fault tolerant applications. Elixir is a functional programming language, and so this means there is no state. In order to maintain state you need to pass […]

Continue reading...

Using Tasks in Elixir

A couple of weeks ago we looked at working with processes in Elixir. To create a new process we can use the spawn/1 function. This creates a new process and executes the given function concurrently to the current process. Elixir also provides the Task module that builds upon these basic spawn functions to provide convenience […]

Continue reading...

Understanding Concurrency and Parallelism in Elixir

A couple of weeks ago we begin the next big section of learning elixir by taking a first look at processes. Processes are the foundation of many of the most attractive characteristics of elixir. Two of those characteristics are concurrency and parallelism. Processes enable these two characteristics in Elixir. In today’s tutorial we will be […]

Continue reading...