Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jjgancfer committed Apr 28, 2024
1 parent 1871748 commit c5e1126
Show file tree
Hide file tree
Showing 15 changed files with 156 additions and 14 deletions.
Binary file removed images/05_building_blocks-EN.png
Binary file not shown.
Binary file removed images/08-Crosscutting-Concepts-Structure-EN.png
Binary file not shown.
Binary file removed images/ContainerDiagram.png
Binary file not shown.
Binary file added images/Gatling_10000_users.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Gatling_1000_users.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Gatling_100_users.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/Gatling_1_user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/Quality Tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/TechnicalContextDiagram.png
Binary file not shown.
Binary file added images/actuator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/arc42-logo.png
Binary file not shown.
Binary file added images/codescene-general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/grafana.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/prometheus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
170 changes: 156 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ <h3 id="_quality_goals">1.2. Quality Goals</h3>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Performance efficiency</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The system shall deliver optimal performance, ensuring responsive interactions for users. The automatic generation of questions from Wikidata and the real-time gameplay shall be efficient. The system shall handle N concurrent users.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The system shall deliver optimal performance, ensuring responsive interactions for users. The automatic generation of questions from Wikidata and the real-time gameplay shall be efficient. The system shall handle 1000 concurrent users.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Security</p></td>
Expand Down Expand Up @@ -1547,7 +1547,7 @@ <h3 id="_quality_tree">10.1. Quality Tree</h3>
<div class="paragraph">
<p>This quality tree is a high-level overview of the quality goals and requirements. The Quality tree uses "quality" as a root while the rest of the quality categories will be displayed as branches.</p>
</div>
<div class="imageblock">
<div class="imageblock text-center">
<div class="content">
<img src="./images/Quality%20Tree.png" alt="Quality Tree" width="1234" height="246">
</div>
Expand Down Expand Up @@ -1591,7 +1591,7 @@ <h4 id="_usage_scenarios">10.2.1. Usage Scenarios</h4>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Performance efficiency</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The system shall deliver optimal performance, ensuring responsive interactions for users. It shall efficiently generate questions from Wikidata and handle real-time gameplay with up to N concurrent users.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The system shall deliver optimal performance, ensuring responsive interactions for users. It shall efficiently generate questions from Wikidata and handle real-time gameplay with up to 1000 concurrent users.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">High, High</p></td>
</tr>
<tr>
Expand All @@ -1610,15 +1610,15 @@ <h4 id="_usage_scenarios">10.2.1. Usage Scenarios</h4>
<td class="tableblock halign-left valign-top"><p class="tableblock">High, Medium</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Transferability</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The system shall allow for easy transfer of user data and game-related information through its APIs.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Medium, High</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Testability</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The unit tests shall have at least 80% coverage.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">High, Medium</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Monitoring</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The system shall have monitoring in place to track the performance and availability of the system.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">High, Medium</p></td>
</tr>
</tbody>
</table>
</div>
Expand All @@ -1639,7 +1639,7 @@ <h4 id="_change_scenarios">10.2.2. Change Scenarios</h4>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Maintainability</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Modifiability</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The system shall be designed and implemented in a way that allows for easy maintenance and updates.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">High, Medium</p></td>
</tr>
Expand All @@ -1650,11 +1650,125 @@ <h4 id="_change_scenarios">10.2.2. Change Scenarios</h4>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_implementation">10.2.3. Implementation</h4>
<div class="sect4">
<h5 id="_performance_efficiency">Performance efficiency</h5>
<div class="paragraph">
<p>The tests were done with a 2 core and 4 GB of memory system.
This system&#8217;s efficiency has been measured with Gatling. For the script that we used, a user already created, logged in and played a full game. After that, the user clicked to look the statistics.
The scripts were run a total of 4 times. One with 1 user, other with 100 users, another one with 1000 users and finally one with 10000 users.
The results of this scripts show that response times are reasonable up until 1000 users. Having 10000 users playing a game at the same time make a lot of failures.
Here are the results.</p>
</div>
<div class="paragraph">
<p><strong>1 user:</strong></p>
</div>
<div class="imageblock text-center">
<div class="content">
<img src="./images/Gatling_1_user.png" alt="Gatling 1 user">
</div>
<div class="title">Figure 19. Gatling results with 1 user</div>
</div>
<div class="paragraph">
<p><strong>100 users:</strong></p>
</div>
<div class="imageblock text-center">
<div class="content">
<img src="./images/Gatling_100_users.png" alt="Gatling 100 users">
</div>
<div class="title">Figure 20. Gatling results with 100 user</div>
</div>
<div class="paragraph">
<p><strong>1000 users:</strong></p>
</div>
<div class="imageblock text-center">
<div class="content">
<img src="./images/Gatling_1000_users.png" alt="Gatling 1000 users">
</div>
<div class="title">Figure 21. Gatling results with 1000 user</div>
</div>
<div class="paragraph">
<p><strong>10000 users:</strong></p>
</div>
<div class="imageblock text-center">
<div class="content">
<img src="./images/Gatling_10000_users.png" alt="Gatling 10000 users">
</div>
<div class="title">Figure 22. Gatling results with 10000 user</div>
</div>
</div>
<div class="sect4">
<h5 id="_security">Security</h5>
<div class="paragraph">
<p>The system is secured using Spring Security. The user data is stored in a database and the passwords are hashed using BCrypt. The API access points are secured with proper authorization. HTTPS is used to encrypt the data in transit.</p>
</div>
<div class="paragraph">
<p>The system is also protected against SQL injection via using JPA repositories and prepared statements.</p>
</div>
<div class="paragraph">
<p>The system is also designed in such a way that prevents cheating, by limiting the options available for the user and doing all validation in the backend, such as checking if the answer is correct, preventing request forgery.</p>
</div>
</div>
<div class="sect4">
<h5 id="_testability">Testability</h5>

</div>
<div class="sect4">
<h5 id="_monitoring">Monitoring</h5>
<div class="paragraph">
<p>The system is monitored using Spring Boot Actuator and Prometheus. The monitoring data is visualized using Grafana.</p>
</div>
<div class="paragraph">
<p>The actuator is deployed in <a href="https://kiwiq.run.place:8443/actuator/prometheus" class="bare">https://kiwiq.run.place:8443/actuator/prometheus</a>.</p>
</div>
<div class="imageblock text-center">
<div class="content">
<img src="./images/actuator.png" alt="actuator">
</div>
<div class="title">Figure 23. Spring Boot Actuator</div>
</div>
<div class="paragraph">
<p>The Prometheus server is deployed in <a href="http://20.199.84.5:9090" class="bare">http://20.199.84.5:9090</a>.</p>
</div>
<div class="imageblock text-center">
<div class="content">
<img src="./images/prometheus.png" alt="prometheus">
</div>
<div class="title">Figure 24. Prometheus</div>
</div>
<div class="paragraph">
<p>The Grafana is deployed in <a href="http://20.199.84.5:9091" class="bare">http://20.199.84.5:9091</a>. The Grafana dashboard is available at the following link with user <a href="mailto:[email protected]">[email protected]</a> and password aswgrafana.</p>
</div>
<div class="paragraph">
<p>The dashboard used is: <a href="https://grafana.com/grafana/dashboards/6756-spring-boot-statistics/" class="bare">https://grafana.com/grafana/dashboards/6756-spring-boot-statistics/</a>
Make sure to put kiwiq.run.place:8443 as the Instance and WIQ API as the application.</p>
</div>
<div class="imageblock text-center">
<div class="content">
<img src="./images/grafana.png" alt="grafana">
</div>
<div class="title">Figure 25. Graphana Spring Boot dashboard</div>
</div>
</div>
<div class="sect4">
<h5 id="_maintainability">Maintainability</h5>
<div class="paragraph">
<p>In our CodeScene analysis we find that our knowledge distribution is well-balanced as well as a nice code health, excepting one hotspot on a test that is not relevant.</p>
</div>
<div class="imageblock text-center">
<div class="content">
<img src="./images/codescene-general.png" alt="codescene general">
</div>
<div class="title">Figure 26. CodeScene general view</div>
</div>
<div style="page-break-after: always;"></div>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="section-technical-risks">11. Risks and Technical Debts</h2>
<div class="sectionbody">
Expand Down Expand Up @@ -1711,8 +1825,16 @@ <h2 id="section-glossary">12. Glossary</h2>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>Distractor</em></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>Incorrect answer shown to the user alongside the correct one in each question</em></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>KiWiq</em></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>The name of our project</em></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>Question Generator</em></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>A module of the application responsible for querying Wikidata, creating the questions and storing them in our DB.</em></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>A module of the application responsible for querying Wikidata, creating the questions and storing them in our DB</em></p></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -1854,9 +1976,6 @@ <h4 id="_data_management_by_the_user">13.1.3. Data management by the user.</h4>
<p>FR-DMU 1.3. Registered users shall be able to access the number of questions they have answered incorrectly.</p>
</li>
<li>
<p>FR-DMU 1.4. Registered users shall be able to access the time they have spent within the system.</p>
</li>
<li>
<p>FR-DMU 1.5. Registered users shall be able to access the ranking of the game.</p>
</li>
</ul>
Expand Down Expand Up @@ -1908,7 +2027,7 @@ <h4 id="_play_to_wiq">13.1.4. Play to WIQ.</h4>
<div class="ulist none or no-bullet">
<ul class="none or no-bullet">
<li>
<p>FR-PWIQ 3.1.1.1.1. The registered user shall earn 10 points.</p>
<p>FR-PWIQ 3.1.1.1.1. The registered user shall be notified.</p>
</li>
<li>
<p>FR-PWIQ 3.1.1.1.2. When the registered user is in the ninth round, the system shall end the game.</p>
Expand Down Expand Up @@ -1954,6 +2073,29 @@ <h4 id="_play_to_wiq">13.1.4. Play to WIQ.</h4>
</ul>
</div>
</li>
<li>
<p>FR-PWIQ 4. The system shall allow the user to create custom games.</p>
<div class="ulist none or no-bullet">
<ul class="none or no-bullet">
<li>
<p>FR-PWIQ 4.1. The user may select.</p>
<div class="ulist none or no-bullet">
<ul class="none or no-bullet">
<li>
<p>FR-PWIQ 4.1.1 The number of rounds.</p>
</li>
<li>
<p>FR-PWIQ 4.1.2 The time per round.</p>
</li>
<li>
<p>FR-PWIQ 4.1.3 The categories of the questions.</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
Expand Down

0 comments on commit c5e1126

Please sign in to comment.