Author : Sam
Reviewer : Kyle
Origin link:https://twitter.com/samecwilliams/status/1784008697351471154
🗨️ Context:
@NoNoiseCrypto asked Sam on X Platform: Can AO do the same TPS as Solana?
Sam replied: Far, far, far more.
And attached a thread explanation as follows.
The answer to OP below is: Far , far , far more.
Why? Messages.
I have huge respect for the engineering of Solana. The design is generally underrated by non-devs. Let's explore the differences and trade-offs with @aoTheComputer in-depth.
A Primer: WTF is message passing?
In computer science when we want to process multiple inputs (like transactions) to a system simultaneously we call this 'parallelism'. There are two fundamental approaches: Shared memory and message passing. Let's look at each in turn.
Shared Memory
Solana is an extremely well-optimized shared memory machine. This means that every contract can read and write directly to the memory of every other contract.
This allows 'state' (the data in programs -- like balances, etc) to be updated synchronously: They are all committed in one go.
This can be helpful, but it also means that when one user is accessing some of the data in a program, it cannot be modified by any other user.
They wait for one-another in a process called 'lock contention'. Alice 'locks' the data, modifies it, 'unlocks' it, and only then can Bob access it. They essentially form a queue.
Shared memory systems scale to a certain point -- and Solana pioneered the most optimal design of it I have seen in a trustless environment -- but then it stops. To scale further, you have to take a different approach...
Message Passing
@aoTheComputer is a hyper-optimization of the other route: Message passing.
In AO, each 'contract' is its own asynchronous process.
Each one 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 like an individual program on your computer, or an extremely fast version of a rollup/app-chain.
When you exhaust the throughput of one process for your app, you can just split your app across any number of other processes.
More processes → higher throughput → more happy users.
There is no practical limit to the number of hosted parallel processes in AO. The only protocol limit is inherited from Arweave: no more than 2^256 bytes. For scale, this is far more atoms than there are in the universe.
The flip-side of this is that you don't have access to the memory of every other process in the network 'globally' -- you have to ask for information via messages.
Fortunately, there is over 50 years of research and deployment of this technique in computer science to make it simple and easy to use. It is called Actor Oriented Programming, and is where AO gets its name.
Almost every service you use on the internet is built using message passing -- messengers, web sites, and the entire TradFi ecosystem. Even the internet itself is a message passing machine.
AO's innovation is to apply this approach to blockchains and smart contracts.
Because we already had to solve the scalability of onchain storage in order to build Arweave, we inherited this scalability 'for free' by building AO with Arweave as its messaging layer.
On-chain data at any scale → on-chain messages at any scale.
The first use of this system is likely to be in the financial arena, but I don't think it will stop there. When each process is asynchronous, any amount of compute can run in the network at the same time without any effect on one-another.
You can use AO to run a compute-heavy AI agent while I use it to buy coffee at a store. Our processes are independent, so neither of us has to bid against the other in order to access the system. There is no reason this cannot scale to cover the entire world's compute load.
To sum it up:
No shared memory via message passing → No lock contention → Scale.
The cost? Shared, synchronous access to global memory.
Given the right tools, which AOS provides, this cost is barely noticeable. Seems like a good trade.
This is a topic that computer scientists can discuss endlessly. There is lots of nuance here, but if you made it this far: Congrats. You now get the gist.
Solana is an exceptionally well engineered machine, taking the shared memory paradigm to its logical conclusion in blockchains. The AO testnet has been live for 2 months, and is currently handling ~6% of the user traffic of Solana.
Clear skies and free-scaling growth ahead .
🔗 More about PermaDAO :Website | Twitter | Telegram | Discord | Medium | Youtube
🏆 Spot typos, grammatical errors, or inaccuracies in this article? Report and Earn !
All Comments