This project has moved. For the latest updates, please go here.

EF to REST to SPARQL

Apr 28, 2014 at 6:54 PM
Edited Apr 28, 2014 at 6:57 PM
Is it possible to access datastores created with EF through the REST and SPARQL interfaces?

Hoping it is a simple connectionstring change.
Coordinator
Apr 28, 2014 at 8:47 PM
Hi,

I wasn't sure if you meant you wanted to access a store you created locally with EF via REST (but still using EF) or if you meant you wanted to use SPARQL or some of our direct RDF APIs on a store you created with EF. The answer in both cases is yes, more detail on each below.

If you want to access a store that you created with an embedded connection to a local directory over REST then yes you just need to change the connection string (you will of course need to make sure that the store is accessible to the REST server you are connecting to). However, one word of warning - the BrightstarDB server will (typically) use an embedded connection to access the store - this means that it has control over the files and you should not try to access the store via an embedded connection from any other process - so once the store is under the control of the server, you should always use a REST connection to access the store via the server.

If you want to actually use SPARQL queries or our direct RDF API to query/update a store created with EF then you can use the same connection string, just change the client you use, so instead of something like:
var context = new MyEntityContext(connectionString);
you use:
var client = BrightstarService.GetClient(connectionString);
You will have to include the store name in calls you make to the RDF API, but you can read that from the connection string directly by parsing it with the ConnectionString class and retrieving the StoreName property.

Hope this helps!

Cheers

Kal
Apr 28, 2014 at 11:20 PM
Thanks for the detail.

The scenario is to have a remote store (not embedded) that we access from multiple clients. Some will connect with EF and manage data, others will uses REST to primarily read data. I am assuming this "Server" usage will not cause issues, wanted to confirm?