3 Replies Latest reply on Jan 24, 2010 12:24 AM by Sean S Murphy

    Is there any way to push data from server to Flash client?

    kazunori_279

      Hi,

       

      I want to push some data from server (like Amazon EC2 instance or Google App Engine) to Flash client via Stratus. For example, a bot working on the server would send chat messages to the clients. Is it possible? It would be nice if Stratus provide a HTTP interface which works as a gateway to RTMFP... any ideas?

       

      Thanks,

       

      Kaz

        • 1. Re: Is there any way to push data from server to Flash client?
          Sean S Murphy Level 1

          I don't think that's the purpose of Stratus at all. Stratus is a peer exchange server. There are much easier solutions to what you are suggesting than trying to hack out a stratus solution. Although it is possible to set up a air app on your server instance that would be one of your peers or in your group, and it could "push" data out to the clients.


          I would highly look into using something like blazeds, lcds, fms, amfphp, or even a simple polling http:// request every few seconds to some script on your server that generates your bot chat, and displaying that in your app. Polling channels on blazeds and lcds would probably be your easiest bets to write a server to client chat application.

           

          Sean Murphy

          http://www.murphysean.com

          • 2. Re: Is there any way to push data from server to Flash client?
            kazunori_279 Level 1

            Hi Sean,

             

            Thanks for the reply. Yes, I understand that the main purpose of Stratus is the inter-client communication, not the client-server. And for the server-to-client push, I've using many solutions include blazeds, sockets, comet and etc, and those should be the better than RTMFP.

             

            Maybe I should have explained the background more: I'm using Google App Engine as the server and it does not allow us to use the ordinally push technics like blazeds messaging, sockets and comet for the following reasons.

             

            - App Engine counts the time required for HTTP request processing and billing against it. It will be so expensive to use long polling or comet on it.

            - App Engine do not allow us to open a socket listner.

            - App Engine provides XMPP client feature as an only mean of realtime push, but it seems nobody has been successful on connecting AS3 client with App Engine XMPP client via various XMPP servers (like GTalk and ejabberd.org) because of incompatibility problems. I've tested three different AS3 XMPP libraries.

            - I just don't like the polling - it's not quick.

             

            Now I have to use an EC2 instance just for running a socket relay server to distribute realtime messages to the Flash client, while all the other application codes resides in the App Engine. I've looking for a way to support the realtime messaging by the App Engine alone. Any ideas?

             

            Thanks,

             

            Kaz

            • 3. Re: Is there any way to push data from server to Flash client?
              Sean S Murphy Level 1

              well... When it comes to http and the data push on gae, it seems if you opened a socket connection to their server, and pushed simple requests down the pipe (keeping the connection open via 1.1, ie poll every second or so - you would have fast speeds on getting your data down) but then you mentioned that they charge you extra for http requests??

              From the sounds of it, perhaps gae isn't the best solution at all for your needs then. Inherently there will need to be some sort of (near) constant connection made if you want to have the server push data to the client. I'd just move everything to the cloud or get a simple web host and push everything through polling...

               

              Good Luck,

               

              Sean