[infinispan-dev] Continuous Query Caching
Navin Surtani
nsurtani at redhat.com
Tue Sep 29 05:10:55 EDT 2009
On 29 Sep 2009, at 09:57, Mircea Markus wrote:
> Hi,
>
> Again, this is a feature from Coherence[1].
>
> Basic idea is to execute a query against the cache, and hold the
> result object. This result object will always have up to date query
> result; this means that whenever something is modified in the cache
> the result itself is updated.
So I'm guessing a use case could be something like putting objects
into one node in a cluster and then running a query on a separate node?
> Advantage: if one performs the same query very often(e.g. several
> times every millisecond) the response will be fast and the system
> will not be overloaded.
> E.g.
> Filter filter = new AndFilter(new EqualsFilter("getTrader", traderid),
> new EqualsFilter("getStatus",
> Status.OPEN));
> ContinuousQueryCache cacheOpenTrades = new
> ContinuousQueryCache(cache, filter);
>
> Iterator iter = cacheOpenTrades.entrySet().iterator(); //*this
> entrySet call will be instant!*
>
> FOr a full list of scenario in which this can be used take a look at
> [1].
> Shall we consider adding something similar?
I guess it would depend if we were thinking of keeping those
iterators. There was the debate about pagination vs iterators so I
guess it would depend on what happens with the debate.
>
> Cheers,
> Mircea
>
>
> [1] http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/continuousquery.htm#BABBEIAH
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
Navin Surtani
Intern Infinispan
Intern JBoss Cache Searchable
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20090929/c3f0d0e5/attachment-0002.html
More information about the infinispan-dev
mailing list