Elixir

Creating Thumbnails of uploaded Images and PDF in Phoenix

We see how to create thumbnails of Images and PDFs in Elixir and Phoenix, using ImageMagick and Mogrify.
Alvise Susmel
10 min read

Step-by-Step Tutorial to Build a Phoenix App that Supports…

A step-by-step tutorial we see in depth how to build a Phoenix app from scratch, letting users upload their files using a multipart form....
Alvise Susmel
15 min read

Hashing a File in Elixir

What is a hash function and how to calculate the hash strings and files in Elixir, using functions in :crypto module and Elixir Streams
Alvise Susmel
3 min read

Elixir Stream and large HTTP responses: processing text

Part 1 – Elixir Stream to process large HTTP responses on the fly Part 2 – this article You find the code, of this...
Alvise Susmel
11 min read

Elixir Streams to process large HTTP responses on the…

Transforming an HTTPoison async response into an Elixir Stream, to easily process large remote files on the fly, gaining code clarity and reusability.
Alvise Susmel
5 min read

The Primitives of Elixir Concurrency: a Full Example

We see how to fully implement concurrent HTTP calls, using just spawn, send and received along with HTTPoison. We then refactor our code using...
Alvise Susmel
6 min read

Hey Process, there is a Message for you!

Messages are a fundamental part of concurrency in Elixir. In this article we see how messaging and mailboxes . With messages we can
Alvise Susmel
5 min read

Spawning processes in Elixir, a gentle introduction to concurrency

In this article I introduce concurrency and show how we can start making our code concurrent in Elixir, using processes.
Alvise Susmel
4 min read

The Beauty of Pattern Matching in Elixir

One of the beautiful things of Elixir is pattern matching. We'll see pattern matching with tuples, lists and maps, a bit of control flow...
Alvise Susmel
3 min read

Download Large Files with HTTPoison Async Requests

Make requests with HTTPoison is easy, but the response is held in memory. To download large files we need to divide the response into...
Alvise Susmel
4 min read

Connecting Elixir Nodes with libcluster, locally and on Kubernetes

We are going to see how to cluster Elixir and Phoenix nodes with libcluster, locally and on Kubernetes using containers.
Alvise Susmel
4 min read

Distributed Phoenix Chat with PubSub PG2 adapter

In this article we see how to cluster Phoenix Chat nodes, using distributed Elixir. We see how pg2 works and inspect how Phoenix efficiently...
Alvise Susmel
6 min read

Distributed Phoenix Chat using Redis PubSub

In this article we'll see how to scale horizontally the Phoenix Chat app, using Redis and a Phoenix PubSub adapter.
Alvise Susmel
3 min read

Processing Large CSV files with Elixir Streams

Elixir Streams are extremely powerful when we need to process large CSV files. Let's see the difference between a greedy and lazy approach.
Alvise Susmel
4 min read

Aggregate and Count Real-Time Trades with Elixir Maps

In this article we start to see how to aggregate Coinbase trades in real-time, using the GenServer behaviour. We'll build an aggregation process that...
Alvise Susmel
6 min read