Repository navigation
M1: ncdc and AirDC++ interop, and a 6000-user soak, in CI - #8
Merged
Merged
Conversation
Contributor
Author
|
CI (run 43789925454, GitHub-hosted ubuntu-24.04) agrees with the local numbers:
The run's summary has the full JSON. |
Contributor
Author
|
Added AirDC++ web client interop (8a7e0b8). The description is updated with its findings. CI run 43793717697 is green:
|
transfix
force-pushed
the
m1-nmdc-hub
branch
from
November 16, 2026 04:41
41faa83 to
a0a17b2
Compare
server/interop/ncdc_interop.py runs ncdc (Ubuntu's package) as a black box, through its documented commands in tmux: three ncdc (active plain, active NMDCS, passive) and an observer log in, chat, exchange private messages, search (active and passive, $SR through the hub) and download each other's file lists by $ConnectToMe and $RevConnectToMe. The hub's new opt-in capture (SUBLEVELS_NMDC_CAPTURE_DIR) records every message both ways; the run writes what it shows for spec/'s "To capture" items. server/interop/soak.py logs in 6000 synthetic clients against the hub run alone (tools/run_hub.py, stdlib only) and measures memory per user, CPU and chat and search fan-out latency at every receiver. The soak found asyncio's default listen backlog (100) overflowing in a login burst; the listeners now take listen_backlog (1024). CI gains interop-ncdc and soak jobs on GitHub-hosted runners.
server/interop/airdcpp_interop.py runs the AirDC++ web client's portable 2.14.0 release as a black box: set up with its documented command-line options (--add-user and --configure, answered on stdin) and driven through its documented HTTP API (the API Blueprint in airdcpp-web/airdcpp-apidocs), with an ncdc beside it. It checks login in active mode, main chat both ways and /me, private messages both ways, search with the address rewrite and the collected result, and file-list transfers both ways, and writes the To-capture findings. CI gains an interop-airdcpp job, with the download pinned by SHA-256.
transfix
force-pushed
the
m1-interop-soak
branch
from
November 16, 2026 04:44
8a7e0b8 to
eb9d87b
Compare
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
M1 part 3 of 3: interop and the soak. It is stacked on #7 (the hub), which is stacked on #6. Retarget each as the one below merges.
Clean room. Both clients ran only as black boxes. Neither one's source, nor any other DC implementation's, was opened.
ncdc1.23.1 package, driven through the commands in its man page, ncdc(1).POST /settings/definitions.What's in it
server/interop/ncdc_interop.py. It starts the hub alone with its capture on, three ncdc in tmux, and an observer client (tools/nmdc_client.py):It checks 17 things:
/me;$ConnectToMe;$RevConnectToMe, then ncdcA's$ConnectToMe;$SRthrough the hub);$Keymatched.It writes
findings.mdfrom the captures. Locally: 17/17 passed.server/interop/airdcpp_interop.py. The AirDC++ web client logs in in active mode, with an ncdc beside it.--add-userand--configuretake their prompts' answers on stdin, so they work without a terminal;POST /settings/set;POST /share_roots;POST /hubswith a bare127.0.0.1:<port>./private_chat);/search/{id}/results);POST /filelists, stateloaded);$Keymatched.server/interop/soak.py.tools/nmdc_client.py, and each reads everything the hub sends, as a real client must.server/tools/run_hub.py. The hub alone on plain asyncio, stdlib only, writinghub.stats()to a file every second.Hub:
SUBLEVELS_NMDC_CAPTURE_DIR: every message both ways, per connection. It records what clients send in clear, so it is for test hubs only;listen_backlog, default 1024 (below).CI: three new jobs on GitHub-hosted runners:
interop-ncdc: aptncdc tmux;interop-airdcpp: the portable build from web-builds.airdcpp.net, checked against a pinned SHA-256;soak: 6000 users. Both put their results in the job summary and keep the captures and results as artifacts.Soak, 6000 users (local, Ubuntu 24.04, 32 cores; the hub is one process on one loop)
For D7. At 6000 users one Python loop sustains roughly 5 fan-outs a second. Searches are capped at 1 per 10 s per user and chat at 5 per 10 s per user. So a hub where only about 1 in 1000 users chats or searches each second stays within that, and anything busier does not.
To capture: what the captures show (for the spec writer)
From the captures of ncdc 1.23.1 and AirDC++ 2.14.0 (web client). Each item names the spec item it informs.
AirDC++ 2.14.0:
$Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch ZPipe0 TLS |, with the trailing space before|that P2 §2 allows.$Key,$ValidateNickand$Version 1,0091.$Hello:$GetNickList, then$MyINFO. That is the reverse of ncdc's order.$MyINFO.$MyINFO $ALL airdcpp <AirDC++w V:2.14.0,M:A,H:1/0/0,S:2>$ $0.1S$$2688$. The flag byte isS(0x53): normal, away, TLS and IPv4. A headless web client counts as away. It answers private messages with an automatic "I'm away…" reply, which the hub forwards like any$To.$Key. It matched./me. A third-person message is sent literally, as<airdcpp> /me waves|, the same as ncdc.$ConnectToMe <remote> <ip>:<port>S|, with the TLS suffix.$Search 127.0.0.1:<udp> F?T?0?1?interop-ncdca|. No TTH search was sent for a plain query, even though it listsTTHSearch.ncdc 1.23.1:
$Supports NoGetINFO NoHello UserIP2 TLS,$Key,$ValidateNickand$Version 1,0091in one burst, before$Hello.$Helloit sends$MyINFO, then$GetNickList.NoHelloandNoGetINFO, and logs in with the hub's$Hello, then its own$MyINFOin the list.$MyINFO.$MyINFO $ALL ncdcA <ncdc V:1.23.1,M:A,H:1/0/0,S:10>$ $0.005\x11$$2560$:$Key. Every ncdc key matched P1 §5's algorithm, on every connection (key_mismatch=0). ncdc escapes/%DCN096%/and others with the DCN scheme./me. ncdc sends it literally as main chat:<ncdcB> /me waves|.$Toduring login. Not exercised. A$Tosent while online opens a PM tab named~observerin ncdc.$ConnectToMe.$ConnectToMe <remote> <ip>:<port>S|.S(TLS) suffix appears even on a plain-NMDC hub when both haveTLSin$Supports.$RevConnectToMeit sends$ConnectToMe <requester> <ip>:<port>S|.$RevConnectToMe.$RevConnectToMe ncdcC ncdcA|, the passive user first. No NAT-traversal suffix or feature was seen.$Search.$Search 127.0.0.1:<udp> F?T?0?1?interop-ncdca|. ncdc wrote the right address already, so the rewrite was a no-op.$Search Hub:ncdcC F?T?0?1?interop-ncdcb|.nmdcs://./accept.$Lockinside TLS, as P7 §1 says.Not done in this PR
The other "To capture" items need DC++ or EiskaltDC++ (by hand, per the roadmap), AirDC++ over NMDCS, or a longer run (keepalive intervals).
Soak memory per user. It varies between runs: 17 KiB locally, 18 KiB in the first CI run, 6.5 KiB in the second. RSS is sampled once everyone is online, and it includes whatever output is still queued for slow readers at that moment.