ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislav Lukyanov <stanlukya...@gmail.com>
Subject Re: .Net ICacheEntryFilter
Date Mon, 12 Mar 2018 12:57:57 GMT
Hi,

It seems to me that there are two questions in this post:
1) How to store cross-referencing data in an IgniteCache?
2) How to extract data from server based on some complex filter?

First, on the cross-references. To store a reference to another entity,
which is stored as a separate entry in the cache, one would usually store
that referenced value's key. So that neither TestItem nor TestList aggregate
the other but they have the keys and can obtain needed objects from the
cache.
To avoid querying the cache each time you need to access TestList from a
TestItem you could do that during the TestItem's construction (e.g. in
WriteBinary).

On executing filters on server: ScanQuery seems appropriate, and you usually
can declare a field with Instance‚ÄčResource‚ÄčAttribute to have an instance of
Ignite injected into it. However, I'm not sure if ICacheEntryFilter is being
processed like that and can't check that right now. Could you please try
that?
Alternatively, you could call use ICompute.broadcast to get execute a
closure on all nodes and return a result.
To execute filter efficiently, make sure that your data is collocated and
that you're performing local queries from the filter, or you might end up
quering other nodes to filter local data and creating a lot of load this
way.

Thanks,
Stan



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Mime
View raw message