Next Step - Caching
As we had seen in previous article, the benchmarks had shown an ability of CppCMS to produce about 630 compressed pages per second and an output of about 20Mbit/s. Is this enough?
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 "a prove of concept" there is an important point that was missed: "Why should I create same page so many times?"
Caching
This is the next logical step in the development of high performance web development framework.
First of all we should understand a requirements of the caching system:
- Efficiency
- Support of "dropping cache on update"
- Support of drop the cache by timeout
- Work using three models: single process cache, shared cache between processes, shared over the network.
- Support of caching on entry page level and single view level as well
- Transparent storage of compressed content
Lets describe each one of them:
more...Understanding Berkeley DB
There are many high quality, high performance, both open and closed source data bases available on the market: MySQL, PostgreSQL, Firebird, Sqlite, Oracle, MS SQL etc. These are industry standard SQL databases that usually power many web sites. The well known LAMP stack is de-facto standard for the web hosting companies.
So why had I chosen to use Berkeley DB instead of many other data bases that most of web technologies work with?
There are several reasons:
- Outstanding performance.
- Direct C++ API instead of SQL one.
- It is as mature as any other databases.
In order to understand the advantages of Berkeley DB over standard SQL data bases we need to understand the architectures of typical DB.
more...Components of CppCMS
There are several important components that CppCMS implements:
- FastCGI Application Framework
- Easy Berkeley DB -- Simple API to BDB
- Templates System
- Text Tools -- text to html conversion tools
- Nice URLs support
I'll describe there all these in details there
more...Benchmarks, First Results
Updated 28/12/07, 17:00
In order to show that all the time I had spend on this system wasn't wasted I had run a simple benchmark tests on following setup:
Server
- Hardware: AMD Athlon XP 3000+ 64 bit, 1GB RAM.
- OS: Debian Etch 64 bit.
- Web server: Lighttpd 1.4.13
- CMS: This blog software, configured with 5 working threads.
- Data base of 85MB: 5,000 articles with 10 comments to each one.
Network devices
- 100Mbit network cards
- Edimax $75 home router
Client
- Hardware: Dell Latitude C400, PIII 750MHz, 256MB RAM
- OS: Debian Etch 32 bit
The Goals
When I started working on this project, many were (and still are) extremely skeptical about its future. Many questions were asked, like: "Are you masochist? Who you think will ever use it? The hardware is cheap, we do not need such things!" etc.
In this post I'll explain my point of view and I'll show why "C++ Web Development Framework" is more then just "yet another crazy idea of another geek"
more...
