Skip to content

Build the HTTP transport, with timeouts, connection reuse and cancellation #27

Description

@iderex

Every other thing the core does goes through one HTTP transport. Built well once,
it is where timeouts, connection reuse and cancellation are decided for the whole
repository. Built badly, every caller writes its own timeout and the core drifts
against itself before a single client exists.

What this produces

One transport type every request goes through. No caller constructs its own.

Separate timeouts for connect, for first byte, and for the whole request, because
a server that accepts a connection and then says nothing is the case a single
overall timeout handles worst and it is the case the slow-server record in #7 is
about.

Connection reuse across requests to one server, since a wall of tiles opens many
requests to the same host and a fresh handshake per tile is a measurable part of
the 1.2 second budget.

Cancellation that actually stops the work, matching what the concurrency record
in #9 promised, so that a tile scrolled off the screen stops costing anything.

Done when

All requests in the repository go through the transport, a test proves each of
the three timeouts independently against the fake server's slow modes, and a
test proves a cancelled request stops rather than completing into a discarded
result. Blocked on #7, #9, #21, and on #102 for the clock each of the three
timeouts is measured against.

Metadata

Metadata

Assignees

Labels

architectureShape of the core: boundaries, interfaces, contractsblocked-on-issueWaits on another open issue on this board

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions