Design Pattern for functional / concurrent programming

This video course really resonates with how like to organize my code in OOP and that I ported to functional Elixir.

My repo from following the course:

https://github.com/Exadra37/elixir-for-programmers-2_learning

So, for design patterns I like to use one that groups things by action performed on a resource, be it in OOP or Functional.

In OOP I was using the Resource Action Pattern, that lends well to functional Elixir, but requiring some adaptations to use distributed Elixir and Elixir processes, that I will borrow from the video course above:

So, @pragdave encourages us to separate the implementation from runtime considerations (OTP), and that was the missing bit in my Resource Action Pattern port to Elixir.

The Resource Action Pattern requires that the code for each resource to be split to his own file by action. For example, if you have the Product resource, then you will have lib/impl/products/add/product_add.ex, lib/impl/products/modify/product_modify.ex, etc. .

This approach as worked very well for me along the OOP years. At a glance I can see which resources a project has, and which actions are performed on them just by opening a folder. No need for reading docs, and it makes easier to onboard new devs to the project.