You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mikael Pesonen <mi...@lingsoft.fi> on 2018/01/24 13:25:20 UTC

Concurrency with Jena/GSP

I'm using Jena directly with HTTP (curl) and GSP.

Are all db opetations atomic? If I PUT large JSON-LD data and read old 
triplets at the same time, is the PUT atomic, so that I either get all 
old values or all new values?

Thanks

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Concurrency with Jena/GSP

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Hi,

we are using Fuseki and TDP.

Just occured to us that we haven't given thought to this aspect. There 
was also this doc about concurrency and there the statement

"Applications need to be aware of the concurrency issues in access Jena 
models. API operations are not thread safe by default."

Br


On 25.1.2018 4:27, Andy Seaborne wrote:
> If calling the Jena API, you should put the operations in a transaction,
> then they are atomic.
>
> With Fuseki, each operation is a transaction and is fully safe if TDB or
> TIM (the in-memory transactional dataset implementation) otherwise it is an
> MRSW lock so visibility is atomic unless you have some quite complex
> multi-dataset setup with shared models.
>
> What's behind the question?
>
>      Andy
>
>
> On 24 January 2018 at 08:35, Mikael Pesonen <mi...@lingsoft.fi>
> wrote:
>
>> Sorry meant to ask, if I POST a large dataset, is it possible that reader
>> gets just some of the triplets but not all?
>>
>>
>>
>>
>> On 24.1.2018 15:25, Mikael Pesonen wrote:
>>
>>> I'm using Jena directly with HTTP (curl) and GSP.
>>>
>>> Are all db opetations atomic? If I PUT large JSON-LD data and read old
>>> triplets at the same time, is the PUT atomic, so that I either get all old
>>> values or all new values?
>>>
>>> Thanks
>>>
>>>
>> --
>> Lingsoft - 30 years of Leading Language Management
>>
>> www.lingsoft.fi
>>
>> Speech Applications - Language Management - Translation - Reader's and
>> Writer's Tools - Text Tools - E-books and M-books
>>
>> Mikael Pesonen
>> System Engineer
>>
>> e-mail: mikael.pesonen@lingsoft.fi
>> Tel. +358 2 279 3300
>>
>> Time zone: GMT+2
>>
>> Helsinki Office
>> Eteläranta 10
>> FI-00130 Helsinki
>> FINLAND
>>
>> Turku Office
>> Kauppiaskatu 5 A
>> FI-20100 Turku
>> FINLAND
>>
>>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Concurrency with Jena/GSP

Posted by Andy Seaborne <an...@apache.org>.
If calling the Jena API, you should put the operations in a transaction,
then they are atomic.

With Fuseki, each operation is a transaction and is fully safe if TDB or
TIM (the in-memory transactional dataset implementation) otherwise it is an
MRSW lock so visibility is atomic unless you have some quite complex
multi-dataset setup with shared models.

What's behind the question?

    Andy


On 24 January 2018 at 08:35, Mikael Pesonen <mi...@lingsoft.fi>
wrote:

>
> Sorry meant to ask, if I POST a large dataset, is it possible that reader
> gets just some of the triplets but not all?
>
>
>
>
> On 24.1.2018 15:25, Mikael Pesonen wrote:
>
>>
>> I'm using Jena directly with HTTP (curl) and GSP.
>>
>> Are all db opetations atomic? If I PUT large JSON-LD data and read old
>> triplets at the same time, is the PUT atomic, so that I either get all old
>> values or all new values?
>>
>> Thanks
>>
>>
> --
> Lingsoft - 30 years of Leading Language Management
>
> www.lingsoft.fi
>
> Speech Applications - Language Management - Translation - Reader's and
> Writer's Tools - Text Tools - E-books and M-books
>
> Mikael Pesonen
> System Engineer
>
> e-mail: mikael.pesonen@lingsoft.fi
> Tel. +358 2 279 3300
>
> Time zone: GMT+2
>
> Helsinki Office
> Eteläranta 10
> FI-00130 Helsinki
> FINLAND
>
> Turku Office
> Kauppiaskatu 5 A
> FI-20100 Turku
> FINLAND
>
>

Re: Concurrency with Jena/GSP

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Sorry meant to ask, if I POST a large dataset, is it possible that 
reader gets just some of the triplets but not all?



On 24.1.2018 15:25, Mikael Pesonen wrote:
>
> I'm using Jena directly with HTTP (curl) and GSP.
>
> Are all db opetations atomic? If I PUT large JSON-LD data and read old 
> triplets at the same time, is the PUT atomic, so that I either get all 
> old values or all new values?
>
> Thanks
>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND