## 5 SARA Data Model
### Sessions  
The main concept of the data model is the _Session_ which can be translated to the concept of a _Scene_ as previously mentioned. However, there is a slight change in the interpretation of the concept. Since we want to provide collaboration capabilities, we have to enable several users to share AR content and interactions. Hence, multiple users may connect to the same _Session_. The digital elements associated with a _Session_ will be shared among the connected users. SARA is capable of handling several _Sessions_ at the same time, each with its own resources, its connected users and its functional objective.  
Each _Session_ has a _SessionStatus_ associated, which includes a reference to a root _Node_. This _Node_ also finds its counterpart in the aforementioned platforms (i.e., a GameObject in Unity and a SCNNNode in ARKit for example). A _Node_ keeps a reference to its parent and its children, which make up a tree-like hierarchical structure referenced by the root node. Besides that, a _Node_ may or may not have an associated _Mesh_, which stores the graphic information of the 3D model. It is possible to have _empty Nodes_, that only have a _Transform_ (a position, rotation or scale) but no associated _Mesh_, with the aim of grouping several nodes under the same parent.  
Regarding the _Mesh_, we have made the decision to keep it as simple as possible. To do so, we only store a list of vertices (each three numbers on the array form a vertex), a list of triangles (each number references the index of a vertex of the vertices array while every three indexes form a triangle) and a list of normals (each one associated with the vertices). we have decided to define the faces of the mesh as triangles to simplify the development process. However, if it is required to use faces formed by more than three vertices, it is easy to make that change.  
Finally, each _Session_ has an _Alignment Info_ field associated. As shown in Figure 8, this class represents a common point from where different strategies can be implemented. For example, it is possible to set the _Alignment Info_ to be _Marker Based_. This indicates that users must physically locate the marker image on his environment and once it has been found, the new coordinate system that encompasses the _Session_ will be centered on it. In the future we are planning to allow the alignment to be established through the use of SLAM maps [32]. However, at this moment this process is not straightforward, since each platform and framework generates a different representation of the same physical space and they use different formats to handle that information. Today, some industry solutions are beginning to appear to solve this challenge, like for example, the Azure Spatial Anchors [29] solution from Microsoft. Since that process requires machine learning capabilities and it goes beyond the scope of this document, it has been decided to support it within the data model, leaving it for a future implementation. Additionally, the use of geo-positioning techniques like GPS may be integrated into the alignment in future versions. To end with the _Alignment Info_, there is a simpler possibility: to not align the virtual content. In this case each _SARA Client_ should offer the user some kind of functionality to choose a real-world physical point that represents the previously mentioned coordinate system.  
Figure 8: Detail on the Alignment Method associated with a Session.