Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Flex Remoting and Messaging (2010)
1. Integrating Flex using AMF Remoting & Messaging in Flex Christopher Grant - crgrant@gmail.com 1/20/2010
2. Agenda What is AMF Data Integration Options in Flex Capabilities of AMF Why it is useful Benefits of AMF Where to get it Server Side Options for AMF How to use it Terminology Configuration Examples Simple Remoting Simple Messaging Custom Objects
4. Data Integration Options Hyper Text Transfer Protocol – HTTP HTTPService Simple Object Access Protocol – SOAP WebService Action Message Format – AMF Remoting RemoteObject Messaging Consumer Publisher
5. AMF Capabilities Remoting Services allow your Flex application to directly invoke methods of Java objects deployed in your application server. Message Services provide a publish/subscribe infrastructure that enables your Flex application to publish messages and subscribe to a messaging destination, enabling the development of real-time data push and collaborative applications.
7. Benefits of AMF Binary transfer is faster than text Objects are very small and are compressed using zlib Fast Serialization/ Deserialization Designed to serialize and deserialize quickly under low memory and slower CPU conditions AMF data is parsed directly into objects, meaning there is no lag for interpretation or parsing ActionScript Object format Support for Native Types and Custom classes
11. Terminology Channel Protocol-based conduits Channel Sets Improves the quality of service in the face of network failures or individual Channel problems Endpoint The server interface responsible for encoding and decoding data into messages Destination Client side reference to resources used for both publish-subscribe and point-to-point messaging Polling vs Streaming Polling opens & closes the connection by message Streaming keeps the connection open at all times
12. Channels, Set and Endpoints Oh MY! Client Destination EndPoint Channel Streaming Destination Destination EndPoint Channel Streaming Channel Set Destination EndPoint Channel Polling Destination
14. Config Files Services-config Need to tell flex where it is Setup with IDE Wizard Setup Manually Flex Compiler arguments: -services "C:...” Pointers to remoting-config.xml proxy-config.xml messaging-config.xml Used by Client and Server