Hi Damian
> model.add _does not need_ batches to be indicated. By default each add
> operation, that is each statement, list of statements or model add, happens
> in a batch load.
> If your results were occasionally lost something is definitely wrong and we
> ought to investigate. Could you post your code?
Well, I said it wrong way.
It is the same project as the SDB/MySQL issue discussed with you last time.
Thus - I just provide SDB-backed OntModel to the client business logic which in
turn does whatever it wants with it - Model.add(Statement),
Model.getGraph().addTriple, Resource.addProperty, etc. etc. It is difficult
for me to trace all the options that are used. In this sense, it is
'occasional' to me that an update is lost - not occasional w.r.t SDB. Thus, it
appears that BL developers use some operations that result in bulk updates and
some that do not - so I need to know which operations I should advise the BL
developers to use as the best and unified practice w.r.t SDB
> each add operation is a separate batched add, and that's expensive. By
> wrapping this with notifications or bulk update call (they resolve to the
> same thing so you can use either) you'll experience a substantial performance
> increase -- though you
need to be careful.
I know, I know ;-) I just do not have much control over the client logic. So I
want to make it as efficient as possible from the SDB backend point of view.
Basically, the currenty (ugly) API is as follows (which was designed before, so
the only degree of freedom for me is the content of these methods):
public OntModel getOntModel() {
1) create an SDB-backed OntModel
2) Model.startBatchUpdate
3) return the model to the user
}
public void saveOntModel(OntModel) {
1) Model.finishBatchUpdate
1) Model.startBatchUpdate
}
Thx
Petr
--
The Open University is incorporated by Royal Charter (RC 000391), an exempt
charity in England & Wales and a charity registered in Scotland (SC 038302).