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

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

Request types | REQUEST

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

Response types | RESPONSE

1 => OK 2 => Created 3 => 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
    }
}