Author: Sam Williams, founder of Arweave; Translation: 0xjs@黄金财经
Can AO do the same TPS as Solana?
The answer is: much more. Why? Messages.
I have great respect for Solana's engineering, and the design is often underestimated by non-developers. Let's dive into the differences and trade-offs between AO and Solana.
Getting Started: What is Message Passing?
In computer science, when we want to process multiple inputs to a system (such as transactions) at the same time, we call it "parallelism." There are two basic approaches: shared memory and message passing. Let's look at each in turn.
Shared Memory
Solana is a very well optimized shared memory machine. This means that each contract can directly read and write to the memory of other contracts.
This allows "state" (the data in a program - such as balances, etc.) to be updated synchronously: they are all committed at once. This can be helpful, but it also means that when one user accesses some data in a program, no other user can modify it. They wait for each other in a process called "lock contention". Alice "locks" the data, modifies it, "unlocks" it, and then Bob can access it. They basically form a queue.
Shared memory systems can scale up to a point, and Solana pioneered the most optimized design I've ever seen in a trustless environment, but then it stops.
To scale further, you have to take a different approach...
Message Passing
AO is a super optimization of another route: message passing.
In AO, each "contract" is its own asynchronous process. Each process runs independently at the speed of a single CPU thread, sending messages to other processes when they need to interact. You can think of each program as a single program on your computer, or an extremely fast version of a rollup/chain of applications.
When you exhaust the throughput of one process of your application, you can split the application into any number of other processes.
More processes —>Higher throughput —>happier users.
There is no practical limit to the number of parallel processes hosted in AO. The only protocol limit is inherited from Arweave: no more than 2^256 bytes. In terms of scale, that’s more than there are atoms in the universe.
On the other hand, you can’t “globally” access the memory of all other processes in the network — you have to request information via messages.
Fortunately, the technology has been studied and deployed in computer science for over 50 years, making it simple to use. It’s called Actor-Oriented Programming, and that’s where the name AO comes from. Almost every service that users use on the internet is built using messaging — messages, websites, and the entire TradFi ecosystem. Even the internet itself is a messaging machine.
The innovation of AO is to apply this approach to blockchains and smart contracts. Because we already had to solve the scalability problem of on-chain storage in order to build Arweave, we built AO by using Arweave as the messaging layer, so it also inherits this scalability “for free.”
On-chain data at any scale —>On-chain messages at any scale.
The first use of this system may be in finance, but I don't think it will stop there. When every process is asynchronous, any number of computations can run in the network at the same time without affecting each other.
You can use AO to run a computationally intensive AI agent, while I use it to buy coffee at the store. Our processes are independent, so neither of us has to compete with each other for access to the system. There's no reason this can't scale to cover the entire world's computational load.
To summarize:
No shared memory via message passing, no lock contention, no capacity expansion.
The cost? Shared, synchronized access to global memory.
This cost is barely noticeable if you use the right tools provided by AOS. Looks like a pretty good deal.
This is a topic that computer scientists can discuss endlessly. There are a lot of nuances here, but if you made it to this point, congratulations, now you get the gist.
Solana is a well-designed machine that takes the shared memory paradigm to its logical conclusion in blockchain. The AO testnet has been online for 2 months and currently handles about 6% of Solana's user traffic.
AO has a bright future with unlimited scalability and growth.