How does Synchronous and Asynchronous communication work exactly

后端 未结 2 1991
误落风尘
误落风尘 2021-01-30 01:45

I was trying to understand the terms Synchronous and Asynchronous communication but i am getting confused a bit. I tried to dig a bit into this but there are still confusions.

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 02:29

    Calling someone on telephone is synchronos. Communicating with him per mail is asynchronous.


    synchronous

    When I call you on the phone, I dial your number and WAIT until you pick up. Then you say something, and in the very same moment I listen to you. When you finished, I send you data (talk to you) and in the same moment you receive them (listen to me). At the end of our communication one of us says "END OF TRANSMISSION" (Good Bye), the other says "Acknoledged" (Good Bye) and then both ring off.


    asynchronous

    I write you a letter. I put it to the postoffice, and it will be sent to you. I the meantime I do NOT WAIT. I do many different other things. Then you receive the letter. You read it while I still do many different other things. Then you write me an answer and send it to me. In all those things I am not involved. At the next day I get a (synchronous) message (a signal) from the system (postman). It (he) says: "Here is a message for you". Alternatively I could poll my inbox every five minutes to check if a new letter is there. Then I pause my other work, receive your letter and read your answer. Then I do something according to this answer. But this are things you will not notice, because you are not involved in what I do with your asynchronous answer.

提交回复
热议问题