# Journal : Programming Phoenix LiveView

**URL:** <https://forum.devtalk.com/t/journal-programming-phoenix-liveview/21508>\
**Category:** Journals & Book Clubs\
**Tags:** book-programming-phoenix-liveview\
**Created:** [16 September 2021 05:25 UTC](https://forum.devtalk.com/t/journal-programming-phoenix-liveview/21508 "2021-09-16T05:25:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![TwistingTwists](https://forum.devtalk.com/user_avatar/forum.devtalk.com/twistingtwists/32/3396_2.png) [@TwistingTwists](https://forum.devtalk.com/u/TwistingTwists)\
**Post date:** [16 September 2021 05:38 UTC](https://forum.devtalk.com/t/journal-programming-phoenix-liveview/21508/3 "2021-09-16T05:38:58Z")

</div>

# Chapter 01 :

## CONCEPTS / RE-Thinks

- SPA is a distributed system !
- SPAs have shared states.

## How Elixir changes SPA?

1. Phoenix Channels = using BEAM for long lived HTTP connections! (as opposed to stateless) - using `socket.assigns`

2. `sockets` function as routers where channel routes are defined. (auto generated by Phoenix)

3. [Phoenix.PubSub.PG2](https://hexdocs.pm/phoenix_pubsub/Phoenix.PubSub.PG2.html) - using BEAM native message passing to broadcaste and **coordinate** updates – where the complexity adds up in SPA !

4. Client for requesting data to SPA CAN BE anyone - watch, app, website, IoT !

- Anyone who subscribes to a `channel` → `topic:subtopic ` is a client.

1. Standard (read : best practices) infrastructure to deal with `auth`.
2. Buggy network connections =\> Phoenix uses ETS-tables (BEAM’s strength) to ensure `fault tolerance`!

Source : from Chapter 01 + [Channels — Phoenix v1.8.3](https://hexdocs.pm/phoenix/channels.html).

Happy Reading!

---

_[View the full topic](https://forum.devtalk.com/t/journal-programming-phoenix-liveview/21508)._
