Projekt

Obecné

Profil

Server-client communication » Historie » Revize 2

Revize 1 (Alex Konig, 2021-04-30 10:06) → Revize 2/4 (Alex Konig, 2021-04-30 18:26)

h1. Server-client communication 

 Between server and client are going to be exchanged messages in the form of Sending xml files. 

 h2. format 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. 

 h3. Weather details 

 * - temperature - double (in °C) 
 * - wind - double (in m/s) 
 * - rain probability - double in range <0, 1> 
 * - weather conditions - an enum 

 h3. Date details date 
 * - start date: 
   - day (int) 
 * 
   - month (int) 
 * 
   - year (int) 
 * 
   - start hour (int) 


 h2. 
 - use end date (bool) 
 - end date (optional) 
   - day (int) 
   - month (int) 
   - year (int) 
   - end 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. 

 h3. Response 
 * - hoursPerSegment (int) 
 * rush level (one or multiple after each other) 

 h3. Rush level details 
 * date (same as specified above) 
 * array with integers, sorted by the enum with buildings, values - pole objektů - datum, čas (jako nahoře) 
	 - pole rušností uspořádaný podle enumu - hodnota 0-100 (signifying "rushness" in percentage) or value (+ -1) 
		 - paleta pro rušnosti -> budou přicházet jako procenta 0-100 
		 - -1 pro neznámou hodnotu (nevím, neumím odvodit) 

 if request couldn't be answered for any reason 


 If server was unresponsive, client will unresponsive/unavailible -> try again after a while. It will while 
 display a warning about problems with server connection. for user