The second type of external world pattern is a reverse verifier pattern.
The reverse verifier pattern is directly opposite to the verifier pattern.
In verifier pattern, we are using the external services and providing the validation to the blockchain.
But in the reverse verifier pattern, the validation is provided to the external services from the blockchain.
The reverse verifier works on the existing system, which relies on the blockchain or smart contracts
running on blockchain to validate the requested data and check the required status In a large software
system where blockchain is only one of the component.
The off chain components might need to use the data stored on the blockchain and smart contracts running
on the blockchain to check certain conditions.
Some of the domains for external systems are very large and mature.
These domains require the existing standards to be maintained.
For such domains, a non-intrusive approach is desired to leverage the existing complex system with
blockchain without changing the core of the existing system.
How to integrate this blockchain with the existing system.
Reverse verifier pattern provides the solution for the same.
The forces which are in effect which led to the creation of reverse verifier pattern are connectivity.
Integrating blockchain into an existing system to leverage the unique properties of blockchain is a
desired property by any of the enterprise solutions.
The second one is simplicity.
Simplicity is required because we want minimal changes inside our legacy system or enterprise system.
The solution for the same which is provided by reverse verifier pattern is based upon validations which
can be carried out by using a unique ID for the transaction or blocks.
This validation of the data can be implemented by smart contracts.
Running on blockchain and an off chain component is required to query the blockchain through using the
ID of the data, and the required data can be sent back to the external services.
The benefit of such a solution is that the blockchain will be integrated into the existing system through
adding the ID of the transaction as a piece of data into the system and using smart contracts to do
the data validation.
But there are certain drawbacks related to this kind of design pattern too.
We cannot take blockchain as a very simple solution which can be integrated to the existing system within
a non-intrusive way.
We might require to make certain changes through the system to read and write data from the blockchain.
Some of the known implementations for reverse verifier pattern are identity.
Identity provides a solution to enrich the payments in banking system with documents and attributes
through using blockchain identity invents the concept of identity tokens stored on a blockchain.
Every payment is associated with an identity token which is used to exchange and enrich the information
about a payment.
Another example could be related to Slock.it, which is aiming to build autonomous objects and a universal
sharing network through the use of blockchain and Iot devices.
These devices can sell or rent themselves and also pay for the services provided by the others.
In terms of renting a device, the availability information is stored on blockchain.
Thus validity checking can be done on blockchain.
This is the image depicting the reverse verifier pattern.
As you can see, we have blockchain on the left hand side and we have off chain services on the right
hand side.
This is directly reversed to the verifier pattern which we have studied before because here the data
is pulled by the external services from the blockchain and is validated as such.
Here we are fetching the data from the blockchain and is to be validated off chain at the external services
end.
This data, which is to be fetched from the blockchain, is going to pass through a reverse verifier.
This reverse verifier will act as a layered approach for the blockchain which will implement the services
in such a way that we don't require to change the external services or legacy systems to much extent.
The next type of external world pattern is the legal and smart contract pattern.
Now let's go and discuss about legal and smart contract pattern.