4 ms·
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
by JoachimSchipper 16y ago
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.)
- tptacek 16y agoThe 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.
- sigil 16y ago> 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/ry/http-parser https://github.com/mongrel/mongrel/blob/master/ext/http11/http11_parser.rl https://github.com/mongrel/mongrel/blob/master/ext/http11/ht...
- DanWaterworth 16y agoRequest parsing is no big deal, I've already written a json parser/generator for this project (though it's in a separate project atm).