Skip to content

Commit

Permalink
Docs: directories used by yagna; communication between components
Browse files Browse the repository at this point in the history
  • Loading branch information
nieznanysprawiciel committed Aug 4, 2023
1 parent faaa6ed commit 9c20ec4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
27 changes: 21 additions & 6 deletions docs/provider/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,33 @@ which can be extended using pluggable ExeUnits.
ExeUnits are responsible for executing Requestors' code. Although conceptually similar to
virtual machines, ExeUnits offer a broader range of utility.

## Interactions
## Interactions

Provider application consists of following components:

- Yagna daemon: It serves as the entry point to the Golem Network, providing APIs for communication
between Nodes, handling market interactions, executing computations, and managing payments.
It exposes a REST API for agent applications.
between Nodes, handling market interactions, executing computations, and managing payments.
It exposes a REST API for agent applications.
- Provider agent: This component is responsible for implementing the provider's business logic.
It handles negotiation of Agreements on the market, spawns ExeUnits, and manages invoicing
and payment reception.
It handles negotiation of Agreements on the market, spawns ExeUnits, and manages invoicing
and payment reception.
- ExeUnit Supervisor: The ExeUnit Supervisor controls the ExeUnit Runtime and facilitates
communication with the Yagna daemon.
communication with the Yagna daemon.
- ExeUnit Runtime: This component is the implementation-specific part of the execution environment.

![Provider agent ExeUnits interaction](./provider-exe-unit-architecture.svg)

### Communication

| From | To | Protocol |
| ------------------ | ------------------ |----------------------------------------------------|
| Provider Agent | Yagna daemon | REST API |
| Provider Agent | ExeUnit Supervisor | No communication (process is only spawned) |
| Yagna daemon | ExeUnit Supervisor | GSB (Unix socket / TCP depending on configuration) |
| ExeUnit Supervisor | ExeUnit Runtime | Unix socket, UDP or TCP (UDP by default) |


There are 3 communication channels between ExeUnit Supervisor and Runtime:
- Status and stdout/stderr channel output
- Outbound networking
- VPN traffic
5 changes: 3 additions & 2 deletions docs/provider/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To change default runtimes versions set env variables:

## Provider directories

Standard Provider installation puts files in following directories:
Standard Provider installation uses files in following directories:


| name | ENV | command line | default configuration | description | comment |
Expand All @@ -30,4 +30,5 @@ Standard Provider installation puts files in following directories:
| ExeUnit cache | | | ~/.local/share/ya-provider/exe-unit/cache | Stores cached ExeUnit Runtime images. | |
| ExeUnit working dir | | | ~/.local/share/ya-provider/exe-unit/work | Directory used to store tasks data. For each Agreement ExeUnit creates directory named by Agreement Id. Inside there are directories created for each activity. VM runtime mounts image volumes inside this directory. | |
| Binaries | | | ~/.local/bin/yagna | Yagna daemon and agent binaries. | If yagna is already installed, intaller will use previous directory instead. |
| Installer files | | | ~/.local/share/ya-installer | Directory used by installer to download files. | EXE_UNIT_PATH |
| Installer files | | | ~/.local/share/ya-installer | Directory used by installer to download files. | Files can be removed after installation is completed. |
| GSB unix socket | GSB_URL | | unix:/tmp/yagna.sock | Unix socket used by GSB for communication. | Can be configured to use TCP. |

0 comments on commit 9c20ec4

Please sign in to comment.