2. • Introduction
• API and Architecture
• Protocols
• Building Blocks
• Group Membership
• Conclusion
OVERVIEW
Wednesday, April 24, 13
3. INTRODUCTION
• What is JGroups?
• Toolkit for Reliable Multicast Communication
• Fragmentation
• Message retransmission
• Ordering
• Group membership, membership change notification, etc.
• LAN or WAN based
Wednesday, April 24, 13
4. INTRODUCTION
• Where JGroups fits in?
Unreliable Reliable
Unicast UDP TCP
Multicast IP Multicast JGroups
Wednesday, April 24, 13
6. CHANNEL
• Lower-Level Abstraction to build Multicast Communication
Apps provided by JGroups.
• Similar to socket from Java
• Operations :
• Create a channel with a set of properties
• Connect to a group X. Everyone that connects to X will see
each other
• Send a message to all members of X
Wednesday, April 24, 13
7. BUILDING BLOCKS
• Group communication pattern
• Layered on top of channels
• More sophisticated APIs
• Applications communicate directly with the building block,
rather than the channel.
• Composed with many basic multicast function
Wednesday, April 24, 13
9. FLEXIBLE PROTOCOL STACK
• The most powerful feature of JGroups!!
• Contains a number of protocol layers in a bidirectional list.
• A message sent by Channel is simply passed to the protocol stack which in
turn forwards it to the top most layer.
• Available Protocol :
• Transport: UDP,TCP,TCP_NIO,TUNNEL, JMS, LOOPBACK
• Discovery: PING,TCPPING,TCPGOSSIP, UDPPING
• Reliable delivery & FIFO: NAKACK, SMACK
• Group membership, Failure Detector, Security, Fragmentation,Virtual
Synchrony, Ordering, etc.
Wednesday, April 24, 13
10. GROUP MEMBERSHIP SERVICE
• Task :
• Maintain a list of members
• Notify members when a new member joins, or an existing
member leaves (or crashes)
• Each member has the same ordered list
• List can be retrieved by Channel.getView()
• First (= oldest) member is coordinator
• If coord crashes, 2nd oldest takes over
Wednesday, April 24, 13
11. VIRTUAL SYNCHRONY
• AView is a list of members (A,B,C,D)
• When members join/leave, a new view will be installed
(A,C,D)
• Every healthy member receives the same set of messages
between subsequent views
• Messages sent inV1 are received inV1
• All msgs by sender received in same order
Wednesday, April 24, 13
12. VIRTUAL SYNCHRONY
• The FLUSH protocol ensures that all members have received
all msgs inV1 before installingV2
• New members won’t receive messages from previous views
• Member that left won’t receive msgs
Wednesday, April 24, 13
13. FAILURE DETECTION
• Failure detection protocol sends up SUSPECT event
• VERIFY_SUSPECT double checks
• GMS multicasts new view (not containing
crashed member)
• If member resurfaces, it will be shunned
• Has to leave and rejoin group
Wednesday, April 24, 13
14. FAILURE DETECTION
• Task :
• Detect if a member has crashed and send SUSPECT event up the stack (to
be handled by GMS)
• Logical ring over membership
• Each member pings its neighbor to the right
Wednesday, April 24, 13
16. CONCLUSION
• Jgroups merupakan toolkit yang bisa dipakai saat akan
membangun suatu aplikasi yang membutuhkan aspek reliability
dalam komunikasi grup.
• Jgroups sangat modular dan mudah untuk dimodifikasi sesuai
dengan kebutuhan aplikasi
• Pengembang aplikasi bisa lebih fokus terhadap persoalan apa
yang mau dipecahkan oleh aplikasinya.
Wednesday, April 24, 13
17. REFERENCE
• JavaGroups - Group Communication Patterns in Java, Bela Ban. 1998
• Design and Implementation of a Reliable Group CommunicationToolkit for
Java, Bela Ban, -
• JgroupTutorial and Programmer’s Manual,Albert M. dkk. 2002.
• Reliable and Secure Distributed Programming 2nd Ed, C. Cachin dkk. 2011.
• http://www.jgroups.org
• https://github.com/belaban/JGroups
Wednesday, April 24, 13