Continuous Queries

classic Classic list List threaded Threaded
12 messages Options
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Continuous Queries

Local listener is executed on local client ignite node or on the remote ignite server node?

If it is executed on local client node and I start several client node, can it do loadbalance and enhance listener processing capabilities?
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

Hi,

Local listener is executed on the node which started the query. Essentially, it's never transferred across network.

-Val
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

If the process after the event has been listened is so complicated,
The burden of the node which started the query will be quite heavy.

How can I do to reduce the burden of nodes
If I start the same query on several nodes, can it do load balance?
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

Hi,

Generally speaking, continuous queries are designed to listen for data updates, not for heavy computational tasks. Can you provide more information about your use case? What are you trying to achieve?

-Val
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

My case is that after listening a process of inserting a record into an ignite cache, do more than 5 SQL querys(such as seclet ... from ... where) on other ignite caches according to this event.
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

Hi,

In this case I would recommend to use continuous queries, but trigger queries from the remote filter. Note that you should execute them asynchronously in separate threads, without blocking the thread that invokes the filter. In the current version you will have to manage these threads manually. Starting with 1.6, this will be automated, like shown in this example: https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheContinuousAsyncQueryExample.java

-Val
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

Do you know when version 1.6 will release?
This function is important to me.
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

Hi,

As far as I know, it's very close and should be sent for a vote soon. I would recommend to monitor the dev list [1] for the latest news.

[1] http://ignite.apache.org/community/resources.html#mail-lists

-Val
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

BTW, you can also download the nightly build to try the new functionality: https://ignite.apache.org/community/contribute.html#nightly-builds

-Val
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

In reply to this post by vkulichenko
I have tried CacheContinuousAsyncQueryExample.java in version 1.6, and found that trigger queries(the process in qry.setLocalListener()) are still executed in local client node, but not remote server nodes.

Is there any problem?

If I want to make the trigger queries to be executed in remote server node, how can I do?
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

The local listener is always executed on the node that executed the continuous query (client node in your case). But the remote filter is executed on the server node and you can use it to trigger server-side processes. See annotated CacheEntryFilter class in the CacheContinuousAsyncQueryExample.

-Val
ght230 ght230
Reply | Threaded
Open this post in threaded view
|

Re: Continuous Queries

Assuming a server node failure during processing, then what will happen?

Can it guarantees exactly once process(if my process is a cumulative operation)?