Projekt

Obecné

Profil

Server-client communication » Historie » Verze 2

Alex Konig, 2021-04-30 18:26

1 1 Alex Konig
h1. Server-client communication
2
3 2 Alex Konig
Between server and client are going to be exchanged messages in the form of xml files.
4 1 Alex Konig
5 2 Alex Konig
h2. Request from client to server
6 1 Alex Konig
7 2 Alex Konig
Client can either send:
8 1 Alex Konig
9 2 Alex Konig
* weather data and date
10
* start date and end date
11 1 Alex Konig
12 2 Alex Konig
First option means that the server will create an approximation of rush level for this specific time and these specific weather conditions and send an answer.
13
14
Second means that the server will need to download weather prediction for those two days, and days in between and create an approximation of rush level for each time period in between. Length of time period depends on how the model was trained.
15
16
h3. Weather details
17
18
* temperature - double (in °C)
19
* wind - double (in m/s)
20
* rain probability - double in range <0, 1>
21
* weather conditions - an enum
22
23
h3. Date details
24
* day (int)
25
* month (int)
26
* year (int)
27
* start hour (int)
28
29
30
h2. Response from server to client
31
32
Server responds with either one or multiple instances of rush level details. One if the first type of request was sent, multiple if the second type of request was sent.
33
34
h3. Response
35
* hoursPerSegment (int)
36
* rush level (one or multiple after each other)
37
38
h3. Rush level details
39
* date (same as specified above)
40
* array with integers, sorted by the enum with buildings, values 0-100 (signifying "rushness" in percentage) or value -1 if request couldn't be answered for any reason
41
42
43
If server was unresponsive, client will try again after a while. It will display a warning about problems with server connection.