Thanks.
Also, I discovered your blog. Good stuff!
Currently reading your Insanity with Elixir + Phoenix post at http://www.brightball.com/articles/insanity-with-elixir-phoe....
Re:Elixir multiple processes: Basics
by brightball on Monday December 18, 2017 @01:03PM
(#15953680)
Awesome! I need to update that article for the changes in Phoenix 1.3 but for the most part everything in there should be consistent.
A big part of the difference it that in a typical web application in most other languages, you'll think of your system in two parts: web and background.
With an Elixir/Erlang you tend to think of the web as just one interface to the application itself. The idea of background jobs in those contexts somewhat goes out the window when you have an environment where spinning up millions of processes at the same time is the expectation and not a terrifying scaling scenario.
Think of responding to an incoming web request as just another job, essentially.
Because everything is just message passing and there is no global state, the restart just looks like a function call. The supervisor will start a new process calling the function with the arguments that were passed to it when it was created.
Here's an example that will try to explain things.
https://medium.com/@tylerpachal/let-it-crash-creating-an-exa...