Server-client communication » Historie » Revize 2
« Předchozí |
Revize 2/4
(rozdíl)
| Další »
Alex Konig, 2021-04-30 18:26
Server-client communication¶
Between server and client are going to be exchanged messages in the form of xml files.
Request from client to server¶
Client can either send:
- weather data and date
- start date and end date
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.
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.
Weather details¶
- temperature - double (in °C)
- wind - double (in m/s)
- rain probability - double in range <0, 1>
- weather conditions - an enum
Date details
- day (int)
- month (int)
- year (int)
- start hour (int)
Response from server to client¶
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.
Response
- hoursPerSegment (int)
- rush level (one or multiple after each other)
Rush level details
- date (same as specified above)
- 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
If server was unresponsive, client will try again after a while. It will display a warning about problems with server connection.
Aktualizováno uživatelem Alex Konig před více než 3 roky(ů) · 2 revizí