mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
many improvements to content/concepts
This commit is contained in:
parent
125eb99ee1
commit
9c293236ed
@ -1,64 +1,64 @@
|
||||
---
|
||||
title: Software Components
|
||||
title: Architecture Overview
|
||||
description: Components, from top-level (GUI) downwards
|
||||
---
|
||||
|
||||
## Ocean Market
|
||||
## Overview
|
||||
|
||||
A [live](http://market.oceanprotocol.com) community-oriented data marketplace. [Here's](https://blog.oceanprotocol.com/ocean-market-an-open-source-community-marketplace-for-data-4b99bedacdc3) a blog post with more information.
|
||||
Here’s an overview of the figure.
|
||||
|
||||
It uses React Hooks, which in turn uses the JavaScript driver.
|
||||
- The top layer is **applications** like Ocean Market. With these apps, users can onboard data services into crypto (publish and mint datatokens), hold datatokens as assets (data wallets), discover data assets and buy / sell datatokens for fixed or auto-determined price (data marketplaces), and consume data services (consume datatokens).
|
||||
- Below that are **libraries** used by the applications: Ocean React hooks, JavaScript library, and Python library. This also includes middleware to assist discovery: Aquarius and (3rd party tool) TheGraph.
|
||||
- The lowest level has the **smart contracts** used by the libraries. They’re deployed on Ethereum mainnet to start, and other networks later.
|
||||
|
||||
<repo name="commons"></repo>
|
||||
Left to right are groupings of functionality: tools for datatokens, tools for markets (including pools), tools to consume data services and for metadata, and external ERC20 tools.
|
||||
|
||||
## React Hooks
|
||||
The rest of this page elaborates.
|
||||
|
||||
Building blocks to help building GUI-based frontends.
|
||||
## Datatokens & Access Control Tools
|
||||
|
||||
## JavaScript & Python Drivers
|
||||
The publisher actor holds the dataset in Google Drive, Dropbox, AWS S3, on their phone, on their home server, etc. The dataset has a URL. The publisher can optionally use IPFS for a content-addressable URL. Or instead of a file, the publisher may run a compute-to-data service.
|
||||
|
||||
Client libraries used by applications (such as Pleuston or Jupyter notebooks) to interact with Ocean components, including Keepers, Aquarius nodes, Brizo nodes, etc.
|
||||
In the **publish** step, the publisher invokes **Ocean Datatoken Factory** to deploy a new datatoken to the chain. To save gas fees, it uses [ERC1167](https://eips.ethereum.org/EIPS/eip-1167) proxy approach on the **ERC20 datatoken template**. The publisher then mints datatokens.
|
||||
|
||||
![How Squid is Used](images/ocean-squid-ecosystem.png)
|
||||
The publisher runs **Ocean Provider**. In the **consume** step, Provider software needs to retrieve the data service URL given a datatoken address. One approach would be for the publisher to run a database; however this adds another dependency. To avoid this, it stores the URL on-chain. So that others don’t see that URL, it encrypts it.
|
||||
|
||||
<repo name="squid-js"></repo>
|
||||
<repo name="squid-py"></repo>
|
||||
<repo name="squid-java"></repo>
|
||||
To initiate the **consume** step, the data consumer sends 1.0 datatokens to the Provider wallet. Then they make a service request to the Provider. The Provider loads the encrypted URL, decrypts it, and provisions the requested service (send static data, or enable a compute-to-data job).
|
||||
|
||||
Instead of running a Provider themselves, the publisher can have a 3rd party like Ocean Market run it. While more convenient, it means that the 3rd party has custody of the private encryption/decryption key (more centralized). Ocean will support more service types and url custody options in the future.
|
||||
|
||||
## Metadata Cache - Aquarius
|
||||
**Ocean JavaScript and Python libraries** act as drivers for the lower-level contracts. Each library integrates with Ocean Provider to provision & consume data services, and Ocean Aquarius for metadata. **Ocean React hooks** use the JavaScript library, to help build webapps & React Native apps with Ocean.
|
||||
|
||||
Ocean stores metadata of data assets *on-chain*.
|
||||
## Market Tools
|
||||
|
||||
To improve GUI responsiveness, Ocean Market runs Aquarius to retrieve the metadata from the chain and cache it locally (using MongoDB).
|
||||
Once someone has generated datatokens, they can be used in any ERC20 exchange, centralized or decentralized. In addition, Ocean provides a convenient default marketplace that is tuned for data: **Ocean Market**. It’s a vendor-neutral reference data marketplace for use by the Ocean community.
|
||||
|
||||
<repo name="aquarius"></repo>
|
||||
The marketplaces are decentralized (no single owner or controller), and non-custodial (only the data owner holds the keys for the datatokens).
|
||||
|
||||
## Provider
|
||||
Ocean Market supports fixed pricing and automatic price discovery.
|
||||
|
||||
Publishers run Provider to serve up a data asset when requested. Provider interacts with the publisher's cloud and/or on-premise infrastructure.
|
||||
- For **fixed pricing**, there’s a simple contract for users to buy/sell datatokens for OCEAN, while avoiding custodianship during value transfer.
|
||||
- For **automatic price discovery**, Ocean Market uses automated market makers (AMMs) powered by [Balancer](https://www.balancer.finance). Each pool is a datatoken-OCEAN pair. In the Ocean Market GUI, the user adds liquidity then invokes pool creation; the GUI’s React code calls the Ocean JavaScript library, which calls the **Pool Factory** to deploy a **Pool** contract. (The Python library also does this.) Deploying a datatoken pool can be viewed as an “Initial Data Offering” (IDO).
|
||||
|
||||
<repo name="brizo"></repo>
|
||||
Complementary to Ocean Market, Ocean has reference code to ease building **third-party data marketplaces**, such as for logistics ([dexFreight data marketplace](https://blog.oceanprotocol.com/dexfreight-ocean-protocol-partner-to-enable-transportation-logistics-companies-to-monetize-data-7aa839195ac)) or mobility ([Daimler](https://blog.oceanprotocol.com/ocean-protocol-delivers-proof-of-concept-for-daimler-ag-in-collaboration-with-daimler-south-east-564aa7d959ca)).
|
||||
|
||||
### Events Handler
|
||||
[This post](https://blog.oceanprotocol.com/ocean-market-an-open-source-community-marketplace-for-data-4b99bedacdc3) elaborates on Ocean marketplace tools.
|
||||
|
||||
Brizo communicates with the Events Handler to deal with Keeper Contracts events.
|
||||
## Metadata Tools
|
||||
|
||||
The Events Handler monitors Service Execution Agreement (SEA) events and acts as a provider agent to grant access and release rewards for the publisher/provider. This is a critical part in the process of consuming data sets in the Ocean Protocol network.
|
||||
Metadata (name of dataset, date created etc.) is used by marketplaces for data asset discovery. Each data asset can have a [decentralized identifier](https://w3c-ccg.github.io/did-spec/) (DID) that resolves to a DID document (DDO) for associated metadata. The DDO is essentially [JSON](https://www.json.org/) filling in metadata fields. [OEP7](https://github.com/oceanprotocol/OEPs/tree/master/7) formalizes Ocean DID usage.
|
||||
|
||||
Every provider in the network must run some sort of an events handler to be able to fulfill the access condition of an `Access` service in a Service Execution Agreement.
|
||||
[OEP8](https://github.com/oceanprotocol/OEPs/tree/master/8) specifies Ocean metadata schema, including fields that must be filled. It’s based on the public [DataSet schema from schema.org](https://schema.org/Dataset).
|
||||
|
||||
<repo name="events-handler"></repo>
|
||||
Ocean uses the Ethereum mainnet as an **on-chain metadata store**, i.e. to store both DID and DDO. This means that once the write fee is paid, there are no further expenses or dev-ops work needed to ensure metadata availability into the future, aiding in the discoverability of data assets. It also simplifies integration with the rest of the Ocean system, which is Ethereum-based. Storage cost on Ethereum mainnet is not negligible, but not prohibitive and the other benefits are currently worth the tradeoff compared to alternatives.
|
||||
|
||||
### Osmosis Drivers
|
||||
Due to the permissionless, decentralized nature of data on Ethereum mainnet, any last-mile tool can access metadata. **Ocean Aquarius** supports different metadata fields for each different Ocean-based marketplace. Developers could also use [TheGraph](https://www.thegraph.com) to see metadata fields that are common across all marketplaces.
|
||||
|
||||
Brizo supports several options for file storage, including Azure Storage, Amazon S3 and on-premise storage. One can add support for another file storage option by creating a new driver similar to one of the existing Osmosis drivers.
|
||||
## Third-Party ERC20 Apps & Tools
|
||||
|
||||
<repo name="osmosis-azure-driver"></repo>
|
||||
<repo name="osmosis-aws-driver"></repo>
|
||||
<repo name="osmosis-ipfs-driver"></repo>
|
||||
<repo name="osmosis-on-premise-driver"></repo>
|
||||
The ERC20 nature of datatokens eases composability with other Ethereum tools and apps, including **MetaMask** and **Trezor** as data wallets, DEXes as data exchanges, and more. [This post](https://blog.oceanprotocol.com/ocean-datatokens-from-money-legos-to-data-legos-4f867cec1837) has details.
|
||||
|
||||
You can create your own Osmosis drivers by extending on the `osmosis-driver-interface`.
|
||||
## Actor Identities
|
||||
|
||||
Actors like data providers and consumers have Ethereum addresses, aka web3 accounts. These are managed by crypto wallets, as one would expect. For most use cases, this is all that’s needed. There are cases where the Ocean community could layer on protocols like [Verifiable Credentials](https://www.w3.org/TR/vc-data-model/) or tools like [3Box](https://3box.io/).
|
||||
|
||||
<repo name="osmosis-driver-interface"></repo>
|
||||
|
@ -5,16 +5,18 @@ description: Ocean Protocol - Tools for the Web3 Data Economy
|
||||
|
||||
In Ocean Protocol, each data service gets its own ERC20 **datatoken**. This enables data wallets, data exchanges, and data co-ops by directly leveraging crypto wallets, exchanges, and more.
|
||||
|
||||
Ocean Protocol provides tools for developers to build data markets, and to manage datatokens for use in DeFi.
|
||||
OCEAN token is used for staking, and more. [Here](https://oceanprotocol.com/token) are details.
|
||||
|
||||
Ocean Protocol provides tools for developers to *build data markets*, and to *manage datatokens* for use in DeFi.
|
||||
|
||||
**Build Data Markets.** Use Ocean Protocol software tools to build your own data marketplace, by either forking [Ocean Market](https://market.oceanprotocol.com/) code or building up with Ocean components.
|
||||
|
||||
**Manage Datatokens for use in DeFi.** Use Ocean [JavaScript](https://github.com/oceanprotocol/ocean-lib-js) or [Python](https://github.com/oceanprotocol/squid-py) drivers to manage datatokens:
|
||||
|
||||
- Publish and consume data services: downloadable files or compute-to-data. Use Ocean to deploy a new [ERC20](https://github.com/ethereum/EIPs/blob/7f4f0377730f5fc266824084188cc17cf246932e/EIPS/eip-20.md) datatoken contract for each data service, then mint datatokens.
|
||||
- *Publish and consume data services:* downloadable files or compute-to-data. Use Ocean to deploy a new [ERC20](https://github.com/ethereum/EIPs/blob/7f4f0377730f5fc266824084188cc17cf246932e/EIPS/eip-20.md) datatoken contract for each data service, then mint datatokens.
|
||||
|
||||
- Transfer datatokens to another owner (or approve & transferFrom).
|
||||
- *Transfer datatokens* to another owner (or approve & transferFrom).
|
||||
|
||||
- Manage pools. Deploy OCEAN-datatoken [Balancer](https://www.balancer.finance/) pools, buy & sell datatokens (swap), and add & remove liquidity.
|
||||
- *Manage pools.* Deploy OCEAN-datatoken [Balancer](https://www.balancer.finance/) pools, buy & sell datatokens (swap), and add & remove liquidity.
|
||||
|
||||
- And more. Use ERC20 support in [web3.js](https://web3js.readthedocs.io/), [web3.py](https://web3py.readthedocs.io/en/stable/examples.html#working-with-an-erc20-token-contract) and Solidity to connect datatokens with crypto wallets and other DeFi services.
|
||||
- *And more.* Use ERC20 support in [web3.js](https://web3js.readthedocs.io/), [web3.py](https://web3py.readthedocs.io/en/stable/examples.html#working-with-an-erc20-token-contract) and Solidity to connect datatokens with crypto wallets and other DeFi services.
|
||||
|
@ -3,7 +3,10 @@ title: Network - Ethereum Mainnet
|
||||
description: Tools for development on Ethereum Mainnet
|
||||
---
|
||||
|
||||
| Component | URL |
|
||||
Ocean is deployed to Ethereum mainnet. This network is for your app's production deployment. Here are tools related to this deployment.
|
||||
|
||||
|
||||
| What | URL |
|
||||
| ---------------------- | ------------------------------------------ |
|
||||
| Etherscan explorer | https://etherscan.io/ |
|
||||
| Ocean Market main | https://oceanmarket.io |
|
||||
|
@ -3,7 +3,10 @@ title: Network - Ropsten Testnet
|
||||
description: Tools for development on Ethereum Ropsten testnet
|
||||
---
|
||||
|
||||
| Component | URL |
|
||||
Ocean is deployed to Ropsten network. This network is for testing your app's deployment before final production deployment. Here are tools related to this deployment.
|
||||
|
||||
|
||||
| What | URL |
|
||||
| ---------------------- | ------------------------------------------ |
|
||||
| Etherscan explorer | https://ropsten.etherscan.io/ |
|
||||
| Ocean Market on Ropsten | https://FIXME
|
||||
|
@ -1,13 +1,13 @@
|
||||
---
|
||||
title: Local Development
|
||||
title: Network - Local
|
||||
description: Tools for local deployment
|
||||
---
|
||||
|
||||
Barge is a tool to help for fast iterations in a local development.
|
||||
You can deploy Ocean onto Ganache - a local Ethereum "network" that you run on your machine for fast iterations while developing your app.
|
||||
|
||||
It's a shell script that launches Docker and Docker Compose, to run Ganache with Ocean smart contracts on top, along with Provider and Aquarius metadata cache.
|
||||
Barge is a shell script to help with Ocean Ganache deployments. It launches Docker and Docker Compose, to run Ganache with Ocean smart contracts on top, along with Provider and Aquarius metadata cache.
|
||||
|
||||
It's used extensively by the Ocean core devs. You'll also find it in the [Quickstart](/setup/quickstart/).
|
||||
It's used extensively by the Ocean core devs. You'll also find Barge in the [Quickstart](/setup/quickstart/).
|
||||
|
||||
<repo name="barge"></repo>
|
||||
|
||||
|
@ -2,9 +2,7 @@
|
||||
items:
|
||||
- title: Introduction
|
||||
link: /concepts/introduction/
|
||||
- title: Terminology
|
||||
link: /concepts/terminology/
|
||||
- title: Software Components
|
||||
- title: Architecture Overview
|
||||
link: /concepts/components/
|
||||
- title: Network - Local
|
||||
link: /concepts/tools/
|
||||
@ -12,8 +10,6 @@
|
||||
link: /concepts/testnets/
|
||||
- title: Network - Ethereum Mainnet
|
||||
link: /concepts/pacific-network/
|
||||
- title: Ocean Tokens
|
||||
link: /concepts/ocean-tokens/
|
||||
- title: Wallet Basics
|
||||
link: /concepts/wallets/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user