• Dmitry Rubinstein
  • 30 May 2019
  • Comments

Elixir: Containerized development environment


Containerizing development environment seems to be good for several reasons:

  • Development can be held on any host - Linux and Windows - in the same manner
  • Environment is shipped as ready-to-work bundle: all needed OS-packages, compilers, tools are pre-installed
  • Additional third-party software, including databases, message-brokers, proxies, caches, and side-services can be bootstrapped in an automated manner in seconds.

This article will dive into creating simple development environment using Docker Compose (and optional - VSCode Remote Tools)

  • Dmitry Rubinstein
  • 23 February 2019
  • Comments

Try vs Case: The last battle


In this article we’ll try to battle different Elixir control structures in order to understand their efficiency and applicability in our projects.


  1. You can use try with else - instead of case literally (only literally!);
  2. Never use with instead of case - only instead of case chains;
  3. Use try if you need it - for catch cases;
  4. Forget about throw and catch in your code - they are really slow;

Do you want to know, what literally means? Welcome under cut!

  • Dmitry Rubinstein
  • 15 February 2019
  • Comments

Fast Cowboy microservice: Recipe

Cowboy with Websocket

In nowadays world of microservices and small web applications, Elixir’s ecosystem obviously have it’s own possibilities to implement them. If you want to create small endpoint, process WebHooks for your process or just like to build everything by yourself it’s good idea not to bring to your project heavy-weight frameworks like Phoenix.

Let’s look at how this problem can be easily solved.

TL;DR: Use Aqua to bootstrap ready-to-go project.

  1. $ mix archive.install hex aqua #(only if not installed)
  2. $ mix aqua new plug my_app --ws --static
  3. ???
  4. Profit!

  • Dmitry Rubinstein
  • 06 April 2018
  • Comments

Elixir: Do you have HTTP requests? You are doing them wrong!

The process of making HTTP requests in Elixir seems to be obvious for every developer: one should take HTTPoison (3,5M downloads from Hex.pm), and do whatever he wants! But… Have you ever thought about alternatives? If not - follow this article, and get the answer to the question:

How to make HTTP request?

  • Dmitry Rubinstein
  • 25 October 2017
  • Comments

Elixir: Brackets Hell in Supervision tree

Supervision tree

The Supervisor.Spec module was deprecated and does not work with the module-based child specs, introduced in Elixir v1.5. Thus, all methods for supervision tree declaring were sugnificantly changed. It’s great time to understand the waterflow of passing arguments - from top-level Supervisor to low-level workers aka GenServers.