Assisted Creation and Deployment of Javascript Remote Experiments

—In order to disseminate and encourage the use of remote experiments, their creation and deployment need to be simplified. This work presents a method to easily develop remote experiments interfaces in Javascript and to quickly embed them in Moodle. This solution requires the use of Easy Java/Javascript Simulations for the development of the interfaces and the EJSApp Moodle plugin to deploy them in the web platform. The proven flexibility of such solution has fostered the integration of two new experiments and also the easy adaptation of an already existing one, opening new remote labs flexibility to educational and/or training activities.


INTRODUCTION
Remote labs are gaining more and more importance and attention in the educational community [1,2]. With all the important web-browsers ending support for Netscape Plug in API (NPAPI) plugins (Chrome, Edge and Opera already dropped their support while Firefox is going to do the same within few months and Safari is expected to do so too), the technology in which Java applets and Flash relies on, groups working on developing remote labs use now Javascript for building their applications' user interfaces. While this enables the use of modern web browsers both in computers and mobile devices, those applications need to be created from scratch for each new development. This is a time consuming task when a new remote experiment is developed.
This work proposes the use of a software that eases the creation of Javascript applications to build remote experiment interfaces. A sort of app builder that provides its users with built-in tools they can use and reuse, to speed up the process of building a new remote experiment application in Javascript. However, building the remote experiment application is just the first step when these kind of resources need to be used with students. Deploying them into a Learning Management System (LMS) in order to 1) provide an educational context and 2) support their maintenance, is also important and this issue has been also addressed in other works [3,4]. In this work, the easy creation of remote labs interfaces, is complemented by the EJSApp plugin for Moodle, which allows the deployment of such created applications. By using EJSapp, it is possible to deploy these labs within courses in a LMS with just a few clicks.
In the development of a remote experiment, after the experimental setup has been built, the next step is to create the remote laboratory software application. For this pur-pose, a very interesting tool to consider is Easy java/javascript Simulations (EjsS) [5]; a free and open source tool written in Java that was originally conceived to help creating interactive simulations in Java, mainly for teaching and learning purposes. Since its appearance, more than a decade ago, EjsS has been growing and nowadays it can also be used to easily create remote laboratories. It has been massively used to create physics simulations: there are more than three hundred at the ComPA-DRE-OSP digital library [6,7], as well as many virtual and remote labs in the automatic control field (for example, those at the UNILabs network [8,9]). While all these applications were based on Java and deployed as Java applets, EjsS now offers the possibility to build Javascript simulations. In this regard, there are now plenty of Javascript simulations created with EjsS: again, ComPADRE-OSP offers a couple of hundreds of them. However, to the best of our knowledge, EjsS has only been used for building a Javascript remote experiment in the present work and in [10].
The final step is deploying the remote experiment application. The most common choice is to deploy it as a web application, as it makes it available to anyone with an Internet connection. However, this can be done in many different ways. The simplest solution would be to deploy the application in a webpage in which the whole content is the remote experiment and nothing more. However, a better solution would be to present such application in a more complete website such as a LMS that could offer tons of additional features related to the use and management of the remote experiment, which could also offer some related documentation, and where it could be freely available in 24/7 with and/or without a booking system. Actually, embedding remote experiments into LMS is one of today's most important and active topics in the area [1]. While the positive effects that collaborative student interaction has over remote lab activities have been widely extensive and proven [11]- [14], most of the online labs developed to date suffer from a lack of providing social contexts which support collaborative group work [15,16]. A possible approach to enrich remote labs with collaborative features is deploying them into LMSs. This way, RLs can take advantage of the LMSs capabilities to support the virtual interaction among participants.
All applications created with EjsS (either if they are Java-based or Javascript-based) can be embedded into the Moodle LMS with just a few clicks. For this, a plugin (developed by some of the authors) called EJSApp [17] is used. Not only the applications get embedded in the LMS but they also gain some additional features automatically, such as: connection with a booking system that may be PAPER ASSISTED CREATION AND DEPLOYMENT OF JAVASCRIPT REMOTE EXPERIMENTS used for controlling the access to the remote experiment, multilanguage support, saving data and image files from the virtual or remote experiment application to the users' files repository in the LMS, grading, monitoring the time spent by users working with the experiment or backup and restore options. It is important to highlight, once again, that all the previous features are gained automatically when adding an EjsS application to Moodle by means of the EJSApp plugin.
For these reasons, the present work describes a solution to embed a Javascript remote experiment inside Moodle, using EjsS and the EJSApp plugin.

A. The Tested Setup
A very simple remote experiment, presented in [18], was used to test the solution flexibility described above. The setup is working for more than 1 year non-stop in the Faculty of Engineering, University of Porto (FEUP), and it was also demonstrated at REV'16 [19] and at ACE16 (IFAC) [20]. The experiment was easily designed and developed just to test a new embedded hardware and software solution for remote monitoring, actuation and data providing. It allows to switch on/off a light bulb, to measure its temperature with a thermocouple and to use a fan as a perturbation element.
The new adopted solution uses a webserver developed at FEUP and is based on a microcontroller from Microchip. A Maxim IC was used as temperature signal conditioning.
Through the webpage interface the user can switch both the lamp and the fan, can observe the temperatures readings both from lamp and environment, can save the temperatures data and can use an elementary on-off temperature control.
The solution reliability and stability proved to be excellent and so it was considered as a good example to embedding its Javascript remote interface inside Moodle, using EjsS and the EJSApp plugin

B. Integration of new experiments
After the well succeed remote experiment interface built in Javascript using EjsS and embedded into Moodle [17] this tool became popular at the group of remote labs at FEUP. So, other examples have been on the way. The hardware solution here described are currently developed and located at FEUP. For developing each of the experiments interface the following steps were accomplished: • To rebuild the HTML interface; • To embed the newly created remote experiment interfaces in Moodle by means of the EJSApp plug-in.
The process is smart and easy and it brought additional benefits for free such as multilanguage support, to allow users to save files from the experiment to the LMS files repository, to get more than a version for the experiment according to the users' perspectives of the topic, etc. However, for achieving a better flexibility the booking system also needed to be more flexible.
The EJSApp Booking module is the user interface for the booking system that is used with EJSApp, allowing each user to book a particular timeslot for a remote experiment.
Originally, the booking system only permitted a timeslot of one hour to perform the experiment. However, due to the nature of the experiments and the expected huge number of students in the course of Instrumentation for Measurement (I&M) at FEUP, there was a need to allow for shorter timeslot intervals. Some developments had originally been made to offer timeslot configurable sizes, however they were not yet operational. The cooperation between both FEUP and UNED institutions had also been efficient at this stage.
The database had generic date-time fields for both the start and end times of each booked slot as well as configuration parameters for each remote lab and, as such, required no changes. The EJSApp module also did not need changes, since it compared the current time directly to the start and end times on the database. The Remote Lab Manager also had support for the configuration parameters, even though some changes needed to be made in regards to default values and stability.
On the other hand, the EJSApp Booking module did not have any support for variable timeslots and this was a desired feature, so it needed to be updated. This involved the replacement of every instance of hard-coded timeslots with the configuration values as well as generating and managing the user interface.
The system that was implemented allows to choose one of five different possible timeslot durations: 2, 5, 15, 30, or 60 minutes.
When students need to make different experiments it requires different bookings. A direct link from the personal booking page of Moodle was implemented in order to redirect the user for the corresponding scheduled experiment.
Due to restrictions on the number of IP addresses with external access to protect the institution security it was decided to implement the infrastructure in a way that allows the use of a single external IP for all the remote experiments.
Therefore, the architecture shown in Fig. 1 was implemented by fitting a server with two different network cards, one connected to the Internet and the other connected to a closed network that includes only the webserver itself and the remote experiences, including the IP cameras for each one.

III. ADAPTING EXPERIMENTS TO THE USERS OBJECTIVES
The present smart and easy way for configuration of remote labs user interfaces exploring the training objectives of a specific course, added a valuable insight for the integration effort of experiments. At the present two of the new remote experiments at FEUP have two available interfaces: a general one and a specific one with a focused goal, adapted to a particular interest, discipline and objective of its curriculum. In this section the two examples will be shortly described to emphasize these features.

A. Level Measurement and Control
For this remote experiment two interfaces were developed. The generic interface version is named Basic Control Strategies and is represented in Fig. 2. The specific one is named as Level Transducers Characterization and is used for a particular objective of the I&M course.
In the first it is possible to take advantage of the system in order to observe each transducer level reading, exhibiting different responses and also to observe and to clarify which of them is a transducer or a detector. The experiment also offers two basic types of control algorithms (the system dynamics limits the use of control strategies) [20]. In the Automatic mode the available controllers are, Fig.  2, [20]: • Hybrid Controller based on a P controller; • Relay Controller; A second interface (Level Transducers Characterization) was prepared to offer the setup easily suitable to allow students to perform the transducers characterization within the available measuring range in the water tank. So, the transducers outputs in volts are displayed according to the water level value in mm, being this provided by the moving level in the animation, as seen in the bottom right side image, similarly to Fig. 2.
This particular lab has been used in the I&M course to convey characteristics of different level transducers, avoiding any theoretical class for this specific topic. The follow up of students' activity in this topic has been presently tested and results are under analysis.

B. Mechanical Material Characterization
Also, to serve a particular objective the generic interface named Cantilever Beam Bending Test in Fig. 3, was adapted to Measurement of Mechanical Parameters.
This particular remote experiment was conceived to illustrate topics related with bending beams, material properties and concepts and measurement based on resistance strain gauges.
A specific interface of the experiment allows to get values coming from strain gauges conditioning systems under beam loads and is named as Measurement of Mechanical Parameters. For each load value students have to determine the corresponding strain measured by the sensors for the transverse and longitudinal strains. Considering the beam geometry available in the System Information button, the determination of mechanical stress for each value of measured strain is also achievable. So, based on these values, it will be possible the graphical representation of Force vs. Strain and Stress vs. Strain, and to understand the difference between both. With strain values the determination of Poison Coefficient and Young Modulus are also expected.  Creating interfaces for already existing remote experiments (or for new ones) gets easy and fast thanks to the use of EjsS. The Javascript applications built this way are integrated into an online course in Moodle with just a few clicks, complementing them with all the necessary educational resources. Being based on Javascript and deployed into a modern LMS, the applications can also be used in