C++ Server Pages
28 Feb 2011

For the last decade I have been a php developer, but I have always seen myself as a c++ developer. Even though I have only written one small c++ application in my work life, and some unfinished test applications. So now I feel it's time to do a new try, to see if I'm a c++ developer, php developer or something else.

Currently I'm buildin a web shop, where I'm going to sell z-wave devcies for home automation. Naturally I started to create it in PHP, but suddenly an old cracy idé took all my attation. I'm going to build it in c++, is this mad or is it the craziest idé someone can come up with? Well, I'm going to give it a try.

First step will be to scan the Internet for a c++ web application system. I'd like something that is opensource, used by others, works both for large websites and embedded systems. So here comes a list of different systems, and some first impression comments.


Wt is a C++ library for developing interactive web applications. The API is widget-centric and inspired by desktop GUI APIs. To the developer, it offers complete abstraction of any web-specific implementation details, including event handling, graphics support, and pretty URLs.

The POCO C++ Libraries (POCO stands for POrtable COmponents) are open source C++ class libraries that simplify and accelerate the development of network-centric, portable applications in C++. The libraries integrate perfectly with the C++ Standard Library and fill many of the functional gaps left open by it. Their modular and efficient design and implementation makes the POCO C++ Libraries extremely well suited for embedded development, an area where the C++ programming language is becoming increasingly popular, due to its suitability for both low-level (device I/O, interrupt handlers, etc.) and high-level object-oriented development. Of course, the POCO C++ Libraries are also ready for enterprise-level challenges.

An article describing how to create your own webserver with poco.

A free (Boost license) portable C++ source library. Not a web server library, but looks very useful for creating the appliations.

Pion Network Library (pion-net) is a C++ development library for embedding a lightweight HTTP interfaces to your application. Uses the boost lib.

Mongoose is an easy to use web server. It can be embedded (40k footprint) into existing application to provide a web interface to it.

A C++ class library for writing CGI/FastCGI applications. Looks ok.

CppCMS is the web development framework written in C++, that is aimed on development of high performance web application. It uses different web APIs, most noticably FastCGI, boost, as a web layer and various databases as a storage backed. Only 383 downloads, so not that many users.

LuCI is a collection of free Lua software for embedded devices. It includes several useful tools and libraries for developers as well as an MVC-Webframework and web user interface which is part of OpenWrt Kamikaze starting from release 8.09.

Web application server.

I get the feeling that nginx is the HTTP server to use. It's defenitley something I'm goin to test and read more about. It feels from what I have read that it's (one of) the fastest webserver, stable and easy to config. It's possible to install on embedded computers (nginx-on-sheevaplug) something I might like to do in a future project.

To make c++ dynamic pages on the nginx, I will need to use somthing like the fastcgi protocol. But the fastcgi protocol has barley been updated since 96, and I can't decided if it's a good or bad thing. Is it stable and good technology or old and bad?

This is a module for apache2 whiche enables compilation, loading and execution of C++ classes and HTML pages with c++ embeded.

Regarding to some web-articles, lighttpd has plenty of memory leaks and other bugs. "Security, speed, compliance, and flexibility — all of these describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems. And best of all it's Open Source licensed under the revised BSD license. lighttpd powers several popular Web 2.0 sites like YouTube, wikipedia and meebo.”

Commersial system. CppServerPages and LuaServerPages SDK for embedded systems.

Yet another small httpd, don't support fastcgi.

Tntnet is a modular, multithreaded, high performance webapplicationserver for C++. To create webapplications Tntnet has a template-language called ecpp similar to php, jsp or mason, where you can embed c++-code inside a html-page to generate active content. The ecpp-files are precompiled to c++-classes called components and compiled and linked into a shared library. This process is done at compiletime.

Appweb is an embedded web server for the efficient hosting of web applications and frameworks. It is blazing fast and has an extensive set of features. Appweb is optimized for hosting dynamic web applications via an event-driven, multi-threaded core to deliver rapid response, fast throughput and effective memory utilization. It is compact and will embed using as little as 800K of memory.

WEB Services

C++ web service engine for soap communication. Not active anymore and replaced by axis2.

C web service engine for soap communication. But possible to write c++ modules.

Commercial version of Axis2.

Opensource c/c++ web service engine for soap communication. "The toolkit has been used by many organizations, including Fortune 100 companies. Applications include embedded systems, mobile devices, telecommunications, routers, online games, Web TV, banking systems, auction systems, news outlets, network management systems, grid and cloud computing platforms, and security software. ”

"Staff is Web Service Framework for C++/JavaScript based on Apache Axis2/C.” It doesn't have that many downloads, if looking on the download page, which probably means that it is not used.

Implent web interface to your programs without using an web server. 2002-2004.

Commercial open source, Applied Informatics Remoting is a distributed objects and web services framework for C++. With Remoting, building distributed applications, implementing high-level inter-process communication (IPC) or web services based on the Simple Object Access Protocol (SOAP) and the Web Service Definition Language (WSDL) becomes a breeze. Making C++ objects available remotely over the network or turning them into a web service is as easy as adding a few annotations to a header file. The Remoting code generator does the rest. There is no need to maintain a separate interface definition, using an awkward interface definition language.

List of webservers

Discussions and articles.

Forum discussions and articles, that might be useful to read.

c++ web server page