ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Kulichenko <valentin.kuliche...@gmail.com>
Subject Re: What is the Ignite equivalent of GridCacheProjection?
Date Thu, 25 Jun 2015 07:11:17 GMT
William,

You don't need a projection for you use case - just create a separate cache
for each user. You can use Ignite.getOrCreateCache() method for this. This
will give you the same functionality, but won't require any additional code
to support multiple users (like having user ID in model classes and
implementing projection filters). It will also be more performant in some
cases. E.g., iterations are much faster, because you iterate through the
data for particular user only instead of going through all entries applying
the filter to each of them.

-Val

On Wed, Jun 24, 2015 at 8:43 PM, William Kemper <doohick@gmail.com> wrote:

> We weren't using the type projection. We were using a predicate to
> implement access control logic in a multiuser application. It was nice
> because it worked for all the methods in the cache API (including queries)
> and because gridgain would do all the heavy lifting for us. Is the feature
> on the roadmap?
>
> On Wed, Jun 24, 2015 at 6:24 PM, dsetrakyan <dsetrakyan@apache.org> wrote:
>
>> William Kemper wrote
>> > In the GridGain API one could use a GridCacheProjection (
>> > http://doc.gridgain.org/latest/GridCacheProjection) to create a kind of
>> > 'view' of a cache. I don't see equivalent functionality in Ignite. I see
>> > that CacheInterceptor may be configured for a cache, but it does not
>> seem
>> > to provide a 'view' into an existing cache in the same way a
>> > GridCacheProjection could.
>>
>> One of the main reasons GridCacheProjection existed was because in
>> GridGain
>> you could not transact across  different caches. Therefore, users were
>> forced to put different types of data into the same cache and then create
>> GridCacheProjections to have different views on the same cache.
>>
>> In Ignite you can transact and query across multiple caches, so there is
>> no
>> real need for a GridCacheProjection, since you can simply put different
>> types of data into different caches.
>>
>>
>>
>> -----
>> D.
>> --
>> View this message in context:
>> http://apache-ignite-users.70518.x6.nabble.com/What-is-the-Ignite-equivalent-of-GridCacheProjection-tp577p579.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>

Mime
View raw message