Projekt

Obecné

Profil

Project architecture » Historie » Revize 14

Revize 13 (Eliška Mourycová, 2021-04-28 06:24) → Revize 14/56 (Eliška Mourycová, 2021-04-28 06:42)

h1. Project architecture 

 The application consists of two parts 

 * Server 
 * Client application 

 h1. Server architecture 

 In the following text will be specified the architecture of and the communication between parts of the server application. 

 In the simple visualisation below are displayed classes that are relevant for more than one main package of the server and requests that take place between the main packages. 
 Main packages of the server are the following:  
 * DataLoader 
 * Parser 
 * Model 
 * Connection 
 * WeatherPredictionParser 

 Main requests that take place within this system are: 
 * Connection asks for prediction for an input from user / requests retraining of the model 
 * Model asks Parser for information acquired from data 
 * Parser asks DataLoader for path to folder containing data 
 * Model asks WeatherPredictionParser for information about current weather prediction for today/tommorrow/day after tommorrow 

 h3. Configuration 

 The path to data folder itself is specified from user as a command line argument upon launching the application. 

 Config file -> WeatherPredictionParser - specific url 

 !basic_architecture_v5.png! !basic_architecture_v4.png! 

 h2. DataDownloader architecture 

 h2. Connection architecture 

 h2. Model architecture 

 h2. Interface model-parser 

 Model can request parsing new data files. This request is done by calling the method Parse() from the class DataParser. Model specifies the time period in which it is interested (dd:mm:yyyy-dd:mm:yyyy), whether it wants to aggregate data from one day into one information piece or into how long intervals (in hours) it wants to divide the days. The information is after parsing stored into attributes WeatherList and AttendanceList of class DataParser. 

 WeatherList contains weather information obtained from data files, and AttendanceList contains the information about the amount of activity (jis activations and webAuth data) that took place. 

 For example if the request is done with parameters wholeDay set as false and intervalLength set as 3, days will be divided with a 3h interval. For each day are created entries for the following times: 

 * 7-10h 
 * 10-13h 
 * 13-16h 
 * 16-19h 

 h2. Parser architecture 

 Parser part of the server is responsible for reading and parsing data from separate files and aggregating data in a way that was requested by model. It expects input in format specified in [[Data formats]] and outputs a relatively universal set of information. 

 However both output and input are dependant on specific tags used in data. If the only subject of change were these tags, then the only class that needs changing would be TagInfo. If the input data file format was changed then the class CsvDataLoader would need to be changed. If there would be different data input than jis and webauth activity then package InputInfo and Parsers would need to change. Output classes are written to be general (as general weather informationa and activity information), however if there were big changes in input or output specification (for instance new added weather input - fog) it would be better to rewrite (or accordingly modify) this whole module. As long as the interface of DataParser is respected. There is a risk that some changes might interfere with Model too because the model is to a degree dependant on given information derived from, as it extracts symptoms from this information, and we cannot predict which extra symptoms could be added. 

 Interesting classes (some of which were already mentioned above) to note are: 

 h3. CsvLoader 

 Class responsible for loading input data files into memory. Can be swapped for a class processing different types of files as long as it provides the same methods. 

 h3. DataParser 

 Class responsible for parsing the input data into information. Can be swapped for a class processing different input files as long as it provides the same methods. 

 h3. TagInfo 

 Tags specified in this class correspond to the ones used in [[Data sources]]. 

 !parser_architecture_v2.png! 

 h2. WeatherPredictionParser architecture 

 This part of the server application is responsible for downloading new information about current weather predictions. It is created to work with the following data source http://wttr.in/?format=j1 

 Specific place can be specified through a config file mentioned in a chapter above. 

 - TODO detailed picture of architecture ? (probably same as in "overview") 

 h2. Interface Parser-DataLoader 

 Parser requests path to folder with data files. Further it can request from DataLoader to filter through data file names and return only those that are from a specified time period (mm:yyyy-mm:yyyy). 

 h2. Loader architecture 

 Has to be able to handle request signaling dowload of new data, and requests for path to folder with data. 


 h1. Client application architecture 



 h1. Communication server-client