[redland-dev] Transaction support (drivers, bindings)

Dave Beckett dave at dajobe.org
Mon Oct 4 21:45:22 CEST 2010


On Mon, 4 Oct 2010, Dorian Taylor (Lists) wrote:
> Hi,
>
> Just trying to get a bearing on transaction support in Redland.
> Grepping the 1.0.11 source looks like they're implemented for MySQL,
> PostgreSQL, SQLite and Virtuoso. Also it seems the bindings (Perl at
> least) map the functions but don't expose them in the public API. Two
> questions:
>
> 1) Are there any plans to implement transactions for Berkeley DB?

There are always plans.  About 3 years ago I thought about doing it, and
using the BDB transactions would make it possible.  Medium hard amount
of work.

> 2) How much overhead is there in getting transactions out into the
> Perl (or other bindings for that matter) API?

Not too hard as long as it is exposed in the Redland SWIG API
http://github.com/dajobe/librdf/blob/master/Redland.i
which it is, and has been available for several years I guess.

There are only three functions and they would be methods of the model
class (perl RDF::Redland::Model) in any of the bindings:

int librdf_model_transaction_start(librdf_model* model);
int librdf_model_transaction_commit(librdf_model* model);
int librdf_model_transaction_rollback(librdf_model* model);

Which would appear under
http://librdf.org/docs/pod/RDF/Redland/Model.html
but doesn't have those 3 methods.  This would be about 3 lines of perl
each.  So, easy!

Dave



More information about the redland-dev mailing list