Digests » 133
We slashed our DynamoDB costs by over 75% using Kinesis, DynamoDB streams, and Erlang/OTP (and now Elixir) to implement a global cache warming system. We present that system and two new open-source libraries for processing Kinesis and DynamoDB streams in a similar way using Elixir and Erlang.
Safe. It uses cryptographically strong random APIs and guarantees a proper distribution of symbols. Compact. It uses a larger alphabet than UUID (A-Za-z0-9_~) and has a similar number of unique IDs in just 21 symbols instead of 36.
In the previous articles, we have covered how to work with the processes in Elixir on a low level. We have also covered what kind of wrappers exist around processes. That can help us to avoid writing that low-level code. Yes, I am mentioning Agents and Tasks now. Now it’s time to get familiar with OTP and its features called GenServer and Supervisors. Let’s dive in.
I recently built a full-text recipe search feature using Ecto and PostgreSQL for Mealthy.com. You can try it out there, if you like. I thought this was interesting enough to write up (with Mealthy's permission).
Elixir/Erlang OTP abstractions enforce developers to split programs into independent parts. While “gen_servers” encapsulate parts of business logic on micro-level, “applications” present a more general (“service”) part of the system. Complex programs written in Elixir are always a collection of communicating OTP applications.