openRDF.org Welcome Guest   | Login   
  Search  
  Index  | Recent Threads  | Who's Online  | User List  | Search  | Help  | RSS feeds

Forum has been closed down
This forum has been closed down due to extensive spamming activities. Please use the mailing list instead.


Quick Go »
Thread Status: Normal
Total posts in this thread: 5
[Add To My Favorites] [Watch this Thread]
Author
Previous Thread This topic has been viewed 2102 times and has 4 replies Next Thread
Feb 4, 2008 11:12:45 AM

hendlerman
Regular
Member's Avatar


Joined: Sep 14, 2004
Posts: 36
Status: Offline
Concurrency Issues with Memory store?

Hi there.

I have a memory store that's accessed via at least two different apps. Sound like trouble?

One accesses over the RPC/REST mechanism, another is a custom app. When the store is created via the console I connect to the RPC, open SYSTEM and create the store there with a SYNC of 0.

Maybe this is the right question:
How can I get force an app to reload against the persisted memory store?
----------------------------------------
[Edit 1 times, last edit by hendlerman at Feb 5, 2008 1:11:03 AM]
Show Printable Version of Post        Hidden to Guest    http://semanticsearch.org [Link] Report threatening or abusive post: please login first  Go to top 
Feb 6, 2008 10:44:07 AM

arjohn
OpenRDF project lead
Member's Avatar

The Netherlands
Joined: Jan 23, 2004
Posts: 1289
Status: Offline
Re: Concurrency Issues with Memory store?

 
Hi there.

I have a memory store that's accessed via at least two different apps. Sound like trouble?

Yes, it does.
 
One accesses over the RPC/REST mechanism, another is a custom app. When the store is created via the console I connect to the RPC, open SYSTEM and create the store there with a SYNC of 0.

Maybe this is the right question:
How can I get force an app to reload against the persisted memory store?

A MemoryStore instance needs exclusive access to its data. If you create two instances that work on the same data then things are bound to go wrong. I probably should modify the memory store so that it (tries to) lock its data files to prevent such situations.

What you could try instead is to route all communication to the store via the REST server, so that both the console and the custom app use the same memory store instance.
----------------------------------------
Arjohn Kampman, OpenRDF project lead, Aduna
Show Printable Version of Post        Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Feb 6, 2008 11:29:02 AM

hendlerman
Regular
Member's Avatar


Joined: Sep 14, 2004
Posts: 36
Status: Offline
Re: Concurrency Issues with Memory store?

HMM. There were a couple problems earlier using the REST and the memory store:

First is that it wasn't finished for 2.0 when I started. Secondly, and more importantly I think, is that the REST interface loaded the memory store once per each request... which made it slower. The solution I use now loads an object and caches it into memory, so each request can be quite fast.

Is this speed issue over REST true, or my imagination?
Show Printable Version of Post        Hidden to Guest    http://semanticsearch.org [Link] Report threatening or abusive post: please login first  Go to top 
Feb 6, 2008 12:38:36 PM

arjohn
OpenRDF project lead
Member's Avatar

The Netherlands
Joined: Jan 23, 2004
Posts: 1289
Status: Offline
Re: Concurrency Issues with Memory store?

The HTTP server should load the memory store only when it is first accessed, or after a change to the configuration in the SYSTEM repository. Subsequent requests should all use the same memory store instance.
----------------------------------------
Arjohn Kampman, OpenRDF project lead, Aduna
Show Printable Version of Post        Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Jun 20, 2008 3:07:47 PM

luca
Member



Joined: Jul 18, 2007
Posts: 7
Status: Offline

Re: Concurrency Issues with Memory store?

Hi, I am also interested in using the same local memory store as accessed by multiple (web) applications. Has there been any development in providing a locking file mechanism to make this possible ?
thanks a lot, Luca
Show Printable Version of Post        Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
[Show Printable Version of Thread]