A New Framework for Remote Laboratory ...

4 downloads 14396 Views 435KB Size Report
this new framework will significantly benefit future remote laboratory development. 1. ... software package of Node.js which is implemented on the server side, and a ... combines FFMPEG, which is a powerful cross platform command line video.
2013 International Conference on Advances in Information Technology Lecture Notes in Information Technology, Vol.39

A New Framework for Remote Laboratory Development Ning Wang1,a, Xuemin Chen2,b, Gangbing Song3,c, Hamid Parsaei4,d 1

Dept. of Computer Science, Texas Southern University, Houston, USA

2

Dept. of Engineering Technology, Texas Southern University, Houston, USA 3

Dept. of Mechanical Engineering, University of Houston, Houston, USA

4

Department of Mechanical Engineering, Texas A&M University at Qatar, Doha, Qatar a

[email protected], [email protected], [email protected], [email protected]

c

Keywords: Remote Laboratory, Traversing Firewall, HTTP-Proxy, HTTP Live Streaming

Abstract. In this paper, we propose a new framework for remote laboratory experiment development. This new framework includes two innovative solutions, namely, real-time remote experiment live streaming video transmission and real-time control command and experiment data transmission. With the new framework, users can conduct or view the real-time remote experiment with any Internet browser without the firewall issues and without the need for a third party plug-in. In addition, this new framework will significantly benefit future remote laboratory development. 1. Introduction Given that the limited number of experiments can be made available for student labs due to increasing complexity which limits the ability of universities to fund courses on such matters, an alternative solution is the remote laboratory, which allows students to perform real experiments remotely via the Internet [1]. Remote experiments are defined as that users conduct real experiments using real instruments and components through the Internet. Remote experiments offer a range of benefits that can significantly improve pedagogical success: 1) they adapt to the pace of each student; 2) an experiment may be concluded from home if the time allotted at the laboratory was not sufficient;3) it can be repeated to clarify indeterminate measurements obtained at the laboratory; 4) the student may improve the effectiveness of his or her time spent at the laboratory by rehearsing the experiment beforehand; 5) safety and security are improved as there is no risk of catastrophic failures[2]. In the last two decades, the engineering education community has carried out numerous initiatives to develop and implement remote laboratory activities in engineering education. This trend resulted concomitantly from the availability of innovative software packages for instrumentation and simulation, as well as the necessity to better support active and collaborative learning. In these solutions for the remote laboratory development, there are mainly two kinds of system architecture, i.e., Client-Server architecture and Browser-Server architecture. In the early remote laboratory system, most of solutions for remote experimentation mainly relied on Client-Server architecture [3]. One of the popularly deployed technologies at the time for remote panel over the Internet is National Instrument’s LabVIEW (Laboratory Virtual Instrument Engineering Workbench)[4]. With the development of computer technology, the Browser-Server architecture technology is becoming increasingly more stable, and new technologies have since been developed to support more complex Internet applications based on a web browser. To adopt the Browser-Server architecture, LabVIEW integrated a new feature to interact with the Virtual Instruments by using the Restful web services technology. REST (Representational State Transfer) provides alight weight protocol accessible to a 978-1-61275-064-4/10/$25.00 ©2013 IERI

205

ICAIT 2013

wide variety of clients. This architecture does not require complex message passing and provides a simple interface for the user to use Web services in LabVIEW. However, it requires the client interface to be developed using different technologies[5].In addition, as the number of remote experiments increases, the software is not capable of handling multiple users with multiple resources. Consequently, we introduced a unified framework for remote laboratory experiments development in order to allow the set up of a distributed network of online experiments that work in any Internet browser without the need of any additional plug-in[5].Nevertheless, we faced some new challenges during the unified framework development and deployment. The real-time communication between browser and server, and traversing network firewall are two critical issues we strived to resolve. In this paper, we present new framework with two innovative solutions to improve the unified framework for the remote laboratory development. The new framework includes three parts: the client web application, the server application and the experiment control application.Socket.IO which is a JavaScript library of Node.js issued to support the real-time web application development and Node-HTTP-Proxy is used to support the traversing network firewall. To address the real-time experiment video transmission, HTTP Live Streaming (HLS) is used for real-time video transmission across network firewall. 2. Previous Work In our previous work, we developed a unified remote laboratory framework which allows distributed online experiments to work in any Internet browser independent of any additional plug-ins and also resolved some challenge issues of developing cross-browser and cross-device web user interface[5][6]. We have used this framework to implement some remote control engineering experiments. For example, the new Smart Vibration Platform (SVP) remote experiment is now used to teach students in mechanical engineering courses at the University of Houston. This remote control experimentation is aimed to offer student hands-on experience through the Internet on structural vibration control by using a Magneto-Rheological (MR) and Shape Memory Alloy (SMA) braces to control the vibration. In order to improve the control commands and experiment data transmission performance of the unified framework, we developed a Comet solution via Socket.IO.Socket.IO is a software package of Node.js which is implemented on the server side, and a new web socket protocol which lets the experiment communicate with Socket.IO is created for experiment control workstation[7]. Nevertheless, the real-time experiment live streaming video is transferred via network port 1026 and the real-time control command and experiment data are transferred via network port 1029 based on this improved Comet solution. With this improved unified framework, users can remotely conduct the experiment by using Internet browser on any portable device without installing any plug-in via the two special network ports 1026 and 1029open. Normally, the special network ports are restricted and blocked by network firewalls in most universities, institutes and companies based on the security regulations. Only port 80 is open for accessing the web contents on web server. Thus, we were motivated to develop a new framework to solve the traversing network firewall issue. 3. The New Framework for Remote Laboratory Development The new framework is based on the Web 2.0 technology. The client web application is based on Hyper Text Markup Language (HTML), Cascading Style Sheets (CSS), and JQuery/JQuery-Mobile JavaScript libraries. The Mash up technology is used for user interface implementation. The client web application can be run in most of current popular browsers such as IE, Firefox, Chrome, Safari etc. The server application is based on Web Service technology, and is directly built on top of MySQL database, Apache web server engine and Node.js web server engine[8][9]. The server application uses JSON and Socket. IO which is developed based on web socket protocol to implement the real-time communication between the server application and the client-web application [10]. The server application runs on Centos 6.0Linux server. The experiment control application is based on the 206

LabVIEW, and uses Socket. IO for real time communication with server application. The experiment control application runs on experiment control workstation which runs Window 7 OS. Our new unified framework for remote laboratory development is based on three vital technologies, which are the Socket.IO, Node-HTTP-Proxy, and HLS protocol. Node-HTTP-Proxy is used for experiment data and control commands transmission and traversing firewall and the novel video transmission approach is based on HLS protocol for real-time system monitoring. The Mash up technology is used for user interface implementation. Table 1 depicts the technical characteristics of the new unified framework in detail. Table 1 Technology/protocol/software list for the new framework  1 2 3 4 5 6 7

Name Http Proxy Data Protocol Real-time experiment video Transmission Database Client – User Interface Server - Web Service Equipment Control

Technology/Protocol/Software Node-HTTP-Proxy Socket.IO Http Live Streaming Protocol /FFMPEG /Segmenter software package MySQL Mashup technology, JavaScript Apache (2.2), Node.js(V1.0), JSON LabView (V8.6)

Remark Part of Node.js Part of Node.js

LtoN (LabVIEW to Node.js)

The system architecture of the new unified framework is shown in Figure 1.

Figure 1 The architecture of the new framework.

4. Vital Improvement of Total Solution In this new framework, there are two key improved implementations, i.e., HTTP proxy implementation and real time video processing module implementation. For the real-time experiment control command and data transmission, we configure and run Node-HTTP-Proxy software application on the server side. The proxy application monitoring the network port 80 looks up the appropriate web server application request from the client and then proxies the data directly from the web server application to the client web browser. And for the real-time experiment live steaming video transmission, we develop a new real-time video transmission approach via HTTP Live Streaming protocol and combines FFMPEG, which is a powerful cross platform command line video trans-code / encoding software package. 207

4.1 The Node-HTTP-Proxy for the network port sharing We need to address complicated problem this is that we cannot set Apache and Node.js to listen on the same network port 80. In addition, we do not have an option to deactivate Apache and only run Node.js. To solve this issue, we propose to set up Node-HTTP-Proxy to get both Apache and Node.js working together and sharing the same network port 80 on the server side. Node-HTTP-Proxy is a full-featured HTTP proxy which is involved in Node.js server software package, and is a free and open source software package. Currently there are one Apache web application and one Node.js web application which work together in our web server. We use the Apache web application to generate the user interface framework, and theSocket.IO which is a module of theNode.js web engine to transfer the experiment data and experiment equipment control commands. In order to share the network port 80 for these two applications, we used the Node-HTTP-Proxy to handle the HTTP requests and data transmission. The Node-HTTP-Proxy is used the stream for HTTP requests and data transmission. The concept of a stream in Node.js lends itself beautifully to working with HTTP requests. One of the strengths of Node.js is its capability for streaming data; a great deal of performance can be achieved simply by tunneling the request and response streams to other destinations.

Figure 2 Node-HTTP-Proxy Deployment Principle

Figure 2 illustrates the deployment of the Node-HTTP-Proxy. The Node-HTTP-Proxy is working as the agent to transfer the request and data between the clients and web server applications via the network port 80. Node-HTTP-Proxy also has the excellent capability of proxy WebSockets protocol. 4.2 The live video streaming approach The purpose of the new approach is to improve the remote laboratory video transmission function and transfer the real-time experiment video via port 80. In order to achieve these goals, we develop a new real-time video transmission approach via a HTTP Live streaming protocol combined with FFMPEG, which is a powerful cross platform command line video trans-code/ encoding software package. To address the network firewall and flash plug-in issue, our new approach works by breaking the overall real-time experiment video stream into a sequence of small HTTP-based file downloads. Each download consists of one short chunk of an overall potentially unbounded transport stream. As the stream, the client may select from a number of different alternate streams containing the same video content encoded at a variety of data rates, allowing the streaming session to adapt to the available data rate. Briefly, the client (normally the Web browser) loads a playlist file of these video segments which is created following HLS protocol on the Web server (we use the Apache Web Server). The contents of this playlist are short clips (about 10 seconds) residing on a Web server. We need to create and maintain a playlist file and the short segments of the real-time video stream. Therefore, the sequence of small HTTP-based file downloading is transferred via HTTP Live Streaming protocol, 208

and we use the FFMPEG software package to break the overall real-time experiment video stream into short download segments [11].Finally, the real-time experiment video segments are transferred via HLS protocol through network port 80,and the real-time video will be reassembled in the Web browser and shown to end users.

Figure 3 The new real-time video transmission approach

Figure 3 illustrates the working process of the new real-time experiment video transmission approach. We need to setup FFMPEG software package eon media server side, compile and install the Segmental software package and configure the Apache Web server on HTTP server side. Upon building up the real-time experiment video processing and transmission environment, we resolve the real-time video transmission problem mentioned above. 5. Implementation of Remote Experiment The remote experiment user interface can be run on different platforms without any additional plug-in or software. To demonstrate the effectiveness of the new framework, a revamped remote SVP experiment is implemented into teh new framework. Figure 4 illustrates the screenshots on desktop PC, iPhone and iPad when theusers conducted the remote SVP experiment. Desktop 

iPhone

ipad 

 

 

 

Figure 4 Screenshots on PC and portable devices

When the power button on the left corner of the Webpage turns on, the user can move the slide bar to control the motor rotation speed. The accelerometer output which indicates the platform vibration is shown in middle of Webpage. And the real-time video is displayed on the top of Webpage. With 209

our novel data and video transmission solution, the real-time experiment video can be transferred to different platforms without firewall issue. Obviously, the remote laboratory system based on the new unified framework is able to take full advantage of the real instrument. The capability of running remote experiment on portable device such as Android phone, iPhone and iPad etc. will significantly increase the instrument utilization and let users gain insights by observing and interacting with the real instrument in an efficient way. 6. Conclusion In this paper, we presented anew unified framework for remote experiment development. We solved the real-time experiment video and real-time experiment control command and data transmission across network firewall issues through two innovative solutions we proposed for remote laboratory development. The remote SVP experiment was successfully implemented under this new unified framework and the user interface can be run on any Internet browser in any platform without installing any additional plug-in. The capability of running remote experiment on portable device let users gain insights by observing and interacting with the real instrument in an efficient way. This new framework gives the future remote laboratory development a prodigious improvement. 7. Acknowledgement This material is based upon work supported by the Qatar National Research Fund under Grant No. NPRP 4-892-2-335. References [1] D.Boehringer, S.Jeschke andT.Richter:Lila - A European Project on Networked Experiments,the Sixth International Conference on Remote Engineering and Virtual Instrumentation,(2009). [2] J.M. M. Ferreira, E.L. Sousa, A.Nafalski, J. Machotka and Z.Nedic:Collaborative learning based on a micro-Webserver remote test controller, iJOE International Journal of Online Engineering vol. 5, no. Special Issue, pp. 18-24 1861-2121, (August 2009). [3] D.Gillet, C. Salzmann, R. Longchamp and D. Bonvin:Telepresence :An Opportunity to Develop Real-World Experimentation in Education,European Control Conference, Brussels, Belgium, Session WE-M-L 1(July 1-4, 1997). [4] N.Duro, R.Dormido,H.Vargas, S.Dormido-Canto, et al:An Integrated Virtual and Remote ControlLab: The Three-Tank System as a Case Study,Computing in Science & Engineering(2008), 10(4), 50-59. [5] C.Olmi,B.Cao,X.Chen, and G.Song:A Unified Framework for Remote Laboratory Experiments, In Proceedings of ASEE Annual Conference & Exposition(June 26 - 29, 2011), Vancouver, BC, Canada. [6] C.Omli,X.Chen, and G.Song: A Framework for Developing Scalable Remote Experiment Laboratory, In Proceedings of World Conference on E-Learning in Corporate, Government, Healthcare, and Higher Education 2011, pp. 2045-2050, Honolulu, Hawaii(2011). [7] X.Chen, D.Osakue, N.Wang, H.Parsaei and G.Song: Development of a Remote Experiment under a Unified Remote Laboratory Framework, in Proceedings of the World Congress on Engineering Education 2013. H.R. Parsaei and K.S. Warraich, eds. [8] T.Hughes-Croucher andM. Wilson: Up and Running with Node.js (First ed.), O'Reilly Media(April, 2012), p. 204, ISBN 978-1-4493-9858-3. 210

[9] Wikipedia: Node.js – Wikipedia, the free encyclopedia, Online, http://en.wikipedia.org/wiki/ Node.js, accessed May 1, 2013. [10] Wikipedia: Socket.IO – Wikipedia, the free Online,http://en.wikipedia.org/wiki/Socket.io, accessed May 1, 2013.

encyclopedia,

[11] C. Foresman: Apple proposes HTTP streaming feature as protocol standard, ArsTechnica, Retrieved 2009-07-10, in IETF.

211