Blockchain vs Scalability
Scalability is one of the most important aspects of software development. Be it blockchain, or any other technology, it is quite important to ensure that the application we are building is scalable and can adapt to any future requirement. This article is targeted at various software developers, project owners, and architects who have decided to implement blockchain into their tech stack but are concerned about scalability and adaptability.
Challenges of Web3
Depending on the current stage of the Software Development Life Cycle, the approach to scalability greatly differs. Before we start with the various possible approaches to scalability, let’s first start by understanding some of the challenges of using Web3 technologies.
Indexing Data
If we are using a blockchain similar to Ethereum (e.g. Ethereum, Polygon, Avalanche, etc.), it’s important to remember that there is no easy way to have multiple indexes. For example, if we are storing multiple money transfers, in a database first approach it’s very easy to perform operations like sorting by date or grouping by sender/receiver. However, in Solidity there is no native function yet to achieve this and hence something as simple as a filter or sorting of records can be a challenge.
Reading Bulk Data
We use RPC endpoints to connect with a blockchain node and read/write data from it. The downside of this is there is a limit to the amount of data that can be transmitted over the RPC endpoint. Hence, even though the data is securely stored in the blockchain, if we try to fetch the data in bulk, sometimes it’s observed that the RPC is not able to transfer the data, resulting in erroneous output. An example of this is if we try to fetch all the transactions recorded by a certain smart contract. Although we can have functions to return the data in bulk, if there are hundreds of thousands of transactions, probably, the RPC probably won’t be able to deliver the data.
领英推荐
Writing Data
While dealing with Ethereum-based blockchain, aka blockchains that use EVM for smart contract execution, we are required to pay a certain amount of “gas fees” while writing any data onto the blockchain. It’s also important to remember that when we try to write any data into a blockchain, it must go through a complex validation process. Both of these make writing data to a blockchain both expensive and relatively slow.
Another unique challenge that’s often faced by blockchain developers is that if two write operations are performed on the blockchain one-after-another, it’s not always guaranteed that they will be executed in the same order. The order of execution depends upon how much gas fees are paid and what is the total amount of data that must be processed. The blockchain would prefer processing an operation consisting of less data and higher gas fees over any other combination. Hence while designing a system for handling heavy traffic, one must be very cautious to ensure that concurrency is maintained wherever necessary.
Computational Threshold...............
For the full article please click here - https://xenabler.digital/blogs/blockchain-vs-scalability