asibbald

asibbald

Programming Phoenix LiveView B3.0 P237: More explanation needed

The text here could do with more explanation. It assumes a considerable amount of knowledge outside that covered so far in the book. If a reader doesn’t have this additional knowledge, they will not be able to understand what is being said here - which is pretty key to what we’re about to do.

an example of what I’m referring to:

“…The configuration sets the default adapter, PubSub.PG2. This adapter runs on Distributed Erlang––clients across distributed nodes of our app can subscribe to a shared topic and broadcast to that shared topic, because PubSub can directly exchange notifications between servers when configured to use the Phoenix.PubSub.PG2 adapter…”

First Post!

SophieDeBenedetto

SophieDeBenedetto

Author of Programming Phoenix LiveView

Hey @asibbald! Which part of this explanation felt unclear to you? The intended take-away here is: By using the PG2 adapter, your code will work even if you deploy your application in a distributed manner". This is what we mean by:

clients across distributed nodes of our app can subscribe to a shared topic and broadcast to that shared topic, because PubSub can directly exchange notifications between servers when configured to use the Phoenix.PubSub.PG2 adapter

It’s not important to understand the mechanics of the PG2 adapter or Distributed Erlang beyond that, and I don’t feel that a lack of that deeper understanding will prevent the reader from building out the feature in this section.

Popular Pragmatic topics Top

Mmm
Hi, build fails on: bracket-lib = “~0.8.1” when running on Mac Mini M1 Rust version 1.5.0: Compiling winit v0.22.2 error[E0308]: mi...
New
joepstender
The generated iex result below should list products instead of product for the metadata. (page 67) iex> product = %Product{} %Pento....
New
New
fynn
This is as much a suggestion as a question, as a note for others. Locally the SGP30 wasn’t available, so I ordered a SGP40. On page 53, ...
New
nicoatridge
Hi, I have just acquired Michael Fazio’s “Kotlin and Android Development” to learn about game programming for Android. I have a game in p...
New
AufHe
I’m a newbie to Rails 7 and have hit an issue with the bin/Dev script mentioned on pages 112-113. Iteration A1 - Seeing the list of prod...
New
taguniversalmachine
It seems the second code snippet is missing the code to set the current_user: current_user: Accounts.get_user_by_session_token(session["...
New
rainforest
Hi, I’ve got a question about the implementation of PubSub when using a Phoenix.Socket.Transport behaviour rather than channels. Before ...
New
ggerico
I got this error when executing the plot files on macOS Ventura 13.0.1 with Python 3.10.8 and matplotlib 3.6.1: programming_ML/code/03_...
New
roadbike
From page 13: On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio ...
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
PragmaticBookshelf
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
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
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New

Latest in PragProg

View all threads ❯