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?:
- Functional Web Development with Elixir, Otp, and Phoenix: Rethink the Modern Web App
- Programming Elixir >= 1.6: Functional -> Concurrent -> Pragmatic -> Fun
- The Little Elixir & OTP Guidebook
- Programming Phoenix
Thanks in advance!