<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Coherence query cache technique using refresh-ahead</title>
	<atom:link href="http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/feed/" rel="self" type="application/rss+xml" />
	<link>http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/</link>
	<description>Thoughts on software development and other stuff</description>
	<lastBuildDate>Tue, 24 Apr 2012 19:47:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: ehcache.net</title>
		<link>http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/comment-page-1/#comment-4250</link>
		<dc:creator>ehcache.net</dc:creator>
		<pubDate>Thu, 23 Dec 2010 06:56:29 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=77#comment-4250</guid>
		<description>&lt;strong&gt;Coherence query cache technique using refresh-ahead...&lt;/strong&gt;

A few days ago I read an excellent post by Martin Elwin on creating a query cache using Coherence. To summarize, he uses a Coherence Filter (an object that contains query criteria) as a key and the results of the query (in this case, a set of keys for ...</description>
		<content:encoded><![CDATA[<p><strong>Coherence query cache technique using refresh-ahead&#8230;</strong></p>
<p>A few days ago I read an excellent post by Martin Elwin on creating a query cache using Coherence. To summarize, he uses a Coherence Filter (an object that contains query criteria) as a key and the results of the query (in this case, a set of keys for &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Peralta</title>
		<link>http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/comment-page-1/#comment-4122</link>
		<dc:creator>Patrick Peralta</dc:creator>
		<pubDate>Sat, 03 Oct 2009 23:59:23 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=77#comment-4122</guid>
		<description>Hi Vikas,

Thanks for your comments.  There is some overlapping functionality between this and CQC.  Here are the ways in which they differ:

1. CQC will register a map listener internally, thus ensuring the client gets the update right away, whereas the query cache will be stale for a period of time.

2. CQC only accepts one filter at a time, the query cache can be used to cache many filters. 

The CQC is a good choice for clients that need real time access to a subset of data (defined by a single filter), whereas the query cache is a good option for caching commonly executed queries.

Thanks,
Patrick</description>
		<content:encoded><![CDATA[<p>Hi Vikas,</p>
<p>Thanks for your comments.  There is some overlapping functionality between this and CQC.  Here are the ways in which they differ:</p>
<p>1. CQC will register a map listener internally, thus ensuring the client gets the update right away, whereas the query cache will be stale for a period of time.</p>
<p>2. CQC only accepts one filter at a time, the query cache can be used to cache many filters. </p>
<p>The CQC is a good choice for clients that need real time access to a subset of data (defined by a single filter), whereas the query cache is a good option for caching commonly executed queries.</p>
<p>Thanks,<br />
Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vikas</title>
		<link>http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/comment-page-1/#comment-4121</link>
		<dc:creator>vikas</dc:creator>
		<pubDate>Fri, 02 Oct 2009 13:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=77#comment-4121</guid>
		<description>Thanks for sharing this. I like your approach but i thinks its same as CQC( Continious query cache).

Just wondering how is this Continious query cache(CQC).  
Refernces: http://wiki.tangosol.com/display/COH32UG/Continuous+Query

Please let me know your thoughts on this.

Regards
Vikas</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this. I like your approach but i thinks its same as CQC( Continious query cache).</p>
<p>Just wondering how is this Continious query cache(CQC).<br />
Refernces: <a href="http://wiki.tangosol.com/display/COH32UG/Continuous+Query" rel="nofollow">http://wiki.tangosol.com/display/COH32UG/Continuous+Query</a></p>
<p>Please let me know your thoughts on this.</p>
<p>Regards<br />
Vikas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Padraic Hannon</title>
		<link>http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/comment-page-1/#comment-3915</link>
		<dc:creator>Padraic Hannon</dc:creator>
		<pubDate>Thu, 08 Jan 2009 19:28:58 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=77#comment-3915</guid>
		<description>We haven&#039;t implemented a query cache in a generic fashion yet. What we have done is create precalculated results on when we load the cluster. The one thing we did do was implement a value holder pattern to enable our object graphs to be deconstructed so that each entity can exist in its own named cache. We found when walking that object graph within the cluster (for example child.getParent.getId) we ran into the re-entrant problem and had to move each named cache into its own service. 

We have several use cases where we want to get parent objects based on the child object&#039;s properties. For example, get all parent objects that have a child object with value X. Given a model where the parent has a collection of child objects and the child objects have a reference to the parent (parent.getChildren(), child.getParent()) and assuming that the parent objects and child objects are stored in separate named caches, our initial reaction was to construct a filter:

Filter filter  = new EqualsFilter(&quot;getName&quot;, &quot;foo&quot;);
NamedCache cache = CacheFactory.getCache(&quot;childCache&quot;);
cache.addIndex(new ChainedExtractor(&quot;getName&quot;);
Aggregate parentAg = new DistinctValues(new ChainedExtractor(&quot;getParent&quot;));
Set parents = cache.aggregate(filter, parentAg);

We found it was much more performant to change the search to be more like so:

Filter filter  = new EqualsFilter(&quot;getName&quot;, &quot;foo&quot;);
NamedCache cache = CacheFactory.getCache(&quot;childCache&quot;);
cache.addIndex(new ChainedExtractor(&quot;getName&quot;);
cache.addIndex(new ChainedExtractor(&quot;getParent.getId&quot;);
Aggregate parentAg = new DistinctValues(new ChainedExtractor(&quot;getParent.getId&quot;));
Set parentKeys = cache.aggregate(filter, parentAg);
Map parents = CacheFactory.getCache(&quot;parentCache&quot;).getAll(parentKeys)

We have created prebuild responses and have been looking at doing a query cache as you suggested. There seems to be a lot of patterns out there, such as these, that could become part of the coherence incubator project.

aloha
Paddy</description>
		<content:encoded><![CDATA[<p>We haven&#8217;t implemented a query cache in a generic fashion yet. What we have done is create precalculated results on when we load the cluster. The one thing we did do was implement a value holder pattern to enable our object graphs to be deconstructed so that each entity can exist in its own named cache. We found when walking that object graph within the cluster (for example child.getParent.getId) we ran into the re-entrant problem and had to move each named cache into its own service. </p>
<p>We have several use cases where we want to get parent objects based on the child object&#8217;s properties. For example, get all parent objects that have a child object with value X. Given a model where the parent has a collection of child objects and the child objects have a reference to the parent (parent.getChildren(), child.getParent()) and assuming that the parent objects and child objects are stored in separate named caches, our initial reaction was to construct a filter:</p>
<p>Filter filter  = new EqualsFilter(&#8220;getName&#8221;, &#8220;foo&#8221;);<br />
NamedCache cache = CacheFactory.getCache(&#8220;childCache&#8221;);<br />
cache.addIndex(new ChainedExtractor(&#8220;getName&#8221;);<br />
Aggregate parentAg = new DistinctValues(new ChainedExtractor(&#8220;getParent&#8221;));<br />
Set parents = cache.aggregate(filter, parentAg);</p>
<p>We found it was much more performant to change the search to be more like so:</p>
<p>Filter filter  = new EqualsFilter(&#8220;getName&#8221;, &#8220;foo&#8221;);<br />
NamedCache cache = CacheFactory.getCache(&#8220;childCache&#8221;);<br />
cache.addIndex(new ChainedExtractor(&#8220;getName&#8221;);<br />
cache.addIndex(new ChainedExtractor(&#8220;getParent.getId&#8221;);<br />
Aggregate parentAg = new DistinctValues(new ChainedExtractor(&#8220;getParent.getId&#8221;));<br />
Set parentKeys = cache.aggregate(filter, parentAg);<br />
Map parents = CacheFactory.getCache(&#8220;parentCache&#8221;).getAll(parentKeys)</p>
<p>We have created prebuild responses and have been looking at doing a query cache as you suggested. There seems to be a lot of patterns out there, such as these, that could become part of the coherence incubator project.</p>
<p>aloha<br />
Paddy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Peralta</title>
		<link>http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/comment-page-1/#comment-3912</link>
		<dc:creator>Patrick Peralta</dc:creator>
		<pubDate>Tue, 30 Dec 2008 19:52:04 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=77#comment-3912</guid>
		<description>Hi Paddy,

We can certainly consider putting this in the Commons project.  Is the above different from your implementation?

Thanks,
Patrick</description>
		<content:encoded><![CDATA[<p>Hi Paddy,</p>
<p>We can certainly consider putting this in the Commons project.  Is the above different from your implementation?</p>
<p>Thanks,<br />
Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Padraic Hannon</title>
		<link>http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/comment-page-1/#comment-3911</link>
		<dc:creator>Padraic Hannon</dc:creator>
		<pubDate>Mon, 29 Dec 2008 20:06:46 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=77#comment-3911</guid>
		<description>We&#039;ve been looking at a very similar implementation to ensure fast query times. Our idea was to build these as items are inserted for common queries and do what you are doing for less common ones. Perhaps this is a good idea to put in the coherence commons? The query cache service / primary cache service separation is something that we run into for querying deconstructed object graphs, another pattern begging for a common approach.

-paddy</description>
		<content:encoded><![CDATA[<p>We&#8217;ve been looking at a very similar implementation to ensure fast query times. Our idea was to build these as items are inserted for common queries and do what you are doing for less common ones. Perhaps this is a good idea to put in the coherence commons? The query cache service / primary cache service separation is something that we run into for querying deconstructed object graphs, another pattern begging for a common approach.</p>
<p>-paddy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Elwin</title>
		<link>http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/comment-page-1/#comment-3884</link>
		<dc:creator>Martin Elwin</dc:creator>
		<pubDate>Sun, 28 Sep 2008 20:27:25 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=77#comment-3884</guid>
		<description>Just read through it - very nice! Good idea that. Makes it even simpler from the using code. Especially good if the queries are made from many different places. Thanks!

/M</description>
		<content:encoded><![CDATA[<p>Just read through it &#8211; very nice! Good idea that. Makes it even simpler from the using code. Especially good if the queries are made from many different places. Thanks!</p>
<p>/M</p>
]]></content:encoded>
	</item>
</channel>
</rss>

