C
not an Emacs extension in Lisp
Maybe a stupid question, but if a request is really slow at coming in (large size, connection issues etc.), will it block other requests from being processed?
In general, the network stack only passes complete data packets to the server. This means that a large, fragmented request should not block the application.
However, programmers always find a way to write bad software and still block the server! 💪
depends on if you coded it to be like that
You can create multithreaded apps in c.
In standard tcp: if recv blocks it doesn’t block all the threads, but it will block the thread that is waiting.
If there’s signal jamming going on, the non jammed requests would probably get processed faster, as the tcp stack politely waits for the radio jammer to stop.
It depends. Some webservers will begin processing of a request once they have the headers, some will wait for the full request.
Applications can use sync or async I/O, can be multi threaded or not, multi threaded could mean a 1:1 threading thread per request, or a listener thread and a worker threadpool, or something else.
The kernel/nic driver is going to be asynchronous, even if the application isn't.
I did this in production for an iot thingy. A pi running chrome kiosk on a touchscreen and a c process doing the conversion from plain text http to various binary over USB to a couple daisy chained samd microcontrollers. It handled one blocking request at a time. In retrospect probably shouldn't have done it in c but it was nice to have the firmware and middleware use the same types.
It's pretty easy to do actually.
terry davis?
The language of the gods
Fucking what did you do?
A few months ago I wrote a http client to a webserver in C as a kernel module, the key thing with that, is that SSL and HTTP is not a thing in kernel code, so it doesn't support SSL and HTTP was hard coded :P
I used to do all my CGI in C. It's actually quite easy and fast.
Even Jerry's beard couldn't be as wild as coding an entire webserver in C. Absolute madlad status right there 😂 #respectTheBeardAndTheCode
Nginx is written in C. I’ll just go with that.
So is Apache.