[Sorry to be slow to respond, I was hoping someone who understands assemblers might take this.]

On 31/03/17 08:10, Élie Roux wrote:
Hello,

I am currently setting up a Fuseki server with the following specs in mind:
 - everything persistent in TDB (it works)
 - many different named graph, with the default graph being the union of
them (it works, but without inference)
 - very simple inferencing (works but not with named graphs)
 - inferenced triples stored in TDB

 The first question is the following: is it realistic?

Sorry, not really.

Whether it's practical at all depends on the size of your data and how dynamic it is.

Jena's inference is purely in memory so running over a TDB store is possible but doesn't give you any scalability and is slower than running over an in-memory copy of the same data. Plus, as you already know, it's not named-graphs-aware.

Assuming modest data sizes and static data then you could either:

1. Have all your base data in named graphs in TDB. Externally run a reasoner over the union of that data (either raw from the TDB or by materializing an in-memory copy of the union). Then materialize all the inferred triples add them as another graph in the TDB - either directly to the TDB before you run fuseki or via fuseki using the graph API.

2. Set up the inference as a separate in-memory dataset within Fuseki which reasons over the union of your TDB graphs and provides a view of that union + inferences but doesn't store the results back into TDB.

Option 1 means using some external process to do the inference and is no use if your data is dynamic. However, for static data is does mean that once the data has been created you can query at full speed without inference slow downs and you can restart fuseki without losing anything.

Option 2 avoids the need for external processing but will be slow to start up (the inferences aren't being persisted) and slow to query (some inferences will performed on-demand). Sadly it wouldn't support dynamic data either. You could submit changes to the in-memory inference graph but when it tries to store those into the base model that will fail because it's a union instead of an actual graph. You could submit changes to the TDB store but the in-memory inference won't notice those automatically and you would have to restart fuseki to see them.

Dave

Reply via email to