bt-maps

bt-maps

Child-Parent Process Flow (Actor model)

I am new to elixir and have gone through much of the initial learning materials (books and courses). As a first project, I would like to recreate this service fabric (actor model-type framework) sample application. Specifically, I am looking for advice on best practices to implement the Child-Parent Process Flow and aggregation using the elixir concurrency model. I have a way forward with the API and dashboard parts of the application using phoenix.

Sample app architecture docs

Thanks in advance
Brent

Most Liked

ruslandoga

ruslandoga

It seems like the sample uses something similar to Orleans. There is an erlang implementation of this general idea of a virtual actor as well, called erleans. The building block of both is a so-called grain (more info on Introduction | Microsoft Orleans Documentation), which is (in my understanding) just a process whose state can be persisted to DB, stopped, and restarted at a later point in time.

It seems that what the sample app wants is to have some sort of a reverse hierarchy of these grains that wake up on incoming transactions, execute them, and “pass it up” to a parent process (possibly starting it) and go back to sleep with some updated state.

It’d be harder to do in plain elixir unless it’s ok to have all processes running all the time, even when there are no transactions to process.

Last Post!

bt-maps

bt-maps

Very helpful. Thanks for the insights

Brent

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40082 209
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement