Boundary pattern in send-receive?

Turned out I was imagining a CQRS/ES pattern without knowing about those approaches. :sweat_smile: It’s a lot involved than I initially thought, but was a good study.

This is something else, but: learning about them, I realised that functional and concurrent (process-oriented) approaches are two completely different paradigms that should be understood differently.

My perspective of Elixir has changed. All this time they confused me because the functional part covers the entire faƧade of Elixir, even spawning too. If I introduce Elixir to someone next time, I’ll emphasise the distinction like ā€œ80% functional and 20% process-orientedā€, not together like ā€œfunctional and concurrentā€.

I understood OTP explained with functions, but I didn’t know what to make out of processes. (I thought I did because I understood the basics of OTP)

Processes haven’t been fully visualised in my mind in conjunction with functions. I’ve read Elixir Docs and Elixir in Action several times, but it was a few community posts that enlightened me.

I think the learning path misses something between functions and OTP. Process is introduced for its general concept but not much about how it forms an Elixir/BEAM system and how the user can juggle with them. Then it proceeds to OTP preemptively.

This post deserves a place in the Elixir Docs I suppose:

https://www.theerlangelist.com/article/spawn_or_not