You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

864 B

Design

Protocol

Types | TYPE

0 => Request, a new request 1 => Result, the result

Request types | REQUEST

0 => New server client 1 => New desktop client 2 => Data

Response types | RESPONSE

0 => OK 1 => Created 2 => Not OK

Data types | DATA

CPU_USAGE => FLOAT => Percentage of CPU usage

Server Client

  1. When a client wants to connect to the server it sends an initial request detailing the type of it is, e.g. desktop client or server client.
{
    "TYPE": 0,
    "REQUEST": 0,
    "HOSTNAME": "ASGARD"
}
  1. Server sends back the following response
{
    "TYPE": 1,
    "RESULT": 0
}
  1. Client starts
{
    "TYPE": 0,
    "REQUEST": 2,
    "HOSTNAME": "ASGARD",
    "DATA": {
        "TIMESTAMP": ,
        "CPU_USAGE": 50,
        "MEMORY_USAGE": 50,
        "MEMORY_USED_GB": 1
    }
}