A LiveView Is a Process
The real &quot;aha!&quot; moment for me with LiveView came when I was using LaTeX to render a PDF in response to some user actions. The first time I did something like this, I did some janky polling on the client side. Other (bad) solutions involved blocking the client process or just praying that the PDF would render in time before the HTTP request timed out.<p>With LiveView, it works like this:<p>- user pushes a button to render the PDF<p>- the LV process calls `Task.async(fn -&gt; do_work({data, self.pid()}))` so the worker process has the PID <i>of the LiveView process itself</i><p>-  when the job completes on a different thread, the worker sends an <i>Elixir message</i> using the standard and highly-flexible built-in mechanism with `send()` to the PID of the LV<p>- the LV gets the message and updates the UI and&#x2F;or initiates a download of the rendered PDF automatically<p>It is so simple to get this workflow going. It&#x27;s super efficient. Perfect for low- to mid-range load on a web app. Perfect for one-person development.