EOS For Investors: Parallel Processing on the EOS Blockchain

in #eos6 years ago (edited)

Eos is a decentralized operating system. What is that?

Much like Windows, Linux, and MacOS, EOS.io has all of the essential developer tools needed to build large scale applications. Some of these features are Account Permisions, Multi-threading, File System, Event Scheduling, and more. The feature being highlighted in this article is "Multi-threading" also known as "Parallelism".

Why is "Parallelism" an important and valuable feature for developers, and ultimately for the user experience? The simple answer: speed.

Why are multiple lanes in a highway important for drivers? The answer is obvious of course; multiple lanes create a more frictionless driver experience by reducing traffic. This allows more people to be driving down the highway at once, thereby reducing the time it takes you to get to your destination.

So what does it mean for developers to have the option of "multiple lanes" on the blockchain highway?

Ultimately, this phenomenon called "parallelism" is essential to reduce the waiting time for a computational instruction to be performed. Without it, our various applications that we spend time with would not run fast enough to handle all of the processes that we wish to run.

Imagine you are playing your favorite computer game. Can you see why you would you want the graphics of that game to be rendered in parallel? If each individual pixel had to be drawn to the screen in sequence, one after the other, you would not be a happy gamer. The picture quality would be so bad you would hardly want to play it. Now imagine if we could draw millions of pixels at the same time using multiple cpu cores, or using a high end graphics card. Are you starting to get the picture (no pun intended)?

To think of it another way, think of all the computers in the world. You could say that they are all running in parallel (simultaneously), right?

Imagine a world where we all shared one computer. How long would it take before you had a turn to use the computer? You might die before your turn, and you would certainly give up on even trying to compute the task at hand.

Why is this important for a blockchain such as EOS? After all, we are not putting pixels on a blockchain, right?

I haven't seen anyone find an economically viable reason to put pixels on a blockchain; that would really stretch my imagination, so we won't go there. But if we are trying to process a smart contract between two corporations, or we are trying to process the transaction at your favorite coffee shop, then we should see some gains by going parallel, right?

Well, yes and no. Not all computations can, nor should they, be put in parallel. An example of something that should not be processed in parallel is a financial transaction.

If Alice pays Bob 5 Eos coins, and Bob then wants to pay Hussein that same 5 Eos coins, then we have to wait for Alice's payment to Bob to clear, before we allow Bob to spend that 5 Eos. If not, then we are allowing Bob to pay Hussein with money that Bob does not possess.

What transactions can be processed in parallel?

To put it simply, many apps can benefit tremendously from this technique. An example of one to consider would be an upvote on a Steemit blog post, such as this one ;-). Do we really need to process upvotes sequentially? Not for any reasons i can think of.

This app could certainly benefit from processing upvotes in parallel, because Steemit is a growing website with perhaps a million or more users, and it is likely that we could see hundreds of votes a second on such a site. If so, we could greatly reduce transaction speeds if we were to put all non-sequential transactions in a parallel processing queue.

Next in EOS For Investors Series:

What about Scalability?
https://steemit.com/eos/@hassananon/eos-for-investors-what-about-scalability

This is not financial or investment advice. Please do your own research or ask a licensed financial expert for such advice. This is just my thoughts and opinions that I wish to share.

Sort:  

Congratulations @hassananon, you have decided to take the next big step with your first post! The Steem Network Team wishes you a great time among this awesome community.


Thumbs up for Steem Network´s strategy

The proven road to boost your personal success in this amazing Steem Network

Do you already know that awesome content will get great profits by following these simple steps that have been worked out by experts?

I upvoted in Parallel ;-)

Coin Marketplace

STEEM 0.28
TRX 0.11
JST 0.034
BTC 66258.39
ETH 3170.93
USDT 1.00
SBD 4.07