Hazelcast client for vert.x

329 views
Skip to first unread message

nimt...@gmail.com

unread,
Jan 25, 2017, 11:08:22 AM1/25/17
to vert.x
Hi,

I'm using vert.x to expose some REST APIs' and want to connect to a hazelcast cache store for data queries. Is there any recommended way like async hazelcast driver or any other way to perform that? I read in the docs that if I do blocking or synchronous queries in a verticle, it defeats the whole purpose of event loop.


Thank you.

javadevmtl

unread,
Jan 25, 2017, 12:04:00 PM1/25/17
to vert.x
See here: http://vertx.io/docs/vertx-hazelcast/java/

It gives you direct access to HazelCastManager. so you should be able to do direct hazelcast calls.

Thomas SEGISMONT

unread,
Jan 25, 2017, 4:12:15 PM1/25/17
to ve...@googlegroups.com
Vert.x cluster wide maps are backed by Hazelcast maps. So if you configure your map properly in cluster.xml, you can use it with Vert.x APIs transparently.


--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/e6ace76d-31c6-4722-abf2-3947512c4a4f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

riscad...@gmail.com

unread,
Jan 25, 2017, 4:29:58 PM1/25/17
to vert.x
I've recently created a project at my company, using Guice, rxjava and vertx, to provide a cache layer, with pluggable provider. By default I'm using hazelcast, by using the default-cluster hazelcast configuration used for vertx, I expand upon it, and run my application as a cluster, but I also add a map configuration with it's own eviction policy (ex: currently using LRU), to use as a cache layer for backend queries being performed by my API.

If my company allows, I have no problem sharing this with you, however I'm currently running into an issue, where load testing my application with a somewhat higher TPS then usual, hazelcast starts failing. And when the nodes rejoin the cluster many of the requests just timeout.

I've profiled the application, and everything is well within memory limits.

I'm using vertx-hazelcast to have access to the shareddata and be able to do Rxified async calls to my cache map with a preconfigired TTL.



On Wednesday, 25 January 2017 21:12:15 UTC, Thomas Segismont wrote:
Vert.x cluster wide maps are backed by Hazelcast maps. So if you configure your map properly in cluster.xml, you can use it with Vert.x APIs transparently.

2017-01-25 18:04 GMT+01:00 javadevmtl <java.d...@gmail.com>:
See here: http://vertx.io/docs/vertx-hazelcast/java/

It gives you direct access to HazelCastManager. so you should be able to do direct hazelcast calls.



On Wednesday, 25 January 2017 11:08:22 UTC-5, nimt...@gmail.com wrote:
Hi,

I'm using vert.x to expose some REST APIs' and want to connect to a hazelcast cache store for data queries. Is there any recommended way like async hazelcast driver or any other way to perform that? I read in the docs that if I do blocking or synchronous queries in a verticle, it defeats the whole purpose of event loop.


Thank you.

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages