massmind - Get Together - Communication and Flash

Skip to navigation

Get Connected on MassMind.com
Massmind Logo
Massmind is Powered by Your Contributions.

Methods Used to Communicate with Adobe Flash and Flex


Type Setup Cost Maintenance Performance Reliability Delivery Method Message Format Communication Best for
URL Variables Low High Very low Very low HTTP/HTTPS URL‐encoded text Asynchronous Simple data types
XML Connections Low High Very low Very low HTTP/HTTPS XML text Asynchronous Simple data types
Web Services Medium Low Low Medium HTTP/HTTPS SOAP Asynchronous Complex data types
Remoting Medium-High Low High Medium HTTP/HTTPS AMF/binary Asynchronous Complex data types
XML socket Services Medium-High Medium High High Sockets XML text Synchronous Real‐time systems
Binary Socket Services High Medium Very High High Sockets Custom Synchronous Real‐time systems

 

1. URL Variables – this legacy method uses HTTP form GET/POST to send and receive information much like a standard Web 1.0 HTML application. All information is sent in pain‐text and must be URL‐encoded. Serialization and deserialization must be performed manually.

Advantages

a.Does not require third‐party installation or setup.
b.Utilizes the HTML GET/POST standards
c.Highly customizable

Disadvantages:

a.Requires both the client and server to manually serialize and deserialize data.
b.Not practical for sending anything but simple data types.
c.Not recommended by Adobe for enterprise‐level or mission critical software.
d.Low performance – scripted parsing as well as plain‐text messages.
e.Asynchronous

2. XML Connections – this method provides a mechanism to send and receive static or dynamic XML documents between the client and the server. All information is sent in plain‐text and (hopefully) formalized by an XML schema. Serialization and deserialization must be performed manually. The XML schema is crucial to the success of XML connections.

Advantages

a.Does not require third‐party installation or setup.
b.Utilizes the XML standard
c.Can be used for complex data types
d.Highly customizable
e.Ideal for small projects and small amounts of data

Disadvantages:

f.Requires both the client and server to manually serialize and deserialize data. It has been projected that Enterprise projects which employ XML Connections as their primary communications inherit a 30% overhead (i.e., 30% of the project’s time and cost are spent dealing with serialization/deserialization issues that do not exist in other solutions).
g.Parsing XML on the client is high cost (in both time and performance)
h.Binds the solution to a specific schema which violates OOP and RPC development methodologies.
i.Not recommended by Adobe for Enterprise or mission critical software.
j.Low performance – scripted parsing as well as verbose protocol.
k.Asynchronous

3.Web Services – this method provides a mechanism to perform Remote Procedure Calls between the client and the server. All information is sent in SOAP format. Serialization and deserialization are automatically performed. The WSDT document requires proper OOP practices.

Advantages

a.Does not require third‐party installation or setup.
b.Automatic serialization/deserialization
c.Utilizes the SOAP standard
d.Promotes strong OOP across tiers
e.Can be used for complex data types
f.Highly customizable
g.Ideal for larger projects where open standards are more important than performance.
h.Superior to XML connections

Disadvantages:

i.Parsing SOAP on the client is high cost (in performance, the process is automatic)
j.Low performance – SOAP protocol is verbose. It is estimate that depending on the operation remoting can be anywhere from 10‐200X higher performance.
k.Asynchronous
l.Learning curve for some server‐side systems (i.e., Java, PHP)

4.Flash Remoting – this method provides a mechanism to perform Remote Procedure Calls between the client and the server. All information is sent in AMF format. Serialization and deserialization are automatically performed.

Advantages

a.Utilizes the AMF binary protocol, for low overhead
b.Automatic serialization/deserialization
c.Promotes strong OOP across tiers
d.Can be used for complex data types
e.Highly customizable
f.Ideal for larger projects where performance is more important than open standards.
g.Superior to Web Service connections
h.Reduces code required on both client and server

Disadvantages:

i.Requires third party product installation and development
j.Requires adherence to strict OOP principles
k.Initial learning curve
l.Asynchronous

5.XML Socket Services – this method provides a mechanism to perform synchronous communication between the client and the server. All information is sent in a custom XML format. Serialization and deserialization and acknowledgement must be performed manually.

Advantages

a.Provides synchronous communication
b.Most reliable since the socket connection is continuous and acknowledgements can be incorporated.
c.Utilizes a simple XML text protocol, ideal for simple messages
d.Highly customiz
e.Ideal for projects that require realtime interactivity (online games, etc.)

Disadvantages:

f.Requires third party XML socket server
g.Requires a messaging API along with a serializer/deserializer
h.Initial learning curve
i.Messages sent in text format, lowers performance due to parsing and bandwiDDh
j.Difficult to send complex data types across the wire

6.Binary Socket Services – this method provides a mechanism to perform synchronous communication between the client and the server. All information is sent in a binary format (can be AMF). All aspects of the implementation must be programmed manually.

Advantages

a.Provides synchronous communication
b.Most reliable since the socket connection is continuous and acknowledgements can be incorporated.
c.Utilizes a binary protocol, ideal for simple messages
d.Highly customizable
e.Ideal for projects that require realtime interactivity and highest performance (online games, etc.)

Disadvantages:

f.Requires third party socket server
g.Requires a messaging API along with a serializer/deserializer
h.Steep learning and programming curve