Re:Raphters, a web framework for C
by JoachimSchipper on Monday April 04, 2011 @04:13PM
(#2408305)
Something like evhttp also has the benefit that you can have more than one request "in flight". FastCGI can theoretically do this, but almost no implementation supports it - and it makes e.g. writing a simple chat server much easier (one process, one thread, tons of connections, data in memory.)
[ Parent
| on HN ]
The downside to doing evhttp is that he'll have to write his own request parsing (I think he's relying on Apache/CGI to do that for him now).
But if you're going to do a C web framework (and... really? you sure about that?), that's probably how you should do it.
> The downside to doing evhttp is that he'll have to write his own request parsing...
Which, these days, isn't a huge deal. Both of these are decent:
https://github.com/ry/http-parser
https://github.com/mongrel/mongrel/blob/master/ext/http11/ht...
Re:Raphters, a web framework for C
by DanWaterworth on Wednesday April 06, 2011 @12:25PM
(#2415735)
Request parsing is no big deal, I've already written a json parser/generator for this project (though it's in a separate project atm).