On 25 Jul 2013, at 09:52, Sanne Grinovero <sanne(a)infinispan.org> wrote:
On 24 July 2013 18:42, Mircea Markus <mmarkus(a)redhat.com>
wrote:
>
> On 24 Jul 2013, at 17:16, Sanne Grinovero <sanne(a)infinispan.org> wrote:
>
>> Also:
>> - support to efficiently preload only the owned entries
>
> We'd still need to iterate over all the stored keys to decide which maps to the
local node, but we won't have to load the entries. Is that what you have in mind?
Ideally you wouldn't want to iterate on the keys: some storage engines
could run the CHM function as a selection criteria (among others,
those supporting Map/Reduce can do it; some of these run in Java
making this relatively easy - also for HotRod we'll likely have to
maintain CHM implementations in other languages anyway).
I realize that's complex to implement but the important change is to
not disallow such optimisations by using a limiting SPI: if the
CacheStore SPI would allow that, then people would be able to try
implement such smarter stores.. otherwise it's impossible.
Today we load all keys first, a good start would be to load them all
as a stream rather than as a single Set.
We can pass in a CacheStoreFilter (as per Manik's original design), that should allow
the cachestore to filter things its own way.
Thanks for the feedback!
Cheers,
--
Mircea Markus
Infinispan lead (
www.infinispan.org)