Elixir

How to safely build Erlang with crypto without OpenSSL issues?

Check out other blog posts related to Erlang: How to deal with CDATA in xmerl? Dark Corners of Erlang and Elixir Tracing How would you debug a highly concurrent system? Erlang + OpenSSL love-hate relationship Sigh. I observe one of the issues above every single time when I need to use an older version of Erlang. It happens only for the aged ones, because they need OpenSSL 1.

Continue reading

How to deal with CDATA in xmerl?

Check out other blog posts related to Erlang: How to safely build Erlang with crypto without OpenSSL issues? Dark Corners of Erlang and Elixir Tracing How would you debug a highly concurrent system? The pain of fiddling with XML via xmerl Let’s agree that the official library - called xmerl is far from perfection, mostly because it does not contain sane defaults for DTD (like XML entities), has deficiencies when it comes to XSD validation, but from the other hand contains exciting stuff like the one documented by Brujo Benavides here.

Continue reading

What is wrong with gen_event?

gen_event confused me from the beginning, so I wanted to investigate the topic more deeply. I did that here. Then I left that topic, and it returned recently to me when I was wondering how the situation changed since then. Here is the updated version of the initial investigation, which started with the following statement: I never used a gen_event, I think it is a bad pattern. At first, it may look like a controversial statement, but I heard a lot of those complaints from other people.

Continue reading

Configuring multiple endpoints in Phoenix Framework

In this post I want to show how to add another endpoint in Phoenix Framework, that is going to listen on a different port. I found out that this topic is not well described in the internet. In our case, this endpoint will be serving a very simple API returning status of the app. The following instructions work with Phoenix version 1.3.2 A separate endpoint gives extra security The first question that comes to mind is “why?

Continue reading

Dark Corners of Erlang and Elixir Tracing

Observability-first Approach Tracing as a tool is immensely productive. It cannot be overestimated - especially in production, but also in development when debugging our own mistakes. In the previous article I covered why we should use that facility and why they invented it in the first place. After first sight and couple of rounds, you fall in love with that tool. Right after you gain some experience, more questions start to arise.

Continue reading

How would you debug a highly concurrent system?

Debugging Concurrency Let me tell you a story. We have deployed a new version of software on the whole fleet. Hundreds of machines in 4 different regions around the world. We observed our metrics, inspected our logs - nothing there. Success, another deployment without any issues. Fast forward two days, and we received a customer support ticket to investigate. One of our integrations complained that they are observing a significant amount of errors when calling our endpoints, in two distinct regions.

Continue reading

Is Elixir/Erlang a good choice for startups?

Erlang vs Node.js & Java Most of the software being developed these days is implemented using Node.js or Java. Ten years ago, around 2006-2009 you would say: Java or Ruby on Rails. No matter how far you look backwards, answer would never contain Erlang. Question is, why? Is it because it’s a functional language? Maybe because it’s old? It’s a hard question but I believe that Erlang is not just a general purpose language.

Continue reading