4 Replies Latest reply on Dec 18, 2009 4:15 AM by Don Park

    Feature request: P2P NetStream.send() data priority

    Don Park

      Is it too late to request data priority support in NetStream.send() so text chat data won't be delayed by ongoing file transfer? Otherwise, file transfer data will have to get chopped down to small pieces in guarantee satisfying UX QoS.

       

      Ideally, it would either be a parameter following handlerName or set per-handlerName using ns.setPriority(handlerName:String, priority:int); IMO, NetStream.dataReliable would be more useful if it can be set per-handlerName instead of being a NetStream wide setting.

       

      - Don Park

        • 1. Re: Feature request: P2P NetStream.send() data priority
          Michael Thornburgh Adobe Employee

          we recognize that there is a need to be able to set the priority of NetStream.send() for different use cases (example: bulk data transfer vs player position updates), and that the current situation is less than optimal when you have bulk data vs video.

           

          the semantics of NetStream.send(), particularly that of message ordering, are incompatible with assigning different priorities to different sends() in the same NetStream.  if, in the future, there was a way to set the priority of NetStream.send()s, it would have to be per NetStream to maintain the ordering semantic of each NetStream.

           

          you can already (existing 10.1 API) vary the reliability of an individual .send() on a NetStream by simply changing the NetStream.dataReliable property right before your .send().  example:

           

             ...

             function sendWithReliability(rel:Boolean, name:String, arg:Object):void

             {

                var oldRel:Boolean = ns.dataReliable;

                ns.dataReliable = rel;

                ns.send(name, arg);

                ns.dataReliable = oldRel;

             }

             ...

           

          -mike

          • 2. Re: Feature request: P2P NetStream.send() data priority
            Don Park Level 1

            > the semantics of NetStream.send(), particularly that of message ordering, are incompatible with assigning different priorities to different sends() in the same NetStream.

             

            That is why I suggested handlerName specific priority control which, at a cost less than duplicate NetStream instances, can be implemented using handlerName specific queue to satisfy the ordering  sematics.

             

            Anyway, thanks for the reply. BTW, unless I am mistaken, I don't think NetStream.send() ordering semantics is explicitly stated in the documentation.

             

            Best,

             

            - Don

            • 3. Re: Feature request: P2P NetStream.send() data priority
              Michael Thornburgh Adobe Employee

              i need to take back what i said in my sendWithReliability() function above.  it appears at least FP10.1 beta uses the "dataReliable" property at a different time than i thought, so changing it right back to the old value immediately after doing a .send() could mean that the data would actually be queued to RTMFP with the old reliability value, not the temporary one.

               

              the upshot is that in 10.1 beta you can't reliably vary the reliability on a per-message basis in one NetStream.  but you can make two NetStreams and give each one a different dataReliable setting.

               

              this scenario is also being taken under advisement.

               

              -mike

              • 4. Re: Feature request: P2P NetStream.send() data priority
                Don Park Level 1

                Got it. Thanks for the correction.