<br><br><div class="gmail_quote">On Sun, Apr 20, 2008 at 9:54 PM, DM Smith &lt;<a href="mailto:dmsmith555@yahoo.com">dmsmith555@yahoo.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
On Apr 20, 2008, at 8:01 AM, Yiguang Hu wrote:<br>
<br>
&gt; DM,<br>
&gt; Yes. It makes perfect sense to refactor the<br>
&gt; getOSISString method with one more parameter like<br>
&gt; startCount instead of making another one.<br>
&gt;<br>
&gt; I think it is useful to make &quot;total&quot; available for<br>
&gt; client. So that user may know the significance of the<br>
&gt; key word from the numerical statistics.<br>
<br>
</div>I added both. I did not give them much of a test. But it compiles and<br>
it looks like it should work :)<br>
<div class="Ih2E3d"><br>
&gt;<br>
&gt; Regarding paging, looks like we do need some way such<br>
&gt; as cache to avoiding repeating the process of<br>
&gt; searching/count total etc for the same<br>
&gt; key/locale/book, when we start to take into account of<br>
&gt; performance.<br>
<br>
</div>I&#39;m not a terribly familiar with servlets, nor with DWR. I know we can<br>
cache on the client side, which will minimize trips to the server.<br>
These trips are the most costly. I don&#39;t think that we can have state<br>
in DwrBridge, or at least I am not sure of whether it persists and if<br>
so, then whether or how it is shared.<br>
<br>
The key is relatively lightweight. Each book translates the string<br>
reference into a key by parsing it. What it references does not have<br>
to actually exist in the book. Doing operations on a key can be<br>
expensive, such as getting the number of verses in a reference.<br>
Caching &quot;total&quot; on the client makes lots of sense.</blockquote><div><br>If DwrBridge was an interface then you could have 2 implementations, one a proxy that included a cache, and the other that did the lookup directly.<br>
<br>Joe.<br><br></div></div><br>