
A static file server in x86 Assembly - gyre007
https://github.com/jeaye/toybox/tree/master/httpd-asm
======
tenebrisalietum
Why not a full featured one:
[https://2ton.com.au/rwasa/](https://2ton.com.au/rwasa/)

------
stochastimus
I think this is really cool. For simple stuff where you just want light and
fast, it's good to see an ASM rewrite.

~~~
theamk
Light? Sure

Fast? Nope. Look at http_write_response for example - it does 5 syscalls
instead of 2 required. And there is no caching headers support, so the browser
will download things more than necessary.

For simple things, I highly recommend a small C-based server. This server has
educational value only.

~~~
rkeene2
Check out "filed" [0] for a small C webserver that does a lot to be fast.

[0] [http://filed.rkeene.org/](http://filed.rkeene.org/)

~~~
Hydraulix989
One thread per request doesn’t scale and becomes inefficient once there are
too many requests because of the context switching.

~~~
vbsteven
This depends on the scenario. Before the async revolution most app servers
were using this model and I’m sure that a very significant portion of the
current internet is served with this model.

It may not be the fastest in all cases but I still find it way easier to build
something with this model than with async-everything.

