So, I started writing a HTTP server. Single thread, async I/O for network and disk. Simple, right? wrong. Linux async I/O support is a fabulous mess. I *think* I can just about get away with it, with two threads, one for epoll and one for io_getevents (kernel AIO). I *think* the kernel version of AIO will work on regular files (but I’m not certain, actually).
The HTTP 1.0 spec is easy to implement – but there’s no pipelining, and pipelining matters. I looked at the 2.0 spec, and it looks complicated. One of the beautiful things about 1.0 was that it was *simple*. I think 1.1 allows clients to send say chunked encoding, so already implementation is a headache. So we’ll see where I go with this.
So, given that I’ve got to read the HTTP specs, what I’m actually working on now is compiling all the GCC versions on the various build platforms. It’s a lot of work – GCCs seem to come in tranches, so there’s going to be a number of separate sets of build problems to deal with.
Right now I’m compiling 4.9.2 on ARM64. Will make sure -march=native works. Then it’ll be time to build all the versions and finding out about the build problems.
And then doing it all again on ARM32 and MIPS32 (but it should be pretty easy by then, hopefully they’ll run through without any extra work).