Skip to content

Feature 1: Fetching newer mining playbooks regularly

I. What is a minining playbooks

A term playbook, I takes it from ansible, ansible playbook. It indicates how a computer should mine a crypto currency. A mining playbook include but not limited to:

  • A miner software
  • Its version
  • argument list passing to the miner software
    • address
    • worker name
    • pool

II. Sequence Diagram (between Sentry and Commander)

sequenceDiagram participant S as CPU/GPU Sentry participant C as Mining Rig Monitor (Commander) S->>C: my playbook stash is empty, this is my API_CODE, please give me mining playbooks! C-->>S: this is your mining playbooks S-->>S: Store new playbooks into a MiningPlaybookStash(GenServer), marked `new` Note right of S: After 5 seconds S->>C: My latest update_at is T, and this is my API_CODE, please give me new mining playbooks! alt there is new playbooks C-->>S: this is your new mining playbooks S-->>S: Remove all old playbooks S-->>S: Store new playbooks into a Stash(GenServer), marked `new` else S-->>S: There is no newer playbook. Keep mining as is. end
Press "Alt" / "Option" to enable Pan & Zoom

III. Sequence Diagram (Sentry internal)

Tôi muốn giảm GEN SERVER

sequenceDiagram participant S as CPU/GPU Sentry participant MPS as MiningPlaybookStash(GenServer) participant OPS as OSProcessStash(GenServer) participant C as MiningRigMonitor(Commander) S->>C: request new mining playbooks C-->>S: this is new mining playbooks S->>OPS: give me a list of `PORT` OS process OPS-->>S: this is a list of `PORT` OS process S-->>S: Close all running miners. `Port.close/1` S->>MPS: remove existing playbooks using GenServer.call S->>MPS: add new playbooks using GenServer.call
Press "Alt" / "Option" to enable Pan & Zoom