I'm happy to announce the release of 5.4!
It has roughly 60 bug fixes, performance improvements and new features. Details can be found here: [1].
The most important new features / enhancements are described below.
Enjoy!
NAKACK4
NAKACK2 used to have unbounded message buffers (for retransmission and delivery). This required STABLE to purge messages seen by all members from retransmission buffers and MFC (= multicast flow control) to prevent fast senders from making receiver message buffers grow too large.
NAKACK4 uses fixed sized buffers with a maximum capacity. When senders attempt to add messages to a full send-buffer, they block until there is space. Receivers also drop a message when there is no space. Receivers remove messages that have been delivered, and also send ACKs back to the sender. When a sender receives ACKs, it computes the minimum and then purges all messages lower than that from its send-buffer.
Because stability is implemented by ACKing, STABLE can be removed from a configuration that has NAKACK4. Because senders block on full send-buffers, MFC can also be removed.
Memory pressure should be smaller with NAKACK4 than with NAKACK2; the former doesn't need to dynamically increase and shrink its receive- and send-buffers, but always uses the same buffer for messages, and only changes write- and read-pointers.
Examples of the new cpnfig are for example ./conf/udp-new.xml, ./conf/tcp-new.xml.
https://issues.redhat.com/browse/JGRP-2780
Documentation: http://www.jgroups.org/manual5/index.html#NAKACK4
UNICAST4
Like NAKACK4, UNICAST4 also uses fixed-size buffers. When used in a configuration, unicast flow control (UFC) can be removed.
https://issues.redhat.com/browse/JGRP-2843
Documentation: http://www.jgroups.org/manual5/index.html#UNICAST4
JDBC_PING2
JDBC_PING2 is a refactored version of JDBC_PING. Besides refactoring, the major changes are
- Text (rather than binary) column types; this provides for more legibility when looking at the DB. For example, a simple select allows to look at all members of a given cluster.
- Support for stored procedures. This makes discovery faster
https://issues.redhat.com/browse/JGRP-2795
Documentation: http://www.jgroups.org/manual5/index.html#JDBC_PING2
Better time units in attributes
Time values in protocols can now be defined in a more simple way, e.g.
- "240000" -> "4m" // 4 minutes
- "500" -> "0.5s" // 0.5 seconds
https://issues.redhat.com/browse/JGRP-2811
Documentation: http://www.jgroups.org/manual5/index.html#AttributeValues
Measuring of round-trip times between members
Round-trip times, measured at the transport of a given stack, can now be fetched. This can be done programmatically, or via probe.
https://issues.redhat.com/browse/JGRP-2812
Faster processing of loopback messages
Loopback messages are messages from A -> A or from A -> all. (In the latter case, a message sent to all members is also looped back up to the sender).
So far, loopback messages have always been passed to the thread pool to be passed up on a seperate thread one by one. This was inefficient, and increased lock contention with messages received from other members. Also, message bundling/batching was forfeited.
This change passes loopback messages down to the message bundler, which queues and subsequently passes up message batches rather than individual messages.
In other words, message bundling is now applied to loopback messages, too.
https://issues.redhat.com/browse/JGRP-2831
More efficient Average
Classes Average and AverageMinMax are used to collect statistics. The change introduced a fixed array of samples, avoiding a costly product and overflow check.
This change should speed up collections of averages (used by many protocol stats).
https://issues.redhat.com/browse/JGRP-2832
FastArray improvements
Class FastArray is used internally over ArrayList. The latter compacts the array when iteration of it removes elements; the former only nulls them. This is a common scenario when handling message batches, leading to a performance increase.
https://issues.redhat.com/browse/JGRP-2834
[1] https://issues.redhat.com/projects/JGRP/versions/12425884