JCache: Replicated Cache

204 views
Skip to first unread message

Rod P

unread,
Jun 27, 2017, 4:47:54 PM6/27/17
to Hazelcast
Hi all,
My team is working on a project that requires a distributed LOOKUP cache. The cache will be mostly used for READs.  We have implemented a cache component that exposes a JCACHE API. Hazelcast is one of the cluster providers (the other being Apache Ignite).  

Since the cache will be used as a lookup, we were planning to use a Replicated Cache. However.  the Hazelcast's JCACHE implementation does not seem to provide any configuration for creating a replicated cache.

Is there any way to create a REPLICATED cache in Hazelcast (via the JCACHE provider)? I know that Hazelcast provides a ReplicatedMap, but we want to stick to JCACHE.

Any help will be greatly appreciated.
Thanks.

Fuad Malikov

unread,
Jun 27, 2017, 4:54:39 PM6/27/17
to Hazelcast
Hi Rod,

Replicated Map does not expose a JCache API. Alternatively I would consider using Near Cache. It will act like a replicated Map. 

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/a205e3cf-22e5-43cd-887a-cbaf4f5bda27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rod P

unread,
Jul 1, 2017, 3:33:52 PM7/1/17
to Hazelcast
Hi Fuad,
Thank you for your response.

we looked into the near-cache option, but Hazelcast is deployed in embedded mode in our application. If i am not mistaken (and based on the Hazelcast documentation)   near-cache is only supported in the CLIENTs. 

So,  in embedded mode, JCACHE's near-cache is not currently supported, am i right? if so,  is there any way to 'force' the Hazelcast JCACHE to act as a replicated cache?

Thank you
-R


On Tuesday, June 27, 2017 at 4:54:39 PM UTC-4, Fuad Malikov wrote:
Hi Rod,

Replicated Map does not expose a JCache API. Alternatively I would consider using Near Cache. It will act like a replicated Map. 

On Tue, Jun 27, 2017 at 1:47 PM, Rod P <rodolfo.p...@gmail.com> wrote:
Hi all,
My team is working on a project that requires a distributed LOOKUP cache. The cache will be mostly used for READs.  We have implemented a cache component that exposes a JCACHE API. Hazelcast is one of the cluster providers (the other being Apache Ignite).  

Since the cache will be used as a lookup, we were planning to use a Replicated Cache. However.  the Hazelcast's JCACHE implementation does not seem to provide any configuration for creating a replicated cache.

Is there any way to create a REPLICATED cache in Hazelcast (via the JCACHE provider)? I know that Hazelcast provides a ReplicatedMap, but we want to stick to JCACHE.

Any help will be greatly appreciated.
Thanks.

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.

dsukho...@gmail.com

unread,
Jul 2, 2017, 2:12:23 AM7/2/17
to Hazelcast
No, near-cache supported on cache nodes. Have a look here: http://docs.hazelcast.org/docs/3.8.2/manual/html-single/index.html#near-cache

Fuad Malikov

unread,
Jul 3, 2017, 12:35:36 AM7/3/17
to Hazelcast
You can use near cache on embedded nodes as well. It will not cache the data that is already stored on that node and will near cache the rest of the data that is remote. 


On Sat, Jul 1, 2017 at 11:12 PM, <dsukho...@gmail.com> wrote:
No, near-cache supported on cache nodes. Have a look here: http://docs.hazelcast.org/docs/3.8.2/manual/html-single/index.html#near-cache
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.

To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.

Ahmet Mircik

unread,
Jul 3, 2017, 3:52:38 AM7/3/17
to Hazelcast
Hi Rod, 

You are right, embedded mode JCache doesn't support near cache (only supported on clients). Seems there is no straightforward way to expose embedded mode JCache as a replicated cache for now. Maybe you can create an issue for that: https://github.com/hazelcast/hazelcast/issues

Reply all
Reply to author
Forward
0 new messages