4

Click here to load reader

Cloud-based NS3 infrastructuremailman.isi.edu/.../attachments/20140320/f1aae9a1/ns3_proposal_r.pdf · Cloud-based NS3 infrastructure Andrei Lapin1 Universit e de Neuch^atel, Computer

Embed Size (px)

Citation preview

Page 1: Cloud-based NS3 infrastructuremailman.isi.edu/.../attachments/20140320/f1aae9a1/ns3_proposal_r.pdf · Cloud-based NS3 infrastructure Andrei Lapin1 Universit e de Neuch^atel, Computer

Cloud-based NS3 infrastructure

Andrei Lapin1

Universite de Neuchatel, Computer science department (IIUN),CH-2000 Neuchatel, Switzerland,

WWW home page: http://www.unine.ch/iiun

1 Introduction

Cloud computing is a growing business with many established players, such as Salesforce, Amazon,Akamai, and Google. Cloud infrastructure gives users great advantages:

– Reduce capital costs. There is no need to spend on hardware maintenance.

– Control on using resources.

– Improve accessibility. Users have access anytime, anywhere.

2 Project description

2.1 General architecture

The main idea of the project is to migrate the simulation process from the local machine of a researcherto the cloud. Figure 1 presents the general architecture of the system. The user operates with a Webbrowser to interact with the system’s manager machine, which in turn launches simulations on the workermachines. Through the Web interface, the user is able to perform all operations with the simulator, e.g.,edit source code, configure simulation scripts, launch simulations.

ObjectStore

Workers

Manager

Cloud

Web Interface

Fig. 1: General architecture

Page 2: Cloud-based NS3 infrastructuremailman.isi.edu/.../attachments/20140320/f1aae9a1/ns3_proposal_r.pdf · Cloud-based NS3 infrastructure Andrei Lapin1 Universit e de Neuch^atel, Computer

2

2.2 Advantages/inconveniences of the suggested architecture

Users will benefit from significant advantages compared to the current simulation process:

– Resource control; the user can appropriately set up VMs for each particular simulation with requiredparameters in order to set resources such as CPU, RAM, etc.,

– The user can start correcting simulation scripts / source code and launch a new simulation immedi-ately after launching previous one,

– The user can have a large number of parallel simulations by launching many simultaneous VMinstances,

– The result gathering process will be centralized and the user will have easy access to results andcorresponding simulation scripts at any time,

– Possibility to control the simulation process from any devices with the Internet connection, also onlineediting of your scripts/source files shall be possible,

– No need to overload the researchers PC with running simulations and wait until they complete,– Easy, semi-automated process to set-up the working environment at the beginning, knowledge about

the cloud infrastructure is not necessary,– Simple migration of the working environment between VM based clouds, batch-queueing clusters,

computational Grids, Linux/UNIX hosts in which a user is provided with SSH-based access.

Possible inconveniences:

– The user cannot use the working front-end environment (e.g., Eclipse) of her/his choice to editsimulation scripts, but she/he will have to use the online environment we provide. We foresee, however,to overcome this inconvenience by providing the upload mechanism of locally written scripts.

– Availability. Internet connectivity is required to set up the simulation. However, after the user launchesa simulation, the remaining process will be automated, up to saving results to a persistent storage.

– Potential costs. Usually cloud providers charge users for access to their infrastructure. However, oursolution will be compatible with all VM based clouds and the user will not be bound to a specificprovider.

2.3 Architecture description

I plan to execute copies of the NS3 simulations in sandboxed protected environments on the cloud VMs.Designing a good execution model of NS3 in the cloud is required, because the user provides C++ codeexecuted on the cloud workers. Potentially malicious code may harm the execution environment and otherexternal resources. Therefore, good sandboxing technology is required. The user has to be provided withthe interface to upload C++ modules and the input files. Moreover, the user should be allowed to modifythe content of existing modules if necessary. We thus require a tool to upload, view, and edit files onlineand keep track of user modifications. The user should also be able to maintain several trees of the NS3simulation tool at the same time. There is need for the monitoring tool. The user has to check whether hissimulations successfully run in the cloud environment. Because the simulation is provided as C++ code,the compilation process may drop errors, thus the interface has to provide the user with all the necessaryinformation to correct the bug and run the simulation once again. The user has to be provided withdifferent supported output components of the NS3 simulator, e.g., the user should be able to downloadoutput text files, output libpcap traces, but also when required the online interface should cooperate withthe NS3 gnuplot module to provide the user with on-the-fly chart diagrams of the simulation.

2.4 System interactions and dataflow

The entire system consists of a several main components. These components perform certain roles inthe interaction chain between the end user and the NS3 simulator. Figure 2 presents the interactiondiagram among the components. The user interacts with the Web application component, which definesand monitors simulations through the Cloud Task Manager component, which eventually manages theVMs with NS3 simulator on-board.

Another important process in the system is the data transfer; this process is illustrated in Figure 3.After the user defines a simulation, the Web application component saves a specific input for the incomingsimulation in the ObjectStore. An important point here is that the simulation machine takes as inputthe difference between a pure version of the NS3 and the version modified by the user. As output, theworker machine saves all data provided by the NS3 simulator in the ObjectStore.

Page 3: Cloud-based NS3 infrastructuremailman.isi.edu/.../attachments/20140320/f1aae9a1/ns3_proposal_r.pdf · Cloud-based NS3 infrastructure Andrei Lapin1 Universit e de Neuch^atel, Computer

3

User

WEBapplicationJob

Controller

WEBInterface

Cloud TaskManager

Asynhronoustask queue

Taskhandler

VM

NS3simulator

- Defines simulations- Schedules simulations

- Receives results- Monitors simulations

- Orchestrates simulations- Monitors simulations

- Controls VMs&

processes

- Monitors VMs & processes

MultipleVMs

Fig. 2: Interactions

2.5 Chosen technologies

All components of the system will be implemented in Python. The core element in the system is theTask Manager. For this component, I will use the GC3pie framework and Celery task queue. GC3pieis a Python framework for orchestrating the execution of external commands over diverse computingresources. Celery is a Python asynchronous task queue/job queue based on distributed message passing.As storage, the system will use a specialized S3-based cloud repository – the Object Storage (OS). S3cmdis a Python interface for communication with the OS. For the Web application, I chose the Djangoframework. Django is a high-level Python Web framework, which supports the Model-View-Controllerparadigm and allows rapid application development.

3 GSoC proposal

The project shall be implemented within the scope of a Swiss National Project during the following year onthe Swiss Academic Cloud testbed environment. However, as the project aims to have a significant impacton the NS3 community, several milestones have to be implemented with strong community support. I canthus greatly benefit from the GSoC program in which I will strongly interact with the NS3 community.

3.1 Implementation

In the GSoC coding period I would like to implement the core elements of the system to have the wholesystem working, but with limited functionality. The first important component is the Task Manager;

Page 4: Cloud-based NS3 infrastructuremailman.isi.edu/.../attachments/20140320/f1aae9a1/ns3_proposal_r.pdf · Cloud-based NS3 infrastructure Andrei Lapin1 Universit e de Neuch^atel, Computer

4

User

Input sources

WEBapplication

Other data interfaces

uploads existinginputs for simulations

Edits source sodeDefines simulations

Gets requested resultsLists completed simulations

TaskManager

provides tasksalong with references to input

Storage service

Input Output NS3simulator

Multipleworkers

providesappropriate input reference

ObjectStoreinterface

Retrievs results Lists input indexes

sends assembled input

ObjectStoreinterface

sends the result along with the task reference for indexing

gets input by using the object reference

Source codeuploader

Fig. 3: Dataflow

this component will perform all actions (e.g., spawning, controlling, terminating) with the worker VMs.The second important element is the ObjectStore Interface; for implementing this component I willrequire strong communication with the NS3 community. I will have to find the best way to determinethe difference between modified versions of the source code of the NS3 simulator, choose the proper placeto pre-compile / compile the NS3 simulator. Also, I will implement all other components with minimalfunctionality to perform tests by the end of the GSoC.

3.2 Working plan

Each period includes 0.5 week for testing the corresponding milestone.3 weeks - GC3pie, Celery integration. Defining, implementing the Task Manager component,1 week - execution of the NS3 in the cloud environment, setting up the environment,3 weeks - defining transferring interfaces and storing structures in the OS, defining messages structure2 weeks - defining, implementing minimal WEB interface and Job Controller component,1 week - whole system testing period