5 Replies Latest reply on Oct 25, 2006 5:11 AM by marcel.panse

    Server-Push

    ciwee_ufrj
      I read somewhere that Flex Data Services provides Server-Push functionality. That is, the server starts a conversation with the client. It's obvious that, In order to such thing ocurr, there has to be a persistent connection between server and client.

      I've being reading about Data Management Service to learn how to implement this Server-Push and all I see is about a method called Fill() that is thriggered from the client and syncronizes it's data with the server. But it's not server-push

      Does it really exist?
        • 1. Re: Server-Push
          aBill Level 1
          Hi,

          When you create a DataService and fill your collection. The collection becomes managed. You don't have to call fill again if there is any change in the data. Server pushs updates to clients when the client's dataservice is using rtmp channel. It is a live connection between the server and the client. For example,
          you fill(collection, "hqsql", from products where price < 100). If one of the product's price increases, server push a message to your collection to remove it. If a product's product's price decrease, it will be added to the collection. The push is happened based on your fill method.

          William Chan
          • 2. Re: Server-Push
            ciwee_ufrj Level 1
            You made it clearer now Bill, thx!. So I'll keep studying how I'll do this. See ya!
            • 3. Re: Server-Push
              marcel.panse Level 1
              How does this rtmp channel work? I mean it isn't http based? Is there a open port directly to some server-side code or something?

              The problem i have is when there is a rtmp message request send for data from the server, it isn't going through any of the servlets, so it isn't captured by Spring/Java which does all the security through the servlets and the HttpSession (session scoped proxy bean from spring2.0) .

              This session scoped bean isn't available from a FDS call because it isn't session scoped...

              I don't think there is a solution to this? Configure the rmtp as a spring bean maybe?
              • 4. Re: Server-Push
                ciwee_ufrj Level 1
                RMTP is a persistent connection so it cant be HTTP. And yes it works in a different port. If you take a look at services-config.xml file in the /WEB-INF/flex/ from the sample applications that come with Flex Data Services you will see the channel configurations available. Search for them for better understanding.
                • 5. Re: Server-Push
                  marcel.panse Level 1
                  Thnx a lot.. ill think of another solution for our security model. I have enough info :-)