Skip to content

Commit

Permalink
docs: deployment levels
Browse files Browse the repository at this point in the history
  • Loading branch information
Toto-hitori committed Apr 27, 2024
1 parent 0ac26ea commit 6ccd897
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 16 deletions.
25 changes: 13 additions & 12 deletions docs/diagrams/deployment/DeploymentDiagramLevel1.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,32 @@ title WIQ Deployment View

legend right
|Color| Type |
|<#darkseagreen>| WIQ Server |
|<#darkolivegreen>| External Service |
|<#darkseagreen>| Container |
|<#darkolivegreen>| WIQ Server |
|<#OliveDrab>| External Service |
end legend

node "Server Hosting WIQ" #darkseagreen {
node "KIWIQ Proxy"
node "KIWIQ WebApp Server" {
node "Server Hosting WIQ" #darkolivegreen {
node "KIWIQ Proxy" #darkseagreen
node "KIWIQ WebApp Server" #darkseagreen {
component "KIWIQ React Application"
}
node "KIWIQ API"{
node "KIWIQ API" #darkseagreen{
component "KIWIQ_API.jar"
}
node "PostgreSQL Docker" {
node "PostgreSQL Docker" #darkseagreen{
database "KIWIQ Database"
}
node "Question generator" {
node "Question generator" #darkseagreen{
component "Question_Generator.jar"
}
node "Grafana"
node "Prometheus"
node "Grafana" #darkseagreen
node "Prometheus" #darkseagreen
}
node "User Computer" #darkolivegreen{
node "User Computer" #OliveDrab {
frame "Web Client"
}
node "WikiData Server" #darkolivegreen {
node "WikiData Server" #OliveDrab {
frame "WikiData REST API"
}
"Web Client" ..> "KIWIQ Proxy" : "HTTPS"
Expand Down
25 changes: 25 additions & 0 deletions docs/diagrams/deployment/DeploymentDiagramLevel2.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@startuml

title KIWIQ API Deployment View

legend right
|Color| Type |
|<#darkseagreen>| WIQ artifact |
|<#OliveDrab>| Package |
end legend

node "KIWIQ_API.jar" #darkseagreen {
component "auth" #OliveDrab
component "commons"#OliveDrab
component "game" #OliveDrab
component "questions" #OliveDrab
component "statistics" #OliveDrab

}
"auth" ..> "commons"
"game" ..> "commons"
"questions" ..> "commons"
"statistics" ..> "commons"
"game" ..> "questions"
"game" ..> "statistics"
@enduml
14 changes: 10 additions & 4 deletions docs/src/07_deployment_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ As stated before, we consider the main advantage of this architecture the interc
Mapping of Building Blocks to Infrastructure::

* The webapp/frontend/client is contained within the `webapp` subfolder.
* The API/backend is contained within the `api` subfolder.
* The API/backend is contained within the `quiz-api` subfolder.
** The database will be generated on deployment.
** Wikidata is an external component, so although it is an important part of the deployment architecture, it is something we do not have access to changing.
** The grafana config is found within the `monitoring/grafana` subdirectory
** The prometheus config is found within the `monitoring/prometheus` subdirectory
* The question generator is a separate component that will be deployed on the server only at the beginning of the system. It is contained within the `questiongenerator` subfolder.
* The configuration for the proxy container is found within the `proxy_conf` subfolder.

=== Infrastructure Level 2

Expand All @@ -33,14 +36,17 @@ Mapping of Building Blocks to Infrastructure::
This component is self-contained and does not require much explanation.

==== API/Backend

[plantuml,"API Deployment diagram",png]
----
include::../diagrams/deployment/DeploymentDiagramLevel2.puml[]
----
===== Server

Our main idea is that the server will be a self-contained .jar file with all the dependencies required within. It will communicate with the database and periodically query Wikidata to generate questions until a certain number has been obtained once per minute to fill up the database and improve speed.
Our main idea is that the server will be a self-contained .jar file with all the dependencies required within. It will communicate with the database to retrieve the questions.

===== Database

The database will contain the data used by the system. Therefore, it will contain user data, as well as the data related to the questions and their answers. The databases to store the questions (and therefore the answers) and the user data might be different, though.
The database will contain the data used by the system. Therefore, it will contain user data, as well as the data related to the questions and their answers.

===== Question Generator
The question generator will be run only at the beginning of the application. It will connect with Wikidata using SPARQL to generate questions and answers and store them in the database. This question generation will generate all the questions used by the application at once. It could be run again to generate new questions if they are added.

0 comments on commit 6ccd897

Please sign in to comment.