<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>CppCMS Blog :: Cache</title>
	<link>http://blog.cppcms.com/</link>
	<description>A blog on CppCMS - C++ Web Development Framework</description>
	<atom:link 
		href="http://blog.cppcms.com/rss/cat/7/" 
		rel="self" type="application/rss+xml" />
	

	
	<item>
		<title>Version 0.99.9 Released</title>
		<link>http://blog.cppcms.com/post/83</link>
		<guid>http://blog.cppcms.com/post/83</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;h2&gt;New Features:&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Clang is support provided, CppCMS was tested against
Clang 2.8.&lt;/p&gt;

&lt;p&gt;Now CppCMS supports 5 families of C++ compilers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GCC 3.4.x to 4.6.1&lt;/li&gt;
&lt;li&gt;Visual Studio 2005 - 2010&lt;/li&gt;
&lt;li&gt;Clang 2.8&lt;/li&gt;
&lt;li&gt;Intel 11&lt;/li&gt;
&lt;li&gt;Sun Studio 5.10&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Significant performance improvements in XSS filtering by
rewriting URI validation using a C++ parser rather then
using complex regular expression.&lt;/p&gt;

&lt;p&gt;Added support of fully custom validation for HTML
attributes using callback functions in the XSS filter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Significant performance improvements over multiple places
in code by eliminating multiple memory allocations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTP, SCGI and FastCGI backends - improved memory allocation
for CGI variables.&lt;/li&gt;
&lt;li&gt;Fetching values from JSON objects using get(...),
find(...) APIs is now done with 0 memory allocation.&lt;/li&gt;
&lt;li&gt;URL mapping is now done with 0 or very low memory allocation.&lt;/li&gt;
&lt;li&gt;Various filters like &lt;code&gt;escape&lt;/code&gt;, &lt;code&gt;urlencode&lt;/code&gt; and some others
now work with no or few memory allocations.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance improvements in caching by replacing
the balanced binary tree by hash table in the
primary cache key index.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Breaking Changes:&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;json::object&lt;/code&gt; had changed from &lt;code&gt;std::map&amp;lt;std::string,value&amp;gt;&lt;/code&gt;
to &lt;code&gt;std::map&amp;lt;string_key,value&amp;gt;&lt;/code&gt;. It should be fully
transparent for almost all users.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Bugs:&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Fixed a crash in http::response when writing HTTP headers
throws due for example to incorrect file permissions.&lt;/li&gt;
&lt;li&gt;Fixed a bug in &lt;code&gt;booster::regex&lt;/code&gt; that prevented some valid
patterns to be matched against some regular expressions.&lt;/li&gt;
&lt;li&gt;Fixed a bug that may prevent from &lt;code&gt;booster::regex&lt;/code&gt; to work on
big endian 64 bit platforms&lt;/li&gt;
&lt;li&gt;Added initial support of Python3 for templates compiler.&lt;/li&gt;
&lt;li&gt;Added a workaround for systems that use python3 by default.&lt;/li&gt;
&lt;/ul&gt;

		
		&lt;/div&gt;
		</description>
	</item>
	
	<item>
		<title>CppCMS benchmarks vs Java, C#, PHP</title>
		<link>http://blog.cppcms.com/post/67</link>
		<guid>http://blog.cppcms.com/post/67</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;p&gt;Long time ago I had posted a &lt;a href=&quot;http://art-blog.no-ip.info/cppcms/blog/post/22&quot;&gt;benchmarks&lt;/a&gt; comparing CppCMS based blog and PHP based one.&lt;/p&gt;

&lt;p&gt;I wanted to compare real life applications with each other. For a long time I had been searching for similar applications in several technologies doing very similar jobs in leading technologies: PHP, Asp.Net and Java/JSP. The last two were particularly important as they use static type system and &quot;compiled&quot; languages as C# and Java that are known to be faster then other dynamic typed languages like PHP, Python, Ruby and Perl popular in web development.&lt;/p&gt;

&lt;h2&gt;Setup&lt;/h2&gt;

&lt;p&gt;Unfortunately I had failed to find such application, so finally I decided to write something representative and small on my own an application with following requirements:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Uses simple time-out based page caching&lt;/li&gt;
&lt;li&gt;Uses MySQL and the database and keeps open connections in pool.&lt;/li&gt;
&lt;li&gt;For each request access to database (if page is not cached), fetches the page content and comments for &quot;sample article&quot; in blog.&lt;/li&gt;
&lt;li&gt;Converts text to HTML using a markdown filter and displays it on page.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I used following technologies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;CppCMS:&lt;/p&gt;

&lt;p&gt;Version: 0.99.3&lt;br/&gt;
MySQL Connection: dbixx/libdbi library using libmysqlclient&lt;br/&gt;
Markdown library: &lt;a href=&quot;http://www.pell.portland.or.us/~orc/Code/discount/&quot;&gt;discount&lt;/a&gt;&lt;br/&gt;
Connection: internal HTTP server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PHP&lt;/p&gt;

&lt;p&gt;Version: 5.2.6&lt;br/&gt;
MySQL Connection: internal driver&lt;br/&gt;
Markdown library: &lt;a href=&quot;http://michelf.com/projects/php-markdown/&quot;&gt;PHP-Makrdown&lt;/a&gt;&lt;br/&gt;
Connection: Lighttpd 1.4.19 + FastCGI&lt;br/&gt;
Bytecode Cache: XCache&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Asp.Net/Mono&lt;/p&gt;

&lt;p&gt;Version: 2.6.7&lt;br/&gt;
MySQL Connection: Connector/Net&lt;br/&gt;
Markdown library: &lt;a href=&quot;http://code.google.com/p/markdownsharp&quot;&gt;MarkdownSharp&lt;/a&gt;&lt;br/&gt;
Connection: internal HTTP server XSP (found to be much faster than fastcgi server)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSP/Tomcat&lt;/p&gt;

&lt;p&gt;Version - Tomcat: 6.0.18&lt;br/&gt;
Version - Java: Sun Java 1.6.0_12&lt;br/&gt;
MySQL Connection: Connector/J&lt;br/&gt;
Markdown library: jmd-0.8.1&lt;br/&gt;
Caching: oscache 2.4.1&lt;br/&gt;
Connection: HTTP&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I tested following parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pages per seconds generation for different cache hit/miss ratio: stating from 0% miss ratio up to 100% miss ratio.&lt;/li&gt;
&lt;li&gt;Memory usage&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;For each test the application was &quot;warmed up&quot; with 100 requests to fill the cache, and then 1000 request with max concurrency of 5 request are done, while certain percent of them is new pages and the other are taken from &quot;warmed up&quot; once.&lt;/p&gt;

&lt;h2&gt;Notes:&lt;/h2&gt;

&lt;p&gt;I used the fastest Markdown implementation I had found.&lt;/p&gt;

&lt;p&gt;C# implementation is the same one that &lt;a href=&quot;http://stackoverflow.com&quot;&gt;http://stackoverflow.com&lt;/a&gt; uses - it is actually heavily optimized implementation based on older C# implementation&lt;/p&gt;

&lt;p&gt;The Java implementation is based on the above C# and the fastest one I had found.&lt;/p&gt;

&lt;p&gt;Discount is the fastest C implementation of markdown that I had found.&lt;/p&gt;

&lt;h2&gt;Results:&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;http://cppcms.com/files/test1-small.png&quot; alt=&quot;Benchmarks Markdown&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://cppcms.com/files/mem-use.png&quot; alt=&quot;Memory&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;C#, Java and PHP implementation behave very similarly and without significant differences.&lt;/li&gt;
&lt;li&gt;The memory usage of Java/Tomcat and Mono/Asp.Net was significantly higher - up one or two orders of magnitude in comparison to CppCMS and PHP&lt;/li&gt;
&lt;li&gt;Surprisingly PHP behaves very well, in comparison to &quot;compiled&quot; languages like Java and C#.&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;Revisiting&lt;/h2&gt;

&lt;p&gt;After doing some profiling it was clear that C implementation of Markdown was significantly faster then all other implementations. So I decided to
create my own mini-markdown that make some basic handing of titles, lists, paragraphs and quotes at one level only. That is very simple syntax but implemented similarly in all 4 languages using same algorithm.&lt;/p&gt;

&lt;p&gt;The results were following:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://cppcms.com/files/test3-small.png&quot; alt=&quot;Benchmarks Markdown&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The difference between CppCMS and other implementations was still significant but still much smaller then the difference between real markdown implementation. So the performance difference was less dramatic.&lt;/p&gt;

&lt;h2&gt;2nd Revision&lt;/h2&gt;

&lt;p&gt;And in the last revision I decided not to use any text filters by fetch
ready HTML formatted content from DB and display it on the web as is.&lt;/p&gt;

&lt;p&gt;Such comparison actually profile the most basic stuff:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Caching&lt;/li&gt;
&lt;li&gt;SQL Connection&lt;/li&gt;
&lt;li&gt;Request/Response handling&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;And would ignore hundreds lines of code used in any web applications responsible
for the actual business logic.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://cppcms.com/files/sql-only.png&quot; alt=&quot;Benchmarks HTML&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;Conclusions&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Using C++ with CppCMS provides significant performance gains in developing web applications even in &lt;strong&gt;very&lt;/strong&gt; basic case.&lt;/li&gt;
&lt;li&gt;The performance is effected not only by the framework itself but also by many other libraries that are in use. Using highly optimized C and C++ libraries
may give significant performance gain in many cases.&lt;/li&gt;
&lt;li&gt;Such called &quot;jit-compiled&quot; languages as C# and Java and the frameworks based on the use significant amount of memory and still provide much lower performance then the one that can be achieved using real compiled languages like C++.&lt;/li&gt;
&lt;li&gt;It is good to remember that these benchmarks are still quite synthetic ones and in real life the actual performance depend on many factors - but using high quality and high performance libraries available for C++ have significant impact on performance.&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;Results Data&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;Markdown
---------
Miss %  CppCMS      Mono        PHP         JSP/Tomcat

0       3200.73     747.164     974.142     821.887
1       2891.2      427.727     724.173     337.736
2       2734.69     300.017     544.162     257.44
5       2285.95     162.686     301.507     130.023
10      1749.14     89.4447     174.724     68.5387
20      1247.86     47.7347     93.7919     25.7081
50      642.769     19.8311     38.979      15.1298
100     356.968     9.77116     20.1892     7.96328

Mini-Markdown
---------
Miss %  CppCMS      Mono        PHP         JSP/Tomcat

0       3103.14     763.222     1152.63     744.72
1       2933.97     728.971     1076.38     765.599
2       2944.42     726.338     1016.42     724.869
5       2804.44     661.613     866.32      822.927
10      2592.99     584.725     705.465     753.218
20      2239.03     471.576     507.021     674.488
50      1625.5      309.443     274.962     374.26
100     1156.09     197.123     159.974     164.515

HTML
-----
Miss %  CppCMS      Mono        PHP         JSP/Tomcat

0       3286.51     849.849     1147.21     808.038
1       3055.53     776.305     1137.35     748.829
2       2991.02     691.502     1122.88     693.439
5       2687.84     693.257     1074.22     756.618
10      2390.12     615.311     1016.27     604.452
20      1886.69     521.467     917.225     668.23
50      1947.93     346.672     669.693     289.656
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;System and Hardware&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;OS: Linux, Debian Lenny, 64 bit&lt;/li&gt;
&lt;li&gt;Hardware: AMD Athlon XP 3000, 64 bit, 1GB memory&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Related:&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.reddit.com/r/programming/comments/ds69u/web_development_benchmarks_of_ccppcms_vs_php/&quot;&gt;Comments on Reddit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://art-blog.no-ip.info/cppcms/blog/post/22&quot;&gt;CppCMS Based Blog vs WordPress Benchmarks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Code&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;http://cppcms.com/files/benchmarks-code.tar.gz&quot;&gt;Code&lt;/a&gt; can be downloaded from there. note, to run it you will need to have some libraries installed and configure some hardcoded paths to make it run.&lt;/p&gt;
		
		&lt;p&gt;
		&lt;a href="/post/67"&gt;more...&lt;/a&gt;
		&lt;/p&gt;
		
		&lt;/div&gt;
		</description>
	</item>
	
	<item>
		<title>CppCMS 0.0.4 Released</title>
		<link>http://blog.cppcms.com/post/41</link>
		<guid>http://blog.cppcms.com/post/41</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;p&gt;Version 0.0.4 of CppCMS had released.&lt;/p&gt;

&lt;p&gt;It includes optimizations required for using it in embedded systems.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Normal Embedded Build:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Caching is completely removed. Small memory footprint
is very important for embedded system thus, caching
stuff in memory is quite useless.&lt;/li&gt;
&lt;li&gt;Zlib compression are removed -- it removes dependency on
boost::iostreams, zlib and bzip2 libraries.&lt;/li&gt;
&lt;li&gt;Removed mod-prefork.&lt;/li&gt;
&lt;li&gt;Removed dynamic templates loading --- this feature requires export of
symbols to binary and increases its size in order to make RTTI work.
 Thus, all templates should be statically compiled into the binary.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;em&gt;Embedded CGI Mode:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FastCGI and SCGI APIs are removed&lt;/li&gt;
&lt;li&gt;Mod-thread and mod process are removed including
all thread pool facilities&lt;/li&gt;
&lt;li&gt;Changes in files based session backend to work
properly with CGI mode including garbage collection
(sessions that had time-out).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Downloads are avialable from Sf Project Page.&lt;/p&gt;
		
		&lt;/div&gt;
		</description>
	</item>
	
	<item>
		<title>Preparing to Beta 2...</title>
		<link>http://blog.cppcms.com/post/29</link>
		<guid>http://blog.cppcms.com/post/29</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;p&gt;What expected in the next beta version:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now CppCMS is really ready for serving high load sides, thanks to new distributed cache module based on Boost.Asio.&lt;/p&gt;

&lt;p&gt; Several CppCMS processes running on different computers can share same cache distributed over several TCP/IP cache servers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;Staticly typed template system that fully integrated with the framework that allows:

&lt;ul&gt;
&lt;li&gt;&quot;Django style&quot; template inheritance.&lt;/li&gt;
&lt;li&gt;Powerful extendsions abilities using C++ code directly.&lt;/li&gt;
&lt;li&gt;Static compilation with generated templates code or loading templates as external shared objects.&lt;/li&gt;
&lt;li&gt;Creates a potential for future &quot;forms/widgets&quot; integration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Various bugfixes and code cleanup.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Possibly included: form validation and generation modules.&lt;/p&gt;

&lt;p&gt;to be Continued...&lt;/p&gt;
		
		&lt;/div&gt;
		</description>
	</item>
	
	<item>
		<title>Caching System: Internals</title>
		<link>http://blog.cppcms.com/post/21</link>
		<guid>http://blog.cppcms.com/post/21</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;p&gt;One of the latest implemented features of CppCMS is a caching system.&lt;/p&gt;

&lt;p&gt;Each cached entry is stored using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unique key that defines the entry&lt;/li&gt;
&lt;li&gt;An actual data&lt;/li&gt;
&lt;li&gt;Entry lifetime period.&lt;/li&gt;
&lt;li&gt;The set of triggers --- this is a feature that is not available in many cache system like &lt;a href=&quot;http://www.danga.com/memcached/&quot;&gt;memcached&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;For example: main page that displays 5 recent posts may have a key &lt;code&gt;main_page&lt;/code&gt; and triggers: &lt;code&gt;post_123&lt;/code&gt;, &lt;code&gt;post_124&lt;/code&gt;, ... , &lt;code&gt;post_128&lt;/code&gt;. More then that, each time, during page build, when you fetch some cached data, like a sidebar or set of options, their sets of triggers are automatically added to the set of triggers of the page you build.&lt;/p&gt;

&lt;p&gt;For example, when the page is created and sidebar block is fetched from cache all its triggers are automatically added: if &lt;code&gt;sidebar&lt;/code&gt; depends of &lt;code&gt;options&lt;/code&gt;, then trigger &lt;code&gt;sidebar&lt;/code&gt; and &lt;code&gt;options&lt;/code&gt; will be automatically added to triggers of &lt;code&gt;main_page&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Thus, when certain trigger is risen, all pages that depends on it are automatically trashed. This makes a cache system quite powerful and easy to control correct data representation.&lt;/p&gt;

&lt;p&gt;The developer is expected to create a rational model of data/triggers that
represent the relations between parts of internal data and rise these triggers
when committing changes to database.&lt;/p&gt;
		
		&lt;p&gt;
		&lt;a href="/post/21"&gt;more...&lt;/a&gt;
		&lt;/p&gt;
		
		&lt;/div&gt;
		</description>
	</item>
	
	<item>
		<title>API Changes and mod-prefork</title>
		<link>http://blog.cppcms.com/post/24</link>
		<guid>http://blog.cppcms.com/post/24</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;p&gt;There have been lot of work in recent weeks in order to make deep internal changes in the framework. Now they include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Transparent support of 3 web server APIs: fastcgi, cgi and scgi.&lt;/li&gt;
&lt;li&gt;Support of new mod prefork that allows safer management of worker processes.&lt;/li&gt;
&lt;li&gt;Implementation of a cache that is shared between forked processes.&lt;/li&gt;
&lt;/ol&gt;

		
		&lt;p&gt;
		&lt;a href="/post/24"&gt;more...&lt;/a&gt;
		&lt;/p&gt;
		
		&lt;/div&gt;
		</description>
	</item>
	
	<item>
		<title>CppCMS vs WordPress</title>
		<link>http://blog.cppcms.com/post/22</link>
		<guid>http://blog.cppcms.com/post/22</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;h3&gt;Setup&lt;/h3&gt;

&lt;p&gt;I had compared two blog systems: this one and WordPress 2.5 with a patched WP-Cache-2 addon. I used following configuration:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Web Server lighttpd 1.4.13&lt;/li&gt;
&lt;li&gt;Interface FastCGI&lt;/li&gt;
&lt;li&gt;PHP 5.2&lt;/li&gt;
&lt;li&gt;Bytecode cacher: XCache 1.2.1&lt;/li&gt;
&lt;li&gt;Database MySQL 5.0&lt;/li&gt;
&lt;li&gt;Caching for WP: WP-Cache-2 with an additional &lt;a href=&quot;http://art-blog.no-ip.info/cppcms/blog/post/20&quot;&gt;performance patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Hardware: AMD Athlon XP 64bit, 1G RAM&lt;/li&gt;
&lt;li&gt;OS: Linux, Debian Etch 64bit.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I prepared two blogs that  were filled up with 1000 articles each. Each article had 10 comments, all the articles were organized in 10 categories in each blog.&lt;/p&gt;
		
		&lt;p&gt;
		&lt;a href="/post/22"&gt;more...&lt;/a&gt;
		&lt;/p&gt;
		
		&lt;/div&gt;
		</description>
	</item>
	
	<item>
		<title>Patch For WP-Cache-2 plugin</title>
		<link>http://blog.cppcms.com/post/20</link>
		<guid>http://blog.cppcms.com/post/20</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;p&gt;I&#39;m going to run a heavy benchmarks comparing WordPress -- the blog system I know very well, with CppCMS based blog -- the system I had written.&lt;/p&gt;

&lt;p&gt;The new caching system that was developed for CppCMS is quite smart, it stores
the entry pages twice: original and gzip compressed. On heavy loads, this allows
serving pages significantly faster because only thing that should be done is
to push html or compressed html page directly from the cache. Otherwise, gzip
compression (even fastest) would take lots of resources and reduces a preformace of the system.&lt;/p&gt;

&lt;p&gt;When it comes to benchmarks, I had discovered that WP-Cache-2 plugin does the
job well, but it caches only html version of the file, thus, even if the
page is cached it still must pass a compression by Apache&#39;s mod_deflate or by PHP engine itself.&lt;/p&gt;

&lt;p&gt;I had patched this plugin and now it stores two versions of same page: an original and compressed. and was able to get 60% performace improvement.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WordPress native plugin: 450 requests per second&lt;/li&gt;
&lt;li&gt;WordPress patched  plugin: 720 requests per second&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So after this patch I can feel that the benchmarks would be proper, because without it this would be incorrect to compare time required for fetching a cache
with the time required for compressing entry page.&lt;/p&gt;

&lt;p&gt;Links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://mnm.uib.es/gallir/wp-cache-2/&quot;&gt;WP Cache 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://cppcms.com/files/wp-cache.patch&quot;&gt;Patch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;strong&gt;N.B.:&lt;/strong&gt; The full benchmarks coming soon&lt;/p&gt;
		
		&lt;/div&gt;
		</description>
	</item>
	
	<item>
		<title>The Roadmap to The First Beta Version of CppCMS</title>
		<link>http://blog.cppcms.com/post/15</link>
		<guid>http://blog.cppcms.com/post/15</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;p&gt;After quite a long period of development I had decided to get prepared to first public beta release of CppCMS.&lt;/p&gt;

&lt;p&gt;The major components of this blog and the framework I want to introduce in first beta are following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implementation of Django style templates inheritance, filters (done 70%)&lt;/li&gt;
&lt;li&gt;Introduce powerful cache system (done 100%)&lt;/li&gt;
&lt;li&gt;Replace &lt;a href=&quot;http://soci.sourceforge.net&quot;&gt;SOCI&lt;/a&gt; by &lt;a href=&quot;http://libdbi.sourceforge.net&quot;&gt;LibDBI&lt;/a&gt; (done 100%)&lt;/li&gt;
&lt;li&gt;Improve blog: true markdown, LaTeX equations, categories etc. (done 100%)&lt;/li&gt;
&lt;li&gt;Write Documentation (done 20%)&lt;/li&gt;
&lt;li&gt;Migrate my Hebrew blog from Word Press to CppCMS (done 100%)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There are lots of work to do, but CppCMS now looks much mature then before.&lt;/p&gt;
		
		&lt;p&gt;
		&lt;a href="/post/15"&gt;more...&lt;/a&gt;
		&lt;/p&gt;
		
		&lt;/div&gt;
		</description>
	</item>
	
	<item>
		<title>Next Step - Caching</title>
		<link>http://blog.cppcms.com/post/7</link>
		<guid>http://blog.cppcms.com/post/7</guid>
		<description>
		&lt;div style=&quot;direction:ltr&quot;&gt;
		&lt;p&gt;As we had seen in previous article, the &lt;a href=&quot;http://art-blog.no-ip.info/cppcms/blog/post/4&quot;&gt;benchmarks&lt;/a&gt; had shown an ability of CppCMS to produce about
630 compressed pages per second and an output of about 20Mbit/s. Is this enough?&lt;/p&gt;

&lt;p&gt;For most of cases it is... But as we had seen I want to use every cycle of the CPU as smart as I can. Even, if the model I had suggested, was able to show &quot;a prove of concept&quot; there is an important point that was missed: &quot;Why should I create same page so many times?&quot;&lt;/p&gt;

&lt;h2&gt;Caching&lt;/h2&gt;

&lt;p&gt;This is the next logical step in the development of high performance web development framework.&lt;/p&gt;

&lt;p&gt;First of all we should understand a requirements of the caching system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Efficiency&lt;/li&gt;
&lt;li&gt;Support of &quot;dropping cache on update&quot;&lt;/li&gt;
&lt;li&gt;Support of drop the cache by timeout&lt;/li&gt;
&lt;li&gt;Work using three models: single process cache, shared cache between processes, shared over the network.&lt;/li&gt;
&lt;li&gt;Support of caching on entry page level and single view level as well&lt;/li&gt;
&lt;li&gt;Transparent storage of compressed content&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Lets describe each one of them:&lt;/p&gt;
		
		&lt;p&gt;
		&lt;a href="/post/7"&gt;more...&lt;/a&gt;
		&lt;/p&gt;
		
		&lt;/div&gt;
		</description>
	</item>
	


</channel>
</rss>
