As we saw in the previous chapter, a common idiom, also seen in Erlang, is to spawn processes to keep state and concurrently perform computations whose side effects may be retrieved by some means afterwards. This approach gives you endless possibilities but is more verbose and prone to errors, given it requires you to build on top of the existing basic primitives from the get-go.
To help with the previous issue, the Erlang creators decided to create higher-level abstractions for some common use cases and collected the recommended design principles to apply when writing Erlang projects. Thus, a set of libraries named Open Telecom Platform (OTP) was born.
In this chapter, we will delve into some of those incredibly useful OTP behaviours that Elixir inherited from Erlang, such as GenServer, and some of the abstractions provided by Elixir...