Coding a website in C


I was just reading the About Us page, and read this line :
"plus, we're one of the few still around using C!"

Considering that meebo is an online chat client, how do they work with C? How can they use C for the backend? How does it interact with the frontend? For example, let's say a user creates a new account, and new directory is to be made, how does the information go from the front end to the back end?

I'm sorry if it's an invalid question.

Thank you

Edit 1: The Intro Tutorial to CGI was great. Any good books I can pick up from my library regarding this?

Thanks a lot for the quick response guys!

Best Solution

I don't know how meebo does it, but given that it's chat software they probably have a custom server written in C to handle the actual message traffic.

However, Apache and most other HTTP servers have always been able to call C programs just as they can call PHP, CGI and other languages for certain requests. Some websites are even written in Lisp.

The backend has to be compiled each time, unlike an interpreted language, but that happens at rollout and is part of the build/production scripts.

The permissions given and user account that the C program runs under must be carefully chosen, and of course a C website suffers from the same issues any other C program can fall for, such as buffer overrun, segfault, stackoverflow, etc. As long as you run it with reduced permissions you are better protected, and it's no worse than any other language/platform/architecture.

For servers, however, it's still used widely - the gold standard, I suppose. You can find plenty of servers written in Java, C++, and every other language, but C just seems to stick around.


Related Question