Wednesday, January 13, 2010

difference between asynchronous and synchronous request

The difference between asynchronous and synchronous interaction is that when it is synchronous you have to do each step at the time. You cannot do two things - or what is called multitasking.

Take uploading a file. To do this, you have to:

1. Select the files you want to upload
2. Click the upload button
3. Wait for the files to be uploaded
4. Work with them

You cannot chose to upload another set of files while the first ones are being uploaded, nor can you start to work with them (like adding tags) before the upload process has completed. The interaction is synchronous.
With asynchronous interaction you can do other things while the system uploads the file.

Or take a kitchen, which is asynchronous by design. While you are e.g. baking bread, cooking spaghetti and frying some meat - you are also making the salad. The result of this multitasking behavior is that you can prepare a nice dinner in about 30 minutes. If you had to do the same in a synchronous fashion it would take hours, and most of the food would have gotten cold before everything was finished.

No comments:

Post a Comment