# A Virtual Learning Architecture Enhanced by Fog Computing and Big Data Streams
## 5 Preliminary Case Study
### Implementation  
To monitor the students and their studying habits, in this preliminary implementation, we considered simply data coming directly from the smartphones of the students themselves. The students had to own an Android smartphone with at least Version 4.1 (Jelly Bean) of their operating system; moreover, we endowed each student with a proper smartband, i.e., a Xiaomi AMAZFIT Smartband ([[http://www.huami-usa.com/](http://www.huami-usa.com/)]([http://www.huami-usa.com/](http://www.huami-usa.com/))), and we asked them to wear it when studying. We implemented a basic Android app, whose main screenshots are depicted in Figure 6. This app takes advantage of Storm API Version 1.1.1 and SAMOA API Version 0.4.0. For the sake of simplicity, SAMOA tasks were concentrated in the students' smartphones, while the SAMOA topology was made of PIs interfacing directly with GPS, timing and Heartbeat Rate Variability (HRV) sensors.  
The data collected by the implemented app are, as a consequence, the following:  
* GPS data coming from the smartphone of the students itself;
* timing data coming from the smartphone of the students itself;
* Heartbeat Rate Variability (HRV) coming from the smartband.  
We considered HRV as a possible index of fatigue and drowsiness of the autonomous nervous system activity, as studied in [47]. This datum is retrieved from the app installed on the smartphone and that can communicate via Bluetooth with the smartband. HRV is computed considering a temporal window of 1 min and averaging data sampled at a 1-ms rate. Data are collected by the app when the student starts a studying session inserting the data of the course and of the attending lesson (Figure 6b). This is a voluntary task the students involved in this study were requested to perform before actually studying. As can be seen from Figure 6c, having selected the data of the studying session, the student can look at his/her real-time data: location, time of starting of the studying session and its duration, as well as heart beat rate. On this page, the student can press the button at the bottom to get a list of LOs he/she can choose to study, depicted in Figure 6d. Finally, the student can select one or more LOs, among the ones suggested, and press a button to send feedback on the used LOs to the cloud part of the VLE, as well as to the teachers.  
In a future and more complex implementation, some further data could be collected about past education experiences and past social and private backgrounds of the students during their enrollment procedure, through opportune forms and questionnaires. Some examples concern grade point average in secondary school, type of secondary school, family income level, parents' level of education, parent's jobs, if any, presence of certified disabilities in the students or family members, age, gender, and the like. These data could go directly to the cloud level, where the the upper mining layer resides, and could be used for suggesting to teachers and educational managers the most suitable algorithms to be employed for analyzing the incoming group of students. Moreover, the upper layer could listen continuously to data collected from the lower layers in the fog, to enact adaptive changes in the algorithms recommended to instructors and managers, according to the specific situation. However, these data were not used in this simple and preliminary implementation, where a single suggesting algorithm is used, namely vertical Hoeffding tree.  
Figure 6: Main screenshots of the implemented app.