Project architecture » Historie » Revize 9
« Předchozí |
Revize 9/56
(rozdíl)
| Další »
Alex Konig, 2021-04-27 13:40
Project architecture¶
The application consists of two parts
- Server
- Client application
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
- 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
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
Connection architecture¶
Model architecture¶
Interface model-parser¶
Handing over information in lists containing separate entries.
Method Parse() enables specifying the interval by which to divide the days. By default parses one day as one entry.
For example if a day is divided with a 3h interval for each day are created entries for the following times
- 7-10
- 10-13
- 13-16
- 16-19
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:
Csv loader¶
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.
TagInfo¶
Tags specified in this class correspond to the ones used in Data sources.
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")
Interface parser-downloader¶
Parser asks for folder with data files.
Loader architecture¶
Has to be able to handle request signaling dowload of new data, and requests for path to folder with data.
Client application architecture¶
Communication server-client¶
Aktualizováno uživatelem Alex Konig před téměř 4 roky(ů) · 9 revizí