1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-06-29 00:58:02 +02:00

formatting

This commit is contained in:
Matthias Kretschmann 2020-06-03 02:30:38 +02:00
parent 8c95107bbe
commit 074321b323
Signed by: m
GPG Key ID: 606EEEF3C479A91F
8 changed files with 17 additions and 28 deletions

View File

@ -1,8 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
time: '03:00'
timezone: Europe/Berlin
- package-ecosystem: npm
directory: '/'
schedule:
interval: weekly
time: '03:00'
timezone: Europe/Berlin

View File

@ -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
@ -40,8 +38,8 @@ Because of these credentials, the execution of Brizo **SHOULD NOT** be delegated
### Compute-to-Data Enviroment (Operator-Service)
The Operator Service is a micro-service implementing part of the Ocean Protocol
[Compute to the Data OEP-12](https://github.com/oceanprotocol/OEPs/tree/master/12),
The Operator Service is a micro-service implementing part of the Ocean Protocol
[Compute to the Data OEP-12](https://github.com/oceanprotocol/OEPs/tree/master/12),
in charge of managing the workflow executing requests.
Typically the Operator Service is integrated from the [Brizo proxy](https://github.com/oceanprotocol/brizo),
@ -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`.

View File

@ -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.

View File

@ -35,15 +35,14 @@ GITHUB-EMBED https://github.com/oceanprotocol/react-tutorial/blob/107d1fa7d0c583
## Final Result
Now that we have all the requirements, we need a function to handle it.
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).**

View File

@ -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).**

View File

@ -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.

View File

@ -15,13 +15,13 @@ Open `src/Compute.js` from your `marketplace/` folder.
First, let's add the [asset](/concepts/terminology/#asset-or-data-asset) that we want to publish.
To do that, we need to define the Algorithm asset based on the [OEP-08](https://github.com/oceanprotocol/OEPs/tree/master/8) metadata structure. An algorithm asset can have multiple `files` attached to it and each file's `url` value will be encrypted during the publish process.
To do that, we need to define the Algorithm asset based on the [OEP-08](https://github.com/oceanprotocol/OEPs/tree/master/8) metadata structure. An algorithm asset can have multiple `files` attached to it and each file's `url` value will be encrypted during the publish process.
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/).**

View File

@ -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/).**