Subscriptions
Last updated
Last updated
For peer-to-peer data sharing to work, we need a few things. First, we need to know who wants a copy of our data. Second, we need to receive payment for our data. To tackle both of these problems, Oz uses Data Subscriptions.
A subscription entitles a network participant to receive the data generated by a data provider using a single Sense Agent for a period of time.
Subscriptions are extremely flexible, and allow all data transfer to remain secure, transparent, and user controlled.
Web2 Analogy
Subscribing to a data feed from a collector is a lot like subscribing to a YouTube Channel. When a YouTube content creator publishes a new video, their subscribers are notified of the publication.
Oz Subscriptions result in the same outcome. When a data provider shares a new piece of data via a collector, that data is sent to all of their subscribers.
The key difference is that with Oz, there is no intermediate. Data is sent directly to all interested parties, so no single entity has a monopoly over it.
Subscriptions are on-chain records that instruct a data provider to share data from their collector with a given subscriber.
When a new subscription is created, the subscriber specifies which endpoint they would like the data to be sent. When collectors generate new data, they will POST each record to this endpoint using HTTPS requests.
Fees
To subscribe to a data provider's feed, the subscriber must pay a fee. This fee is split between the data provider and the collector developer at a ratio defined in the collector contract. In most cases, the fee is split with 80% going to the data provider and 15% going to the developer.
Validation
Each collector developer must define a schema for the data they intend to collect via their collector. The collect itself should validate that all data they're sending matches the defined schema.
Subscribers should also implement validation.
If a data provider is consistently sharing data that does not pass validation, it is likely that the data provider is dishonest. Failing to pass validation should impact a data provider's reputation score (see Reputation for more details).
Duration
Subscriptions are created for a predefined period of time. While the subscription is active, the data provider will share data with their subscribers. Once the subscription ends, data sharing will also end.
Reputation
At the conclusion of a subscription, data providers will have a good understanding of the quality and quantity of data shared by a data provider.
At this time, the subscriber can share a reputation score for a given data provider. The data provider's reputation is stored publicly on chain, so future subscribers can get a clear picture on the quality of data shared by each data provider.