In Simple words and in non technical terms
SYNCHRONOUS
You are in a queue to get a movie ticket. You cannot get one until everybody in front of you gets one, and the same applies to the people queued behind you.
ASYNCHRONOUS
You are in a restaurant with many other people. You order your food. Other people can also order their food, they don't have to wait for your food to be cooked and served to you before they can order. In the kitchen restaurant workers are continuously cooking, serving, and taking orders. People will get their food served as soon as it is cooked.
---------------------------------------------------------------------------------------------------------------------
SYNCHRONOUS
When executing a sequence like: a>b>c>d>, if we get a failure in the middle of execution like:
a
b
c
fail
Then we re-start from the beginning:
Like below:
a
b
c
d
this is synchronous
----------------------------------------------------------------------------------------------------------------------------
ASYNCHRONOUS
If, however, we have the same sequence to execute: a>b>c>d>, and we have a failure in the middle:
a
b
c
fail
...but instead of restarting from the beginning, we re-start from the point of failure:
Like below:
c
d
...this is know as asynchronous.
No comments:
Post a Comment