Hyperstack.on_server? can do much better please
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách lần theo Hyperstack.on_server? và phần ghi đè initializer được mô tả trong issue, sau đó so sánh các chế độ simple_poller và Action Cable được đề cập. Công việc được xem là hoàn tất khi thay thế giả định về vị trí server bằng forward_messages_to_server? cùng các kiểm tra cấu hình hoặc hành vi nhằm tránh chuyển tiếp không cần thiết nhưng vẫn giữ lại các broadcast bắt buộc.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- JavaScript
- Star
- 538
- Fork
- 41
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperstack-org/hyperstack
-
expose_as_operations method Đang mởenhancement needs doc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
hyperstack-org/hyperstack#359 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
hyperstack-org/hyperstack#267 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
hyperstack-org/hyperstack#457 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
hyperstack-org/hyperstack#456 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
hyperstack-org/hyperstack#455 · 2 bình luận ·
Tất cả issue của hyperstack-org/hyperstack
Issue tương tự
-
ai-observability bug team/ai-observability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
AllTheMods/ATM-10-L#19 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SignalK/n2k-signalk#345 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
JuliaPluto/PlutoPlotly.jl#72 ·