Live data from Hacker News

Althttpd: Simple webserver in a single C file

sqlite.org

11–20 of 345 posts

Re: Althttpd: Simple webserver in a single C file

#13

Interesting but why? There’s a bazillion web servers out there, surely one of them can do the job? What have I missed?

> [Althttpd ...] has run the https://sqlite.org/ website since 2004

I don't know what the landscape was like in 2004 really, but probably at least an order of magnitude less than today's bazillion (whatever that would be!).

Re: Althttpd: Simple webserver in a single C file

#15
post #2

Here is the actual single C-code file: https://sqlite.org/althttpd/file?name=althttpd.c Something I absolutely love about text based protocols such as HTTP/1 is how easy you can implement it in any virtually programming language. Sure, the implementation is not top-of-the-notch, but it just damned works, it is portable, it is understandable by humans. That's something what's got lost with HTTP/2 and HTTP/3, respectiv…

HTTP/1 simplicity comes not from text nature, but from it's clear concept and limited functionality.

At core, it's just request-reply + key-value metadata. Whenever it's text, or binary, it does not matter much. But writing HTTP/2 frame types in letters would not make them any easier to understand.

Re: Althttpd: Simple webserver in a single C file

#18

I'm all for SQLite and I am a fan of the author of the project but for a webserver I have turned my back away from Nginx for https://caddyserver.com/ because of the simplicity. Caddy is just really awesome as a reverse proxy (2 line config!!) and I am in the processes of moving all my projects to it. It is fast enough as well since other things will be the bottle neck way before that. I am not affiliated with Caddy i…

The thing I love most about caddy is it automatically does all the ssl certificate garbage which is so painful in every other web server ever. Yes certbot makes it less painful but it’s still a big PITA, unlike caddy where SSL is just like magic.

And zero dependencies!

This might solve my problem with older servers that no longer support the latest SSL.

I really need to upgrade those rickety old machines.

Re: Althttpd: Simple webserver in a single C file

#19
post #7

Earlier quoted context omitted.

dependency awareness. External stuff bears surprises. Not everybody feels comfortable with that.

There’s plenty of lightweight minimal web servers with minimal dependencies. But hang on is dependency anxiety really the reason or did you just make that up?

no, not made up – selfmade is even less dependencies than a 3rd party without other deps. And minimalis more than zero, still.
Post reply on HN