Edit this page

Client node

What is Client node?

Client node is a SONM component that provides the execution of commands from the GUI (Wallet/CLI). Functions for Consumers and Suppliers are different.

Client node has functions for Consumer and Supplier, that are provided by Client node API. And Client node takes part in automatic processes, where Consumer and Supplier does not participate.

Functions for Consumer

Interact with Marketplace

Client node is the first SONM component that should be installed and configured by Consumer. Client node interacts with Marketplace. Interaction is over open channels, encrypted with TLS. Functions:

  • View Marketplace orders. Function initiates by Consumer in GUI/CLI. Consumer prepares slot parameters for searching orders (resources, type).
  • Create BID orders on Marketplace. Function initiates by Consumer in GUI. Client node interacts with Marketplace.
  • View list information about current consumer's orders. Function initiates by Consumer in GUI. Client node interacts with Marketplace.
  • Get matched ASK orders for BID order. Function is automatic and work after BID order hasa been placed. After receive ASK orders form Marketplace Client node chooses the most suitable.
  • Cancel BID order on Marketplace. Function initiates by Consumer in GUI anytime. And it will be done automaticaly after making deal based on such BID order.

Make a deal

Making deals is an automatic process in SONM.

  • After choosing the ASK order Consumer's Client node proposes a deal to such Hub node, using Hub API. Interaction is over open channels, encrypted with TLS.
  • Hub node and Client node checks, that offers match each other and if everything is good, Hub accept it. After that Client node places a deal on the blockchain, using Blockchain API.
  • Hub receives information about new deal, check it and accept it in Blockchain. After this deal is started. Client node receives parmeters for task starting from Hub node.

Also Client node may take information about Consumer's deals from blockchain.

Run and control tasks

Task consists of two parts: description and image. Description is sent through UI (CLI or Wallet) - Client node - Hub node - Worker node. Image should be pushed by Consumer to Docker registry.

  • Consumer initiates start task in UI with task specification. After that command is translated to Client node. Client node calls Hub node with task parameters and task specification, using Hub API.
  • After that task execution is started on Hub's side (for getting more information see "Hub node").

Client node provides functions:

  • start task
  • gets task list and task status from Hub
  • get task logs
  • stop task

After task stop the results may be received from Hub.

Functions for Supplier

After install Hub node component Supplier should install Client node. Supplier's Client node interacts with Hub node using Hub API. Interaction is over open channels, encrypted with TLS. Functions:

  • Register workers on Hub. Function initiates by Supplier in GUI/CLI.
  • Monitoring Hub and Workers, get information about configuration. Function initiates by Supplier in GUI/CLI.
  • Set resource properties. Function iniciates by Supplier in GUI/CLI. Properties may be set for each CPU and GPU Worker's device.

Create resource slots for Hub to publish ASK orders. Function initiates by Supplier in GUI/CLI. After create slot Hub places ASK order on Marketplace automatically.