Thinking in Processes

If you first started programming with procedural languages and then moved to an object-oriented style, you’ll have experienced a period of dislocation as you tried to get your head to think in terms of objects.

The same will be happening now as you start to think of your work in terms of processes. Just about every decent Elixir program will have many, many processes, and by and large they’ll be just as easy to create and manage as the objects were in object-oriented programming. But learning to think that way takes awhile. Stick with it.

So far we’ve been running our processes in the same VM. But if we’re planning on taking over the world, we need to be able to scale. And that means running on more than one machine.

The abstraction for this is the node, and that’s the subject of the next chapter.

Footnotes

[32]

https://github.com/elixir-lang/elixir/issues/1050

[33]

http://en.wikipedia.org/wiki/Fibonacci_number