Book Image

Infinispan data grid platform definitive guide

Book Image

Infinispan data grid platform definitive guide

Overview of this book

Table of Contents (20 chapters)
Infinispan Data Grid Platform Definitive Guide
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

The JGroups architecture


As we said, JGroups is a toolkit for reliable group communication. It's possible to configure JGroups to use UDP with IP multicast for point-to-multipoint communication, or use JGroups with TCP for a point-to-point reliable communication, where group members are interconnected by TCP point-to-point connections, as you can see in the following figure:

As you can see in the diagram, for large clusters, it's more efficient to use UDP, because with UDP only one message is sent, and all the members of the group can receive it.

In the Infinispan with TCP example, JGroups will have to send one message for each node you have in the cluster, which can decrease performance.

Tip

A Message (org.jgroups.Message) is how data is exchanged, that is, how data is sent and received from one member to a single member, or can be sent by a member to all members of the group.

To interact with the group, JGroups provides the Channel API for clients. The client (for instance, Infinispan or a...