Elixir Blog Posts

blog-posts
wiki
stickies

#425

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.


#426

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.

https://blog.zdsmith.com/posts/sketches-of-elixir.html


#427

@sfusato Hey another Erlanger!

A note:

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

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

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

:slight_smile:

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:


#428

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:


#429

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:


#430

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.


#431

https://www.jackmarchant.com/articles/using-a-genserver-to-handle-asynchronous-concurrent-tasks


#433

Using Raxx.View in Plug applications

http://crowdhailer.me/2019-02-08/using-raxx-view-in-plug-applications/


#434

https://www.jackmarchant.com/articles/a-comparison-of-elixir-supervision-trees-and-react-component-trees


#436

Wrote down some thoughts about modular design in Elixir:

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


#437

https://www.jackmarchant.com/articles/lonestar-elixir-conf-2019-highlights


Phoenix LiveView Info
#438

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


#440

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.


#441

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


#442

missing link?


#443

Fixed :slight_smile:


#444

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
#445

#446

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