ProgrammerHumor

justAsGodIntended

justAsGodIntended
https://i.redd.it/do7reemeheef1.jpeg
Reddit

Discussion

MissinqLink
:js::g::hamster::j::py::holyc:

Nginx is written in C. I’ll just go with that.

7 hours ago
72kdieuwjwbfuei626

So is Apache.

4 hours ago
MissinqLink
:js::g::hamster::j::py::holyc:

4 hours ago
reallokiscarlet

C

not an Emacs extension in Lisp

7 hours ago
KlogKoder
:py:

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?

7 hours ago
Key_Combination_2386
:js::powershell:

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! 💪

7 hours ago
_Cakeshop

depends on if you coded it to be like that

7 hours ago
11middle11

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.

4 hours ago
HildartheDorf
:rust::c::cp::cs:

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.

2 hours ago
konglongjiqiche

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.

6 hours ago
LordAmir5
:c::cp::j:

It's pretty easy to do actually. 

6 hours ago
messierCobalt_

terry davis?

5 hours ago
DarthRiznat

The language of the gods

3 hours ago
QuardanterGaming
:j:

Fucking what did you do?

5 hours ago
Mast3r_waf1z
:cp:

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

3 hours ago
AllenKll

I used to do all my CGI in C. It's actually quite easy and fast.

2 hours ago
ThiccerThanU-Think

Even Jerry's beard couldn't be as wild as coding an entire webserver in C. Absolute madlad status right there 😂 #respectTheBeardAndTheCode

7 hours ago