Too many programming terms, Synchronous/Asynchronous Communication

in #programming7 years ago

Continuing this series with a quite important topic which should also be important for non-coders.
Additionally, the understanding I want to provide will be important for my next programming challenge.

Let’s start with an easy example.

fritz1.png

Little Fritz grew up and became smarter and started talking with his friends about school.
He and his friend are next to each other, discussing important subjects.

Now in this case, since they’re standing in front of each other, we have a clear case of

Synchronous communication

That means we can be sure that the messages both send reach each other infinite time (Like, really short)

We need no guarantees that they understand each other though.

Now, Fritz went home from his school and decides to call his friend because they weren’t able to finish discussing the important matter.

fritz2.png

Now since those two are on the phone and live reaaally far away from each other, we can’t be that sure anymore if and when a message arrives since we don’t know what might be happening between those two. Therefore, we have a case of

Asynchronous communication

There might be a beaver chewing on the cable, his grandma digging for copper cables or just a lot of traffic since the whole city is having as intellectual discussions as those two.

But, still, in the case of those two kids, we don’t expect any bigger delays usually, so, in order to leverage the differences between both let’s get to the next example.

Little Fritz has only one grandma, who gives him a lot of chocolate when he visits her.

He loves visiting Grandma Berta, while he is at her house he is able to talk to his grandmother and, while she is thinking about a response and then talking he is able to eat the whole chocolate bar at the same time.
This is the perfect case of Asynchronous communication.

fritz3.png

Because while Fritz is waiting for the next messages to work on his is able to execute other tasks.

Let’s finally put this in a computer-related context.

Imagine you have an application which has to query some data from the web.
As you should’ve understood by now, in this case, we’re talking about asynchronous communication since we have no idea when the data will get back to our application.
Obviously, we don’t want to wait until the data arrives before continuing the application or else our user will be really mad at us.
That’s what we use asynchronicity for, at the very start of the application we will issue the data to the web, then, while we’re waiting we will execute other tasks, allow user input etc.
And then, when the data finally arrived we will display it to the user.
Meanwhile, we can make him show the content which already finished loading.

I hope you ended up learning something today, until the next issue!

Sort:  

Upvoted. I'll be resteeming this now :]

Nice, thanks =) Great you liked it

My husband is a developer and he tried to explain all this to me once in a while. Bdw you have explained it very

Congratulations @raycoms, this post is the seventh most rewarded post (based on pending payouts) in the last 12 hours written by a Dust account holder (accounts that hold between 0 and 0.01 Mega Vests). The total number of posts by Dust account holders during this period was 3401 and the total pending payments to posts in this category was $944.84. To see the full list of highest paid posts across all accounts categories, click here.

If you do not wish to receive these messages in future, please reply stop to this comment.

Congratulations @raycoms! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Congratulations @raycoms! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 62423.89
ETH 3202.33
USDT 1.00
SBD 3.81