Is AMF so superior to SOAP or HTTP communication?

v2 modified on 2011-04-18

– added 2 other tests results and some moderations

Subtitle: the interest of compression


– César : Compression motocyclette, circa 1970 –


What kind of communication between 4D and Flex?

On 4D-Flex Google group, there was a question about AMF availability for 4D Server. The developer asking for a communication solution between Flex and 4D was referencing WebOrb web site.

Only HTTP and SOAP

Unhappily, there is no support for AMF in 4D, neither from the editor nor from the community. And due to the very nature of 4D language which is not OOP, I’m afraid there is not going to be one.

Apart from HTTP and SOAP support, 4D made an attempt to provide a direct connected SQL driver for Flex : 4D for Flex. Despite an initial interest from the community, it seems that this product didn’t find its way to success.

Two main reasons are maybe :

  • lack of support from Adobe of encrypted sockets communication in the Flash Player;
  • reluctance to embed SQL statements inside Flash app.

So, for 4D we stay with SOAP and XML over HTTP.

 AMF performances?

But, having a glance at webOrb web site after this initial question, I noticed an inline Flex application for comparing HTTP – SOAP- AMF. So, I tried.

And these are the results I got :



Not showing a tremendous superiority of AMF over the two other modes. Some noticeable gains can be expected, mostly for complex types, but for the two other tests, it’s not convincing so superior, though results may vary a lot from one test session to another one.

Don’t forget that the test are iterated several times, so depending on the kind of request, for a real project the AMF performance may not be really awesome for one request. Especially, if the request doesn’t carry large streams.  

In the case of large streams, you can really increase http performances using gzip compression, with no-extra coding effort as it is supported at the browser level.

So, is AMF such a winner?

PhilFlash great blog entry

On the same subject, Philippe Kirsch (philflash), a great French Flex Developer, has published a detailed entry on his PhilFlash blog : Flex HTTPService performance avec MySQL et PHP : XML : 1 – AMF : 0. Though it is written in french, I advise the reader to parse this page. There are code samples and you should get the main facts.

Here is the final chart showing the results of his testing:


If you consider the result for gzipped streams, it appears that the lack of AMF support for 4D Server seems not to be such a big deal.



Un commentaire

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:


Vous commentez à l'aide de votre compte Déconnexion /  Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )


Connexion à %s

%d blogueurs aiment cette page :