On 16/11/11 17:21, Loic R Julien wrote:
Hi,

1/ I currently only support a single persistent location: this.model =
TDBFactory.createModel(getPersistentLocation ()); for my TDB Model.

(minor) It is better to use Datasets, not Models.

My
Model is serving requests from many clients concurrently.
Some earlier posts seem to recommend that for a single location, there
should only be a single instance of the Model always up and running that
serve all client's requests (with TDB.sync on update).
         ->  I would like to confirm that this is the best practice.

There must only be one database engine per location ... but TDBFactory sorts that out for you. If you ask TDBFactory for a dataset (or model) at a location, it returns a suitably shared instance. The actual Java object will be different but internally it refers to the shared objects.

Use from multiple JVMs is not supported (use Fuseki).

2/ While I implemented MRSW, it sounds that there should be some common
knowledge on best practices. I have seen this
https://cwiki.apache.org/confluence/display/JENA/TxTDB but this is
incomplete at this stage.
         ->  Any documentation/sample written on this?

TDB trunk (v0.9.0) is transactional if you ask for a transactional dataset. In 0.9.0, existing usage will act as before; you need to ask for a transactional database.

http://openjena.org/wiki/TDB/Transactions shows the internal APIs - there will be (actually,there is in trunk/) TDBFactoryTxn.

This will be in the next release, along with documentation.

        Andy


Thanks for your help,
~Loic

Reply via email to