signal.console/personal-atlas

Low-Level Atlas III

From “I built real systems” to “I built systems that talk to each other”

Part III of the Low-Level Atlas series: sockets, concurrency, and network protocols to the bone — raw TCP, a hand-rolled binary protocol, RFC 6455 WebSocket, connection concurrency at scale, and a real-time chat with a C client and a TypeScript client speaking the same wire format. No frameworks, no shortcuts. Assumes you already did Atlas I and II.

20Notes
8Branches
1Playbooks
1Registries
Part 3 of the series

You understood the machine, then you built with it. Now make it talk.

Atlas I covered the machine model, C, pointers and memory, assembly, the toolchain, systems programming, concurrency basics, and a small OS. Atlas II built real everyday systems in C — a shell, a malloc, an HTTP server, a database engine. This atlas is a category shift: long-lived connections that need to see each other, not many stateless requests in parallel — so it gets its own space instead of diluting into a phase of Atlas II.

Build order

Read it as a build queue, not a course catalog.

Start with raw TCP, suffer through designing your own framing before adopting WebSocket, then make connections concurrent at scale and give the chat rooms and presence — with a C client and a TypeScript client speaking the same protocol at the end.

Open Start Here
00
Phase 00 · Map the build queue

Orientation

Where to start, what Atlas I and II you need first, and how this atlas is organized as a build queue.

Phase page
01
Phase 01 · Understand the wire

TCP from Scratch

Raw BSD sockets to the bone: the three-way handshake, TCP_NODELAY, socket buffers, backpressure, half-close, and real network error handling — a simple echo server understood all the way down.

Phase page
02
Phase 02 · Suffer, then design

Design Your Own Protocol

Design your own application protocol over raw TCP before adopting WebSocket: framing, binary serialization, versioning, heartbeats — feel the problem a real standard exists to solve.

Phase page
03
Phase 03 · Speak the real standard

WebSocket, for Real

RFC 6455 implemented by hand in C: the HTTP Upgrade handshake, Sec-WebSocket-Accept, the frame format, control frames, fragmentation, and the close handshake.

Phase page
04
Phase 04 · Make connections scale

Concurrency at Scale

Long-lived connections that need to see each other: epoll/kqueue vs thread-per-connection vs hybrid pools, the C10K→C10M problem, and lock vs lock-free connection registries.

Phase page
05
Phase 05 · Model the chat's domain

Messaging Architecture

Rooms, presence, message history, delivery guarantees and ordering — and the pub/sub backplane concept for scaling a server across processes.

Phase page
06
Phase 06 · Compare the runtimes

Two Clients, One Protocol

The same protocol surviving two runtimes: a terminal client in C and a client in TypeScript, side by side, low-level vs high-level solving the same network problem.

Phase page
Phase ★ · Keep the discipline

Always Active

Testing network protocols: mock sockets, fuzzing malformed frames, Wireshark/tcpdump debugging, connection observability, and TDD applied to async and concurrent code.

Phase page
Spine project

The real-time chat, v0 → v5

Built across every branch in this atlas — a raw TCP echo server, then a binary protocol, then RFC 6455 WebSocket, then rooms and scale, then two clients speaking the same wire format — the same way Atlas I built an OS and Atlas II built a database engine: in milestones, not all at once.

v0

Raw TCP echo server

One client, one message, round trip. No protocol yet — just a socket that works.

v1

Custom binary protocol

A hand-rolled framing and serialization format working between N clients — no WebSocket yet.

v2

RFC 6455 WebSocket

Migrate to a compliant WebSocket implementation, verified against a real browser client.

v3

Rooms, presence, scale

Broadcast to hundreds of simulated connections with real concurrency, not a toy loop.

v4

Two clients, side by side

A complete C client and a complete TypeScript client, both talking to the same server.

v5

Pub/sub backplane (optional)

Scale the server across processes — the door into distributed infrastructure, discussed when reached.

Open TCP Fundamentals
Reference layer

Registries and operating memory

Registries keep external references, specs, tools, and source material normalized behind short atomic notes.