TwistingTwists

TwistingTwists

Journal : Programming Phoenix LiveView

I have read first chapter. Will add my notes / code tries / self exploration as I go along!

Thank you @AstonJ for encouraging to start it.
I hope I’ll be able to finish the book in a couple of months.

Stay tuned!

Most Liked

TwistingTwists

TwistingTwists

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

    • think of channels as joining channels on slack.
  2. sockets function as routers where channel routes are defined. (auto generated by Phoenix)

  3. Phoenix.PubSub.PG2 - using BEAM native message passing to broadcaste and coordinate updates – where the complexity adds up in SPA !

    • Leveraging the best of the Erlang VM.
  4. Client for requesting data to SPA CAN BE anyone - watch, app, website, IoT !

  • Anyone who subscribes to a channeltopic: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.5.12.

Happy Reading!

AstonJ

AstonJ

Nice one TT! I am sure a lot of people are going to be interested in following your journal! :023:

Popular General Dev topics Top

Devtalk
Our jobs section is for full-time paid positions and for companies to post their own jobs (no consultancies or agencies, sorry!) - simply...
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
AstonJ
Things like smart speakers (such Amazon Alexa), smart TVs or other devices with built in microphones, cameras or with other features that...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
First poster: bot
Apple’s Tim Cook to take 50% pay hit after shareholder feedback. ‘Target compensation’ for CEO down from $99.4m in 2022 to an expected $...
New
CommunityNews
Christian Mills - Testing Intel’s Arc A770 GPU for Deep Learning Pt. 2. This post covers my experience training image classification mod...
New
CommunityNews
The Definitive PHP 7.2, 7.3, 7.4, 8.0, and 8.1 Benchmarks (2023). We tested the performance of 14 PHP platforms (WordPress, Drupal, Lara...
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New

Other popular topics Top

DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
AstonJ
Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face: https://on...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1122 25133 743
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New
First poster: bot
zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig. General-purpose programming language and toolchain for maintaini...
New