Has anyone ever tried using IgniteSet or similar data structures for setting remote filters on a continuous query? There is not much documentation on how IgniteSet works and hence this question. Basically my use case is as follows:
I have a distributed cache implemented using Ignite. A user is interested in real time updates from my cache based on some criteria. I will have more than one user subscribing to these updates. Rather than run n continuous queries, I intend to run one continuous query for n users with the remote filter backed by some distributed data structure.
I think IgniteSet could work for me. But I am not sure how this will affect the performance of my app server in production since I am not entirely sure how IgniteSet would work (due to minimal documentation on this topic). Basically, if I need to update the ignite set data structure, will it be dynamically updated for all remote nodes as well and will this mean I will start receiving updates for the filter that might be evaluated (to true) on these remote nodes?
qry.setRemoteFilterFactory(new Factory<CacheEntryEventFilter<PersonKey, Person>>() {
@Override public CacheEntryEventFilter<PersonKey, Person> create() {
return new CacheEntryEventFilter<PersonKey, Person>() {
@Override public boolean evaluate(CacheEntryEvent<? extends PersonKey, ? extends Person> e) {
//IgniteSet maintained outside of filter
return igniteSet.contains(e.getKey().getCity());
}
};
}
});
Sorry if I am missing something obvious here.
Any help would be greatly appreciated!