Summary
In taking issue with a comment by James Gosling on the robustness of Flex's communication protocols, Yakov Fain discusses the Flex remoting protocols used in Flex Data Services and in the recently open-sourced BlazeDS.
Advertisement
When Adobe announced the open-source release of its BlazeDS suite of data management software last month, it also made available the specifications of its Action Message Format, Flash's remoting protocol. While a general-purpose remoting standard for the Flash VM, AMF can be implemented in any language. Adobe's BlazeDS includes a Java-based implementation.
While discussing the merits of Flex for rich-client applications in a Redmond Developer News interview, James Gosling mentioned that Java allows more complex networking protocols to be used in a rich-client UI. Since many Java or enterprise developers are not very familiar with AMF, Yakov Fain explains in a recent editorial, Can You Use Flex Communication Protocols for Mission-Critical Trading Applications?, why he thinks Flex does have indutrial-strength network protocol support already:
Flex offers a server-side piece called LiveCycle Data Services ES, which comes with a couple of fast communication protocols: AMF – a binary protocol that makes calls over HTTP from client to server (polling), and RTMP – real time messaging protocol that supports real time push from the server to the Flash client... AMF goes open source in a month or so... Security is similar to Java applets (sandbox) and you can use RTMPS instead of RTMP... RTMP is easy to integrate with other messaging systems via JMS. RTMP is built using Java non-blocking IO and it supports the data push needed in most Web applications.
Under the hood, AMF and RTMP protocols implement object serialization, so an instance of a Java object gets serialized on one end and is re-created as an instance of the ActionScript object on the client inside Flash Player, which is nothing else but a VM. On the way back, an ActionScript object is serialized on the client and gets re-created in the server’s JVM as a Java object.
One of the most important features of the Flex framework is that it’s extendable. The server side of the implementation of these protocols is written in Java, and the client side in ActionScript 3.
What remote protocol would you use in a situation that required truly mission-critical communication between a rich-client interface and a server-side application? Do you think Ajax is ready for the task?