samacs

samacs

About a month or so we embarked on redesigning/rearchitecting most of the operation processes of the business for the company I work for, one of the biggest online clothing retailers in Mexico.

In order to support more sale channels and marketplaces, we decided to delegate some operational aspects of the overall system and start building systems to coordinate or orchestrate these operations and keep them in sync with our monolith back office system and services around it.

We started building these microservices using Go. It’s been a little difficult to find people willing to work/learn Go our the Mexico City’s area, but still, we are about to ship these to production and the overall outcome seem pretty promising, systems talk to each other in a proper way using message queues, RPC calls, etc.

We built a series of mechanisms in order to manage and monitor the lifecycle of various processes (task workers, consumers, etc.) in Go. Which I’ve seen that’s related almost homogeneously to the way Processes, GenServers and Supervisors work in Elixir.

As of today, we manage and monitor periodically running tasks and queue consumers using Goroutines, channels, and mutexes. Different endpoints are exposed via an API in order to query the state of processes and to manage their lifecycles, the number of workers needed for a particular job/consumer.

Although it works, I started feeling it is a little hacky, considering that this kind of supervising processes seems to come out almost free out of the box in OTP, the challenging being I think designing the correct processes tree and exposing the interfaces to monitor/manage them.

In this regard, along with reading the excellent articles and presentations out there, I’m considering getting a couple of books in order to research this in depth and build a stronger base to implement part of the system using Elixir, but I’m afraid of wasting my time (and money) reading things that treat Elixir with a web development point of view. Not that I’m not considering something like Plug, or even Phoenix, but for now I consider a little more important understanding OTP for the kind of system we are trying to build.

What are your thoughts on the following books? Is there any other good book/resource you consider worth reading to have a better understanding of OTP and Elixir in general?:

Thanks in advance!

Showing Posts 1 to 5

peerreynders

peerreynders

So far the best OTP (design) book that I’ve encountered is still Designing for Scalability with Erlang/OTP-Implement Robust, Fault-Tolerant Systems. The ebook is available DRM-free from Google Play Books and ebooks.com. The free sample on Google Play Books covers everything up to most of Chapter 4.

The Chapter 2 Erlang primer should be enough to get an Elixir developer going to understand the Erlang code - which isn’t that difficult to port to Elixir.

Functional Web Development with Elixir, OTP, and Phoenix would be a great follow up as a demonstration in the pure Elixir space with Phoenix (don’t forget the forum discount).

If you are still looking for a more introductory Elixir text Elixir In Action - 2e is a good choice for an experienced programmer with its more “Erlang-oriented” approach - and it dabbles a little bit with OTP (for a few more hours half off).

Fred Hébert:

samacs

samacs OP

@peerreynders Thanks for your recommendations. I’ve been playing around with Elixir mostly, no Erlang nor Phoenix, but I’m more interested in getting a good understanding of the design principles of OTP, so definitely I will check your first recommendation. Following up with the one that covers OTP and Phoenix too.

Thanks!

ghoetker

ghoetker

I think highly of the Programming Elixir >=1.6 book for established programmers in other languages.

samacs

samacs OP

Hi @ghoetker, thanks for your response.

I’ve been reading (the few) comments on the internet about the book, no this particular edition for Elixir 1.6 but, they all seem to agree on that the book doesn’t get deep on OTP, I mean, as I was saying, I’m aware enough about Elixir and the functional programming side of things, but most of the resources I’ve found (articles, videos) don’t deepen on supervising trees, which is exactly what I’m trying to get my hands dirty with. I’ve already added that book to the basket though.

I already started reading the one @peerreynders suggested, I think it aligns more with what we have ahead rather than just learning a new programming language, be it Elixir or Erlang, I think it’s more of a mindset shift.

Thanks!

kokolegorille

kokolegorille

If You want to focus on OTP, there is also from Manning

It is also an Erlang book, a little bit outdated, but worth the read.

I also did enjoy The little Elixir & Otp guidebook, as it really focus on Otp. While outdated too, if You make the effort, You will learn how to build a poolboy clone.

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews