Oracle Design Patterns
All oracles perform some key roles based on their capabilities including the ability:
- Derive data from any non-blockchain source.
- Send data on-chain leveraging signed messages.
- Store the data in a smart contract to make it accessible.
Once done, other automated agreements can easily access the stored data through message calls invoking the “retrieve” function.
The three design patterns to set up an oracle are:
- Immediate-read: These oracles provide data required for quick decision-making, based on queries that work on a “just-in-time” basis, with information derived only when needed. Sample the dial codes or airport identification and oracles related to academic certificates.
- Publish-subscribe: This oracle provides a broadcast data service that could change information and be polled by smart contract on-chain or watched by off-chain daemon for constant updates. These designs span weather data, volatile price feeds, social statistics, and routine traffic data.
- Request-response: This pattern includes a large data space for storage in smart contracts. Users can access a small portion of the information at any point in time, making this pattern perfect for commencing a viable business strategy for veteran data providers. It could be implemented as a system of on-chain smart contracts and for monitoring requests.
Blockchain Oracle: Types, Uses and How it Works
The term “blockchain oracles” might seem familiar if you’ve been keeping up with the development of the infrastructure supporting smart contracts and blockchains. The blockchain industry is developing in its data-rich setting. Any data from the external world can’t just “communicate” to a blockchain; it has to be entered by hand. However, this is labour-intensive and prone to bias or mistakes. Oracles allow blockchains to interact in real-time with not only other digital information but also with regular, everyday things like smart devices.