Distributed programming made easy with Elixir

The Elixir programming language on a Raspberry Pi lets you create distributed projects in just a few lines of code.

Creating distributed and concurrent applications doesn’t have to be difficult. Elixir [1] allows hobbyists and new programmers to create projects that can work across multiple nodes. A general-purpose programming language, Elixer runs on top of the Erlang virtual machine (VM) [2], which is known for running low-latency, distributed, and fault-tolerant systems.

In this article, I look at three projects (Figure 1) that use basic Elixir functions, with no custom project setup or imported libraries. The first project employs remote functions between a PC and a Raspberry Pi, the second project uses multinode requests to get Pi statistics, and the final project looks at dynamic sharing of data between three nodes.

These projects require only 10 to 25 lines of Elixir code, showing that distributed projects don’t have to be complicated.


Use Express-Checkout link below to read the full article (PDF).

Posted by Contributor