<br><br><div class="gmail_quote">On Sun, Apr 20, 2008 at 9:54 PM, DM Smith <<a href="mailto:dmsmith555@yahoo.com">dmsmith555@yahoo.com</a>> 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>
> DM,<br>
> Yes. It makes perfect sense to refactor the<br>
> getOSISString method with one more parameter like<br>
> startCount instead of making another one.<br>
><br>
> I think it is useful to make "total" available for<br>
> client. So that user may know the significance of the<br>
> 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>
><br>
> Regarding paging, looks like we do need some way such<br>
> as cache to avoiding repeating the process of<br>
> searching/count total etc for the same<br>
> key/locale/book, when we start to take into account of<br>
> performance.<br>
<br>
</div>I'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'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 "total" 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>