2 Replies Latest reply on Sep 23, 2010 4:19 AM by baluvg

    Comparison of number of bytes transferred over network while using HTTPService and RemoteObjects

    baluvg

      If I have to transfer data(say records of 100 employees in a DB) from Server to Client, I could use HTTPService and fetch the data as an XML file and then convert it to ArrayCollection in the Client. Or use RemoteObject and transfer the data in binary. Lets ignore other methods(Web Services etc) of data transfer for the moment.

       

      Now, for the same data, if I implement the application using HTTPService and RemoteObject, I notice that the number of bytes transferred over the network is less in case of HTTPService(XML) when compared to RemoteObject(AMF) which is a shock to me. My understanding is that AMF transfer should be more compact than XML. Ofcourse, once the data is available, RemoteObject result processing is noticeably faster than HTTPService result processing. My concern is why data transferred using AMF is larger than XML. As an example, you may refer to the samples provided in TourDeFlex. Refer to the following:

       

      HTTPService:

          Found in : Flex Data Access->HTTPService->BasicExample

          Link: http://www.adobe.com/devnet-archive/flex/tourdeflex/web/#docIndex=0;illustIndex=0;sampleId =12700

          Click on the 'Get Data' button to fetch the data.

          Bytes transferred - 1050

       

      RemoteObject:

          Found in : Flex Data Access->RemoteObject->BasicJavaRemoting

          Link: http://www.adobe.com/devnet-archive/flex/tourdeflex/web/#docIndex=0;illustIndex=0;sampleId =13300

          Click on the 'Get Data' button to fetch the data.

          Bytes transferred - 1440

       

      This is a significant size difference. You may see the data transfer size by using developer tools like the HTTPFox Firefox extension.

       

      Am I missing something here? Any help will be very much appreciated.

       

      Thanks,

      Balu