Call over Cast
Explore why using call messages is often better than cast in Elixir's GenServer processes. Understand message queue mechanics, back pressure, and how selective back-pressure helps manage process load and errors.
Reviewing our decisions
Now that the service layer is in, let’s review some of the significant decisions we made.
You might have noticed that we used call several times when we returned an :ok value. You might be wondering why we chose not to use cast messages instead. The answer is not as simple as it may seem on the surface. Let’s find out why.
Why using casts isn’t preferred?
Intuitively, you might ...