NoSQL Databases gaining momentum

July 17th, 2009

Currently a lot of brouhaha is generated around NoSQL databases. If you’re interested, here are some meeting points:

NoSQL LinkedIn Group: http://www.linkedin.com/groups?home=&gid=2085042&trk=anet_ug_hm

NoSQL Google Group: http://groups.google.com/group/nosql-discussion

Highavailability.com featuring this week’s best blog entry title: “It must be crap on relational databases week”:

http://highscalability.com/it-must-be-crap-relational-dabases-week

http://highscalability.com/no-sql-anti-database-movement-gains-steam-my-take

And from the other side - Curt Monash on NoSQL (BI point of view): http://www.dbms2.com/2009/07/01/nosql-sql-alternative/

chris Uncategorized

Seeing all predefined gcc macros

June 12th, 2009

I just found a really cool trick to get a list of all predefined gcc macros:

echo | gcc -dM -E -

Found it here: http://www.willus.com/mingw/_predefined.shtml

chris Coding

hamsterdb: release 1.0.9

May 18th, 2009

This release fixes a minor bug in ham_cursor_move; if the second parameter (”record”) is NULL and compression is enabled, hamsterdb crashes. Also, the unittest-dependency to cppunit was removed.
Sources, CHANGELOG and precompiled win32 libraries are available for download.

chris Coding, Databases, Libraries, hamsterdb

Why cheap hard disks are slower than expensive disks

April 30th, 2009

Curt Monash is a database analyst. He usually blogs about enterprise databases and not the embedded kind. Nevertheless his posts are really interesting, therefore i added him to my blogroll.

This post is about harddisks and why cheap (SATA) harddisks are much slower than expensive ones (Fibre channel/SAS).

chris Databases

hamsterdb: FOSS license exceptions

April 30th, 2009

In order to allow linking of hamsterdb with more open source projects, i added FOSS license exceptions. These exceptions allow linking with BSD licensed libraries, Apache, LGPL and others.

Here’s the legal stuff and the list of licenses: http://hamsterdb.com/licensing/exceptions

I’m absolutely willing to add more licenses upon request.

chris Coding, Libraries, hamsterdb

hamsterdb: release 1.0.8

March 2nd, 2009

Immediately after releasing 1.0.7, a user informed me of a weird behaviour which appeared after deleting database keys.

It took me about 20 hours to track it down… sometimes, when deleting a key (and it’s an extended key which does not fit into the index page and therefore was stored in an overflow area), the database page has to be merged with other pages because it’s getting too empty. And in one (rare, but nevertheless dangerous) case the overflow area was deleted, but there was still a key pointing to it. And from that moment on the index was in an inconsistent state.

Everything’s available for download.

chris Coding, Libraries, hamsterdb

hamsterdb: release 1.0.7

February 26th, 2009

1.0.7 is out! it fixes a bug on big-endian architectures - they were not able to open database files which were created on little-endian architectures.

From the README:

This release fixes a bug on big-endian architectures; Databases from little- endian architectures were not loaded correctly, and vice versa. A typo in the Tutorial was fixed.

Everything’s available for download.

chris Coding, Libraries, hamsterdb

hamsterdb2: all your database are belong to us!

February 24th, 2009

Currently, it looks as if i stopped working on hamsterdb (and Ohloh’s “Decreasing year-over-year development activity“) really makes me feel bad!) - but that’s far from true. I spend every minute on hamsterdb2, the next generation. I will continue to maintain hamsterdb and i even hope that i have time to release a bugfix release today or even tomorrow.

As i wrote in an older blog entry, hamsterdb will focus on embedded devices with limited hardware; it will offer high configurability and a limited feature set, optimized on throughput and performance. (Therefore i currently do not plan to improve transaction support for hamsterdb).

In contrast, hamsterdb2 will be for modern (preferably multi-core) machines and modern applications. Here’s a list of buzzwords:

- multithreaded - hamsterdb2 will not be just threadsafe, but it will actively encourage the use of multiple threads. Performance intensive operations are processed in the background. Every API handle (for Environments, Databases and Transactions) can be used from multiple threads in parallel.

- transactional - hamsterdb2 will support ACID transactions and multiple isolation levels. Isolation levels can be set individually for each transaction. Transactions itself are kept in memory - whenever a Database is modified, the Database “diff” is stored in-memory; transaction conflicts are resolved in-memory, without disk access. Same applies to UNDO operations. Committed transactions are periodically flushed to disk in the background.

- logging/recovery: since transactions are kept in-memory, they are also written to a logical logfile. In case of a crash, all operations from this logfile are repeated. These operations are idempotent, which means that they can be applied multiple times without side effects. Incomplete/Active transactions are recreated (there’s an API function to enumerate all active transactions). The index file is based on a B+Tree with atomic algorithms and therefore does not need its own logfile.

- Simplified API - i think the API of hamsterdb was already quite simple to use. Nevertheless i managed to improve it a little bit.

- The current state? I’m currently working on the recovery algorithm. Transactions and the index files are already working, but the index files need improvements (they currently only work for fixed-size keys). There’s no freelist management yet - empty pages are not reused. And i only implemented the SERIALIZE isolation level - but others will be simple to do. Currently, there’s no support for duplicate keys, record numbers and cursors.

Feel free to post questions/comments!

chris Coding, hamsterdb

hamsterdb: release 1.0.6

September 23rd, 2008

The 1.0.6 release was overdue - my lack of time is a tribute to our baby, to the daily work, the preparations for moving to the new house and the beginning of a new hamsterdb version, which is a completely new library and will not share any code with the current architecture. Both libraries will coexist in parallel - hamsterdb is optimized for embedded architectures, the new hamsterdb will be optimized for concurrent access and transactions.

This release adds a new flag HAM_CACHE_UNLIMITED which uses unlimited cache, and is therefore nearly as fast as a pure In-Memory Database. Also, the unittests now compile with gcc 4.3.x and glibc 2.8. The C++ API has a new function to assign keys with a template parameter. ./configure has a new option –enable-system-zlib to link against -lz instead of the zlib version which is provided with hamsterdb. Finally, the tutorial has a new chapter about Transaction support.

Sources, CHANGELOG and precompiled win32 libraries are available for download here!

chris Coding, Libraries, hamsterdb

hamsterdb: release 1.0.5

August 13th, 2008

I just released hamsterdb 1.0.5!

From the README:

This release fixes several minor issues found by static code analysis tools. A
bug in the command line tool ham_dump was fixed. hamsterdb was ported to the
maemo.org SDK for ATMEL-based Nokia N810 cell phones. The C++ wrapper
now supports the Transaction API. On Linux, the flag O_NOATIME is specified
when opening or creating files. When closing the Environment or Database,
a pending Transaction can now be auto-committed (HAM_AUTO_COMMIT).

As always, grab it here: http://hamsterdb.com

chris Coding, Libraries, hamsterdb