-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to broadcast using poke / peek #60
Comments
Intended. I left it commented out to think about it later. Maybe the good documentation would be enough to avoid confusion with the side effects? |
Probably that would help, for me I don’t care about the current browser value or assigns since I just want to render a button that has it’s state returned from a Gen Server process.
Would be cool if you make a release and uncomment it :D!
Regards,
- Jan Stevens
… On 29 Sep 2017, at 12:10, Tomek Gryszkiewicz ***@***.***> wrote:
Intended.
Broadcasting the assign change may cause the unexpected side effects. You may have an expression which takes more than one assign as an argument, but you want to change the only one. The second assign value is taken from the browser which launched the event. This value may be different in every browser.
I left it commented out to think about it later. Maybe the good documentation would be enough to avoid confusion with the side effects?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#60 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABeBg6ZCjWT6QtIWEhjQm4bCESnnWfYjks5snMIrgaJpZM4PodWU>.
|
Still not convinced, broadcasting assigns may cause troubles. Drab has the own assign cache (in Drab genserver), used when reading it with But if we allow broadcasted
I don't want to allow 2. This could be misleading, as you don't expect that behavior. All caches must be updated, but it must be done internally, not via browsers. The issue is how to identify all Drab genservers to send them a message, which might be running on a different nodes, not even connected to each other? I am leaving this issue opened, to be solved (or not) in a future. |
I see two possible options:
|
|
We could already start with 1 and then deal with 2 later on. I think it also deals with #18 were you already indicated that current setup with spawn link ends with zombie processes ( Cleary noticeable in dev mode with code reloading). Keeping it simple is definitely important but an additional genserver to keep broadcast cache does not seem like an overkill imoh. I will see if I can help out with option 1 if you can give some small pointers 😃 |
It will finally happen in the next release. |
Hello,
I see it in the code but its commented out, is this because
poke_bcast
does not work yet as intended or just a small mistake?poke_bcast
would be very handy to have :)Regards
The text was updated successfully, but these errors were encountered: