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

Cesar_moto

– 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 :

Weborb-test

Capture_decran_2011-04-18_a_06
Capture_decran_2011-04-18_a_06

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:

Result

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:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. 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 )

Photo Google+

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

Connexion à %s

%d blogueurs aiment cette page :