A little over a month ago, I wrote an article detailing how one could scale a completely blockchain-based application using something I dubbed as “Instant Gratification Layers” (obviously very high level and theoretical).
The idea behind this concept is rather simple - spawn an offchain process for a specific purpose and context. This process should be something that doesn’t require the state of the chain to be accessed during use, but would still be useful to include with each instance of a node in order to keep the continuity of a particular application intact.
While it seems logical that this could utilize a Substrate off-chain worker - I believe this sorts of layers should be stateless when actually in use, very lightweight, context-driven, and have little impact on node performance. Almost akin to the microservices of web2 architecture.
In other words - we use the chain’s existing state to manage data and verify that whatever rules in place are being respected, but the actual processes occur off-chain.
A use case specific to a project I have been working on is messaging - it makes no sense to clog the network with “message extrinisics”, rather it’s better for the network to acknowledge the need for two users to communicate, establish a means for them to communicate, then delegate actual data processing to a trusted service within the node’s topology (that has no impact on consensus) that knows that the terms for communication are valid, then commence communication.
Beforehand, this service already knows certain limitations, i.e, the access rules defined by a user on who they wish to communicate to, and on what terms, but does not modify the chain’s state.
This presents a few immediate questions:
- Logically, would this setup make sense? Or is it merely what a “layer 2” solution would do for a blockchain already?
- Is this something off-chain workers can already do?
- What would be the best way to fit this sort of setup within a node’s topology?