Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-760

Improve the JavaScript binding's internal Event loop and add additional tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • None
    • javascript-binding

    Description

      Improve the JavaScript binding's internal Event loop and add additional tests.

      The addition of JavaScript soak/performance tests msgr-send.js and msgr-recv.js, which mirror tests of the same name in C and Python flagged up a few edge cases that caused sporadic failures. The problems seem to be related to the ws WebSocket library directly calling some callbacks rather than posting to the JavaScript internal Event queue. The effect of calling directly mean that the main message handler and the close handler could actually get called concurrently which is clearly a bad thing and somewhat undexpected in JavaScript..... The improvements here add a number of guard tests and introduce a setTimeout that allows the "real" close handler to be deferred by posting it onto the Event queue.

      msgr-send and msgr-recv have been run with counts of several million messages and also with message sizes of up to 2MB and everything seems stable now.

      Attachments

        Activity

          People

            Unassigned Unassigned
            fadams Fraser Adams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: