Using TDB for glib/gobject applications
idra at samba.org
Wed Jun 24 22:38:49 MDT 2009
On Thu, 2009-06-25 at 14:11 +1000, tridge at samba.org wrote:
> Hi Simo,
> > Not sure it would be a really good idea for ldb, serializing
> > transactions is probably ok, and will make a lot of uses much simpler.
> Serializing transactions at the ldb layer certainly is attractive,
> although I couldn't see how to do it within a single process without
> forcing all callers of all ldb API calls to be async. That would
> complicate the code in places like the SAMR server a lot.
It may complicate it a bit, but Volker's tevent_req stuff makes async
programming a lot easier, I am planning to see if I can start slowly to
conver the ldb API to use tevent_req.
> Did you have an idea on how to achieve this?
I am currently experimenting with serialization in another project
(nothing published yet, still prototyping), and if you use tevent_req
and async calls to enter a transaction then things get easier.
Basically all you need is a queue where all code that needs transaction
wait on asynchronously, once a transaction finishes the control is
passed on to the next in line, all others are stalled waiting to be
It is not that complex once you get to use tevent_req code for it,
although I semi-async and tevent_req probably can't work well together.
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>
More information about the samba-technical