## 3 Proposed Pipeline
### Capture  
The first goal of the pipeline is to record large amounts of users' interactions performed using remote applications or equipment (e.g., interactive 3D applications in public exhibits, immersive devices in research infrastructures or labs, etc.). This involves the development of a scalable service able to handle and track incoming interaction states via network connection, while storing them on a dedicated hub (or multiple hubs). The first challenge was thus to properly design a flexible architecture in terms of session tracking and retrieval, state variable definitions (e.g., custom attributes to track), reliability and an on-demand model. The designed protocol between the client application and the hub is as follows:  
1. The client application requests a new session, including the intended attributes to record;
2. If the capture service responds successfully, a new session is initiated on the hub and the unique ID is sent to the client;
3. The client is now able to send progressive data chunks to the hub, with custom policies. When requesting a new session, the client application formalizes a list of attributes that will be tracked during the session. This includes, for instance, spatial attributes (like virtual/physical 3D locations, eye movements, focal points, HMD location in physical space, GPS coordinates, etc. ), interaction states related to the application logic or equipment (like BCI headsets' EEG voltages for each channel, wearable device signals, etc.) or other attributes. Although, within this work, we are mainly interested in virtual or physical spaces, such abstraction allows clients to independently define and formalize a _frame_ with custom variables to track during a session, offering huge flexibility to monitor specific interactions, equipment or application states. The request includes also an optional \(groupID\) that allows us to capture multiple sessions under a common set; for example, in 3D applications, this may refer to a scene or object ID, while, in EEG sessions, \(groupID\) may refer to an experiment or trial. Once the service responds successfully (the session is initiated), the client application receives a unique ID (string) referring to the session. Defined attributes are collected locally and sent as progressive data chunks; this ensures that the hub maintains a valid stored record in the event that the network connection is dropped. Interaction attributes can be recorded by the client application based on a fixed time interval policy (e.g., 0.1 s) or based on custom event-driven policies. If the session does not exist, is expired or reaches the configured limitations (duration, storage, etc. ), the data chunk is dropped and the client is notified. The open-source capture service was developed under the H2 IOSC project (under E-RIHS services) on top of Node.js ([[https://nodejs.org/](https://nodejs.org/)]([https://nodejs.org/](https://nodejs.org/)), accessed on 22 April 2024), using the micro-service architectural style [39] to provide a modular and scalable approach for deployment in research infrastructures (RIs) that are part of the H2 IOSC federation or in external infrastructures. In order to facilitate integration and provide access to the scientific community, a REST API has been designed for the open-source capture service under the H2 IOSC project, following the guidelines established in Work Package 6, based on existing best practices [40; 41; 42]. The _OpenAPI_ specification ([[https://www.openapis.org/](https://www.openapis.org/)]([https://www.openapis.org/](https://www.openapis.org/)), accessed on 22 April 2024) was also embraced to provide a formal description and documentation [43] for all exposed functionalities, targeting developers willing to access or integrate the capture service for interactive applications or remote devices. Within the presented work, the capture service was used to monitor a set of attributes in virtual 3D spaces over time, including users' 3D locations, orientations, view directions, navigation modes and fields of view.