
paul at nfg
May 4, 2008, 11:06 AM
Post #9 of 9
(331 views)
Permalink
|
Hi all, Thought I'd bring you up to speed with regard to the state of things to come. Even though it's been a while since I released 2.3.2, I haven't excactly been sitting around idly. - libzdb Dbmail has has now fully switched to using libzdb for driving the database layer. It's a beautiful little library that provides a simple and elegant API for thread-safe connection pools, prepared statements and exception handling. During this transition I pushed libzdb's envelope a little, mainly because our usage pattern differs significantly from what the libzdb community normally sees. What this boils down to was that I was able to expose a couple of important bugs in the libzdb code, each of which was promptly fixed by the upstream developers. In many ways the release of libzdb-2.2.1 today cleared the road for dbmail-2.3.3. - threading This is where most of the work before 2.4.0 still needs to be done. Rather that use a thread-per-client (crude, simple, and very difficult to do bug-free without doing massive amounts of mutex locking), I decided to go for a more finegrained pattern. All network IO will be done by the main thread, but blocking tasks (mainly database related) will be deferred to threads as much as possible. Synchronizing with the main thread is being done with the GAsyncQueue api from glib which provides a thread-safe mechanism for inter-thread communication. A worker thread is spawned, does it's thing, builds up a result dataset, pushes this data onto the async queue, and notifies the main event-loop in the main thread using a self-pipe. The main event loop pops an element from the queue, and runs the callbacks that are part of the data element to process the result. This is a often used pattern that is sometimes called thread-enter/thread-leave. Anyway, even though only a very few IMAP commands have gone threaded, throughput under high concurrencies is quite good at the moment. And with the stabilization of the database layer with the new release of libzdb, I think the time for releasing 2.3.3 is upon us. stay tuned. -- ________________________________________________________________ Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands________________________________http://www.nfg.nl _______________________________________________ Dbmail-dev mailing list Dbmail-dev[at]dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
|