Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1266

NAKACK: don't wrap retransmitted messages

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • 2.12
    • None
    • None

    Description

      In NAKACK.handleXmitReq(), we wrap messages that are retransmitted. Every xmitted message gets serialized into a byte buffer, and is added as the payload of another message. When received, NAKACK.handleXmitRsp() de-serializes the message and passes it up.

      We can get rid of this unneeded serialization/de-serialization:

      • When a message is to be retransmitted with dest=null (use_mcast_xmit), we simply resend the message: the rceeiver will receive the message as if it was a regular message, and not an xmit. NAKACK.handleMessage() will be invoked.
      • When dest != null, we make a copy of the message and replace the NakAckHeader.MSG with XMIT_RSP (plus seqno). When the message is received (handledd by NAKACK.handleXmitRsp() this time), we simply replace the XMIT_RSP with a MSG again, and pass the message up

      When we have a lot of retransmissions, this will save 1 serialization when handling the xmit request, and 1 de-serialization when handling the xmit response. Even better when use_mcast_xmit=true: here, everybody has to de-serialize the xmitted message. With the proposed solution, this cost is gone

      Attachments

        Activity

          People

            rhn-engineering-bban Bela Ban
            rhn-engineering-bban Bela Ban
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: