ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognen Duzlevski <ognen.duzlev...@gmail.com>
Subject Re: CacheStore load/get and SQL
Date Mon, 29 Jun 2015 20:32:44 GMT

Thanks. Just so I understand: I am looking at the CacheStore example and
the whole discussion on:

In that example the load() method takes a key which is then used
automatically to query the underlying SQL persistent store and the results
are served back to client.

How about this scenario? I get the key in the load method and I first check
to see if my data is in cache. If it is, I serve the result from cache,
otherwise I go to persistent storage.

Is this handled automatically by Ignite in the background and that's why
the load() method in the example pays no attention to the possibility of
the key/value already existing in memory? Or is that something I have to
explicitly check for in the load() implementation?


On Mon, Jun 29, 2015 at 2:53 PM, Dmitriy Setrakyan <dsetrakyan@apache.org>

> On Mon, Jun 29, 2015 at 12:38 PM, Ognen Duzlevski <
> ognen.duzlevski@gmail.com> wrote:
>> How about SQL queries on ignite? Do they end up being translated into
>> series of gets() and hence make use of the read-through CacheStore
>> implementation?
> The answer is No. Queries are executed only on the in-memory data. To
> support what you are suggesting, we would have to execute a query on the
> database, get all the keys back, and then execute a bunch of cache.get(..)
> calls for each returned key. Overall, this would be very slow and that's
> why was not done for Ignite.
> Having said that, we can enhance our Hibernate integration to support this
> use case. I will file a ticket.
> D.

View raw message