<html><head></head><body 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. <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, </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. </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); "> </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 </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; "> 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. </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) Put's performance is better now: 1RPC for non-tx and 2 RPC for tx. </span></font><span class="Apple-style-span" style="font-size: 12px; ">However this will change once </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 </span><span class="Apple-style-span" style="font-size: 12px; ">ISPN-61 is rather trivial right now.</span></div></body></html>