Home  /  RSS  /  RSS Comments  /  Enter

BDB or not BDB - that is the question...

Monday, February 4, 2008, by artyom ; Posted in: Storage, Benchmarks, Berkeley DB; 12 comments

At the beginning of the project I had several options for president storage for CppCMS:

  1. Use standard SQL databases like MySQL, PostgreSQL.
  2. Use embedded SQL data base like Sqlite3
  3. Use Berkeley DB
  4. Implement my own storage model.

At the beginning I wanted to use MySQL. At certain point I decided to switch to Berkeley DB, and now I come back to the original question: "what data storage to use?"

In order to make a proper design I had run lots of micro benchmarks and finally I had chosen Berkeley DB. However I never used queries from real DB. And now, when I had implemented a simple blog I decided to run benchmarks on the situation that is closer to real one.

I had reimplemented an operation of fetching single post using MySQL and imported the database that included 5000 articles with 10 comments each one and tested.

more...

Next Step - Caching

Thursday, January 17, 2008, by artyom ; Posted in: Progress, Templates, Framework, Cache; 5 comments

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:

  1. Efficiency
  2. Support of "dropping cache on update"
  3. Support of drop the cache by timeout
  4. Work using three models: single process cache, shared cache between processes, shared over the network.
  5. Support of caching on entry page level and single view level as well
  6. Transparent storage of compressed content

Lets describe each one of them:

more...

Understanding Berkeley DB

Tuesday, January 1, 2008, by artyom ; Posted in: Storage, Berkeley DB; 2 comments

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:

  1. Outstanding performance.
  2. Direct C++ API instead of SQL one.
  3. 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

Sunday, December 30, 2007, by artyom ; Posted in: Progress, Templates, FastCGI, Framework, Berkeley DB; 3 comments

There are several important components that CppCMS implements:

  1. FastCGI Application Framework
  2. Easy Berkeley DB -- Simple API to BDB
  3. Templates System
  4. Text Tools -- text to html conversion tools
  5. Nice URLs support

I'll describe there all these in details there

more...

Benchmarks, First Results

Thursday, December 27, 2007, by artyom ; Posted in: Benchmarks, FastCGI, Framework; 0 comments

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

more...

previous page

next page

Pages

Categories