hazelcast

Clustering and Shared Data in Vert.x

夙愿已清 提交于 2019-12-20 09:18:52
问题 I'm developing in Vert.x (based on Netty and Hazelcast), and I'm trying to share data between two server instances (eache of those instances in different machines, on the same lan). My problem is that I don't know how to configure the vert.x servers to allow them to share their concurrent memory maps (the theory says that's possible). I've read many documents off Vert.x and Hazelcast but I haven't had results yet. (I don't know how to force vert.x to load hazelcast xml configuration files).

Hazelcast Caching for Clusterd Spring Application

邮差的信 提交于 2019-12-20 07:28:27
问题 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

Mixing declarative and imperative JCache configurations

∥☆過路亽.° 提交于 2019-12-14 02:12:22
问题 I'm trying to setup (J)caches in a mix of declarative and imperative configuration, as the JCache standard doesn't provide a means to limit the max size a cache can occupy. I want to do it as much "provider independent" as possible, so I have the flexibility to change provider in the future. Currently I have the limitation of using Java 7, so Caffeine is discarded, I believe. I keep a list of the caches and the duration (TTL) for their entries in my application.yaml, which I get with a

Hazelcast: notify when a cluster node dies

梦想与她 提交于 2019-12-13 22:16:33
问题 I am quite a newbie to Hazelcast. I'm building a cluster where different nodes take in charge different activities. When a node dies, I'd like other nodes to notice, so they can reassign the dead node's activities among themselves. Is this possible? I have already made some research for this, but I couldn't find anything useful. Any help would be appreciated :) 回答1: There are a number of ways here, probably the simplest for what you describe is http://docs.hazelcast.org/docs/3.8.5/javadoc/com

Hazelcast - cannot make remote call: ContainsKeyOperation

天大地大妈咪最大 提交于 2019-12-13 18:05:19
问题 The error is purely the title. Any call I do to containsKey in a map retrieved from Hazelcast I get this specific error. Example below: val structuresMapStore : IMap[ String, Object ] = instance.getMap( MapNames.Structures ) if ( structuresMapStore.containsKey( uuidModel ) ) { logger.info( "\n\n Server - Dropping map: " + uuidModel + "\n\n" ) structuresMapStore.remove( uuidModel ) instance.getMap( uuidModel ).destroy() return "SUCCESS" } return "FAIL" The stack after the exception Aug 05,

hazelcast entry listener on a multinode cluster

假如想象 提交于 2019-12-13 15:24:22
问题 I have a multi-node hazelcast cluster. I need to ensure that when a new value is inserted into a map, only one entrylistener/map store gets invoked. Unless I am having a brain freeze, hazelcast does not do that by default (It would be great if I was wrong about this). Besides using distributed locks (I do not wish to avoid using listeners/map stores on other nodes), are there any other suggestions to ensure that only one listener/map store ends up executing code. Thanks 回答1: After a put only

Hazelcast embedded in tomcat

不羁岁月 提交于 2019-12-13 10:36:00
问题 I need to start Hazelcast within Tomcat without separate war-file. So put hazelcast.jar into lib folder, hazelczast.xml somewhere... What next? Or it is not possible? 回答1: First step was ok, just place Hazelcast lib and configuration inside the libs folder of Tomcat. Next thing, if you don't want a separate WAR file, is to build a small Valve class that starts up / shuts down the Hazelcast node. The question is: What do you want to achieve with this, since for a practical use you will likely

getAsync(“key”).get(timeout, sec) doesn't wait, return null

我的梦境 提交于 2019-12-13 06:07:07
问题 Hazelcast 3.4.4. I got a situation when map.getAsync returns null no matter what. It even if timeout set to 10000000 , TimeUnit.SECONDS it doesn't wait. But if I put Thread.sleep(10000) just before getAsync then it returns proper value from the map. I wonder what's wrong and how I could check/fix/undersand it? UPDATE : if I remove import ExecutionContext.Implicit.global from my code and all dependencies (like Scala.concurent.Future ), then getAsync starts working again. But I'm not satisfied

Which distributed database I need to choose for medium data project

ε祈祈猫儿з 提交于 2019-12-13 04:03:17
问题 Now we have java project with PostgreSQL database on spring boot 2 with Spring Data JPA (Hibernate). Requirements to new architecture: On N computers we have workplace. Each workplace use the same program with different configuration (configured client for redistributed database). Computers count is not big - amount 10/20 PCs. Database must be scalable (a lot of data can be stored at the disk ~1/2 Tb). Every day up to 1 million rows can be inserted into database from one workplace. Each

how to invalidate sessions in jetty Hazelcast?

不羁的心 提交于 2019-12-13 03:56:00
问题 I am using hazelcast 3.6.3 in jetty 9.4.8 for session replication and we would like to invalidate multiple sessions based on a separate JMS message. the hazelcast config is (using zookeeper for peer discovery) Config config = new Config(); config.setInstanceName(HAZELCAST_INSTANCE_NAME); // logger config config.setProperty("hazelcast.logging.type", "slf4j"); // config for session map MapConfig sessionMapConfig = new MapConfig(); sessionMapConfig.setName(SESSION_MAP_NAME) .setBackupCount(2);