CppCMS The High Performance C++ Web Development Framework

Project: CppCMS Features: Case Study Web Site: http://cppcms.sf.net Author: Artyom Beilis - FCGI & SCGI web - internationalization Web Technologies Performance Comparison Application: 16000 Version: 0.99.9 server API and localization CppCMS Display a simple blog page with License: LGPLv3 - built-in web server - JSON configuration 14000 PHP comments, using sqlite3

Category: MVC - nice url mapping and - SQL connectivity 12000 caching system and XSS filtering for

OS Support: Linux, Windows, FreeBSD, formatting. - - server side comments n 10000 o

Solaris, Mac OS X - templates system events. c e s

Compilers: GCC, Intel, Visual Studio, - powerful caching - , JSON-RPC r 8000 Technologies: e p

Clang, Sun Studio - web forms formatting - process and chroot s - CppCMS 0.99.9, cppdb 0.0.3

e 6000 g

Notable Users: dhiti.com, tatoeba.org (beta) and validation isolation a - Jetty 7.4.2, oscache 2.4.1, - sessions - XSS filtering P 4000 antisamy 1.4.4, Java 1.6 (-server),

2000 Javasqlite-20110430. - PHP 5.3.3, lighttpd 1.4.26, 0 0 10 20 30 40 50 60 70 80 90 100 xcache 1.3.0, htmLawed 1.1.9.5 Advanced Caching: Cache miss ratio (%) Setup: Two levels cache Gzip compression Cache Invalidation - Sqlite3 database with 100,000 Memory Consumption articles with 10 comments each. triggers objects keys - XSS filter for comments Page Application In-memory Cached? PHP - Pages level cache Cache Generation No k r o Load: L1 Yes w Java e

m - Warm up with 100,000 requests a r

L2 F - Measure number of requests CppCMS per second for each cache miss Cache Cache deflate Cache 0 200 400 600 800 1000 1200 ratio over 100,000 requests. Server Server Megabytes Hardware: CppCMS creates two CppCMS allows to cache CppCMS allows to actively - Intel i5 2.53GHz 2 cores, 4 threads. level cache for distributed already compressed pages invalidate the cache using - 4GB Memory cache system reducing the reducing the load on the web special triggers that have network latency for most server and the network one to many relationship and frequently used items. bandwidth. thus invalidate many Comet Programming (server side events) objects in one operation. Event Loop Pool CppCMS supports Comet programming a.k.a. server side Performance Oriented Session Management synchronous app. events support. Client Side Server Side Combined It allows to create asynchronous synchronous app. applications that run in the main Save the state on the client Save the state on server side Save the state on the client event loop and handle multiple requests simultaneously allowing to side in a signed and optionally using memory, files or other side unless it is too big or it synchronous app. encrypted cookie using HMAC custom storage, while the is explicitly requested to use Asynchronous postpone the responses to client with and AES algorithms. cookie keeps the session id. the server side. Application minimal resource use.