Virtual laboratory for HPC applications development ...

6 downloads 6233 Views 233KB Size Report
A web application or "web app" is a software program that runs on a web server. Unlike traditional desktop applications, which are launched on the operating ...
International Scientific Conference Computer Science’2015

Virtual laboratory for HPC applications development on Tilera processors Simeon Tsvetanov, Teodora Kireva Technical University of Sofia, [email protected] Technical University of Sofia, [email protected]

Abstract: The paper presents the development and exploitation of a virtual laboratory for high performance multicore platforms. The aim of the project is to develop a convenient interface that grants remote access to a high-performance "Tillera" platform and all necessary development tools for it. This product is designed for students that are interested in developing applications for multicore platforms. The global idea is building of a virtual laboratory accessible via web browser and organized as a cloud service. The authorization is regulated by the user model of the host operating system that “Tillera” is installed in. The web application must implement options for navigation between the server file system directories, adding, modifying, deleting and compiling files and execution of finished applications on the platform "Tillera". The end product enables the users to perform system commands on the server in convenient way. Keywords: Web Applications, HPC, Tilera Multicore Processor, Virtual Laboratory.

1. INTRODUCTION A web application or "web app" is a software program that runs on a web server. Unlike traditional desktop applications, which are launched on the operating system, web apps must be accessed through a web browser. Web apps have several advantages over desktop applications. Since they run inside web browsers, developers do not need to develop web apps for multiple platforms. For example, a single application that runs in Chrome will work on both Windows and OS X. Developers do not need to distribute software updates to users when the web app is updated. By updating the application on the server, all users have access to the updated version. While web applications offer several benefits, they do have some disadvantages compared to desktop applications. Since they do not run directly from the operating system, they have limited access to system resources, such as the CPU, memory, and the file system. Therefore, high-end programs, such as video production and other media apps generally perform better as desktop applications. Web apps are also entirely dependent on the web browser. If the browser crashes, for example, you may lose your unsaved progress. Also, browser updates may cause incompatibilities with web apps, creating unexpected issues [1]. Platform as a service (PaaS) is a cloud computing model that delivers applications over the Internet. In a PaaS model, a cloud provider delivers hardware and software tools -- usually those needed for application development -- to its users as a service. A PaaS provider hosts the hardware and software on its own infrastructure. As a result, PaaS frees users from having to install in-house hardware and software to develop or run a new application [2]. Some PaaS providers charge a flat monthly fee to access the platform and the apps hosted within it. It is important to discuss pricing, service uptime and support with a PaaS provider before engaging their services [3].

International Scientific Conference Computer Science’2015

The TILE-Gx family is fabricated in 40nm process technology, offering high clock speeds at very low power. With the standard part at 1.2GHz clock rate and with a typical networking application running, the device is expected to draw approximately 25-30W of power. Considering the high level of system integration (onboard memory controllers, PCI Express, and I/O controllers), the total system power is 2x to 4x lower than other competitive high performance processor systems. The TILE-Gx8036 chip is packaged in a 37.5mm x 37.5mm flip-chip Ball Grid Array (BGA). It is RoHS-6 compliant and is compatible with standard multilayer PCB designs. Each of the 36 processor cores is a full-fledged 64-bit processor with local cache and supports a flexible virtual memory system. Any of the cores can independently run its own operating system (that is, standard Linux 2.6), and many or all of the tiles can as a group run Symmetric Multi-Processing (SMP) operating systems, such as SMP Linux. Existing applications written in C or C++ for standard processors will port very quickly to the TILE-Gx. The development tools enable rapid migration to multiple tiles using various standard multicore programming techniques such as threads, decomposed pipelining, or multiple “run-to-completion” process instances. Several unique architectural innovations enable the low-power and scalable performance of the Tile Processor. The mesh-based interconnect between processor cores provides high communication bandwidth and low latency to other tiles cache, external memory and I/O. Further, the distributed and shared coherent cache architecture removes bottlenecks and contention and minimizes power dissipation [4]. 2. ARCHITECTURE OF THE VIRTUAL LABORATORY The purpose of this product is to provide a single convenient interface to a remote platform. This platform contains specific libraries, peripherals and development tools for parallel applications that can be implemented on high performance machines [5]. Since it comes to high-performance platform "Tilera", it must be installed on the workstation guest operating system Linux CentOS. This workstation runs the designed server web application. It must give full access to the file system and all attached peripherals. The overall idea involves editing and creating files that are to be compiled to executable programs on the Tillera server via web interface, fig. 1. Internet Tillera platform

Student terminal

Host machine WEB Application

Fig. 1: Architecture of the Virtual Laboratory

For this purpose the user of the system must be authorized for full set of file operations. The idea is still in the initial page of the application to display a list of available files in the public directory server. Any new application that will be developed will con-

International Scientific Conference Computer Science’2015

tain one or more text file containing its source code. Therefore, the developer must be able to create files in the file system on the server. Of course, some of the files, which the student generates in the course of their development, are not necessary. They are designed for test or debug purposes and should not reside on the server. Another aspect of the existence of functionality to delete files is protecting private intellectual work. Renaming files is also mandatory functionality that the developed cloud service must support as this operation is carried out repeatedly in the development process for all manner of reasons. Once the user has deleted their files from the last session, and they would like to start from the beginning, the system must allow them to upload files to the server. So they can continue their work successfully. Of course, if after every session to the server the user must delete their files, they must store them locally to avoid losing their contents. For this purpose download functionality is necessary in the designed cloud service. For greater convenience, they should be able to download and archive multiple files. Surely it would be possible "Tilera" platform to be used only for compilation and execution of test software, but this requires multiple operations to download and upload files to and from a server at each change in code development through application which definitely slows down development. So one of the basic requirements for a cloud service is designed to provide remote change of a text file. Probably every user would create a lot of files. It is better for each user to organize their files in separate directories for greater convenience. Implementing a feature for adding a new directory is required. By executing system commands on the server the user gets access to the entire platform. He can use all its tools, libraries and peripherals remotely. In this scenario, this feature will be used for compilation and execution of program files on the "Tilera" platform. 3. DEVELOPMENT OF THE VIRTUAL LABORATORY Implementation of services described cloud service is based on Java Server Pages technology, which allows embedding Java source code constructions in HTML pages. These code fragments are executed on the server and thus realize access to the resources of the server platform. When the web application is started, it performs an initialization of some global variables associated with the specific platform. The web application is hosted on Tomcat7 web server because it is one of the most simple and platform independent web servers for Java application. The "Home" page of the web application contains a list of files and directories located in the public directory, formatted as a table, fig. 2. For constructing this table it is necessary the entire content of the directory to be retrieved. The first line of the table is a link to the current directory. The second row of the table leads to the parent directory. For each element in the current directory it is performed a check for the type of the object - whether it is a file or a directory. If it is a directory, a link to it and its contents is created. If it is a file, it can be opened for view in a separate browser window. If this is a backup, it can be unzipped. If the user has read access (the user that is running the server), hi can download a file using a link in this page. Under the table with the directory content are created buttons for working with files and directories. If user wants to operate with any of these files, they must be marked by the added "checkbox". Most operations for working with files, except of the change and deletion, are implemented as separate buttons below the table of contents of the current directory.

International Scientific Conference Computer Science’2015

Fig. 2: Home Page of the Web Application

When user clicks on any of them they change the value of the “Submit” button, which actually starts the handling of the user request. The query is processed by the server which executes the appropriate handler. Upon selection of a file editing procedure, the selected file opens in a new textual form that allows user making changes. This form is implemented with BufferedReader standard library Java object that is filled by the form and saved with a BufferedWriter to the file if “Submit” is pressed. If the user chooses the option for "backup" file, its handler creates a new file. First the file name is extracted from the HTTP request. After that the application checks if it is possible to write in the current directory (if current user has access). Then it attempts to "upload" to the desired file. If it is successful, the new content moves from the temporary directory in the directory specified by the user. When the user wants to delete a file, the system first checks if more than one file is selected. For each of the marked files are verified the rights for writing. If its modification (deletion) is allowed, it shall be done. If an error occurs, a message is returned to the user. When selecting copy operation the following variables are extracted from the HTTP request: number of files, files, current directory, and new directory.

International Scientific Conference Computer Science’2015

After verifying that writing in the new directory is permitted, each filename is checked whether it exists in the new directory. If it does, the operation is terminated. Otherwise the contents of the source are copied to the newly created file. If an error occurs a message appears to the user. Similarly when a file is moved first the number of files, their names and the new directory are retrieved. If write permissions on the files and the new directory are granted, it actually performs renaming of files. If an error occurs, a message is displayed to the user. In a procedure for downloading a file first the file path is read from the HTTP request. If the user has read writes, a new file and a buffer are instantiated through which the content of the desired file is copied to the new file. If an error occurs during the process, it is terminated and the user is notified with a message. In terms of implementation creating directory is extremely trivial operation, but it is actually one of the most useful in the developer cloud service. First the name of the new directory is got from the HTTP request. If writing in the current directory is permitted it is added inside it. When an error occurs, it is displayed to the user. Directory downloading functionality as the archive is very similar to downloading a single file. The difference is that processing an archive file requires "ZipOutputStream" Java object. The compression level is chosen after its instantiation and all files from the directory are copied as separate objects. Execution of a system command includes visualization of its output. After the user enters the command, it is searched in the list of available commands for the system. If it exists, the server calls a function that spawns the process. The function that starts the new process takes care about the forking of the process (implementation of the system command) and about the extraction of its output and redirecting it to the application. After successfully execution the output is transformed into a suitable for display format and it is printed to the client. Scheme navigation between web pages of the application is extremely simple, as it contains only 4 pages. Project’s purpose is not visualizing a lot of information, but providing a limited range of services emulating system terminal. From the "home" page the user is forwarded to the preview page of the file's contents if they choose its name. By button "External command" user gets access to the site for execution of system commands. If "Edit" is selected for a file, it opens a page in edit mode. 4. EXPERIMETS AND TESTIGN When users access the application, they see the contents of the current directory, actually it is the public directory. "Home" page allow them to navigate between directories, to upload and download files, to add and remove files and directories. Each of those actions is active after pressing the "Submit" button Using the supplied interface files can be: deleted - "Delete"; copied - "Copy"; renamed - "Rename"; created - "Create"; removed - "Download"; uploaded - "Upload". For each file in the list in the “Home” page is implemented "Edit" link. When it is pressed the system redirects users to a page for editing the files. It is a form text entry, filled with the current content of the file. Besides the buttons "save" and "cancel" there is a "backup" button which preserves the old contents of the file with the new extension "backup".

International Scientific Conference Computer Science’2015

After pressing the "Launch external program" from the "Home" page of the application it loads a page for execution of a system command. After the command is entered in the text box below, “Launch” button must be pressed. If the command has generated an output, it will be displayed in the text form. Compiling is a special case of execution of a system command. For instance, the user can easily create and edit source code files, using the home page of the application, then compile and execute them, using the system commands page, fig. 3.

Fig. 3: Execution of a system command

5. SUMMARY AND FUTURE WORK This paper describes a cloud service project for remote access to file system environment, compiling and executing parallel applications through a web interface. The application is deployed via web server Tomcat7 on a test machine which is connected to a high-performance platform "Tilera" with installed a full base of libraries and compiler tools. At the next stage of the project will implement advanced authentication mechanism to improve the security levels and tracking user activities. 6. REFERENCES [1] http://techterms.com/definition/web_application [2] Batra, A., Kumar, A., High Performance Computing into Cloud Computing Services, ICCS 2012, 14-15 Sept. 2012, ISBN 978-1-4673-2647-6, 172 – 175. [3] http://searchcloudcomputing.techtarget.com/definition/Platform-as-a-ServicePaaS [4] UG130-ArchOverview-TILE-Gx.pdf [5] Ciepiela, E., Harezlak, D., Kocot, J., Bartynski, T., Kasztelnik, M., Nowakowski, P., Exploratory programming in the virtual laboratory, IMCSIT 2010, 18-20 Oct. 2010, ISBN 978-1-4244-6432-6, 621 – 628.