-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deploy progress spec description
- Loading branch information
1 parent
be1310a
commit e442ab1
Showing
2 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Golem Capability List | ||
|
||
| Capability | Yagna package version | Backwards-compatible? | Description | | ||
|------------|-----------------------|-----------------------|-------------| | ||
| Multi-Activity Agreement | 0.5.0 | Yes | Negotiate ability to create multiple activities under single Agreement. Use (which?) property in Demand/Offer to indicate node's support for Multi-Activity. If counterparty does not support Multi-Activity, the node falls back to single Activity per Agreement behaviour. | | ||
| Restart Proposal Negotiations | 0.7.0 | Yes | Agent is allowed to restart negotiations, by sending `Counter Proposal`, after he rejected Proposal at some point. Counter-party will receive regular `ProposalEvent` in this case. Only Agent rejecting Proposal has initiative in restarting negotiations, rejected Agent can only wait for this to happen. To indicate, that Proposal rejection isn't final and negotiations can be restarted later, Agent can set `golem.proposal.rejection.is-final` (bool) field in `Reason` structure. If this value is set to false, Agent can free any state related to this negotiation. The same field can be set in `Reason` sent in `Reject Agreement` operation. Requestor can send new counter Proposal after some period of time or propose the same Agreement for the second time. (No change to specification) | | ||
| | | | | | ||
| Capability | Yagna package version | Backwards-compatible? | Description | Property | | ||
|-------------------------------|-----------------------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| | ||
| Multi-Activity Agreement | 0.5.0 | Yes | Negotiate ability to create multiple activities under single Agreement. Use (which?) property in Demand/Offer to indicate node's support for Multi-Activity. If counterparty does not support Multi-Activity, the node falls back to single Activity per Agreement behaviour. | | | ||
| Restart Proposal Negotiations | 0.7.0 | Yes | Agent is allowed to restart negotiations, by sending `Counter Proposal`, after he rejected Proposal at some point. Counter-party will receive regular `ProposalEvent` in this case. Only Agent rejecting Proposal has initiative in restarting negotiations, rejected Agent can only wait for this to happen. To indicate, that Proposal rejection isn't final and negotiations can be restarted later, Agent can set `golem.proposal.rejection.is-final` (bool) field in `Reason` structure. If this value is set to false, Agent can free any state related to this negotiation. The same field can be set in `Reason` sent in `Reject Agreement` operation. Requestor can send new counter Proposal after some period of time or propose the same Agreement for the second time. (No change to specification) | | | ||
| Command progress reporting | (not released) | Yes | ExeUnit can report progress of executed commands. [Specification](./command-progress.md) | `golem.activity.caps.transfer.report-progress` `golem.activity.caps.transfer.deploy-progress` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Command progress reporting | ||
|
||
Downloading large images and files poses problem for Requestor controlling ExeUnit. | ||
Since he doesn't have any information about Provider's internet bandwidth, there is no | ||
way to estimate download time. Slow internet connection is indistinguishable from Provider | ||
that just doesn't work and is unable to finish task. This results in wasted resources and | ||
non-optimal Requestor behavior. | ||
|
||
|
||
This specification describes generic mechanisms allowing to report progress of different | ||
commands from ExeUnit to Reqeustors. Moreover, it describes current implementation of ExeUnit. | ||
|
||
## Specification | ||
|
||
### Capabilities | ||
|
||
ExeUnit supporting progress reporting should put following properties in the Offer: | ||
- `golem.activity.caps.transfer.report-progress` - if he can report `transfer` command progress | ||
- `golem.activity.caps.deploy.report-progress` - if he can report `deploy` command progress | ||
|
||
To support progress for any other command, specification should be extended with new properties. | ||
Current ExeUnit implementation supports only these 2 commands. | ||
|
||
### Progress parameters | ||
|
||
To enable progress events Requestor agent has to attach progress parameters to `ExeScriptCommand`. | ||
Example `deploy` and `transfer` command: | ||
```json | ||
[ | ||
{ | ||
"deploy": { | ||
"progress" : { "updateInterval" : "300ms", "updateStep" : null } | ||
} | ||
}, | ||
{ | ||
"transfer": { | ||
"from": "http://34.244.4.185:8000/LICENSE", | ||
"to": "container:/input/file_in", | ||
"progress" : { "updateInterval" : null, "updateStep" : 1048576 } | ||
} | ||
} | ||
] | ||
``` | ||
|
||
`ProgressArgs` structure is described [here](https://golemfactory.github.io/ya-client/index.html?urls.primaryName=Activity%20API#model-ProgressArgs). | ||
|
||
### Progress event | ||
|
||
### Listening to events | ||
|