Skip to content

Document the protocols and state machines - #77

Merged
benoitc merged 1 commit into
mainfrom
protocol-docs
Aug 29, 2026
Merged

Document the protocols and state machines#77
benoitc merged 1 commit into
mainfrom
protocol-docs

Conversation

@benoitc

@benoitc benoitc commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Until now the message shapes lived in the code and in the memory of whoever wrote them; a reader tracing a hang had to reassemble the frame formats from three C files, two Erlang modules and the child. The protocols page puts every boundary in one place, from the caller's message to the byte layout on the pipe and the socket, with the response body rule the three writers and two parsers share and a checklist of what to touch when adding a request, a control or an event. The state machines page does the same for behaviour over time: the runtime, the embedded context thread and its process, a request's refcount, the isolated gen_statem with what each state dispatches, postpones or refuses, the child's execution stack, and the invariants underneath. Both are linked from the architecture page and listed under Internals in ex_doc.

Every message, frame and status code now has one page saying who
sends it, what answers it and which files must change together,
and every long-lived process and thread has its states, triggers
and timers written down next to the invariants a change must keep.
@benoitc
benoitc merged commit 6aafcf6 into main Aug 29, 2026
58 of 60 checks passed
@benoitc
benoitc deleted the protocol-docs branch August 29, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant