<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Don't transactional caches require a JTA cache manager being present, configured and running?<div><br><div><div>On 28 Sep 2011, at 17:10, Mircea Markus wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>ATM the default cache transaction model in 5.1 is transactional.&nbsp;<span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, sans-serif; font-size: 12px; line-height: 18px; background-color: rgb(251, 251, 251); ">The main reason transactional cache was chosen by default was backward compatibility: existing code that access the cache in a mixed way (i.e. both transactional and non transactional) would fail if the default mode is non transactional. By fail I don't mean a runtime exception being thrown, but the the operations in transaction's scope being executed individually and the transaction ignored.</span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, sans-serif; font-size: 12px; line-height: 18px; background-color: rgb(251, 251, 251); "><br></span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, sans-serif; font-size: 12px; line-height: 18px; background-color: rgb(251, 251, 251); ">As Galder highlighted,&nbsp;</span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, sans-serif; font-size: 12px; line-height: 18px; background-color: rgb(251, 251, 251); ">the problem with being transactional by default is that you pay a penalti if you take Infinispan and run out of the box as a simple local cache for example. In theory, in only makes sense to enable transactional behaivour if you want transactions.&nbsp;</span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, sans-serif; font-size: 12px; line-height: 18px; background-color: rgb(251, 251, 251); ">[1]</span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, sans-serif; font-size: 12px; line-height: 18px; background-color: rgb(251, 251, 251); ">&nbsp;</span></div><div><font class="Apple-style-span" color="#333333" face="helvetica, arial, freesans, sans-serif"><span class="Apple-style-span" style="line-height: 18px;">Shall we switch to non-tx caches by default? Or implement&nbsp;</span></font><span class="Apple-style-span" style="font-size: 12px; ">ISPN-61</span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: helvetica, arial, freesans, sans-serif; line-height: 18px; ">&nbsp;in 5.1, measure performance and if perf is ok stick with transactional cache? [2] Opinions?</span></div><div><font class="Apple-style-span" color="#333333" face="helvetica, arial, freesans, sans-serif"><span class="Apple-style-span" style="line-height: 18px;"><br></span></font></div><div><font class="Apple-style-span" color="#333333" face="helvetica, arial, freesans, sans-serif"><span class="Apple-style-span" style="line-height: 18px;">Cheers,</span></font></div><div><font class="Apple-style-span" color="#333333" face="helvetica, arial, freesans, sans-serif"><span class="Apple-style-span" style="line-height: 18px;">Mircea</span></font></div><div><font class="Apple-style-span" color="#333333" face="helvetica, arial, freesans, sans-serif"><span class="Apple-style-span" style="line-height: 18px;"><br></span></font></div><div><font class="Apple-style-span" color="#333333" face="helvetica, arial, freesans, sans-serif"><span class="Apple-style-span" style="line-height: 18px;"><br></span></font></div><div><font class="Apple-style-span" color="#333333" face="helvetica, arial, freesans, sans-serif"><span class="Apple-style-span" style="line-height: 18px;">[1]</span></font></div><div><font class="Apple-style-span" color="#333333" face="helvetica, arial, freesans, sans-serif"><span class="Apple-style-span" style="line-height: 18px;">a). The performance for a get should be the same for a tx and non tx cache.&nbsp;</span></font></div><div><font class="Apple-style-span" color="#333333" face="helvetica, arial, freesans, sans-serif"><span class="Apple-style-span" style="line-height: 18px;">b) &nbsp;Put's performance is better now: 1RPC for non-tx and 2 RPC for tx.&nbsp;</span></font><span class="Apple-style-span" style="font-size: 12px; ">However this will change once&nbsp;</span><span class="Apple-style-span" style="font-size: 12px; "><a href="https://issues.jboss.org/browse/ISPN-61">https://issues.jboss.org/browse/ISPN-61</a>. With ISPN-61 implemented, I expect the performance of both tx and non-tx caches to be roughly the same.</span></div><div><span class="Apple-style-span" style="font-size: 12px; "><br></span></div><div><span class="Apple-style-span" style="font-size: 12px; ">[2] Implementing first optimisation described in&nbsp;</span><span class="Apple-style-span" style="font-size: 12px; ">ISPN-61 is rather trivial right now.</span></div></div>_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani">twitter.com/maniksurtani</a></div><div><br></div><div>Lead, Infinispan</div><div><a href="http://www.infinispan.org">http://www.infinispan.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>