“Sometimes web applications need small and fast components that are best written in C.
Example: ad banner rotation engine. It gets invoked many times on every page of your site producing little HTML snippets based on predefined configuration. How would you implement it?
CGI is not an option as it gets loaded and unloaded on every request. Writing a module for your main web server such as Apache httpd or nginx gives best performance but server’s API isn’t very friendly (especially when dealing with shared memory, etc.). What we need is sort of servlet container for C (just like Java has).
Before writing NXWEB I evaluated a number of existing light/embeddable web servers (mongoose, microhttpd, libevent, G-WAN) each one having their own drawbacks (see notes to benchmarks)…”
