Difference between revisions of "Web Speed"

From Internet Computer Wiki
Jump to: navigation, search
m
Line 1: Line 1:
In order to reach web-speed, web3 services should be indistinguishable from web2 apps in terms of speed. Considering that web2 now has had decades to optimize processes, there is a particularly high bar that distributed and decentralized protocols need to meet. Canister smart contracts are fast and performant to allow developers to build anything. The design goal aims to facilitate developers to build consumer-facing experiences that are as fast as they would expect from centralized web2 servers. Dapp developers do not need to choose between "smart contracts" and "fast." In short, dapp users experience is so fast that users should not notice if their web experience is running on a blockchain or centralized provider.
+
'''To achieve mass adoption, web3 dapps need to run with speeds indistinguishable from web2 applications. The Internet Computer provides a unique solution by splitting calls into query calls (read) and update calls (write) where reading has a latency of 200ms, speeds comparable to traditional web services. Thanks to this architecture, users can experience web speeds without sacrificing the security provided by the blockchain.'''
  
 
===Read vs Write calls===
 
===Read vs Write calls===

Revision as of 16:14, 30 August 2022

To achieve mass adoption, web3 dapps need to run with speeds indistinguishable from web2 applications. The Internet Computer provides a unique solution by splitting calls into query calls (read) and update calls (write) where reading has a latency of 200ms, speeds comparable to traditional web services. Thanks to this architecture, users can experience web speeds without sacrificing the security provided by the blockchain.

Read vs Write calls

A common practice in computer science and databases is to separate tasks into read tasks and write tasks. As the former are less 'expensive' in terms of time, categorizing types of calls can substantially help to increase the efficiency of a program. As a blockchain partly acts as a distributed database, it is useful to consider this separation of tasks in this case too. Following this line of thinking, the Internet Computer facilitates two type of transactions, query calls (read-only) and update (write) calls.

From a blockchain POV, performance tests shows the IC latency at 200 milliseconds for query calls (reads) and 2 seconds for update calls (writes). As of December 1, 2021, The Internet Computer can handle 250,000 queries per second and 11,500 update calls per second.

Chain Key Cryptography

The main advantage of using a blockchain or decentralized protocol is that the central point of trust is removed. This advantage comes at a cost; trust is not removed, it's decentralized which means that multiple people (or machines or nodes) need to agree on the 'truth' at a given point in time. For multiple people/nodes to agree, they each sign their version of the truth, and each verify all of the others' signatures. In most blockchain protocols, this is the large source of inefficiency as verifying many individual signatures can be slow. One of the key innovations of the IC is the introduction of Chain Key (CK) Cryptography which allows IC signatures to be verified with a single public key, hence reducing friction for all types of devices (node machines, laptops, mobile phones) that want to efficiently interact with a blockchain with the same speed and security of web2, but without the centralization.

Scalability

Another advantage of CK Cryptography and the Internet Computer lies in the architectural design. In order to reach web speed, the IC needs to process increasingly large numbers of transactions. This requires the network to be able to scale quickly in order to process all those transactions. CK cryptography also facilitates nodes to onboard, catch up, and recover in the event of a hardware failure which all allow the IC to scale infinitely. Decentralized infinity.