<p>Hi,<br>
in the case of Lucene Queries my main concern is about how to a) properly serialize the query b) how to stream the resusts back, possibly having some pagination / flow control.<br>
I didn&#39;t look into hotrod sources, but I was not assuming the hard part would to make it possible to send some new commands?</p>
<p>So if that&#39;s all what is needed for transactions to work properly, can&#39;t you just add the commands before 5.1?</p>
<p>Cheers,<br>
Sanne</p>
<div class="gmail_quote">On 15 Jul 2011 12:53, &quot;Mircea Markus&quot; &lt;<a href="mailto:mircea.markus@jboss.com">mircea.markus@jboss.com</a>&gt; wrote:<br type="attribution">&gt; Hi,<br>&gt; <br>&gt; 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. <br>
&gt; I hijacked Hotrod&#39;s put operation and added a custom interceptor, so that if a certain object is being &quot;put&quot; into remote cache, the server side interceptor jumps in and runs transactions.<br>&gt; This doesn&#39;t look too bad for the user, e.g. for supporting transactions:<br>
&gt; <br>&gt; RemoteCache rc = getRemoteCache();//from somewhere...<br>&gt; <br>&gt; //this is what we&#39;ll use for running remote transactions over hotrod<br>&gt; BatchEnabledRemoteCache berc = new BatchEnabledRemoteCache(rc);<br>
&gt; <br>&gt; berc.startBatch(); //everything from here to endBatch call is a single transaction<br>&gt; berc.put(&quot;k&quot;, &quot;v1&quot;);<br>&gt; berc.put(&quot;k2&quot;, &quot;v2&quot;);<br>&gt; berc.put(&quot;k3&quot;, &quot;v3&quot;);<br>
&gt; berc.endBatch(true); // all or nothing!<br>&gt; <br>&gt; <br>&gt; Of course this won&#39;t work with other clients than the java client, but I think most of our users are using that one ATM. <br>&gt; Currently there&#39;s only support for transactions but this approach (and the code) can be easily extended to mapreduce and querying. <br>
&gt; I added s short description on how this can be used [1], also the source code is available here[2].<br>&gt; <br>&gt; What do you think about it? Is it worth suggesting to the users this approach(and possibly the code as well)?<br>
&gt; <br>&gt; Cheers,<br>&gt; Mircea<br>&gt; <br>&gt; [1] <a href="https://github.com/mmarkus/ops_over_hotrod/wiki/Usage-guide">https://github.com/mmarkus/ops_over_hotrod/wiki/Usage-guide</a><br>&gt; [2]<a href="https://github.com/mmarkus/ops_over_hotrod">https://github.com/mmarkus/ops_over_hotrod</a><br>
</div>