Author: buildbot
Date: Thu Mar 29 18:43:16 2012
New Revision: 810571
Log:
Staging update by buildbot for jena
Modified:
websites/staging/jena/trunk/content/ (props changed)
websites/staging/jena/trunk/content/jena/documentation/notes/concurrency-howto.html
Propchange: websites/staging/jena/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Mar 29 18:43:16 2012
@@ -1 +1 @@
-1306774
+1307040
Modified:
websites/staging/jena/trunk/content/jena/documentation/notes/concurrency-howto.html
==============================================================================
---
websites/staging/jena/trunk/content/jena/documentation/notes/concurrency-howto.html
(original)
+++
websites/staging/jena/trunk/content/jena/documentation/notes/concurrency-howto.html
Thu Mar 29 18:43:16 2012
@@ -157,22 +157,22 @@
<div id="content">
<h1 class="title">Concurrent access to Models</h1>
<p>Applications need to be aware of the concurrency issues in access
-Jena models. API operations are not thread safe by default. Thread
+Jena models. API operations are not thread safe by default. Thread
safety would simple ensure that the model data-structures remained
intact but would not give an application consistent access to the
-RDF graph. It would also limit the throughput of multi-threaded
+RDF graph. It would also limit the throughput of multi-threaded
applications on multiprocessor machines where true concurrency can
lead to a reduction in response time.</p>
<p>For example, supposed an application wishes to read the name and
-age of a person from model. This takes two API calls. It is more
+age of a person from model. This takes two API calls. It is more
convenient to be able to read that information in a consistent
fashion, knowing that the access to the second piece of information
is not being done after some model change has occurred.</p>
-<p>Special care is needed with iterators. In general, Jena's
+<p>Special care is needed with iterators. In general, Jena's
iterators do <em>not</em> take a copy to enable safe use in the presence
-of concurrent update. A multi-threaded application needs to be
+of concurrent update. A multi-threaded application needs to be
aware of these issues and correctly use the mechanisms that Jena
-provides (or manage its own concurrency itself). While not zero,
+provides (or manage its own concurrency itself). While not zero,
the application burden is not high.</p>
<p>There are two main cases:</p>
<ul>
@@ -180,16 +180,15 @@ the application burden is not high.</p>
<li>Multiple applications accessing the same persistent model
(typically, a database).</li>
</ul>
-<p>Transactions are provided by persistent models: see the
-<a href="/jena/documenation/sdb">SDB documentation TODO</a> and
+<p>Transactions are provided by persistent models: see
the <a href="/jena/documentation/tdb/tdb_transactions.html">TDB
documentation</a>
-for details, and also the
-<a
href="/jena/documentation/javadoc/jena/com/hp/hpl/jena/rdf/model/Model.html#supportsTransactions()">Model
interface to transactions</a>.</p>
+and the <a href="/jena/documenation/sdb/index.html">SDB documentation</a>
+and for details.</p>
<p>This note describes the support for same-JVM, multi-threaded
applications.</p>
<h2 id="locks">Locks</h2>
<p>Locks provide critical section support for managing the
-interactions of multiple threads in the same JVM. Jena provides
+interactions of multiple threads in the same JVM. Jena provides
multiple-reader/single-writer concurrency support (MRSW).</p>
<p>The pattern general is:</p>
<div class="codehilite"><pre><span class="n">Model</span> <span
class="n">model</span> <span class="o">=</span> <span class="o">.</span> <span
class="o">.</span> <span class="o">.</span> <span class="p">;</span>
@@ -213,11 +212,11 @@ in the model or graph implementation its
safely pass these out of critical sections.</p>
<h2 id="sparql-query">SPARQL Query</h2>
<p>SPARQL query results are iterators and no different from other
-iterators in Jena for concurrency purposes. The default query
+iterators in Jena for concurrency purposes. The default query
engine does not give thread safety and the normal requirements on
an application to ensure MRSW access in the presence of iterators
-applies. Note that Jena's query mechanism is itself multi-threaded.
-If the application is single threaded, no extra work is necessary.Â
+applies. Note that Jena's query mechanism is itself multi-threaded.
+If the application is single threaded, no extra work is necessary.
If the application is multi-threaded, queries should be executed
with a read lock.</p>
<p>Outline:</p>
@@ -240,8 +239,8 @@ with a read lock.</p>
<p>Updates to the model should not be performed inside the read-only
-section. For database-backed models, the application can use a
-transaction. For in-memory models, the application should collect
+section. For database-backed models, the application can use a
+transaction. For in-memory models, the application should collect
the changes together during the query processing then making all
the changes holding a write lock.</p>
<p>Jena Locks do not provide lock promotion - an application can not