sending event on update of a specific cache

classic Classic list List threaded Threaded
7 messages Options
matanlevy matanlevy
Reply | Threaded
Open this post in threaded view
|

sending event on update of a specific cache

Hi,

I am using ignite cache and I would like to know if there is any mechanishm
that I can use to trigger update only for a *specific *cache.

my use case is using REST API in order to perform simple actions on the
cache(simple get and put), so I can't use Continous Query for that.

I know that I can use the event mechanism for that, but I am affraid the
overhead for eachupdate in each cache in the clusther is too high.

I am looking for a way to filter it so only updates on my specific cache
will trigger events.

Thanks!





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Павлухин Иван Павлухин Иван
Reply | Threaded
Open this post in threaded view
|

Re: sending event on update of a specific cache

Hi,

You can try a following combination:
1. Use IgniteEvents to setup event listeners.
2. Disable events for all other caches via CacheConfiguration.setEventsDisabled.

вс, 7 апр. 2019 г. в 15:18, matanlevy <[hidden email]>:

>
> Hi,
>
> I am using ignite cache and I would like to know if there is any mechanishm
> that I can use to trigger update only for a *specific *cache.
>
> my use case is using REST API in order to perform simple actions on the
> cache(simple get and put), so I can't use Continous Query for that.
>
> I know that I can use the event mechanism for that, but I am affraid the
> overhead for eachupdate in each cache in the clusther is too high.
>
> I am looking for a way to filter it so only updates on my specific cache
> will trigger events.
>
> Thanks!
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/



--
Best regards,
Ivan Pavlukhin
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: sending event on update of a specific cache

In reply to this post by matanlevy
Hello!

Maybe I'm missing something, but why do you say you can't use Continuous Query? Should work with REST jsut fine.

Regards,
--
Ilya Kasnacheev


вс, 7 апр. 2019 г. в 15:18, matanlevy <[hidden email]>:
Hi,

I am using ignite cache and I would like to know if there is any mechanishm
that I can use to trigger update only for a *specific *cache.

my use case is using REST API in order to perform simple actions on the
cache(simple get and put), so I can't use Continous Query for that.

I know that I can use the event mechanism for that, but I am affraid the
overhead for eachupdate in each cache in the clusther is too high.

I am looking for a way to filter it so only updates on my specific cache
will trigger events.

Thanks!





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
matanlevy matanlevy
Reply | Threaded
Open this post in threaded view
|

Re: sending event on update of a specific cache

Hi Ilya,

from REST API page on Ignite documentation I could find only SQL Queries or
simple key/val operations.

In addition, from Continuous Queries documentation page + this
thread(http://apache-ignite-users.70518.x6.nabble.com/Ignite-Thin-Client-Continuous-Query-td23980.html)
it seems that it can be done only as a client or server node, and REST API
is more a thin client implementation than a node.

Do you have an example for using Continuous Queries from REST?





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: sending event on update of a specific cache

Hello!

You can't do Continuous Queries via REST (or events for that matter), but changes to caches done via REST are visible to Continuous Queries.

So why would you want to use events and not Continuous Queries?

Regards,
--
Ilya Kasnacheev


пн, 8 апр. 2019 г. в 10:59, matanlevy <[hidden email]>:
Hi Ilya,

from REST API page on Ignite documentation I could find only SQL Queries or
simple key/val operations.

In addition, from Continuous Queries documentation page + this
thread(http://apache-ignite-users.70518.x6.nabble.com/Ignite-Thin-Client-Continuous-Query-td23980.html)
it seems that it can be done only as a client or server node, and REST API
is more a thin client implementation than a node.

Do you have an example for using Continuous Queries from REST?





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
matanlevy matanlevy
Reply | Threaded
Open this post in threaded view
|

Re: sending event on update of a specific cache

In reply to this post by Павлухин Иван
Hi,
is it possible to disable it in XML configuration and not in code?
Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
matanlevy matanlevy
Reply | Threaded
Open this post in threaded view
|

Re: sending event on update of a specific cache

OK I think i got it(under CacheConfiguration bean) :

<property name="EventsDisabled" value="true"/>





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