Hyperstack.on_server? can do much better please
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia tracciando Hyperstack.on_server? e l’override dell’inizializer descritto nell’issue, quindi confronta le modalità simple_poller e Action Cable menzionate. Il lavoro è completato quando l’assunzione sulla posizione del server viene sostituita da forward_messages_to_server? e da controlli di configurazione o comportamento che evitino l’inoltro non necessario preservando al contempo i broadcast richiesti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Currently Hyperstack.on_server? returns false if you not on the rails server (i.e. on the console or on in a sidekiq worker).
The system uses this to decide if it needs to forward any broadcasts to the server from, under the assumption that if you are not on the server you do not have access to the broadcast mechanism.
This assumption is pretty weak. The following are known cases where it doesn't matter:
you are using simple_poller (in this case you are going to shove the message into a queue, and wait for the next poll)
you are using action_cable NOT in async mode. (i.e. the connection data is stored in a database, not in the servers memory)
Not tested is pusher, and actually not tested (but I'm sure it would work is action_cable and redis)
Soooo...
This method should be called: forward_messages_to_server?
and should check to see if we have to forward it, by a combination of checking configuration and/or checking actual behavior.
Why should I care?
Because if you are using a lot of outside processes to do stuff, then you are adding unneeded overhead forwarding this stuff to the server.
The current work around is very simple: Just add this line to the hyperstack initializer
def Hyperstack.on_server?; true; end
- Lingua principale
- JavaScript
- Stelle
- 538
- Fork
- 41
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hyperstack-org/hyperstack
-
expose_as_operations method Apertaenhancement needs doc
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
hyperstack-org/hyperstack#359 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
hyperstack-org/hyperstack#267 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
hyperstack-org/hyperstack#457 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
hyperstack-org/hyperstack#456 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
hyperstack-org/hyperstack#455 · 2 commenti ·
Tutte le issue di hyperstack-org/hyperstack
Issue simili
-
ai-observability bug team/ai-observability
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
AllTheMods/ATM-10-L#19 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
SignalK/n2k-signalk#345 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
JuliaPluto/PlutoPlotly.jl#72 ·