On 08/06/15 16:41, Andy Seaborne wrote:
Informational announcement: TDB2
TDB2 is a reworking of TDB based on updated implementations of
transactions and transactional data structures for project Lizard (a
clustered SPARQL store).
TDB2 has:
* Arbitrary scale write-once transactions
* New transaction system - can add other first class components.
(e.g. text indexes, cache tables)
* Models works across transaction boundaries
* Cleaner, simpler, more maintainable
TDB2 databases are not compatible with TDB databases. It uses a more
efficient encoding for RDF terms. [1]
Being a database, the new indexing and transaction code needs time to
settle to bring the maturity up. I'm using that tech in Lizard
development.
Andy
TDB2 code:
https://github.com/afs/mantis/tree/master/tdb2
Lizard slides:
http://www.slideshare.net/andyseaborne/201411-apache-coneu-lizard
[1] An upgrade path using TDB1-style encoding is possible; it is an
one-way upgrade path and not reversible [2]. TDB2 adds control files
for the copy-on-write data structures that TDB1 does not understand.
[2] Actually, if the encoding is compatible, what will happen is that
TDB1 will see the database at the time of the upgrade. Welcome to
copy-on-write immutable data structures.
TDB2 is transactional use only.
Additional fun with Java8: all the begin/commit foo is hidden.
Dataset ds = TDBFactory.createDataset() ;
Here is a write transaction to load a file:
TDBTxn.executeWrite(ds, ()->RDFDataMgr.read(ds, "http:...")) ;
Or to get the size of the default model safely:
long size =
TDBTxn.executeReadReturn(ds, ()->ds.getDefaultModel().size()) ;
Andy