This post is about how to add Dialyzer to an existing Elixir project to get the benefits today without being overwhelmed fixing all the legacy problems.
Most of us are familiar with IP addresses: they are strings of the form “ddd.ddd.ddd.ddd” where ddd is a decimal number of up to three digits in the range 0 to 255. For example, 127.0.0.1 or 192.168.0.2. Each of the four number is a byte value, and the address is n IPv4 network address that … Continue reading Parsing IP addresses crazily fast
Publish-Subscribe is a messaging pattern that works as follows: a group of consumers subscribe to events of a given topic and are notified whenever an event of that topic arrives. When an event is published into a topic channel, the channel delivers a copy of the message to each of the output channels. The advantage of this is we can decouple the consumers from the producers. Neither party need knowledge of each other to communicate. In other words, pub-sub is a pattern used to communicate messages between different system components without the components knowing anything about each other’s identity. Let’s look at an implementation of Publish-Subscribe in Elixir. The full source code is provided below.