On 09/06/15 16:55, Charles Greer wrote:
Hi all,

I'm trying still to wrap my head around Dataset and DatasetGraph.

My intention is to support MarkLogic XA transactions over SPARQL queries and 
graph operations.

I see only a locking mechanism for DatasetGraph, not transaction boundaries.

In order to support transactions with a custom backend, it seems to me that I 
will have to provide a custom Dataset
implementation, not only a DatasetGraph.

Is this correct?  Thanks, Charles

You could implement Dataset directly but it's not the ideal way to do it (IMO).

As a general style-thing, Jena does have interfaces for Dataset/Model/Statement/Resource/Literal, which form the API but the core system is DatasetGraph/Graph/Triple/Node. Extending at the Dataset/Model is very unusual.

The single implementation of Dataset is DatasetImpl that goes:

    protected DatasetImpl(DatasetGraph dsg)
    {
        this.dsg = dsg ;
        if ( dsg instanceof Transactional )
            this.transactional = (Transactional)dsg ;
    }

i.e. it dynamically checks the DatasetGraph for the Transactional interface.

I have suggested all DatasetGraph are sort-of Transactional [1].

class MarkLogicDSG implements DatasetGraph, Transactional

There are several frameworks under DatasetGraph though may not not as useful to you.

        Andy


[1]
http://mail-archives.apache.org/mod_mbox/jena-dev/201506.mbox/%3C5575EBA6.2040106%40apache.org%3E

https://issues.apache.org/jira/browse/JENA-957

DatasetGraphWithLock - no real abort.
Actually, using RDF Patch [2] and recording undo actions, abort can be done but it's not zero cost in terms of memory which might have knock-on effects to apps.

[2] http://afs.github.io/rdf-patch/




Charles Greer
Lead Engineer
MarkLogic Corporation
[email protected]
Cell:  +1 707 318 0442
@grechaw
www.marklogic.com



Reply via email to