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

RequestCorrelator: parallelize processing of requests and responses

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 5.2.12
    • None
    • None
    • False
    • None
    • False
    • If Release Note Needed, Set a Value
    • Set a Value

      In RequestCorrelator.receiveMessageBatch(MessageBatch), we iterate through the batch and process messages one by one. Messages can be either requests, which need to be delivered in order (unless they're OOB) and can take some time, or responses, which can be delivered in random order.

      It would be faster to deliver responses (and OOB requests) in parallel to (regular) requests. This can be done with batch.stream().parallel() for the first case and batch.stream() for the latter case.

      Todos:

      • UPerf should have better perf with this implemented
      • Add MessageBatch.stream(Predicate<Message>) to prefilter for requests and responses

      The attached sample shows how to do this.

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

              Created:
              Updated:
              Resolved: