Date: 2004-12-10T07:27:07
   Editor: OliverZeigermann <[EMAIL PROTECTED]>
   Wiki: Jakarta-Slide Wiki
   Page: ConcurrencyIssues
   URL: http://wiki.apache.org/jakarta-slide/ConcurrencyIssues

   no comment

New Page:

= Concurrency Tuning =

This page describes what parameters in Domain.xml are there to adapt Slide to 
your concurrency requirements. Some of these setting may only be available in 
Slide 2.2

== General ==

Slide's general concurrency parametes are in the configuration section of 
Domain.xml. 
They include

 * ''sequential-mode (default "off")'' enables internal locking
  * ''off'' turns internal locking off
  * ''write'' global mutex for write request, i.e. only one request may write 
at a time
  * ''full'' global read/write lock; only one request may write at a time and 
if so there can be no concurrent read
  * ''fine-grain'' local read/write locks; allow for much higher concurrency; 
details: ["locksNeeded"]
   '''Caution''': There are scenarios where Slide's internal locking can cause 
distributed (unresolvable) deadlocks. This can be when the DB has more coase 
grain locks than Slide or when there are other applications accessing the same 
data as Slide.

 * ''repeat-upon-conflict (default "false")'' sets if a request should be 
repeated in case it conflicted with a concurrent one (otherwise it fails)
 * ''max-retry-repeat (default "1")'' if so, how often
 * ''all-methods-in-transactions (default "false")'' if enabled not only write, 
but also read requests are executed inside of transactions; offers better 
protection, but means more overhead 
   '''Caution''': Write operations will need a transaction, so be sure to have 
this enabled when using user auto creation

These parameters are set using name value pairs. For example to set 
''sequential-mode'' to ''fine-grain'' you would have something similar to this 
in your Domain.xml

{{{<slide>
  <namespace ...>
    ...
    <definition>
      ...
    </definition>
      <configuration>
        <parameter name="sequential-mode">fine-grain</parameter>
      </configuration>
...}}}


== Store ==

Store specific parameters are also srt in Domain.xml, however 

=== Tx File Store (standard store) ===

The standard file store uses pessimistic locking to achieve serializable 
transaction. No real deadlock detection is available, yet, only timeouts. You 
can set the timeout in the configuration section of Domain.xml. Additionally,  

 * ''defer-saving (default "false")''
 * ''timeout (default 5 seconds)''

== Memory Store ==

The memory store is based on a 
[http://jakarta.apache.org/commons/transaction/apidocs/org/apache/commons/transaction/memory/OptimisticMapWrapper.html
 transactional map] that uses an optimistic locking scheme similar to Oracle's 
snapshot isolation. It might fail upon commit. If the ''repeat-upon-conflict'' 
option as been enabled as described above the transaction will be repeated, 
otherwise it fails. There are no special parameters.

== JDBCStore ==

 * ''isolation (default READ_COMMITTED)''
  * ''READ_UNCOMMITTED''
  * ''READ_COMMITTED''
  * ''REPEATABLE_READ''
  * ''SERIALIZABLE''

=== MySQL ===

=== SQL Server ===

=== Oracle ===


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to