You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to Phoenix/Elixir and I watched your talk on Presence and went through the code. I'm curious about the split of the state here:
The currently selected programming lanuage and tracked and broadcast with the help of the ChallengeChannel.Monitor module which leverages GenServer to store the language in a "channel state".
&
The tracking of which user is currently typing is managed by the ChallengePresence module. This module leverages PhoenixPresence to track user state in the channel and expose it to all subscribing clients.
I'm building a little game of my own and I discovered Presence a bit too late in the day.
The way I've modeled it is the following:
HTTP endpoints that bootstrap a GenServer (with Game state) driven by a cljs frontend.
All post-joining/creating communication happens over channels within the game that communicate with that GenServer to update the state.
My question is,
Now that I've done all this, I feel like most of it could be better done through Presence, but I'm still uncertain. I'm curious why you chose to split your challenge state in a GenServer and more ephemeral state in the Presence?
The text was updated successfully, but these errors were encountered:
Hi!
I'm new to Phoenix/Elixir and I watched your talk on
Presence
and went through the code. I'm curious about the split of the state here:&
I'm building a little game of my own and I discovered
Presence
a bit too late in the day.The way I've modeled it is the following:
GenServer
(with Game state) driven by a cljs frontend.GenServer
to update the state.My question is,
Now that I've done all this, I feel like most of it could be better done through
Presence
, but I'm still uncertain. I'm curious why you chose to split your challenge state in aGenServer
and more ephemeral state in thePresence
?The text was updated successfully, but these errors were encountered: