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

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • None
    • core-libs
    • None

      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.

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

              Created:
              Updated:
              Resolved: