I want to create a distributed applications on JVM which has a number of nodes, and need a library which allow me to:
I have found two solutions:
Are there any other libraries which can do the same?
JGroups is a library for reliable one-to-one or one-to-many communication written in the Java language. It can be used to create groups of processes whose members send messages to each other. JGroups enables developers to create reliable multipoint (multicast) applications where reliability is a deployment issue.
JGroups is a Java API for reliable messages exchange. It features a simple interface that provides: a flexible protocol stack, including TCP and UDP. fragmentation and reassembly of large messages. reliable unicast and multicast.
This may be the case when operating over a WAN, where routers might discard IP multicast packets. Usually, UDP is used as transport in LANs, while TCP is used for clusters spanning WANs. The transport protocol, uses TCP (from TCP/IP) to send unicast and multicast messages.
Infinispan uses the JGroups library to handle all network communications. JGroups enables cluster node detection, a process called discovery, and reliable data transfer between nodes. JGroups also handles the process of nodes entering and exiting the cluster and master node determination for the cluster.
JGroups has been around since 1998 and is therefore very stable, not dated at all ! It is being actively developed (I'm the lead dev).
It is used by a lot of applications/systems out there, if you google for it, you'll find a lot of references. Just this week, a telecom company using it broke the record for largest cluster built with JGroups with a 1115 node cluster !
JBoss (Wildfly) clustering (Infinispan) uses JGroups as well. I suggest write a small prototype and see how it performs. If you ask questions on the JGroups mailing list, the people there are very helpful...
I can't comment on Akka, as I haven't used it, but my distaste for Scala would keep me away from it anyway...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With