Re: Ajax Latency: Myth, Reality, and Solutions

Dion, Jep and Harry have all wondered about how to cope with multiple concurrent XMLHttpRequest calls, and asked what will break.

One of the DWR unit tests configurations is to run all 200+ tests in parallel. I then load up IE/FF/Op all doing their 200 tests at the same time, at the same time.

I can say that the iframe implementation of Ajax on DWR creaks under IE, but XHR works just fine everywhere. That is to say the server correctly replies to all 600 vaguely concurrent requests without error. To be honest I'm even surprised that Windows can cope.

The lesson is - don't write your own Ajax code. Use a library like prototype or DWR.

You can run the tests yourself. Just download the war file, deploy, go to the /dwr URL, click on the unit tests link and play. Tell me if you manage to break it!


Comments have been turned off on old posts