CppCMS Blog :: Storage http://blog.cppcms.com/ A blog on CppCMS - C++ Web Development Framework CppDB 0.3.1 Released http://blog.cppcms.com/post/106 http://blog.cppcms.com/post/106 <div style="direction:ltr"> <p>This is an important bugfix release.</p> <p>It is recommended for all users to upgrade to latest version:</p> <p>Critical Bugs fixed:</p> <ul> <li>Fixed bug #3536452: <ul> <li><code>cppdb::transaction::~transaction()</code> could leak an exception</li> <li><code>busy_timeout</code> option was not working for sqlite3 backend</li> </ul> </li> <li>Fixed incorrect use of <code>SQLITE_STATIC</code> that could cause crash</li> </ul> <p>Full Changelog: <a href="http://cppcms.com/sql/cppdb_0.3.1/changelog.html">http://cppcms.com/sql/cppdb_0.3.1/changelog.html</a><br/> Downloads: <a href="https://sourceforge.net/projects/cppcms/files/cppdb/">https://sourceforge.net/projects/cppcms/files/cppdb/</a></p> </div> CppDB 0.3.0 Released http://blog.cppcms.com/post/91 http://blog.cppcms.com/post/91 <div style="direction:ltr"> <p><em>New Features:</em></p> <ul> <li>Added session specific storage for custom data</li> <li>Added support of one time initialization</li> <li>Added version number API</li> <li>Added an option to clear the connections pool</li> <li>Added busy_timeout option to sqlite3 backend.</li> <li><p>Changed library version format to Major.Minor.Patch</p> <ul> <li><code>Major</code> is updated when the library breaks its ABI or API, should not happen often.</li> <li><code>Minor</code> is updated when new features or new API is introduced, The library remains fully backward compatible</li> <li><code>Patch</code> - maintenance bug fix release, no changes in public API.</li> </ul> </li> </ul> <p>Bugs:</p> <ul> <li>Fixed bug #3451653 - disconnected connections are recycled to the pool</li> <li>Fixed issue #3439445 - build problem on some distributions</li> </ul> </div> CppDB 0.0.4 Released http://blog.cppcms.com/post/89 http://blog.cppcms.com/post/89 <div style="direction:ltr"> <p>CppDB 0.0.4 Released</p> <p>This release mostly includes multiple bug fixes and few new features:</p> <p><em>Features:</em></p> <ul> <li>Added <code>empty()</code> and <code>clear()</code> members for <code>cppdb::statement</code></li> <li>Added an option to provide default value when the value is NULL in <code>result::get()</code> instead of throwing an exception. Thanks to Krzysztof Wrzalik.</li> </ul> <p><em>Bugs:</em></p> <ul> <li>Switched to using ODBC as internal backend by default due to multiple issues with dynamic unloading of ODBC backend. Now if you want to use it dynamically you must sed the build option <code>-DODBC_BACKEND_INTERNAL=OFF</code></li> <li>Build issue of PostgreSQL with MSVC compiler.</li> <li>Various fixes for FreeBSD, Solaris and Darwin</li> <li>Fixed bug #3317277: a exception is not thrown when connection to PostgreSQL server could not be established.</li> <li>Fixed bug #3439445: added search path to PostgreSQL headers for some Linux distributions.</li> </ul> <p>The release is fully backward compatible (API and ABI) with previous release.</p> </div> CppDB changes license. http://blog.cppcms.com/post/73 http://blog.cppcms.com/post/73 <div style="direction:ltr"> <p>I had decided to change the license of CppDB (the SQL Connectivity Library) to permissive one.</p> <p>Now CppDB is dual licensed under <a href="http://www.boost.org/users/license.html">Boost Software License</a> or <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>.</p> <p>I actually would like to release it under BSL only, but unfortunately the MySQL connector does not have a GPL exception for this license - so if you use GPL MySQL connector with CppDB you should follow the MIT license terms.</p> <p>This was the step I had planned to do from the beginning as it would bring more potential users for this specific part of CppCMS project and as it would probably allow it being integrated to the Boost project in future.</p> <p>Due to license change CppDB 0.0.3 was released that has exactly the same code as CppDB 0.0.2 but has BSL/MIT license instead of LGPLv3.</p> <p>Of course the CppCMS itself remains licensed under LGPLv3 and this is not going to be changed.</p> </div> CppDB 0.0.2 Released http://blog.cppcms.com/post/72 http://blog.cppcms.com/post/72 <div style="direction:ltr"> <h2>New Features:</h2> <ul> <li>Performance optimizations in connection opening when using pool.</li> <li>Added advanced MySQL options support, patch from Krzysztof (kyku)</li> </ul> <h2>Bugs:</h2> <ul> <li>Fixed crash on process shutdown when connections pool is used. The crash was caused by incorrect order of unloading the driver and closing shared object.</li> <li>Added missing copy constructor.</li> <li>Fixed error reporting in PostgreSQL backend when statement preparation fails.</li> </ul> </div> SQL Connectivity Libraries released http://blog.cppcms.com/post/70 http://blog.cppcms.com/post/70 <div style="direction:ltr"> <p>Today two SQL Connectivity libraries were released.</p> <ol> <li>Released first version 0.0.1 of <a href="http://art-blog.no-ip.info/sql/cppdb/index.html">CppDB</a> library - new powerful SQL Connectivity library written in C++.</li> <li><p>Released updated version 0.0.4 of <a href="http://art-blog.no-ip.info/sql/dbixx_0.0.4/">DbiXX</a> - libdbi wrapper. It was also deprecated in favor of CppDB.</p> <p> 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.</p></li> </ol> <p>Downloads are available in usual place: <a href="https://sourceforge.net/projects/cppcms/files/">https://sourceforge.net/projects/cppcms/files/</a></p> <p>Documentation can be found at: <a href="http://art-blog.no-ip.info/sql">http://art-blog.no-ip.info/sql</a></p> <h2>Why CppDB? What is New There?</h2> <p>New SQL Connectivity library was introduced. There were many reasons for this step:</p> <ol> <li>Support of both prepared and unprepared statements and transparent prepared statements caching.</li> <li>Connection Pooling</li> <li>Static and Dynamic linking of the modules - very important for deploy.</li> <li>Native windows support including MSVC compiler.</li> <li>Removal of additional intermediate layer between the C++ code and native SQL client - libdbi.</li> <li>Performance.</li> <li>Ensure thread safety (which libdbi was lacking on some platforms - windows)</li> </ol> <h2>What is new in DbiXX</h2> <ul> <li>Correct overloading for all integer types</li> <li>Access to underlying dbi data structures from all classes</li> <li>Support of connection string</li> <li>Support of getting driver name (for conditional coding)</li> <li>Full Doxygen documentation</li> <li>Some code cleanup - to make it locale safe</li> </ul> <h2>Why not other libraries like SOCI or QtSql</h2> <ul> <li>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)</li> <li>SOCI - the development cycle is very slow, the quality of some primary FOSS RDBMS drivers is very low, and general disagreement about several concepts.</li> </ul> </div> Session Management in CppCMS http://blog.cppcms.com/post/33 http://blog.cppcms.com/post/33 <div style="direction:ltr"> <p>Session management branch was merged to trunk, now you can use sessions transparently in CppCMS.</p> <p>Quite full tutorial about sessions in CppCMS was written:</p> <ul> <li><a href="http://art-blog.no-ip.info/wikipp/en/page/tut_sessions">Starting With Sessions</a></li> <li><a href="http://art-blog.no-ip.info/newpress/blog/post/193">Management Sessions with CppCMS</a> (Hebrew) was published as well.</li> </ul> </div> DbiXX Documentation http://blog.cppcms.com/post/32 http://blog.cppcms.com/post/32 <div style="direction:ltr"> <p>DbiXX SQL Library documentation is completed. It can be found in the wiki:</p> <p><a href="http://art-blog.no-ip.info/wikipp/en/page/ref_dbixx">http://art-blog.no-ip.info/wikipp/en/page/ref_dbixx</a></p> </div> The Roadmap to The First Beta Version of CppCMS http://blog.cppcms.com/post/15 http://blog.cppcms.com/post/15 <div style="direction:ltr"> <p>After quite a long period of development I had decided to get prepared to first public beta release of CppCMS.</p> <p>The major components of this blog and the framework I want to introduce in first beta are following:</p> <ul> <li>Implementation of Django style templates inheritance, filters (done 70%)</li> <li>Introduce powerful cache system (done 100%)</li> <li>Replace <a href="http://soci.sourceforge.net">SOCI</a> by <a href="http://libdbi.sourceforge.net">LibDBI</a> (done 100%)</li> <li>Improve blog: true markdown, LaTeX equations, categories etc. (done 100%)</li> <li>Write Documentation (done 20%)</li> <li>Migrate my Hebrew blog from Word Press to CppCMS (done 100%)</li> </ul> <p>There are lots of work to do, but CppCMS now looks much mature then before.</p> <p> <a href="/post/15">more...</a> </p> </div> SOCI or DBI, stage 2 http://blog.cppcms.com/post/13 http://blog.cppcms.com/post/13 <div style="direction:ltr"> <p>Discussing soci <a href="http://sourceforge.net/mailarchive/forum.php?forum_name=soci-users">performance</a> with its developers I had found that soci is compiled without any optimizations by default.</p> <p>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</p> <p>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%).</p> <p>So it seems to me that both solutions are quite reasonable to use without clear advantage of one over another.</p> </div>