Custom execution environments in the BOINC middleware Diogo Ferreira1 , Filipe Araujo1 , Patricio Domingues3 1

2

CISUC, Dept. of Informatics Engineering, University of Coimbra, Portugal [email protected] CISUC, Dept. of Informatics Engineering, University of Coimbra, Portugal 3 Research Center for Informatics and Communications School of Technology and Management Polytechnic Institute of Leiria, Leiria, Portugal [email protected]

Abstract. BOINC is a middleware that builds the largest grids on Earth out of commodity hardware offered by volunteers. Although BOINC has a large user base, it suffers from two fundamental limitations: first, it can only provide limited security to volunteer machines; second, creating large-scale projects is a formidable task only accessible to a few. Virtualization is a concept introduced many years ago, but its recent developments in consumer hardware provide fertile ground for improvements in many applications. Virtualization is one of the forms of sand-boxing, where applications are confined to a closed environment, to prevent them from causing any harm to the hosting system. To provide the security that volunteers expect, but also to simplify the task of project creators, we present Libboincexec, a library that enables BOINC to use custom execution environments. These environments can include, but are not restricted to any well-known virtual machine, a simple fork() and exec(), or even secure shell commands.

1

Introduction

BOINC is a middleware that hides the non-trivial operations required to distribute work to volunteer computers and getting results back [1]. Unfortunately, application developers need to ensure their application will run in each and every single combination of architecture and operating system available, if they want to leverage all the power the grid has to offer. Subtle and not so subtle differences between these different targets can lead to many hours of development and testing. Moreover, volunteers running tasks in their computers are vulnerable to possibly unsafe operations, either intentional or not, performed by grid applications. Virtual machines can solve both problems at once. To the developer, they offer a single compilation target, thus reducing programming and testing time. To the volunteer, they solve security issues, by providing an environment which does not affect the host [9]. In this paper we present Libboincexec , a low level library which extends BOINC with the additional capability of running applications in a custom execution environment. Examples of execution environments are virtual machines,

such as VMWare [6] and Xen [2], or application level sandboxes such as Native Client [11] and Vx32 [5]. Libboincexec uses a similar idea to the one introduced by Gonzales et al. [8] but their work focuses mainly on virtualization on the VMWare software. Our approach, while also touching in the subject of virtualization, is agnostic from it allowing for different applications and possibilities. Although, so far, we have focused our work on virtual machines, we could also run simple command inside the hosting operating system, with fork() and exec() commands, or submit remote commands using secure shell, Condor [10], or some other scheduler. Libboincexec also differs from some other BOINC virtualization work, because it does not depend on external software, having the same dependencies as BOINC itself. This allows Libboincexec to be integrated with the BOINC open source project in the future without dragging additional software requirements. Using our library, adding a new execution environment is as simple as implementing a set of functions which are then called by BOINC. Libboincexec is composed of a plugin manager and one or several execution plugins. The plugin manager hides all the complexity from the BOINC execution path. This kind of transparency allows switching between different execution environments without application changes and keeping the BOINC client free of any execution logic.

2

Related work

In this section we mention currently known implementations of custom execution environments in the BOINC middleware, comprised mostly of virtualization solutions. We also mention related technologies that abstract the interaction between a host and a guest environment. Gonzales et al. [8] were able to run a Matlab environment inside a VMWare machine using a modified BOINC wrapper. Their work shows that by changing the execution environment developers can run non-standard applications (like Matlab) or languages (Python, Java) inside a virtual machine. While their work touches the fundamental issues defined above, their implementation is VMWare-centric and was developed for a limited set of machines controlled by the authors. Ben Segal4 enriched the BOINC wrapper with VMWare API calls, which successfully runs workunits inside VMWare virtual machines. This solution has the advantage of not requiring any modifications to the BOINC client but is tied to VMWare. VM Controller Software, by David Quintas5 is a high-level communication layer that allows applications to control virtual machine hypervisors through message passing via standard XML-RPC calls. This solution solves the problem of communicating asynchronously with the virtual machine and can be used side by side with the library we propose as helper for plugins. While interesting, this solution also drags some dependencies with it, the most significant being the Python in4 5

http://boinc.berkeley.edu/trac/wiki/VmApps http://boinc.berkeley.edu/trac/wiki/VirtualBox

terpreter required to run the software and a message queue for message passing between the host and virtual machines. Atilla Marosi implemented changes in the BOINC client, allowing it to run jobs on a QEMU6 virtual machine [3]. This approach puts the volunteer in control, he decides where applications run – directly on their hardware or inside a virtual machine. This approach is similar to the second step of Libboincexec integration, but is not execution environment agnostic, because it uses one particular virtual machine.

3

Architecture of Libboincexec

3.1

Overview

Request QEMU Plugin

Plugin Manager

Fork/Exec Plugin BOINC Client Vx32 Plugin Run Application

QEMU Plugin

QEMU running the App.

Fig. 1. Overview of Libboincexec architecture

Figure 1 shows the high-level architecture of Libboincexec. There are two main components required for execution: the Plugin Manager and an Execution Plugin. Execution Plugins implement functionality required for execution on a specific execution environment and define how applications are transported, executed and how the results of computation are obtained. The Plugin Manager is able to locate installed plugins and deliver them on demand to requesting applications. It also provides a convenient common interface that hides the plugins’ functionality, allowing applications to transparently switch execution plugins without changing their code. At the moment, Libboincexec is a passive execution method. The application using it needs to be modified to in order to successfully use an execution environ6

http://www.qemu.org

ment. Further information describing how BOINC integration is implemented is given in Section 3.5. 3.2

Plugin Manager

The Plugin Manager is the of the most important parts of the architecture, providing the glue between BOINC and the execution environment. One of our main concerns was keeping the manager portable and free from as many external dependencies as possible. As such, third party libraries and operating system specific calls were avoided. Since system calls cannot be avoided for dynamic plugin loading, Libboincexec depends on libltdl 7 , a software library which allows loading plugins in different operating system using a common interface. libtldl can be bundled with Libboincexec, therefore removing the need of installing it. If required, usage of libtldl could be avoided by adding multiple implementations of plugin loading and decide which one is used in compile time. As the Plugin Manager works on demand, an application using Libboincexec needs to explicitly request for a specific plugin. Execution plugins could be userconfigurable in the future. Volunteers would then be able to choose a specific virtualization product and use it as an execution environment. The abstract plugin interface is also defined by the Plugin Manager and contains, at the moment of writing, five functions that should be implemented by plugins: Obtain metadata Contains plugin information, description, possible configuration options. Prepare work Prepares the execution environment for execution (ie. starting a virtual machine). File copy Copies files back and forth between host and execution environment. Run a command Runs a command on the execution environment. Checkpoint Checkpoints the execution environment and the underlying running application. This interface is designed in a way that allows each plugin to handle multiple applications running in the same execution environment. 3.3

Execution Plugin

Execution Plugins are software modules that serve to control the execution of the BOINC application. They provide the glue between Libboincexec and an execution environment. The use of a plugin pattern allows for plugins to be bundled with Libboincexec but also for plugins developed for specific use cases in controlled environments. In order to add an execution plugin one needs to implement the functions mentioned above. Usually these translate to known API calls or commands that belong to the execution environment. 7

http://www.gnu.org/software/libtool/manual/html node/Using-libltdl.html

At the moment of writing we have two functional plugins, one which implements the VMWare execution environment and one which emulates the default execution behaviour (ie. fork/exec). Our VMWare plugin calls API methods exposed by VMWare through the VIX API8 . This API provides all the required methods for copying files, running applications and checkpointing on a virtual machine. Some environments, however, may contain additional levels of complexity.

3.4

Developing for Libboincexec

In order to understand how to develop for Libboincexec, one has to know how BOINC runs applications. Currently, developers can distribute work using the BOINC middleware by writing an application that implements the BOINC API. Some applications, however, do not implement the API. These are known as legacy applications and BOINC supports them by using a wrapper. A wrapper is an application that provides a bridge between the BOINC API and the unmodified legacy application. In Libboincexec we let the plugin manager and plugins implement the BOINC API instead of the application itself, this means that developers only need to write an application which runs until its work is done, as if it were running in a standard shell. Such application should be able to run using any Libboincexec plugin that supports the platform and operating system where it is executed. By using Libboincexec the work of developers is simplified because they do not have to worry about how BOINC will interact with the application. This transparency allows switching of plugins easily without developer burden. When using a virtualization plugin developers can also develop to a single target supported by that virtual machine, lowering developer effort and costs.

Fig. 2. BOINC client and server architecture

8

http://www.vmware.com/support/developer/vix-api/

3.5

Integration with BOINC

Figure 2 shows the client and server architecture of BOINC. The core client and applications communicate by an interface defined in the BOINC API, as mentioned in section 3.4. At the moment of writing the core client uses operating system specific calls in order to execute work delivered by the server. Integration with BOINC can be done in two different levels of the BOINC architecture: through a wrapper that uses the Libboincexec API or by letting Libboincexec replace the execution path in the current BOINC client. Using a wrapper

Fig. 3. Modified BOINC architecture using a wrapper.

Figure 3 shows the required changes (in gray) for integration through a wrapper. We provide a modified wrapper bundled with Libboincexec. This wrapper translates between BOINC and Libboincexec, allowing the application to be executed using any execution plugin. This integration is less complex because the wrapper interacts with BOINC at the application level. This means that the client will download the modified wrapper and any required files while receiving work. The wrapper is executed by the client as a regular workunit. This approach does not require any changes to the core client. By integrating at this level first, we created a suitable environment for development and early testing while the library matures. Replacing the execution path Our final goal is to replace the execution path of the core client with Libboincexec. Figure 4 shows the changes (in gray) required to accomplish this goal By replacing the execution path, BOINC is enhanced with extensible execution environment support in the default client. Developers are then able to write thirdparty plugins to fit their needs and define how applications will run.

Fig. 4. Modified BOINC architecture using custom plugins for all executions.

This implementation adds no dependencies or fundamental changes to the architecture but requires deep changes in parts of the client. One of our goals is to keep the client fully backwards-compatible. Implementing features such as default virtualization in the client is then as easy as including a plugin and bundling a virtual machine with the client package.

4

Enhancing BOINC

While our main focus was adding generic virtualization support, we designed our API in a way that opens new possibilities for BOINC computation. For instance, an SSH plugin can be implemented easily. This plugin would allow applications to run on a machine other than the BOINC client. This system could be used to implement a simple grid in an ssh-enabled school network, for example, requiring minimal deployment efforts. The EDGeS project [4] has the goal of bridging different grid middlewares in an unified computing platform. One of the EDGeS core components for BOINC is a modified wrapper which serves as a bridge, running jobs in a remote grid instead of the local computer. Libboincexec could help the development of such bridges through execution plugins which transport jobs from BOINC to grids like Condor [10] or EGEE [7].

5

Conclusions, Open Issues and Future Work

In this paper we presented Libboincexec, a software library that enables the creation of custom execution environments in the BOINC middleware. The main features of Libboincexec are not being dependent from external libraries and its pluggable architecture, that enables new possibilities for both users and developers. We believe that our work can ease the development of applications while increasing security for volunteers. At the moment Libboincexec is useful for developers wanting to run applications in virtualized guests, but the use cases will expand with time.

Our final goal is to integrate Libboincexec with the BOINC project. However, to reach this goal we still have to solve a number of open issues. We currently have a proof-of-concept implementation of Libboincexec, consisting of the library and a modified wrapper that uses the library on a simple BOINC setup. We only have one virtualization plugin, for the VMWare API. However, to support QEMU or VirtualBox, we will need to handle file copies to and from the guest operating system. As we mentioned before, this problem is well-known (e.g., [3]). We are considering to use the standard Secure Copy through Secure Shell and a backdoor to the guest virtual machine. When a solution using virtualization is deployed, disk space and bandwidth must also be taken into account. At the moment, we require the user to have the hypervisor installed in their machine prior to doing any computation. While this is not a limitation of Libboincexec, but of the VMWare plugin, this is a problem that will rise when using any hypervisor. Distributing the hypervisor with the workunit is possible but licensing issues may prevent the choice of some virtualization products. This is also a difficult problem because typically these require additional drivers to be installed in the user operating system. Another issue is supporting all the platforms where BOINC runs. We tested our prototype on the Linux operating system but there is no dependency on it. For now, we leave the issue of portability to the consideration of plugin developers. Plugins should implement multiple operating-system dependent calls and decide in compile time which one is used.

Acknowledgements This work was partially supported by Funda¸c˜ao para a Ciˆencia e a Tecnologia under the project GRID/GRI/81727/2006, “GRID para simula¸c˜ao e an´alise de dados de ATLAS/LHC”.

References 1. Anderson, D. P. Boinc: A system for public-resource computing and storage. In GRID ’04: Proceedings of the 5th IEEE/ACM International Workshop on Grid Computing (Washington, DC, USA, 2004), IEEE Computer Society, pp. 4–10. 2. Barham, P., Dragovic, B., Fraser, K., Hand, S., H, S., Harris, T., Ho, A., Neugebauer, R., Pratt, I., and Warfield, A. Xen and the art of virtualization, 2003. 3. Csaba Marosi, A., Kacsuk, P., Fedak, G., and Lodygensky, O. Using virtual machines in desktop grid clients for application sandboxing. Tech. Rep. TR-0140, Institute on Architectural Issues: Scalability, Dependability, Adaptability, CoreGRID - Network of Excellence, August 2008. 4. Fedak, G., He, H., Lodygensky, O., Balaton, Z., Farkas, Z., Gombas, G., Kacsuk, P., Lovas, R., Marosi, A. C., Kelley, I., Taylor, I., Terstyanszky, G., Kiss, T., Cardenas-Montes, M., Emmen, A., and Araujo, F. Edges: A bridge between desktop grids and service grids. ChinaGrid, Annual Conference 0 (2008), 3–9.

5. Ford, B., and Cox, R. Vx32: Lightweight userlevel sandboxing on the x86. In In Proceedings of the USENIX Annual Technical Conference (2008). 6. Inc, V. Understanding full virtualization, paravirtualization, and hardware assist. 7. Laure, E., and Jones, B. Enabling grids for e-science: The egee project. Tech. Rep. EGEE-PUB-2009-001. 1, Sep 2008. ´ lez, D. L., de Vega, F. F., Trujillo, L., Olague, G., and Segal, 8. na Gonza B. Customizable execution environments with virtual desktop grid computing. In Parallel and Distributed Computing and Systems, PDCS (Porto, Portugal, 2007). 9. Popek, G. J., and Goldberg, R. P. Formal requirements for virtualizable third generation architectures. Commun. ACM 17, 7 (1974), 412–421. 10. Tannenbaum, T., Wright, D., Miller, K., and Livny, M. Condor – a distributed job scheduler. In Beowulf Cluster Computing with Linux, T. Sterling, Ed. MIT Press, October 2001. 11. Yee, B., Sehr, D., Dardyk, G., Chen, J. B., Muth, R., Ormandy, T., Okasaka, S., Narula, N., and Fullagar, N. Native client: A sandbox for portable, untrusted x86 native code. pp. 79–93.

Custom execution environments in the BOINC middleware

such as VMWare[6] and Xen[2], or application level sandboxes such as Native ..... B. Customizable execution environments with virtual desktop grid computing.

244KB Sizes 0 Downloads 255 Views

Recommend Documents

Custom execution environments in the BOINC middleware
where applications are confined to a closed environment, to prevent them from causing any harm to the hosting system. To provide the security that volunteers expect, .... supports the platform and operating system where it is executed. By using Libbo

Custom execution environments in the BOINC middleware
large user base, it suffers from two fundamental limitations: first, it can only ... pend on external software, having the same dependencies as BOINC itself. This ... advantage of not requiring any modifications to the BOINC client but is tied to ...

Virtual Execution Environments: Support and Tools
They are duplicated many times in the code cache and are often not used after the .... dynamic optimizations on code statements and data values from the user.

A contract-oriented middleware - UniCa
A contract-oriented middleware. Massimo Bartoletti. University of Cagliari (Italy) — BETTY COST Action. London, Apr 17th, 2015 ...

Oracle® Fusion Middleware -
Sep 1, 2008 - 1 Introduction to Building Fusion Web Applications with Oracle ADF. 1.1. Introduction to Oracle ...... How to Set Database and Java Data Types for an Entity Object Attribute .............. 4-29. 4.10.2 ...... How to Access an Applicatio

species richness in fluctuating environments
The promotion of competition in the delivery of electricity, telecommunication, water and other infrastructure ... providers in the sector would be large enough to allow competition for the market to be effective. .... solutions adopted in this paper

Conifers in cold environments synchronize maximum ... - CiteSeerX
Sep 7, 2005 - Summary. • Intra-annual radial ... ments of photoperiod could act as a growth constraint or a limit after which the rate of tree-ring formation tends ...

Oracle® Fusion Middleware -
Sep 1, 2008 - Fusion Developer's Guide for Oracle Application Development. Framework ...... Introduction to Developing a Web Application with ADF Faces.

A Survey on Service Composition Middleware in ...
context awareness, QoS management, security, spontaneous management, and ...... [35] UPnP Forum, "Understanding UPnP: A White Paper",. Technical Report ...

Speech Recognition in reverberant environments ...
suitable filter-and-sum beamforming [2, 3], i.e. a combi- nation of filtered versions of all the microphone signals. In ... microphonic version of the well known TI connected digit recognition task) and Section 9 draws our ... a Recognition Directivi

Mahatma Gandhi University M.Tech IT Sem 2 Trends in Middleware ...
What are the disadvantages of message-oriented middleware? (8 marks) ... Mahatma Gandhi University M.Tech IT Sem 2 Trends in Middleware Systems P-I.pdf.

species richness in fluctuating environments
distribution operations became separate business units in many countries. .... regional or global level, information is needed on the number of firms active in .... instance, the test is inconclusive when HHmin < 1000 and HHmax > 1800 since ...

Oracle® Fusion Middleware -
Sep 1, 2008 - 1 Introduction to Building Fusion Web Applications with Oracle ADF. 1.1 ...... create, modify, and validate data using web, wireless, desktop, .... that handles displaying the component and also provides the JavaScript objects.

Power Awareness In Context Aware Middleware for ...
context aware middleware for ubiquitous Computing Systems. The principal ... thousands small sensor nodes is the key to achieve the designing of ubiquitous ..... the wired [17] and wireless [8] network architecture for a Context-aware Home. ... build

A Middleware for Context-Aware Agents in Ubiquitous
computing is essentially a reactive approach to information access, and it ..... Context-sensitive object request broker (R-ORB) hides the intricacies of ad hoc ...

Execution of Execution of Asynchronous Substitution ...
2Assistant Professor, Department of ECE,Velalar College of Engineering and Technology, Anna University. Chennai ... substitution box design essentially matches all the important security properties. ... using Mentor Graphics EDA (Electronic Design Au

Oracle® Fusion Middleware -
Sep 1, 2008 - What Happens When You Add Attribute Control Hints ........................................... 4-21. 4.7. Working ...... 12-15. 12.4.3.2. Setting Digital Signatures.

Modelware for Middleware
CRC for Enterprise Distributed Systems (DSTC)∗. April 16, 2003. Abstract ... ering the design of an enterprise application creating a. Platform Independent ... concepts, allowing the annotation of the PIM to indicate which application artifacts ...

A contract-oriented middleware - UniCa
Apr 17, 2015 - runtime monitoring (send(), receive()). ▻ subtyping. M. Bartoletti, T. Cimoli, M. Murgia, A.S. Podda, L. Pompianu. Compliance and subtyping in ...

monitoring middleware for service level agreements in ...
Measurement service – Measures a given list of metrics at specified intervals. • Evaluation ... production of client/server stubs for easing the implementation of remote procedure call (RPC) ..... media (e.g., online games). Acknowledgements.