Disk, connection and electricity

Disk, connection and electricity

A host's spare disk can be sold to storage networks, its spare connection to bandwidth networks, and its disk and connection together to networks that pay node operators per request served. A host whose load can be interrupted can be paid by a grid demand-response program for cutting it when called. Each needs the host's internet contract or electricity contract to allow it.

Stado assumes no demand-response program and reads no utility's API. The operator records each event from the program's own notice:

stado demand event add <id> --program <name> --host <target> [--host …] \
  --starts-at <RFC 3339> --ends-at <RFC 3339> --source <the notice>
stado demand event withdraw <id>
stado demand event paid <id> --amount N --currency <code> --source <the statement>
stado demand event list
stado demand event report <id>              [--json on each]

During the window each named host's agent claims nothing (its capacity row says demand_response) and yields its yieldable jobs back to the queue, running their yield hook first; work that does not yield keeps running, since cutting it would lose it. A host the Vast loop follows is unlisted for the window. When the window ends, or the event is withdrawn, the host claims again and the yielded jobs are claimed like any queued work. report reads, per host, the boards' energy in the window and in the same length of time just before it from the beacon's hours and prints the difference as the load shed; an hour the beacon does not hold (it keeps one day) is named and leaves the shed unmeasured. add refuses an id already recorded or not lowercase letters, digits and hyphens, a host the registry does not hold, no host, a time that is not RFC 3339, and a window that does not end after it starts; an event list that cannot be read leaves every host claiming and says why. Events are kept at state/demand/events/<id>.json. Desktop's Registry screen records, withdraws, pays and reports events.

Source: this website