<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 15 Jul 2011, at 18:06, Manik Surtani 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; ">I think this is fine as a wiki page, and let users extend/hack in this functionality for now, but IMO we need to properly engineer distributed XA over Hot Rod (with a tx broker, etc. as we designed some months back).</div></blockquote>+1. I've added an wiki[1] and started by making it clear to the users that this is a *workaround* and proper functionality should be used when available.</div><div>[1]&nbsp;<a href="http://community.jboss.org/wiki/WorkaroundForSupportingTxOverHotrod">http://community.jboss.org/wiki/WorkaroundForSupportingTxOverHotrod</a><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div></div></div></div></blockquote></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>It's good that we have detailed this prototype, but I would say put it up on the wiki (not official docs) and point people to it each time they ask. &nbsp;Maybe someone will implement it and contribute it back. &nbsp;Otherwise, I would say wait for 5.2 for a full distributed XA impl. &nbsp;:)</div></div></blockquote>my thought exactly :-)<br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></div></blockquote><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>On 15 Jul 2011, at 12:53, 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>As there is a high community demand for having these operations in place, and most of these are targeted for post 5.1 releases, I thought about a workaround for having this functionality in place.&nbsp;</div><div>I hijacked Hotrod's put operation and added a custom interceptor, so that if a certain object is being "put" into remote cache, the server side interceptor jumps in and runs transactions.</div><div>This doesn't look too bad for the user, e.g. for supporting transactions:</div><div><br></div><div><span class="Apple-style-span" style="font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 19px; "><pre style="margin-top: 20px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-right: 10px; padding-bottom: 6px; padding-left: 10px; font: normal normal normal 12px/normal 'Bitstream Vera Sans Mono', Courier, monospace; background-color: rgb(248, 248, 248); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); font-size: 13px; line-height: 19px; overflow-x: auto; overflow-y: auto; border-top-left-radius: 3px 3px; border-top-right-radius: 3px 3px; border-bottom-right-radius: 3px 3px; border-bottom-left-radius: 3px 3px; "><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font: normal normal normal 12px/normal 'Bitstream Vera Sans Mono', Courier, monospace; background-color: transparent; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: rgb(222, 222, 222); border-right-color: rgb(222, 222, 222); border-bottom-color: rgb(222, 222, 222); border-left-color: rgb(222, 222, 222); font-size: 13px; border-top-left-radius: 3px 3px; border-top-right-radius: 3px 3px; border-bottom-right-radius: 3px 3px; border-bottom-left-radius: 3px 3px; border-width: initial; border-color: initial; ">RemoteCache rc = getRemoteCache();//from somewhere...

//this is what we'll use for running remote transactions over hotrod
BatchEnabledRemoteCache berc = new BatchEnabledRemoteCache(rc);

berc.startBatch(); //everything from here to endBatch call is a single transaction
berc.put("k", "v1");
berc.put("k2", "v2");
berc.put("k3", "v3");
berc.endBatch(true); // all or nothing!
</code></pre><div><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font: normal normal normal 12px/normal 'Bitstream Vera Sans Mono', Courier, monospace; background-color: transparent; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: rgb(222, 222, 222); border-right-color: rgb(222, 222, 222); border-bottom-color: rgb(222, 222, 222); border-left-color: rgb(222, 222, 222); font-size: 13px; border-top-left-radius: 3px 3px; border-top-right-radius: 3px 3px; border-bottom-right-radius: 3px 3px; border-bottom-left-radius: 3px 3px; border-width: initial; border-color: initial; "><br></code></div><div><font class="Apple-style-span" face="'Bitstream Vera Sans Mono', Courier, monospace" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: normal;"><br></span></font></div><div><font class="Apple-style-span" face="'Bitstream Vera Sans Mono', Courier, monospace" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: normal;"><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">Of course this won't work with other clients than the java client, but I think most of our users are using that one ATM.&nbsp;</span></span></font></div><div><font class="Apple-style-span" face="'Bitstream Vera Sans Mono', Courier, monospace" size="3"><span class="Apple-style-span" style="font-size: 13px; line-height: normal;"><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">Currently there's only support for transactions but this approach (and the code) can be easily extended to mapreduce and querying.&nbsp;</span></span></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="line-height: normal; font-size: medium;">I added s short description on how this can be used [1], also the source code is available here[2].</span></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="line-height: normal; font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="line-height: normal; font-size: medium;">What do you think about it? Is it worth suggesting to the users this approach(and possibly the code as well)?</span></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="line-height: normal; font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="line-height: normal; font-size: medium;">Cheers,</span></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="line-height: normal; font-size: medium;">Mircea</span></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="line-height: normal; font-size: medium;"><br></span></font></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="line-height: normal; font-size: medium;">[1]&nbsp;</span></font><a href="https://github.com/mmarkus/ops_over_hotrod/wiki/Usage-guide">https://github.com/mmarkus/ops_over_hotrod/wiki/Usage-guide</a></div><div><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="line-height: normal; font-size: medium;">[2]</span></font><a href="https://github.com/mmarkus/ops_over_hotrod">https://github.com/mmarkus/ops_over_hotrod</a></div></span></div></div>_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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></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></body></html>