Skip to content

http

2 posts with the tag “http”

Everything but the Views

An HTTP server assembled from the familiars, with the defaults already chosen.

A table of routes is not a server. Before anyone can use it, something has to open a port, spread the work over the cores, shrink the replies, write down what came in and what went out, and explain a crash instead of hiding it. The thirty-third familiar is that something, assembled from the familiars before it, with every one of those decisions already made.

The Seam

An HTTP/1.1 framework that streams requests in, and buffers replies out unless asked to stream.

Most HTTP frameworks make you think about the server. This one gives you exactly one thing to implement, a handler that takes a request and writes a response, and hides the socket, the parser, and the event loop behind that seam. The fourteenth familiar streams where it has to, on the way in, so a multi-gigabyte restore never sits in memory, and buffers on the way out by default, which is what gives a reply its ETag, its byte ranges and its compression. A reply too big to hold can stream too.