Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Deployment documentation to architecture snapshot #121

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 52 additions & 5 deletions arch-snapshot/arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ Subnets operate at the market level, meaning the Nodes aren't truly separated fr
the network. Instead, only the Offers from other Nodes are excluded from being matched with the Demands.

| | Provider Proposal | Requestor Proposal |
|-------------|:------------------------------------------|:------------------------------------------|
| ----------- | :---------------------------------------- | :---------------------------------------- |
| Properties | "golem.node.debug.subnet": "private-1234" | "golem.node.debug.subnet": "private-1234" |
| Constraints | (golem.node.debug.subnet=private-1234) | (golem.node.debug.subnet=private-1234) |

Expand Down Expand Up @@ -1435,7 +1435,7 @@ Both agents begin by setting their initial preferred timeout values. With each t
they either agree on a specific value or one party rejects the proposals, ending the negotiation.

| Provider Proposal | | Requestor Proposal |
|:-----------------------------------------------------|--------------------------|:-----------------------------------------------------|
| :--------------------------------------------------- | ------------------------ | :--------------------------------------------------- |
| "golem.com.payment.debit-notes.accept-timeout?": 600 | Initial Offer/Demand | "golem.com.payment.debit-notes.accept-timeout?": 240 |
| | ← Counter Proposal | "golem.com.payment.debit-notes.accept-timeout?": 300 |
| "golem.com.payment.debit-notes.accept-timeout?": 450 | Counter Proposal → | |
Expand Down Expand Up @@ -1501,7 +1501,7 @@ ExeUnit progress reporting feature. The [specification](../specs/command-progres
properties added for this feature:

| Property | Description |
|:----------------------------------------------------|:-----------------------------------------------|
| :-------------------------------------------------- | :--------------------------------------------- |
| "golem.activity.caps.transfer.report-progress=true" | ExeUnit can report `transfer` command progress |
| "golem.activity.caps.deploy.report-progress=true" | ExeUnit can report `deploy` command progress |

Expand Down Expand Up @@ -2378,8 +2378,55 @@ process executes using standard UNIX syscalls.
* which of the logic useful to the user ends up in the SDK

## Technical view - deployment
How the components are reflected in processes, where the processes are run, what
is their relation ship, etc.
Golem, as described in the [layers section](#layers), stacks functionalities on
top of each other. As a consequence, typically there are following processes
involved:
* Yagna – the process which implements the Core Network, i.e. the ability for
nodes to find each other and trade
* ExeUnits are distributed as plugins for Yagna that can be invoked by the
Provider Agent.
* Provider Agent – Software interacting with Yagna to publish Offers and
execute tasks on behalf of Requestors via an appropriate ExeUnit.
* Requestor Agent – Software interacting with Yagna to search for Offers and
run tasks on Providers. This is typically implemented by Requestors using
SDKs.

The deployment is quite flexible – you can run a node that acts as a Provider,
as a Requestor, both or neither – the last of which is useful for e.g. collecting
Offers to produce statistics about the network.

### Components & Processes
* Yagna process contains all core components:
* Identity
* Networking
* Market
* Payments
* Payment Drivers
* Requestor Agent is a separate process, usually implemented using an SDK
* Provider Agent is a separate process (ya-provider)
* ExeUnits are separate processes
* Runtimes are separate proccesses
* In case of VM Runtime, QEMU is a separate process

### Process trees
The lists below show the structure of processes run within a given deployment
type. All processes listed run on the machine hosting the node in the usual
case, with the exception of Requestor Agents, that can reasonably run on
a separate machine.

#### Bare Node
- Yagna
#### Requestor
- Yagna
- Requestor Agent
#### Provider
- Yagna
- Provider Agent
- Per each Activity running on the Provider:
- ExeUnit
- Runtime
- QEMU if Activity is deployed and using VM Runtime.
- Wasmtime if Activity is deployed and using WASM Runtime.

## Technical view - flows & algorithms
This section documents how control and responsibility flows through the listed
Expand Down