Posts in category ‘Storage’.
SQL Connectivity Libraries released
Today two SQL Connectivity libraries were released.
- Released first version 0.0.1 of CppDB library - new powerful SQL Connectivity library written in C++.
Released updated version 0.0.4 of DbiXX - libdbi wrapper. It was also deprecated in favor of CppDB.
It would be continued to be updated with bug fixed and probably small features, but the support will be discontinued withing a year or two, depending on the users needs.
Downloads are available in usual place: https://sourceforge.net/projects/cppcms/files/
Documentation can be found at: http://art-blog.no-ip.info/sql
Why CppDB? What is New There?
New SQL Connectivity library was introduced. There were many reasons for this step:
- Support of both prepared and unprepared statements and transparent prepared statements caching.
- Connection Pooling
- Static and Dynamic linking of the modules - very important for deploy.
- Native windows support including MSVC compiler.
- Removal of additional intermediate layer between the C++ code and native SQL client - libdbi.
- Performance.
- Ensure thread safety (which libdbi was lacking on some platforms - windows)
What is new in DbiXX
- Correct overloading for all integer types
- Access to underlying dbi data structures from all classes
- Support of connection string
- Support of getting driver name (for conditional coding)
- Full Doxygen documentation
- Some code cleanup - to make it locale safe
Why not other libraries like SOCI or QtSql
- QtSql is very heavy depends on Qt framework and does not fit well to modern C++ design (as it provides their own classes for everything - QString etc)
- SOCI - the development cycle is very slow, the quality of some primary FOSS RDBMS drivers is very low, and general disagreement about several concepts.
Session Management in CppCMS
Session management branch was merged to trunk, now you can use sessions transparently in CppCMS.
Quite full tutorial about sessions in CppCMS was written:
- Starting With Sessions
- Management Sessions with CppCMS (Hebrew) was published as well.
DbiXX Documentation
DbiXX SQL Library documentation is completed. It can be found in the wiki:
http://art-blog.no-ip.info/wikipp/en/page/ref_dbixx
The Roadmap to The First Beta Version of CppCMS
After quite a long period of development I had decided to get prepared to first public beta release of CppCMS.
The major components of this blog and the framework I want to introduce in first beta are following:
- Implementation of Django style templates inheritance, filters (done 70%)
- Introduce powerful cache system (done 100%)
- Replace SOCI by LibDBI (done 100%)
- Improve blog: true markdown, LaTeX equations, categories etc. (done 100%)
- Write Documentation (done 20%)
- Migrate my Hebrew blog from Word Press to CppCMS (done 100%)
There are lots of work to do, but CppCMS now looks much mature then before.
more...SOCI or DBI, stage 2
Discussing soci performance with its developers I had found that soci is compiled without any optimizations by default.
So, after recompiling soci with -O2 option I've got much better results. Simple comparison of dbixx and soci had given very close result. I had run my tests once more and got following results -- pages per second (no gzip): DB soci dbixx -------------------- MySQL 710 800 Sqlite3 550 410 PgSQL 385 430
We can clearly see that for MySQL and PostgreSQL dbixx is still faster in about 10% however in case of Sqlite3 dbixx is significantly slower (25%).
So it seems to me that both solutions are quite reasonable to use without clear advantage of one over another.