How Phoenix LiveView works

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.พ. 2025
  • In this lesson we are going to see how LiveView really works and what happens behind the scenes when a user connects.
    • Article:
    • Introductory Phoenix LiveView Course page: www.poeticodin...
    • Buy the full Elixir and LiveView course: courses.poetic...

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

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

    Real treasure trove of information. The part where you show us the detailed information from the websocket really makes me understand what's happening under the hood. God bless you.

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

      Just enrolled in the course. It's that great!

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

    Thank you so much for your efforts.
    Please upload more videos on Elixir and Phoenix

  • @willistg
    @willistg 3 ปีที่แล้ว +1

    How would this work in a scenario where the phoenix app is dockerized and then put on aws(ecs) implicitly behind a load balancer? Is the app state for the users session able to be coordinated between all running instances? Or would they have to be configured to store app state in something like redis so all instances can access? If so, how does it impact performance?
    Thanks so much for the informative video

    • @poeticoding
      @poeticoding  3 ปีที่แล้ว +1

      Great question! Yes, it definitely works! One of cool things about Elixir (and the Erlang Virtual Machine) is that you can connect many nodes (in your case each node would be a container), and the processes in one node can send and receive messages to other processes in other nodes. This means you don't need to use redis.
      You obviously need a little bit of configuration and to change a bit the architecture and deployment, especially for this poeticoins application. This app starts cryptocurrency clients and an Historical processes which are meant to be unique. This means that only one node (container) should start these processes, and all the other containers would just serve the the web requests.
      In these articles/videos I show how to deploy a phoenix realtime application (with websockets) on multiple containers and how to use libcluster to automatically connect containers together:
      www.poeticoding.com/distributed-phoenix-chat-with-pubsub-pg2-adapter/
      www.poeticoding.com/connecting-elixir-nodes-with-libcluster-locally-and-on-kubernetes/

  • @samulevy
    @samulevy 3 ปีที่แล้ว

    Amazing content.

    • @poeticoding
      @poeticoding  3 ปีที่แล้ว

      Thank you Samuel! 💜