mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
formatting
This commit is contained in:
parent
8c95107bbe
commit
074321b323
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@ -1,7 +1,7 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
- package-ecosystem: npm
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: weekly
|
||||
time: '03:00'
|
||||
|
@ -5,16 +5,14 @@ slug: /concepts/compute-to-data/
|
||||
section: concepts
|
||||
---
|
||||
|
||||
|
||||
## Motivation
|
||||
|
||||
The most basic scenario for a Publisher is to provide access to the datasets they own or manage.
|
||||
In addition to that, a Publisher could offer a service to execute some computation on top of their data. This has some benefits:
|
||||
|
||||
- The data **never** leaves the Publisher enclave.
|
||||
- It's not necessary to move the data; the algorithm is sent to the data.
|
||||
- Having only one copy of the data and not moving it makes it easier to be compliant with data protection regulations.
|
||||
|
||||
- The data **never** leaves the Publisher enclave.
|
||||
- It's not necessary to move the data; the algorithm is sent to the data.
|
||||
- Having only one copy of the data and not moving it makes it easier to be compliant with data protection regulations.
|
||||
|
||||
## Architecture
|
||||
|
||||
@ -56,7 +54,6 @@ The Operator Service is in charge of stablishing the communication with the K8s
|
||||
|
||||
The Operator Service doesn't provide any storage capability, all the state is stored directly in the K8s cluster.
|
||||
|
||||
|
||||
<repo name="operator-service"></repo>
|
||||
|
||||
### Responsibilities
|
||||
@ -70,7 +67,6 @@ The main responsibilities are:
|
||||
- Retrieve the logs generated during executions.
|
||||
- Register newly-derived assets arising from the executions (i.e. as new Ocean assets) (if required by the consumer).
|
||||
|
||||
|
||||
### Flow
|
||||
|
||||
![Sequence Diagram for computing services](images/4_Starting_New_Compute_Job.png)
|
||||
@ -87,4 +83,3 @@ Before the flow can begin, the following pre-conditions must be met:
|
||||
- The Asset DDO has a compute service.
|
||||
- The Asset DDO must specify the Brizo endpoint exposed by the Publisher.
|
||||
- The Service Agreement template must already be predefined and whitelisted `on-chain`.
|
||||
|
||||
|
@ -64,6 +64,5 @@ A local testnet similar to Spree but launched by using the `--local-ganache-node
|
||||
|
||||
> You shouldn't use a Ganache-Based Testnet unless you know why you're doing so. For example, a Ganache-based testnet can be used to test some smart contracts, but it can't be used with a Secret Store.
|
||||
|
||||
|
||||
[^1]: Formerly called Ocean Protocol Testnet v0.1, it was announced as part of the Plankton milestone.
|
||||
[^2]: Also known as the Nile Beta Network. Formerly called the Ocean POA Testnet.
|
||||
|
@ -39,11 +39,10 @@ Now that we have all the requirements, we need a function to handle it.
|
||||
|
||||
GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583cc8042339f1f5090ff9ee0920b/src/Compute.js jsx 58-89,92-94 GITHUB-EMBED
|
||||
|
||||
|
||||
The last thing we need is a button to start our compute job:
|
||||
|
||||
GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583cc8042339f1f5090ff9ee0920b/src/Compute.js jsx 202-207 GITHUB-EMBED
|
||||
|
||||
** Notice that the button will be disabled if there were no previous published Datasets and Algorithms.
|
||||
\*\* Notice that the button will be disabled if there were no previous published Datasets and Algorithms.
|
||||
|
||||
**Move on to [Get Status of a Compute Job](react-compute-status).**
|
||||
|
@ -29,7 +29,6 @@ and them import it to our Compute.js:
|
||||
|
||||
GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583cc8042339f1f5090ff9ee0920b/src/Compute.js jsx 4 GITHUB-EMBED
|
||||
|
||||
|
||||
## Define Compute Output
|
||||
|
||||
Let's define some options for our upcoming job:
|
||||
@ -60,6 +59,6 @@ The last thing we need is a button inside the `render()` function:
|
||||
|
||||
GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583cc8042339f1f5090ff9ee0920b/src/Compute.js jsx 208-211 GITHUB-EMBED
|
||||
|
||||
** Notice that the button will be disabled if there were no previous published Datasets.
|
||||
\*\* Notice that the button will be disabled if there were no previous published Datasets.
|
||||
|
||||
**Move on to [Get Status of a Compute Job](react-compute-status).**
|
||||
|
@ -29,4 +29,4 @@ and have a button for it:
|
||||
|
||||
GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583cc8042339f1f5090ff9ee0920b/src/Compute.js jsx 223 GITHUB-EMBED
|
||||
|
||||
** Notice that the button will be disabled if jobId is missing.
|
||||
\*\* Notice that the button will be disabled if jobId is missing.
|
||||
|
@ -21,7 +21,7 @@ Let's create a new file `src/asset-compute.js` and fill it with:
|
||||
|
||||
GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583cc8042339f1f5090ff9ee0920b/src/asset-compute.js jsx 1-33 GITHUB-EMBED
|
||||
|
||||
** Notice the “ALGO” macro in the entrypoint attribute, this is replaced with the downloaded executable algorithm inside the pod
|
||||
\*\* Notice the “ALGO” macro in the entrypoint attribute, this is replaced with the downloaded executable algorithm inside the pod
|
||||
|
||||
Then import this asset definition at the top of `src/Compute.js`:
|
||||
|
||||
@ -37,5 +37,4 @@ The last thing we need is a button to start our registration inside the `render(
|
||||
|
||||
GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583cc8042339f1f5090ff9ee0920b/src/Compute.js jsx 153 GITHUB-EMBED
|
||||
|
||||
|
||||
**Move on to [Compute using a published algorithm on a Data Set](/tutorials/react-compute-published-algorithm/).**
|
||||
|
@ -19,7 +19,6 @@ This is achiveable by adding a 'compute' service to the DDO:
|
||||
|
||||
GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583cc8042339f1f5090ff9ee0920b/src/Compute.js jsx 23-27 GITHUB-EMBED
|
||||
|
||||
|
||||
## Handle Asset Publishing
|
||||
|
||||
Note that ocean.assets.create will define an 'access' service if the services list is missing. Since we are providing this attribute, our asset will have only a 'compute' service and no 'access' service.
|
||||
@ -30,5 +29,4 @@ The last thing we need is a button to start our registration inside the `render(
|
||||
|
||||
GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583cc8042339f1f5090ff9ee0920b/src/Compute.js jsx 143 GITHUB-EMBED
|
||||
|
||||
|
||||
**Move on to [Publish a Algorithm](/tutorials/react-publish-algorithm/).**
|
||||
|
Loading…
Reference in New Issue
Block a user