Compare commits

...

7 Commits

Author SHA1 Message Date
d7ca87d9e5 feat: add xurl package to allow long URL breaks in the document
All checks were successful
Build LaTeX Document / build_latex (push) Successful in 4m0s
2025-04-02 17:13:27 +02:00
f5bb59f433 feat: add new references to bibliography, fix lexical errors
All checks were successful
Build LaTeX Document / build_latex (push) Successful in 3m55s
2025-04-01 15:13:26 +02:00
09745960cc fix: update academic year in title page of thesis document
All checks were successful
Build LaTeX Document / build_latex (push) Successful in 4m7s
2025-03-31 20:17:23 +02:00
ae3023d688 feat: add dedication and acknowledgments sections to the thesis document
All checks were successful
Build LaTeX Document / build_latex (push) Successful in 4m42s
2025-03-31 18:19:35 +02:00
6f4cd93528 feat: add new images for unicast, multicast, broadcast, and P2P network, and update bibliography with relevant citations
All checks were successful
Build LaTeX Document / build_latex (push) Successful in 5m26s
2025-03-31 16:08:20 +02:00
f9e8345eba fix: update P2P traffic statistics and improve clarity in the report
All checks were successful
Build LaTeX Document / build_latex (push) Successful in 3m25s
2025-03-30 19:58:41 +02:00
d63589fe73 feat: add player and webrtc statistics aggregation scripts, update subproject reference, and include latency images 2025-03-30 19:55:01 +02:00
13 changed files with 987 additions and 160 deletions

View File

@@ -165,6 +165,14 @@
note = {[Accessed 20-03-2025]}
}
@misc{geeksforgeeksAggregationMongoDB,
author = {},
title = {{A}ggregation in {M}ongo{D}{B} - {G}eeksfor{G}eeks --- geeksforgeeks.org},
howpublished = {\url{https://www.geeksforgeeks.org/aggregation-in-mongodb/}},
year = {},
note = {[Accessed 01-04-2025]}
}
@misc{geeksforgeeksContainerizationUsing,
author = {},
title = {{C}ontainerization using {D}ocker - {G}eeksfor{G}eeks --- geeksforgeeks.org},
@@ -221,6 +229,22 @@
note = {[Accessed 18-03-2025]}
}
@misc{influxdataInfrastructureMonitoring,
author = {},
title = {{I}nfrastructure {M}onitoring {B}asics with {T}elegraf, {I}nflux{D}{B}, and {G}rafana --- influxdata.com},
howpublished = {\url{https://www.influxdata.com/blog/infrastructure-monitoring-basics-telegraf-influxdb-grafana/}},
year = {},
note = {[Accessed 01-04-2025]}
}
@misc{innovationyourselfDockerDocker,
author = {},
title = {{D}ocker vs {D}ocker {C}ompose vs {D}ocker {S}warm s docker engine --- innovationyourself.com},
howpublished = {\url{https://innovationyourself.com/docker-vs-docker-compose-vs-docker-swarm/}},
year = {},
note = {[Accessed 01-04-2025]}
}
@misc{ipfsIPFSWhitepaper,
doi = {10.48550/ARXIV.1407.3561},
url = {https://arxiv.org/abs/1407.3561},
@@ -331,6 +355,14 @@
note = {[Accessed 07-Mar-2023]}
}
@misc{qabrainsSeleniumGrid,
author = {},
title = {{S}elenium {G}rid 4 - {A}rchitecture and {C}ommunication --- qabrains.com},
howpublished = {\url{https://qabrains.com/selenium-grid-4-architecture-and-communication}},
year = {},
note = {[Accessed 01-04-2025]}
}
@phdthesis{ResearchBasedDataRightsManagementUsingBlockchainOverEthereumNetwork,
author = {Naz, Muqaddas and Javaid, Nadeem and Iqbal, Sohail},
year = {2019},
@@ -439,6 +471,14 @@
month = {9}
}
@online{The360Degree,
author = {The 360 Degree},
title = {Own work},
year = {2022},
url = {https://commons.wikimedia.org/w/index.php?curid=116056511},
note = {Licensed under CC BY-SA 4.0}
}
@misc{theoryBitTorrentSpecificationTheoryOrg,
author = {},
title = {{B}it{T}orrent{S}pecification - {T}heory{O}rg --- wiki.theory.org},
@@ -483,6 +523,22 @@
note = {[Accessed 11-Feb-2023]}
}
@misc{uclvDockerOverview,
author = {},
title = {{D}ocker overview --- docker-docs.uclv.cu},
howpublished = {\url{https://docker-docs.uclv.cu/get-started/overview/}},
year = {},
note = {[Accessed 01-04-2025]}
}
@online{VignoniCalimo2009,
author = {David Vignoni and Calimo},
title = {By Gnome-fs-client.svg: David Vignoni, Gnome-fs-server.svg: David Vignoni, derivative work: Calimo},
year = {2009},
url = {https://commons.wikimedia.org/w/index.php?curid=15782858},
note = {Licensed under LGPL}
}
@misc{w3c,
author = {W3C},
title = {What is the difference between the Web and the Internet?},
@@ -523,6 +579,38 @@
note = {[Online; accessed 05-April-2023]}
}
@misc{wiki:Broadcasting_networking,
author = {Wikipedia},
title = {{Broadcasting (networking)} --- {W}ikipedia{,} The Free Encyclopedia},
year = {2025},
howpublished = {\url{http://en.wikipedia.org/w/index.php?title=Broadcasting\%20(networking)&oldid=1238402634}},
note = {[Online; accessed 31-March-2025]}
}
@misc{wiki:Content_delivery_network,
author = {Wikipedia},
title = {{Content delivery network} --- {W}ikipedia{,} The Free Encyclopedia},
year = {2025},
howpublished = {\url{http://en.wikipedia.org/w/index.php?title=Content\%20delivery\%20network&oldid=1279155231}},
note = {[Online; accessed 31-March-2025]}
}
@misc{wiki:Multicast,
author = {Wikipedia},
title = {{Multicast} --- {W}ikipedia{,} The Free Encyclopedia},
year = {2025},
howpublished = {\url{http://en.wikipedia.org/w/index.php?title=Multicast&oldid=1270123732}},
note = {[Online; accessed 31-March-2025]}
}
@misc{wiki:Network_address_translation,
author = {Wikipedia},
title = {{Network address translation} --- {W}ikipedia{,} The Free Encyclopedia},
year = {2025},
howpublished = {\url{http://en.wikipedia.org/w/index.php?title=Network\%20address\%20translation&oldid=1283227709}},
note = {[Online; accessed 01-April-2025]}
}
@misc{wiki:PeerTube,
author = {Wikipedia},
title = {{PeerTube} --- {W}ikipedia{,} The Free Encyclopedia},
@@ -531,6 +619,14 @@
note = {[Online; accessed 24-March-2025]}
}
@misc{wiki:Unicast,
author = {Wikipedia},
title = {{Unicast} --- {W}ikipedia{,} The Free Encyclopedia},
year = {2025},
howpublished = {\url{http://en.wikipedia.org/w/index.php?title=Unicast&oldid=1222709440}},
note = {[Online; accessed 31-March-2025]}
}
@misc{wikipediaLicenzainformatica,
author = {Wikipedia},
title = {{L}icenza (informatica) - {W}ikipedia --- it.wikipedia.org},

687
Tesi.tex

File diff suppressed because it is too large Load Diff

BIN
images/Broadcast.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
images/Multicast.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

BIN
images/Unicast.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
images/p2p-network.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View File

@@ -0,0 +1,103 @@
/* global use, db */
// MongoDB Playground
// To disable this template go to Settings | MongoDB | Use Default Template For Playground.
// Make sure you are connected to enable completions and to be able to run a playground.
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.
// The result of the last command run in a playground is shown on the results panel.
// By default the first 20 documents will be returned with a cursor.
// Use 'console.log()' to print to the debug output.
// For more documentation on playgrounds please refer to
// https://www.mongodb.com/docs/mongodb-vscode/playgrounds/
// Select the database to use.
use('statistics');
// Insert a few documents into the sales collection.
db.getCollection('peertube_hetzner_high_latency').aggregate(
[
{
$group: {
_id: "$tags.session",
maxDownPeers: {
$max: "$player.Download Breakdown.Peers"
},
maxDownServer: {
$max: "$player.Download Breakdown.Server"
},
}
},
{
$group: {
_id: null,
totalDownPeers: {
$sum: "$maxDownPeers"
},
totalDownServer: {
$sum: "$maxDownServer"
}
}
},
{
$project: {
_id: 0,
totalDownPeers: 1,
totalDownServer: 1,
totalComputedDown: {
$sum: [
"$totalDownPeers",
"$totalDownServer"
]
}
}
},
{
$project: {
totalDownPeers: 1,
totalDownServer: 1,
totalComputedDown: 1,
percentageOfTotalPeers: {
$round: {
$multiply: [
{
$divide: [
"$totalDownPeers",
"$totalComputedDown"
]
},
100
]
}
},
percentageOfTotalServer: {
$round: {
$multiply: [
{
$divide: [
"$totalDownServer",
"$totalComputedDown"
]
},
100
]
}
},
ratio: {
$round: {
$divide: [
"$totalDownPeers",
"$totalDownServer"
]
}
}
}
},
{
$sort: {
ratio: -1
}
},
{
$limit: 10
}
]
)

View File

@@ -0,0 +1,255 @@
/* global use, db */
// MongoDB Playground
// To disable this template go to Settings | MongoDB | Use Default Template For Playground.
// Make sure you are connected to enable completions and to be able to run a playground.
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.
// The result of the last command run in a playground is shown on the results panel.
// By default the first 20 documents will be returned with a cursor.
// Use 'console.log()' to print to the debug output.
// For more documentation on playgrounds please refer to
// https://www.mongodb.com/docs/mongodb-vscode/playgrounds/
use("statistics");
let formattedDate = (date) => ({
unix: { $toLong: date },
iso: { $toString: date },
});
// Find the minimum timestamp and calculate the maximum timestamp (one hour later) for a collection
function getTimeWindow(collectionName) {
const minTimestamp = db.getCollection(collectionName).aggregate([
{ $sort: { timestamp: 1 } },
{ $limit: 1 },
{ $project: { _id: 0, timestamp: 1 } }
]).toArray()[0]?.timestamp;
if (!minTimestamp) return null;
const maxTimestamp = new Date(minTimestamp.getTime() + 60 * 60 * 1000);
return { minTimestamp, maxTimestamp };
}
// Get time windows for both collections
const highLatencyTimeWindow = getTimeWindow("peertube_hetzner_high_latency");
const defaultLatencyTimeWindow = getTimeWindow("peertube_hetzner_default_latency");
// Function to perform the aggregation for a given collection
function getAggregationResult(collectionName, timeWindow) {
if (!timeWindow) return [];
return db.getCollection(collectionName).aggregate([
// Filter documents within the collection's specific time window
{
$match: {
timestamp: {
$gte: timeWindow.minTimestamp,
$lt: timeWindow.maxTimestamp
}
}
},
{
$unwind: "$peers"
},
{
$match: {
"peers.iceConnectionState": "connected"
}
},
{
$unwind: "$peers.values"
},
{
$match: {
"peers.values.type": "data-channel",
}
},
{
$group: {
_id: "$peers.id",
maxBytesReceived: {
$max: "$peers.values.bytesReceived"
},
maxBytesSent: {
$max: "$peers.values.bytesSent"
}
}
},
{
$group: {
_id: null,
totalMaxBytesReceived: {
$sum: "$maxBytesReceived"
},
totalMaxBytesSent: {
$sum: "$maxBytesSent"
}
}
},
{
$project: {
_id: 0,
collection: collectionName,
totalBytesReceived: "$totalMaxBytesReceived",
totalBytesSent: "$totalMaxBytesSent",
formattedBytesReceived: {
$switch: {
branches: [
{
case: {
$gte: [
"$totalMaxBytesReceived",
1073741824 // 1024^3
]
},
then: {
$concat: [
{
$toString: {
$divide: [
"$totalMaxBytesReceived",
1073741824 // 1024^3
]
}
},
" GiB"
]
}
},
{
case: {
$gte: [
"$totalMaxBytesReceived",
1048576 // 1024^2
]
},
then: {
$concat: [
{
$toString: {
$divide: [
"$totalMaxBytesReceived",
1048576 // 1024^2
]
}
},
" MiB"
]
}
},
{
case: {
$gte: [
"$totalMaxBytesReceived",
1024 // 1024^1
]
},
then: {
$concat: [
{
$toString: {
$divide: [
"$totalMaxBytesReceived",
1024 // 1024^1
]
}
},
" KiB"
]
}
}
],
default: {
$concat: [
{
$toString:
"$totalMaxBytesReceived"
},
" bytes"
]
}
}
},
formattedBytesSent: {
$switch: {
branches: [
{
case: {
$gte: [
"$totalMaxBytesSent",
1073741824 // 1024^3
]
},
then: {
$concat: [
{
$toString: {
$divide: [
"$totalMaxBytesSent",
1073741824 // 1024^3
]
}
},
" GiB"
]
}
},
{
case: {
$gte: [
"$totalMaxBytesSent",
1048576 // 1024^2
]
},
then: {
$concat: [
{
$toString: {
$divide: [
"$totalMaxBytesSent",
1048576 // 1024^2
]
}
},
" MiB"
]
}
},
{
case: {
$gte: ["$totalMaxBytesSent", 1024] // 1024^1
},
then: {
$concat: [
{
$toString: {
$divide: [
"$totalMaxBytesSent",
1024 // 1024^1
]
}
},
" KiB"
]
}
}
],
default: {
$concat: [
{ $toString: "$totalMaxBytesSent" },
" bytes"
]
}
}
}
}
}
]).toArray();
}
// Get results from both collections using their respective time windows
const highLatencyResults = getAggregationResult("peertube_hetzner_high_latency", highLatencyTimeWindow);
const defaultLatencyResults = getAggregationResult("peertube_hetzner_default_latency", defaultLatencyTimeWindow);
// Combine and return the results
const combinedResults = [...highLatencyResults, ...defaultLatencyResults];
combinedResults;