What's wrong with how we think about blockchain?
Often, when a blockchain solution is contemplated, it is regarded as an alternative to using established database technology. A better way to look at it is that blockchain complements traditional databases by providing capabilities that a centralized database can’t. What blockchain adds is a greater assurance of trustworthiness, and that can be a big deal.
Coupling a Virtual Supercomputer (VS) to Blockchain
Database tools can make blockchain applications more responsive and easier to build.
Combining blockchain and database technologies
As opposed to using blockchain for the main distributed database, we suggest combining the power and
efficiency possible from relational databases with the fraud resistance and assurance of
immutability provided by a blockchain ledger. In financial processing, using a small number of
blockchain transactions done at critical points, one can reliably document and secure a much larger
number of actual database calculations and transactions.
Blockchain allows for the creation of distributed ledgers that can detect tampering with the
database and, for example, pause payment processing as a defensive response. For arm’s-length
security, this approach depends on independent parties maintaining copies of the ledger outside the
control of the database administrator. Hyperledger Fabric, available through major cloud service
providers, provides the infrastructure for storing distributed copies of financial records and
protecting the validation “chaincode” itself. In short, the addition of blockchain provides a way to
keep a centralized database honest.
We recommend a unique model for integrating blockchain transactions and database transactions with
an emphasis on scalability, security, and rapid auditability. The model is a good fit for automating
the financial side of many complex SaaS web applications, particularly when large amounts of money
are flowing between many independent participants. Blockchain ledgers can make promises that the
databases can’t, but databases are easier to program, faster, and do useful things that blockchains
can’t.
When intermediaries play a major role, blockchain is needed
We’re concerned with financial applications involving a primary intermediary and large amounts of money flowing between many parties. Whatever technology is used, be it relational or non-relational, distributed or not, some kind of central database is necessary. Someone must have physical, administrative control of that database, and the intermediary is the logical choice. The crux of the problem is that traditional database technology by itself can’t prevent abuse by the principal administrator. Thus, the key point of blockchain is to provide an added level of protection against abuse, even by the intermediary.
The blockchain only needs to track a subset of complex accounting activity.
Overcoming scalability limitations in blockchain systems
Blockchain technology comes with a lot of overhead compared to traditional databases (extra network
traffic, exchanges of certificates, encryption and decryption, redundant storage, transaction
endorsement and validation, etc.). It is widely thought that one must accept these inefficiencies in
order to gain the security that blockchain affords - but this is not the case.
We propose a more selective basis on which to use blockchain to achieve its security benefits
without a substantial performance penalty. In our model, the blockchain maintains an exact copy of a
small but sufficient subset of the database, along with the validation logic needed to audit
database processing. There is much less work done on the blockchain than on the database itself, and
blockchain processing runs slightly behind database processing. Nevertheless, the blockchain’s
stripped-down contents and validation logic provide each node with everything it needs to
independently verify the integrity of the relevant portion of the database.
The proper role of blockchain validation
Validation logic for financial transactions can be very complicated. This kind of logic is much more
easily and efficiently implemented using well-established database technology than through the
restrictive facilities of blockchain. There are many types of validation that are simple to program
against a database but require considerably more programming in chaincode. Examples include
referential constraints (does this code, item number, or ID actually exist?), uniqueness checks, and
determining whether an item is still available.
The more sensible role for blockchain validation is to perform those simple checks that are financially material and critical to the participant who owns a given node.
For example, a customer wants to know that the invoice being paid is the same version that was approved.
Any participating entity can have a copy of the ledger, with the guarantee that all transactions have passed validation rules installed on the blockchain node under its control.
Limitations in blockchain transaction processing
Financial transactions, such as recording sales receipts and generating payments,
involve a series of interdependent calculations and changes to multiple records.
Conventional database systems allow these operations to be grouped into “atomic” transactions.
Either all the changes take effect or none of them do. Other users never see a partially completed transaction.
Even after a system failure, the database is recovered to a consistent state.
Blockchain systems such as Hyperledger Fabric lack the general-purpose transaction processing mechanisms that make financial transactions easy to program safely.
Too much of the responsibility for coordinating operations, preventing interference between concurrent transactions, and recovering from failures is left to the application programmer.
Limitations of blockchain security
Blockchain systems such as Hyperledger Fabric provide mechanisms for restricting access to
transactions and data, including separate communication "channels" and private data collections. Our
approach uses a central (possibly distributed) database as the starting point and principal arbiter
of transactions. Such a database-centric model can help with the combinatorial access control
problem that results from distributing data across multiple, independent blockchain nodes.
Furthermore, a database-centric approach can reduce unnecessary exposure of sensitive data.
When the initiation and primary execution of transactions depend on the blockchain, access
permissions must be established for the various combinations of interacting parties. Even a few
hundred parties can have tens of thousands of potential private business relationships. Managing the
corresponding blockchain channels, private data collections, and access permissions can become a
substantial administrative and programming burden.
The more scalable solution is for blockchain transactions to mirror selected records from successfully completed database transactions.
In this model, each party communicates directly with the database,
which handles the access control requirements of the application. The blockchain simply serves as a
mechanism to assure auditability. Each party need only have access to blockchain records pertaining
to that party. Both parties involved can have their own private blockchain copy of a given
transaction. Thus, our database-centric approach also reduces unnecessary data exposure.
Efficient processing on the database server is unimpeded by asynchronous blockchain services.
Blockchain processing with a Virtual Supercomputer
A good way to build large-scale financial blockchain applications would be to use what we call a “Virtual Supercomputer” architecture.
In this design, the database is used to coordinate a network of loosely coupled web and application servers.
Each application engine looks for work by searching through records retrieved from database queues.
This model can effectively combine the available processing power and resources of a large number of ordinary commodity and cloud virtual machines.
Regardless of the choice of database development tools, here are some of the features that can simplify building real-world blockchain applications:
- Data dictionary with integrated security and distributed computing
This simplifies building sophisticated, custom database applications.
- Efficient transactional queuing
Tight integration with standard database transaction processing assures rigorous multi-user synchronization and recovery from failures.
- Scalable distributed processing facilities
A database-centric architecture provides the basis for building an easily extensible Virtual Supercomputer. Loose coupling to asynchronous blockchain services avoids degrading database performance.
Our open source toolkit, Base One Foundation Component Library (BFC), provides these capabilities.
(Wikipedia article on BFC)
Conclusion
Blockchain ledgers can greatly reduce the potential for fraud, and this can be achieved with little
performance penalty if the right design is chosen. By retaining the transaction processing
capabilities of established database technology, a database-centric approach simplifies programming while achieving greater
security and scalability. This opens up a surprising number of blockchain applications worthy of consideration.