Web Speed

From Internet Computer Wiki
Revision as of 17:44, 29 August 2022 by Ais (talk | contribs) (Substantially extended)
Jump to: navigation, search

In order to reach web-speed, web 3 services should be indistinguishable from web 2 apps in terms of speed. Considering that web 2 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 web 2 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.

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 web 2, 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.