Turned out I was imagining a CQRS/ES pattern without knowing about those approaches. Itās a lot involved than I initially thought, but was a good study.
- GitHub - commanded/commanded: Use Commanded to build Elixir CQRS/ES applications
- GitHub - CargoSense/fable
- GitHub - pragdave/component: Experiment in moving towards higher-level Elixir components
- Domain Driven design : Aggregate roots as Elixir Processes/GenServer
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: