4 ms·
Probably better asked on elxiriforum.com. But to answer a few for you, because I love the expressiveness I get from elixir and understand the confusion a lot o
by dpeck 6y ago
Probably better asked on elxiriforum.com.
But to answer a few for you, because I love the expressiveness I get from elixir and understand the confusion a lot of people have getting their heads in the right space of understanding it:
Think of agent as a specialized subset of a genserver. It holds a value, and let’s other processes ask for it, and it can be updated. Past that it doesn’t do much.
Everything is a process.
Supervised tasks are used for spawning off work into a new process, and keeping a connection to them so you know if they crash.
My advice generally would be to understand a little of how the low level processes communicate with send/receive, and then after that focus on getting your head wrapped around how those primitives are used to build that behavior. Most everything else is as implication of or an extension of that behavior.
If you can get that, and pair it with a good understanding of the actor model, you’re on a good path.
- fdeage 6y agoThanks, I'll try my luck there then..