Elixir Blog Posts



Counting Real-Time Trades

In the Real-time Market-Data Updates with Elixir article, we have seen how to build a Coinbase WebSocket client and receive real-time trades. A reader asked how many trades we receive per second. In general, the rate of trades depends on the product and the time of day.
In this article we start to see how to aggregate these trades in real-time, using the GenServer behaviour. We’ll build an aggregation process that groups and count the trades.


Friends, I am now at least in this respect a rare breed: an Elixir programmer who has never written Ruby.

I was never a professional Erlang programmer. I cut my teeth on Python and began working in Python, but Erlang was the language I learned after that and the one that I looked for excuses to write in (in addition to Nim, which would come a little later, but which I would also be able to finagle into production at MakeSpace).

So here was my impression of Elixir for the first several years of my passing acquaintance with it: it’s Erlang with Ruby syntax. I had never ended up writing any Ruby, and I was already happy with Erlang and its syntax. So I had a fairly simplistic understanding of the Elixir language and the roots of its popularity and it didn’t seem that there was anything of value to me.



@sfusato Hey another Erlanger!

A note:

iex(3)> [x, y, z: true] == [x, y, {:z, true}]

You put [x, y, [{:z, :true}]], which is:

iex(4)> [x, y, z: true] == [x, y, [{:z, :true}]]


Also on Streams, those aren’t an Elixir’y thing, they are just repeated function application underneath, trivial to do in Erlang as well. Structs are just maps. Etc…

However the quintessential Elixir’y bits of Elixir are Macro’s. The tooling built up around Elixir works for Erlang as well (except using the ASN.1 compiler in erlang, that’s still borked in Elixir…), you could implement protocols in Erlang the same as you could in Elixir (In fact my ProtocolEx library could even use a ProtocolEx or implementations defined in Erlang as long as a couple specially named named functions with appropriate returns are defined).

But the one thing that is horribly hard to port back to Erlang are Macros. Sure Parse Transforms give you the power, but not the succinctness, and there are parse transforms that add AST quoteing and compile-time calls, but it never gets as succinct as Elixir macros. Macros is what elevates Elixir from just a beam language to a more Lisp’y language without the parenthesis (though if you like the parenthesis look at lfe, it’s an awesome beam language as well!). :slight_smile:


Hey everyone! Happy new year!

Processing Large CSV files with Elixir Streams

In this article I introduce Elixir Streams as a powerful and elegant way to process large CSV files. I compare the greedy and the lazy approach with some memory and cpu benchmarking.

As always, any feedback is really appreciated! :smiley:


Create a High-Availability Kubernetes Cluster on AWS with Kops

This article is mainly focused on DevOps. I show how to create a High-Availability Kubernetes cluster on AWS with Kops and deploy a Phoenix Chat application.

I hope this can be useful to the Elixir community. I find interesting the idea of experimenting and discussing (in further articles) the deployment and update of distributed stateful elixir apps on a Kubernetes cluster.

Please let me know what you think. I’m here for any question :smile:


Distributed Phoenix Chat using Redis PubSub

Hi guys!

In this article we see how to solve an issue we faced in the previous article, scaling horizontally the Phoenix Chat app. We’ll see how to integrate the PubSub Redis adapter to our chat app, and make it distributed.




Using Raxx.View in Plug applications





Wrote down some thoughts about modular design in Elixir:

Comments, disagreements, and corrections are highly welcome :wink:



Phoenix LiveView Info

Elixir is one of the young programming languages people mentioned a lot. We have been working on Elixir and Phoenix for several months since we started the business and we would like to share why we chose Elixir, the lessons learned, sample code and why it might be a good choice for your next project.

split this topic #439

A post was split to a new topic: Achieving 100k connections per second with Elixir


Spawning processes in Elixir, a gentle introduction to concurrency

Along with pattern matching, one of the coolest things in Erlang and Elixir is their concurrency implementation based on Actor model. In this article I introduce concurrency and show how we can start making our code concurrent in Elixir, using processes.


Blog post on common pitfalls of :ets and introduces the Ets library:


missing link?


Fixed :slight_smile:


Hey Process, there is a Message for you!

Messages are a fundamental part of concurrency in Erlang and Elixir. In this article I introduce how messaging between processes works. We play with simple examples to see how a process sends and receives messages.

Alvise Susmel's blog on Elixir


Gonna add my own post that I wrote after building my first product (written in Elixir:))