Thank you for putting these videos together. It's very handy to see these concepts succinctly expressed specially because they are very unique at least to folks with conventional programming knowledge.
I have a suggestion which is to consider explaining Agents, GenServer and Tasks within the context of something like a Phoenix app. There are two advantages to that form of explainations: 1) most devs these days are web developers and they want to understand the circumstances that make either of these constructs useful within a web app environment and 2) it would be good to understand the limitations of these constructs if your Phoenix website has to deal with a large volume of requests which should hopefully teach something about how to structure things to avoid bottlenecks. I hope this makes sense.
And for what exactly are you using the genserver for your website? Phoenix uses genservers , but for a simple website you don't need to implement one at your own.
I'm not clear on how to use a GenServer. Are we supposed to call all those functions separately from another module? It seemed like you said that calling start_link will automatically call init, but I don't see how that works, and I don't understand how the state is passed from start_link to init. And if we configure a handle_call or handle_cast function, how do we interact with that from another function? Do we have some standard way to cast or call a process and it just knows to use the appropriate function to deal with the incoming message?
Thank you for putting these videos together. It's very handy to see these concepts succinctly expressed specially because they are very unique at least to folks with conventional programming knowledge.
I have a suggestion which is to consider explaining Agents, GenServer and Tasks within the context of something like a Phoenix app. There are two advantages to that form of explainations: 1) most devs these days are web developers and they want to understand the circumstances that make either of these constructs useful within a web app environment and 2) it would be good to understand the limitations of these constructs if your Phoenix website has to deal with a large volume of requests which should hopefully teach something about how to structure things to avoid bottlenecks. I hope this makes sense.
I've been looking for the same info and yet no one seems to care about explaining it in such context...waiting...
And for what exactly are you using the genserver for your website? Phoenix uses genservers , but for a simple website you don't need to implement one at your own.
awesome stuff!
I'm not clear on how to use a GenServer. Are we supposed to call all those functions separately from another module? It seemed like you said that calling start_link will automatically call init, but I don't see how that works, and I don't understand how the state is passed from start_link to init. And if we configure a handle_call or handle_cast function, how do we interact with that from another function? Do we have some standard way to cast or call a process and it just knows to use the appropriate function to deal with the incoming message?