Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8186829 HTTP Client impl - Reduce implementation execution modes
  3. JDK-8187231

Use SequentialScheduler to cleanup and simplify the dispatch logic of Http1Exchange/Http1Response

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      The Http1Response has now a complex logic to avoid losing data during the switching of its phases (reading headers, reading body) and the eventual upgrade to HTTP/2. It uses synchronization, a readLock, and a queue, to attempt to ensure that byte buffers are delivered in the right order.

      This logic could probably be considerably simplified if the queue was managed at the Http1Exchange level, with the help of a SequentialScheduler to ensure that byte buffers are handled in the right sequence. This should also make it easier to delegate the heavy part of a the task to an executor in order to avoid starving the selector thread.

        Attachments

          Activity

            People

            • Assignee:
              dfuchs Daniel Fuchs
              Reporter:
              dfuchs Daniel Fuchs
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: