Learn Elixir: OTP, GenServers, Agents, & Tasks

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2024
  • Upskill with Learn Elixir - Fast Track to Senior Status
    Start Your Free Trial: learn-elixir.dev/
    Testimonials: • Learn Elixir Testimonials
    Midterm Project Recap + Preparation: • Midterm Project Recap ...

ความคิดเห็น • 6

  • @armanmirk
    @armanmirk 3 ปีที่แล้ว +2

    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.

  • @armanmirk
    @armanmirk 3 ปีที่แล้ว +8

    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.

    • @pupdoggify
      @pupdoggify 2 ปีที่แล้ว

      I've been looking for the same info and yet no one seems to care about explaining it in such context...waiting...

    • @simonkistler6468
      @simonkistler6468 ปีที่แล้ว

      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.

  • @gettyorawo4371
    @gettyorawo4371 2 ปีที่แล้ว +3

    awesome stuff!

  • @johnneiberger7311
    @johnneiberger7311 ปีที่แล้ว

    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?