WebSockets rewrite
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, nodejs, wordpress
調査の方向性
Review the changes described for wsConnectUserToServer in api2.js, the wpIdentity WebSocket package switch, and the Caddy configuration shown in the issue. Check the server log and client behavior against the retry limits and WebSocket routing; done means failed connections no longer retry indefinitely or fall back to HTTP unexpectedly.
索引モデルが issue の本文から書いたものです。
説明
There have been problems over time with the WebSocket functionality in WordLand and wpIdentity. But I think I've gotten it stabilized, and since @scotthansonde was involved in this, a long time ago, I thought I should close the loop.
- I rewrote wsConnectUserToServer in api2.js to wait 10 seconds between retries after a failed connection, and to only try 100 times, and after that it gives up. You can reload the page to get another set of tries. Previously it waited 1 second and retried indefinitely.
- I switched the websockets package wpIdentity was using from nodejs-websocket to ws. This was based on advice I got from ChatGPT and Claude.ai, saying that nodejs-websocket was not being maintained, and the gold standard for everyone was ws.
- I changed the Caddy config file on the server, per the advice of ChatGPT, to make sure that failed WS connections didn't fall back to HTTP connections, which is what I was seeing in the logfile, along with the steady stream of errors in the user's JS console (this came up the other day in a bug report on the wordlandSupport repo issues list.
The result? It's much calmer in the server log. This is kind of mysterious, I didn't expect it to settle down so quickly because there must have been some old clients out there reconnecting every second?
The new Caddy file
{
on_demand_tls {
ask http://localhost:1339/isdomainvalid
}
}
https:// {
tls {
on_demand
}
@websocketsWordlandSocial {
host wordland.social
header Connection *Upgrade*
header Upgrade websocket
}
@httpWordlandSocial {
host wordland.social
}
reverse_proxy @websocketsWordlandSocial localhost:1502
reverse_proxy @httpWordlandSocial localhost:1339
# Optional: fallback for other domains
reverse_proxy localhost:1339
}
Screen shot of server log with a client trying to connect every second
- 主要言語
- JavaScript
- スター
- 21
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
scripting/wpIdentity のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
scripting/wpIdentity#6 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
scripting/wpIdentity#5 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
scripting/wpIdentity#2 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
scripting/wpIdentity#1 ·
scripting/wpIdentity の issue をすべて見る
似ている issue
-
bug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
open-webui/open-webui#30750 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100