Add docs/ARCHITECTURE.md: system overview, source map, threading model#3791
Add docs/ARCHITECTURE.md: system overview, source map, threading model#3791mcfnord wants to merge 3 commits into
Conversation
One place that answers: how audio flows, which class lives where, which threads exist, how a UDP "connection" works, and the two invariants that protect live performances (never block the real-time path; all network input is untrusted). Co-Authored-By: Claude Fable 5 <[email protected]>
ann0see
left a comment
There was a problem hiding this comment.
I suppose we'll need to make this more detailed. Also explain classes, ...
Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Added a "Key classes and how they connect" section — the ownership tree ( Is that the level of detail you had in mind, or do you want it to go deeper (e.g. per-class method walkthroughs)? My instinct is to keep it at "what state lives where and who calls whom" and let the code carry the rest, so the doc doesn't rot. |
|
Whilst keeping this as the "this is the current architecture" guide, I'd like somewhere that directs people on what the "target architecture" is: the clear separation of concerns as raised in #3801. I guess that Issue can have that document as a deliverable. |
Split out of #3789 per review — one new file per PR.
A single page answering the questions every new contributor (human or agent) otherwise reconstructs from scratch: how audio flows client → server → client, which class lives in which file, which threads exist and which of them are real-time, how a UDP "connection" works without a handshake, how directory servers and hole punching fit in, and where common kinds of changes go. It states two invariants: never block the real-time path, and treat all network input as untrusted.
Everything in it is verified against current
main(socket.cppProcessPacket(),CHighPrecisionTimer/OnTimer,CChannel,CServerListManager).Two things worth discussing here, per the comments in #3789:
src/themselves, so the source map is aimed at humans — it carries the class→file responsibilities that enumeration doesn't reveal. Can trim if you prefer.Docs only; no code changes.
CHANGELOG: SKIP
🤖 Generated with Claude Code