Erlang proponent have a slogan they often use to (gently) shock newcomers:
Objects are out. Concurrency is in.To oversimplify things, where you would use objects in OOP, you use parallel processes in Erlang (they call it Concurrency Oriented Programming). Erlang use almost no mutable data structures, it is a shared-nothing message-passing architecture. Dabbling into Erlang made me think a lot about granularity in application architecture.
Erlang got its 15 minutes of fame a few months after Herb Sutter's "The Free Lunch Is Over" article, for some time it seemed everyone was working on an Erlang project, then it kind of faded away (the "Erlang everywhere" hype, not Erlang itself). Building applications in Erlang is not easy. Of course you can use some of the concepts (and a lot of the spirit) in other languages (for Python you can try Concurrence), but the pure Erlang approach will teach you a lot of things.
With Erlang, processes have extremely fine granularity, you design applications with hundreds or even thousands of processes. But all these processes are inside the same execution environment: the Erlang Virtual Machine. With the Micro Services Architecture, my idea is to emulate these principles at a coarser granularity level and to expose the components of the application on the network, replacing encapsulation with an "exoskeleton" at the application level. More on that later.
