hazelcast

redis vs hazelcast [closed]

本秂侑毒 提交于 2019-12-02 17:29:13
Redis Vs Hazelcast If my app: Have a lot of http requests (6,000 per minute, I collect clicks info) that needs to be saved Have a lot of http requests that query the data previously saved. My Questions are - Which one between Redis and Hazelcast should I chose to store and query data - which one is faster for reads and writes? - which one is more reliable? - Might Cassandra be a better option? Answering any of the questions helps We switched from redis to hazelcast for our caching needs. Protostuff + Hazelcast is much faster for us than Protostuff + Jedis (pooled) + Redis We use protostuff to

Hazelcast equcalent for Coherence local cache

大城市里の小女人 提交于 2019-12-02 15:57:46
问题 Actualy we are migrating from Coherence to Hazelcast. In Coherence we use a local cache like this: <cache-mapping> <cache-name>INFOHUB_PROGNOSE_DATENSATZ_LOCAL</cache-name> <scheme-name>default-local</scheme-name> </cache-mapping> <local-scheme> <scheme-name>default-local</scheme-name> </local-scheme> Because in coherence are local caches perm mutch better than distributed. Is there an equvalent in Hazelcast? Something like force Hazelcast to have the cache just in the local JVM. A plain java

Hazelcast Caching for Clusterd Spring Application

断了今生、忘了曾经 提交于 2019-12-02 12:42:22
We recently clusterd our Spring application with 2 nodes backed by one database. Our application has Dynamic menu(each user has different menu options), since we dont have enough caching in place every time user logs we hit the database and filter the Menu options based on user security. We want to avoid hitting the database each time user logs in by introducing Cache. I was reading about hazelcast cache http://hazelcast.org/use-cases/caching/ and I noticed multiple options available for caching like In-Memory Data Grid/NoSql , Jcache and Spring Cache but not really sure which one is the best

Hazelcast equcalent for Coherence local cache

为君一笑 提交于 2019-12-02 11:11:46
Actualy we are migrating from Coherence to Hazelcast. In Coherence we use a local cache like this: <cache-mapping> <cache-name>INFOHUB_PROGNOSE_DATENSATZ_LOCAL</cache-name> <scheme-name>default-local</scheme-name> </cache-mapping> <local-scheme> <scheme-name>default-local</scheme-name> </local-scheme> Because in coherence are local caches perm mutch better than distributed. Is there an equvalent in Hazelcast? Something like force Hazelcast to have the cache just in the local JVM. A plain java map is no alternative, because of all the great features like eviction that an IMap offers. Hazelcast

How to add objects to a distributed queue in hazelcast performantly?

耗尽温柔 提交于 2019-12-02 11:00:52
问题 Adding items to a distributed queue in hazelcast is incredibly slow (read: 66 items/sec; is that normal?) when the queue is stored on a different node than the one where the code is executed ( and is set to 0 in the config for this queue). Is there any way to add the items from the owner node? Is there anything fundamentally wrong with my approach using Hazelcast? This operation takes around 15 seconds: public static void main(String[] args) throws ExecutionException { HazelcastInstance

How to add objects to a distributed queue in hazelcast performantly?

↘锁芯ラ 提交于 2019-12-02 05:04:59
Adding items to a distributed queue in hazelcast is incredibly slow (read: 66 items/sec; is that normal?) when the queue is stored on a different node than the one where the code is executed ( and is set to 0 in the config for this queue). Is there any way to add the items from the owner node? Is there anything fundamentally wrong with my approach using Hazelcast? This operation takes around 15 seconds: public static void main(String[] args) throws ExecutionException { HazelcastInstance hazelcastInstance = Hazelcast.newHazelcastInstance(); IQueue<String> configs = hazelcastInstance.getQueue(

How to show all current locks in hazelcast

大城市里の小女人 提交于 2019-12-01 23:02:49
I am a newbie for Hazelcast. I would like to know how can I list current lock in Hazelcast console? For ex. assume that i open three console and i have taken 3 lock as follow: m.lock object1 m.lock object2 m.lock object3 How can i get output like: number of lock site: 3 locks: object1, object2, object3 Console is just a test app to simulate basic functionalities of hazelcast. To see your lock instances following code will help you. HazelcastInstance hzInstance = Hazelcast.newHazelcastInstance(null); Collection<Instance> instances = hzInstance.getInstances(); Set<Instance> locks = new HashSet

Hazelcast: programmatic configuration for logging in debug mode

狂风中的少年 提交于 2019-12-01 18:47:08
Trying to configure slf4j to log in DEBUG mode, but get only INFO logs. What am I doing wrong? Config hazelcastConfig = new Config("HazelcastConfig"); hazelcastConfig.getProperties().put("hazelcast.logging.type", "sl4j"); hazelcastConfig.getProperties().put("slf4j.logger.com.hazelcast", "debug"); Hazelcast.newHazelcastInstance(hazelcastConfig); You should try Config hazelcastConfig = new Config(); hazelcastConfig.setProperty("hazelcast.logging.type", "slf4j"); Hazelcast.newHazelcastInstance(hazelcastConfig); Keep in mind that slf4j is just facade API for logger. You should use it with actual

SpringBoot,用200行代码完成一个一二级分布式缓存

北慕城南 提交于 2019-12-01 03:58:48
缓存系统的用来代替直接访问数据库,用来提升系统性能,减小数据库复杂。早期缓存跟系统在一个虚拟机里,这样内存访问,速度最快。 后来应用系统水平扩展,缓存作为一个独立系统存在,如redis,但是每次从缓存获取数据,都还是要通过网络访问才能获取,效率相对于早先从内存里获取,还是差了点。如果一个应用,比如传统的企业应用,一次页面显示,要访问数次redis,那效果就不是特别好,因此,现在有人提出了一二级缓存。即一级缓存跟系统在一个虚拟机内,这样速度最快。二级缓存位于redis里,当一级缓存没有数据的时候,再从redis里获取,并同步到一级缓存里。 现在实现这种一二级缓存的也挺多的,比如 hazelcast,新版的Ehcache..不过,实际上,如果你用spring boot,手里又一个Redis,则不需要搞hazelcastEhcache,只需要200行代码,就能在spring boot基础上,提供一个一二级缓存,代码如下: import java.io.UnsupportedEncodingException; import java.util.concurrent.ConcurrentHashMap; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot

How to make Hazelcast nodes installed in docker on different aws instances interact with each other?

本秂侑毒 提交于 2019-11-30 22:03:40
I have three aws machines on which I have setup three docker containers having hazelcast-3.5.4 installed on them(ubuntu).With aws configuration set as what I do normally with Hazelcast(without docker).The nodes are not discovering each other. How to make them interact or discover each other? Hazelcast.xml file looks like this: <join> <multicast enabled="false"> <multicast-group>224.2.2.3</multicast-group> <multicast-port>54327</multicast-port> </multicast> <tcp-ip enabled="false"> <interface>127.0.0.1</interface> <member-list> <member>127.0.0.1</member> </member-list> </tcp-ip> <aws enabled=