added base information for the game allocator

This commit is contained in:
2025-10-08 11:53:57 +01:00
parent af48a2c184
commit 3729db43c0
3 changed files with 157 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
% Created 2025-04-06 Sun 12:44
% Created 2025-10-08 Wed 11:52
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
@@ -25,7 +25,7 @@
\begin{document}
\section{Xplane WebRTC}
\label{sec:orgb89245a}
\label{sec:org0e3cbea}
\begin{center}
\includegraphics[width=.9\linewidth]{./xprc.drawio.png}
\end{center}
@@ -76,7 +76,7 @@ approach and this open lot of areas of future research and hopefully better
performant flight simulators with better purposed algorithm to offload tasks to
devices such as FPGAs or potato machines in abstraction layer similar to speaking nodes in an network.
\section{Architecture}
\label{sec:orgcd900b9}
\label{sec:orgb730ec5}
This chapter dives into the high architecture design of the
project and each module is communicated in detail on the following
section below.
@@ -85,4 +85,80 @@ section below.
\includegraphics[height=500px]{./Flightsimarch.drawio.png}
\caption{High level architecture of the entire project}
\end{figure}
\subsection{Game allocator}
\label{sec:orgd67a679}
The game allocator stores information about the game sessions. This consists of attributes
such as:
\begin{verbatim}
- Game Session ID <UUID>
- Session name <String>
- Nodes Running the game [
{ Rendered Node IP <String>
Rendered Node Specs <Node Specs>
Flight Route Path loaded <TBD when network
scenery files
defined>
User on Node <UUID>
Flight Sim API url <String>
} ..... N ]
- Instructor ID <String>
\end{verbatim}
The following above shows a high level data structure for storing session
information. A session consists of multiple pilots training with a single
instructor. Each pilot is assigned a node to render the game remotely
and the instructor can set the scenarios to be trained on.
\subsubsection{Interfaces}
\label{sec:org380680a}
We will now motivate the higher level interfaces to construct a \uline{game allocator}
this term is inspired from the use of terms like \emph{malloc} and \emph{free} in userspace
for allocating memory in a kernel.
\begin{verbatim}
Instructor = AddInstructor(<Instructor object>)
\end{verbatim}
This function creates a insturctor in database.
\begin{verbatim}
Player = AddPlayer(<player object>)
\end{verbatim}
Creates a player (i.e trainer) to the database.
\begin{verbatim}
NodePlayer = AllocateNode(<player object>)
\end{verbatim}
Finds a free node varaible and adds allocates
a player to it based on least latency.
\begin{verbatim}
FreeNode(NodePlayer)
\end{verbatim}
Frees the player from the node. Normally called
after the end of the flight session.
\begin{verbatim}
Node = AddNode(<register node information>)
\end{verbatim}
Adds a node that can redered the flight sim
into the network.
\begin{verbatim}
FreeNode(Node)
\end{verbatim}
Removes the flight sim render node
from the network.
\begin{verbatim}
Session = CreateSession([Player],...n],[Instuctor,...n])
\end{verbatim}
Create session of players mapped and adds
instructors to the session. This function
is a high level function that encapsulates
\emph{AllocateNode} and maps it to \emph{Instructors}.
\begin{verbatim}
FreeSession(Session)
\end{verbatim}
Free the entire session created.
\end{document}