You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Nauman Ramzan <na...@gmail.com> on 2016/11/17 10:52:43 UTC

Transaction in Fuseki over HTTP

I wanted to ask is there Transaction query in SPARQL like begin, commit,
rollback .
Thank you

Re: Transaction in Fuseki over HTTP

Posted by Nauman Ramzan <na...@gmail.com>.
Ok thank you

On Thursday, November 17, 2016, A. Soroka <aj...@virginia.edu> wrote:

> Yes, I know you are using that. I am asking if you _must_ use that or if
> you can choose to use the dataset directly (via the Jena Java API).
>
> ---
> A. Soroka
> The University of Virginia Library
>
> > On Nov 17, 2016, at 10:00 AM, Nauman Ramzan <nauman.emallates@gmail.com
> <javascript:;>> wrote:
> >
> > I am using HTTP-server SPARQL.
> > And thank you
> >
> > On Thu, Nov 17, 2016 at 6:52 PM, A. Soroka <ajs6f@virginia.edu
> <javascript:;>> wrote:
> >
> >> If your data arrangements permit, you could hold a record of the
> contents
> >> of the last request on the client side and in the event of a "failure"
> you
> >> could fire a request that reverses that effect. Of course, this only
> works
> >> in some simple cases.
> >>
> >> Fuseki doesn't keep a record like that on the server side, and as Andy
> >> said, it closes each transaction inside the request-response cycle.
> >>
> >> Do you need to use Fuseki (HTTP-served SPARQL) in particular, or do you
> >> just need SPARQL, or some other technique? With direct access to the
> >> dataset, it would be possible to use a transactional dataset
> implementation
> >> like TDB or TIM.
> >>
> >> ---
> >> A. Soroka
> >> The University of Virginia Library
> >>
> >>> On Nov 17, 2016, at 9:41 AM, Nauman Ramzan <nauman.emallates@gmail.com
> <javascript:;>>
> >> wrote:
> >>>
> >>> It is clear for me. But what about if i wanted to rollback one
> successful
> >>> operation ? Like first I updated one record now I wanted to roll it
> back
> >>> due to any other/outside reason?
> >>>
> >>> On Thu, Nov 17, 2016 at 3:22 PM, Andy Seaborne <andy@apache.org
> <javascript:;>> wrote:
> >>>
> >>>> Each operation is executed in a transaction but there is no HTTP
> >>>> operations to start and end a transaction of several HTTP requests.
> >>>>
> >>>> You can combine multiple SPARQL Update operations into one HTTP
> request
> >>>> using ";" between SPARQL Update operations in the HTTP body.
> >>>>
> >>>>   Andy
> >>>>
> >>>>
> >>>>
> >>>> On 17/11/16 10:52, Nauman Ramzan wrote:
> >>>>
> >>>>> I wanted to ask is there Transaction query in SPARQL like begin,
> >> commit,
> >>>>> rollback .
> >>>>> Thank you
> >>>>>
> >>>>>
> >>
> >>
>
>

Re: Transaction in Fuseki over HTTP

Posted by "A. Soroka" <aj...@virginia.edu>.
Yes, I know you are using that. I am asking if you _must_ use that or if you can choose to use the dataset directly (via the Jena Java API).

---
A. Soroka
The University of Virginia Library

> On Nov 17, 2016, at 10:00 AM, Nauman Ramzan <na...@gmail.com> wrote:
> 
> I am using HTTP-server SPARQL.
> And thank you
> 
> On Thu, Nov 17, 2016 at 6:52 PM, A. Soroka <aj...@virginia.edu> wrote:
> 
>> If your data arrangements permit, you could hold a record of the contents
>> of the last request on the client side and in the event of a "failure" you
>> could fire a request that reverses that effect. Of course, this only works
>> in some simple cases.
>> 
>> Fuseki doesn't keep a record like that on the server side, and as Andy
>> said, it closes each transaction inside the request-response cycle.
>> 
>> Do you need to use Fuseki (HTTP-served SPARQL) in particular, or do you
>> just need SPARQL, or some other technique? With direct access to the
>> dataset, it would be possible to use a transactional dataset implementation
>> like TDB or TIM.
>> 
>> ---
>> A. Soroka
>> The University of Virginia Library
>> 
>>> On Nov 17, 2016, at 9:41 AM, Nauman Ramzan <na...@gmail.com>
>> wrote:
>>> 
>>> It is clear for me. But what about if i wanted to rollback one successful
>>> operation ? Like first I updated one record now I wanted to roll it back
>>> due to any other/outside reason?
>>> 
>>> On Thu, Nov 17, 2016 at 3:22 PM, Andy Seaborne <an...@apache.org> wrote:
>>> 
>>>> Each operation is executed in a transaction but there is no HTTP
>>>> operations to start and end a transaction of several HTTP requests.
>>>> 
>>>> You can combine multiple SPARQL Update operations into one HTTP request
>>>> using ";" between SPARQL Update operations in the HTTP body.
>>>> 
>>>>   Andy
>>>> 
>>>> 
>>>> 
>>>> On 17/11/16 10:52, Nauman Ramzan wrote:
>>>> 
>>>>> I wanted to ask is there Transaction query in SPARQL like begin,
>> commit,
>>>>> rollback .
>>>>> Thank you
>>>>> 
>>>>> 
>> 
>> 


Re: Transaction in Fuseki over HTTP

Posted by Nauman Ramzan <na...@gmail.com>.
I am using HTTP-server SPARQL.
And thank you

On Thu, Nov 17, 2016 at 6:52 PM, A. Soroka <aj...@virginia.edu> wrote:

> If your data arrangements permit, you could hold a record of the contents
> of the last request on the client side and in the event of a "failure" you
> could fire a request that reverses that effect. Of course, this only works
> in some simple cases.
>
> Fuseki doesn't keep a record like that on the server side, and as Andy
> said, it closes each transaction inside the request-response cycle.
>
> Do you need to use Fuseki (HTTP-served SPARQL) in particular, or do you
> just need SPARQL, or some other technique? With direct access to the
> dataset, it would be possible to use a transactional dataset implementation
> like TDB or TIM.
>
> ---
> A. Soroka
> The University of Virginia Library
>
> > On Nov 17, 2016, at 9:41 AM, Nauman Ramzan <na...@gmail.com>
> wrote:
> >
> > It is clear for me. But what about if i wanted to rollback one successful
> > operation ? Like first I updated one record now I wanted to roll it back
> > due to any other/outside reason?
> >
> > On Thu, Nov 17, 2016 at 3:22 PM, Andy Seaborne <an...@apache.org> wrote:
> >
> >> Each operation is executed in a transaction but there is no HTTP
> >> operations to start and end a transaction of several HTTP requests.
> >>
> >> You can combine multiple SPARQL Update operations into one HTTP request
> >> using ";" between SPARQL Update operations in the HTTP body.
> >>
> >>    Andy
> >>
> >>
> >>
> >> On 17/11/16 10:52, Nauman Ramzan wrote:
> >>
> >>> I wanted to ask is there Transaction query in SPARQL like begin,
> commit,
> >>> rollback .
> >>> Thank you
> >>>
> >>>
>
>

Re: Transaction in Fuseki over HTTP

Posted by "A. Soroka" <aj...@virginia.edu>.
If your data arrangements permit, you could hold a record of the contents of the last request on the client side and in the event of a "failure" you could fire a request that reverses that effect. Of course, this only works in some simple cases.

Fuseki doesn't keep a record like that on the server side, and as Andy said, it closes each transaction inside the request-response cycle.

Do you need to use Fuseki (HTTP-served SPARQL) in particular, or do you just need SPARQL, or some other technique? With direct access to the dataset, it would be possible to use a transactional dataset implementation like TDB or TIM.

---
A. Soroka
The University of Virginia Library

> On Nov 17, 2016, at 9:41 AM, Nauman Ramzan <na...@gmail.com> wrote:
> 
> It is clear for me. But what about if i wanted to rollback one successful
> operation ? Like first I updated one record now I wanted to roll it back
> due to any other/outside reason?
> 
> On Thu, Nov 17, 2016 at 3:22 PM, Andy Seaborne <an...@apache.org> wrote:
> 
>> Each operation is executed in a transaction but there is no HTTP
>> operations to start and end a transaction of several HTTP requests.
>> 
>> You can combine multiple SPARQL Update operations into one HTTP request
>> using ";" between SPARQL Update operations in the HTTP body.
>> 
>>    Andy
>> 
>> 
>> 
>> On 17/11/16 10:52, Nauman Ramzan wrote:
>> 
>>> I wanted to ask is there Transaction query in SPARQL like begin, commit,
>>> rollback .
>>> Thank you
>>> 
>>> 


Re: Transaction in Fuseki over HTTP

Posted by Nauman Ramzan <na...@gmail.com>.
It is clear for me. But what about if i wanted to rollback one successful
operation ? Like first I updated one record now I wanted to roll it back
due to any other/outside reason?

On Thu, Nov 17, 2016 at 3:22 PM, Andy Seaborne <an...@apache.org> wrote:

> Each operation is executed in a transaction but there is no HTTP
> operations to start and end a transaction of several HTTP requests.
>
> You can combine multiple SPARQL Update operations into one HTTP request
> using ";" between SPARQL Update operations in the HTTP body.
>
>     Andy
>
>
>
> On 17/11/16 10:52, Nauman Ramzan wrote:
>
>> I wanted to ask is there Transaction query in SPARQL like begin, commit,
>> rollback .
>> Thank you
>>
>>

Re: Transaction in Fuseki over HTTP

Posted by Rob Vesse <rv...@dotnetrdf.org>.
There is one single transaction for all the updates received in a single HTTP request

This is per the specification:

https://www.w3.org/TR/sparql11-update/#updateServices

Rob

On 22/11/2016 21:18, "François-Paul Servant" <fr...@gmail.com> wrote:

    Hi Andy,
    
    not sure to understand your answer:
    
    > Le 17 nov. 2016 à 12:22, Andy Seaborne <an...@apache.org> a écrit :
    > 
    > Each operation is executed in a transaction but there is no HTTP operations to start and end a transaction of several HTTP requests.
    > 
    > You can combine multiple SPARQL Update operations into one HTTP request using ";" between SPARQL Update operations in the HTTP body.
    
    in this case, is there one big transaction with all the updates, or different transactions for the different updates?
    
    > 
    >    Andy
    > 
    > 
    > On 17/11/16 10:52, Nauman Ramzan wrote:
    >> I wanted to ask is there Transaction query in SPARQL like begin, commit,
    >> rollback .
    >> Thank you
    >> 
    
    Thanks,
    
    fps





Re: Transaction in Fuseki over HTTP

Posted by François-Paul Servant <fr...@gmail.com>.
Hi Andy,

not sure to understand your answer:

> Le 17 nov. 2016 à 12:22, Andy Seaborne <an...@apache.org> a écrit :
> 
> Each operation is executed in a transaction but there is no HTTP operations to start and end a transaction of several HTTP requests.
> 
> You can combine multiple SPARQL Update operations into one HTTP request using ";" between SPARQL Update operations in the HTTP body.

in this case, is there one big transaction with all the updates, or different transactions for the different updates?

> 
>    Andy
> 
> 
> On 17/11/16 10:52, Nauman Ramzan wrote:
>> I wanted to ask is there Transaction query in SPARQL like begin, commit,
>> rollback .
>> Thank you
>> 

Thanks,

fps

Re: Transaction in Fuseki over HTTP

Posted by Andy Seaborne <an...@apache.org>.
Each operation is executed in a transaction but there is no HTTP 
operations to start and end a transaction of several HTTP requests.

You can combine multiple SPARQL Update operations into one HTTP request 
using ";" between SPARQL Update operations in the HTTP body.

     Andy


On 17/11/16 10:52, Nauman Ramzan wrote:
> I wanted to ask is there Transaction query in SPARQL like begin, commit,
> rollback .
> Thank you
>