3 Replies Latest reply on Apr 23, 2007 7:06 AM by Mete Atamel

    Server Pushed Messaging Over HTTP

      Hey guys,

      I have a question on Flex messaging. I am new to Flex data services. Can somebody let me know if you guys have encountered the same?

      We wanted to use the Flex Messaging for showing real time alerts in our application. We want to use Push mechanism and the message channel that supports this is RTMP protocol. RTMP uses the port number other than HTTP port number. The problem is our application is behind the firewall and we have security retrictions on opening a new port for RTMP.

      Is there any way that we can use RTMP over HTTP. I have seen an article saying that Flex channels are designed to be extensible, such that independent software vendors may craft their own channel implementations and integrate them into Flex Data Services. Is it possible to have our own PUSH implementation that can run over HTTP. Please let me know if anybody has used such implementation. OR if we have any solution that we can use PUSH messaging that uses HTTP.

      I appreciate your time and help.

      Best Regards,

        • 1. Re: Server Pushed Messaging Over HTTP
          knallore_adobe Level 1
          Have you tried using amf-polling or http-polling channels?

          • 2. Re: Server Pushed Messaging Over HTTP
            raghuposan Level 1

            Thanks for the response. We tried amf-polling and executed successfully. The problem with polling is even if the user does not do any operations and as the polling process makes a continuous request to the server the application will not timeout as mentioned in the siteminder policy server.

            To overcome this we want to use the flex messaging PUSH mechanism and now we have the restriction of RTMP protocol used by Push mechanism and RTMP uses Non http port number.

            Best Regards,

            • 3. Re: Server Pushed Messaging Over HTTP
              Mete Atamel Level 1
              raghuposan, in FDS 2.5 which is now called Livecycle Data Services 2.5 (and it's currently in beta mode on Adobe Labs), there's a new feature called HTTP push. It's not server push per say but it acts like one. The way it works is that when a client polls the server (using amf-polling or http-polling), if there are no messages for the client, the poll thread will wait on the server until a new message arrives. When the new message arrives, the poll thread wakes up and client gets the message. This can be an alternative to RTMP in your environment. All you need to do is to setup a few parameter on HTTPChannel and AMFChannel definitions as explained below:

              <!-- Optional. Default is 0. This parameter specifies the number
              of milliseconds the server poll response thread will wait
              for new messages to arrive when the server has no messages
              for the client at the time of poll request handling. 0 means
              that server does not wait for new messages for the client
              and returns an empty acknowledgment as usual. -1 means that
              server waits indefinitely until new messages arrive for the
              client before responding the client poll request.
              <!-- Optional. Default is 0. This parameter specifies the maximum
              number of server poll response threads that can be in wait
              state. When this limit is reached, the subsequent poll requests
              will be treated as having zero wait-interval-millis.

              So if you want to use HTTP push instead of RTMP push, you would set poll-interval-millis parameter to zero (which means poll as much as you can), then set wait-interval-millis to -1 (which means wait on the server forever) and set max-waiting-poll-request to something non-zero. That way, client will poll, if there's no message for it on the server, it'll wait forever until a message arrives and as soon as message arrives, client will get the message and poll again. So there are no wasted polls.

              Let me know if you need further info.