developing applications for cloud computing platforms jeremy cohen department of computing imperial...

39
Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0 on e-Research Infrastructure, Applications and Users NeSC, Edinburgh 24th March 2009

Upload: samuel-lawrence

Post on 28-Mar-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

Developing Applications for Cloud Computing Platforms

Jeremy CohenDepartment of ComputingImperial College London

The Influence and Impact of Web 2.0 on e-Research Infrastructure, Applications and Users

NeSC, Edinburgh24th March 2009

Developing Applications for Cloud Computing Platforms

Jeremy CohenDepartment of ComputingImperial College London

The Influence and Impact of Web 2.0 on e-Research Infrastructure, Applications and Users

NeSC, Edinburgh24th March 2009

Page 2: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Why migrate my apps to the Cloud?Why migrate my apps to the Cloud?

• Application / Usage profilesApplication / Usage profiles

• ChallengesChallenges

• Client / Server-side TechnologiesClient / Server-side Technologies

• ExamplesExamples

Outline

Page 3: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Need more compute power / storage than easily accessible Need more compute power / storage than easily accessible locally / free up local resourceslocally / free up local resources

• Avoid costs/problems of local resource hostingAvoid costs/problems of local resource hosting

• Power, cooling, space, maintenance, Power, cooling, space, maintenance, ……

• Flexibility / ScalabilityFlexibility / Scalability

• Discontinuous demandDiscontinuous demand

• Rapid growth / declineRapid growth / decline

• Provisioning resources in-house takes too longProvisioning resources in-house takes too long

Why migrate?

Page 4: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Pay only for what you usePay only for what you use

• Local networking / bandwidth constraintsLocal networking / bandwidth constraints

• Move some/most costs from Capex to OpexMove some/most costs from Capex to Opex

• Greater control Greater control –– firewalls, resource types, etc. firewalls, resource types, etc.

• Transparent technology refreshTransparent technology refresh

Why migrate?

Page 5: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Unsuitable application modelUnsuitable application model

• Security concerns Security concerns –– confidential data / algorithms / confidential data / algorithms / ……

• Specific hardware/infrastructure requirements (e.g. high-Specific hardware/infrastructure requirements (e.g. high-performance inter-node linking)performance inter-node linking)

• Infrastructure location issuesInfrastructure location issues

• Latency concernsLatency concerns

• Resource/data storage locationsResource/data storage locations

• SLA guarantees not satisfactorySLA guarantees not satisfactory

Why not migrate?

Page 6: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Limited number of raw infrastructure providersLimited number of raw infrastructure providers

• Increasing numbers of higher level service providersIncreasing numbers of higher level service providers

• Infrastructure – dynamic DNS, load balancing, etc.Infrastructure – dynamic DNS, load balancing, etc.

• Brokering / MarketplaceBrokering / Marketplace

• Software toolkitsSoftware toolkits

• Simplified resource management – APIs, GUIsSimplified resource management – APIs, GUIs

• Consultants / Application enablersConsultants / Application enablers

• Different payment modelsDifferent payment models

What services are on offer?

Page 7: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

Application Profiles

Where does your app fit in?

Application Profiles

Where does your app fit in?

Page 8: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Batch applications Batch applications –– limited / no interactivity limited / no interactivity

• HPC applicationsHPC applications

• Client / server Client / server –– Web 2.0 Web 2.0 apps, Software-as-a-Serviceapps, Software-as-a-Service

• Standalone interactive applicationsStandalone interactive applications

Application profiles

Data in

Results out

Page 9: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Batch applications Batch applications

• Code takes some input data and carries out processing, Code takes some input data and carries out processing, returning result datareturning result data

• Generally no interactivityGenerally no interactivity

• Individual tasks may beIndividual tasks may be

• Computationally intensive Computationally intensive –– long running long running

• Computationally simple but high throughputComputationally simple but high throughput

• May require significant data to carry out processing May require significant data to carry out processing –– either either as input or from third-party sourceas input or from third-party source

• Likely to be produced as a native executable so may require Likely to be produced as a native executable so may require a specific CPU type for executiona specific CPU type for execution

Application profiles

✔✔

Page 10: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Web 2.0 Web 2.0 apps – client / server modelapps – client / server model

• High throughput, interactivityHigh throughput, interactivity

• May be data intensive / processor intensiveMay be data intensive / processor intensive

• Loosely-coupled, client/server designLoosely-coupled, client/server design

• Message-based communication between application Message-based communication between application componentscomponents

• Handle state / sessions for support of multiple concurrent Handle state / sessions for support of multiple concurrent clientsclients

• SaaSSaaS

• Service enabled application coreService enabled application core

• Client-side (web) application provides remote GUIClient-side (web) application provides remote GUI

Application profiles

✔✔

Page 11: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Standalone interactive applicationsStandalone interactive applications

• Traditional desktop applicationsTraditional desktop applications

• Highly interactive but generally not highly processor intensiveHighly interactive but generally not highly processor intensive

• Tight coupling between application functionality and user Tight coupling between application functionality and user interfaceinterface

• Generally not designed for access by multiple (concurrent) Generally not designed for access by multiple (concurrent) usersusers

Application profiles

✖✖?

Page 12: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• HPC ApplicationsHPC Applications

• Processor/Memory intensiveProcessor/Memory intensive

• Data intensiveData intensive

• Generally batch applications but may have elements of Generally batch applications but may have elements of interactivityinteractivity

• May be parallelised May be parallelised –– operation across multiple CPUs (e.g. operation across multiple CPUs (e.g. MPI, OpenMP, Hadoop, MPI, OpenMP, Hadoop, ……))

• May require extensive communication between parallel May require extensive communication between parallel nodes (high performance interconnects required)nodes (high performance interconnects required)

• Visualisation / steering of output often necessaryVisualisation / steering of output often necessary

Application profiles

✓✓

Page 13: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• FrequencyFrequency

• How frequently an application is usedHow frequently an application is used

• Is usage predictable?Is usage predictable?

• LoadLoad

• Does application require significant processing power?Does application require significant processing power?

• Is the processing requirement similar for each application Is the processing requirement similar for each application run?run?

• Is it dependent on input data?Is it dependent on input data?

• Can required processing capacity be identified Can required processing capacity be identified programmatically in advance of an application run?programmatically in advance of an application run?

Usage profiles

Page 14: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Data volume / proximity / couplingData volume / proximity / coupling

• How much data is involved in a run of the application?How much data is involved in a run of the application?

• Is data proximity of importance Is data proximity of importance –– if there is a lot of transfer of if there is a lot of transfer of data between storage and execution resource, data should data between storage and execution resource, data should be stored close to where the app is runbe stored close to where the app is run

• How tightly coupled is the data How tightly coupled is the data –– can data transfer be can data transfer be optimised?optimised?

• Availability / Reliability Availability / Reliability –– need SLA? need SLA?

• Are guarantees on uptime / reliability needed?Are guarantees on uptime / reliability needed?

• If the resources running the application go down, how long If the resources running the application go down, how long will it take / how complex will it be to restart it?will it take / how complex will it be to restart it?

Usage profiles

Page 15: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Information SecurityInformation Security

• How critical is data/code security?How critical is data/code security?

• IP in code (algorithms, etc.), dataIP in code (algorithms, etc.), data

• Data protection issues Data protection issues –– where can data be sent / stored? where can data be sent / stored?

• Is third party data being used? Can this be transferred to Is third party data being used? Can this be transferred to another location for processing?another location for processing?

• Latency Latency requirementsrequirements

• Real time data processing applicationsReal time data processing applications

• Are there specific requirements for latency on network Are there specific requirements for latency on network connections?connections?

• Are these catered for under SLA?Are these catered for under SLA?

Usage profiles

Page 16: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

Challenges – Preparing Your Application for the Cloud

Challenges – Preparing Your Application for the Cloud

Page 17: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• What are you aiming for?What are you aiming for?

• One-off/occasional manual execution of an application on a One-off/occasional manual execution of an application on a remote resource from a terminalremote resource from a terminal

• ee.g. long running HPC app, don’t want to hog CPU on .g. long running HPC app, don’t want to hog CPU on local resource for a long period of timelocal resource for a long period of time

• Use a Cloud platform such as Amazon EC2 to create an Use a Cloud platform such as Amazon EC2 to create an instance of a Cloud resource and interact with it via a instance of a Cloud resource and interact with it via a terminal to upload and run your applicationterminal to upload and run your application

• Full remote deployment of applicationFull remote deployment of application

• Remote execution / interactionRemote execution / interaction

Preparing your application

Page 18: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Batch applications (e.g. scientific HPC codes)Batch applications (e.g. scientific HPC codes)

• If native code, need to ensure CPU/OS requirements are If native code, need to ensure CPU/OS requirements are supported supported

• Same goes for apps based on JIT / interpreted languagesSame goes for apps based on JIT / interpreted languages

• Does application have a GUI?Does application have a GUI?

• Data transfer issues Data transfer issues –– if very data intensive, data transfer if very data intensive, data transfer may present problems may present problems

• Dynamic deployment / wrapping?Dynamic deployment / wrapping?

Preparing your application

Page 19: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Web 2.0 / SaaS applicationsWeb 2.0 / SaaS applications

• Deploy necessary application server and server-side code Deploy necessary application server and server-side code

• If supported by Cloud provider, bundle deployed system in If supported by Cloud provider, bundle deployed system in platform wrapper for easy restart / creating additional nodesplatform wrapper for easy restart / creating additional nodes

• Storage considerationsStorage considerations

• How much output data is there?How much output data is there?

• Where are you going to put it?Where are you going to put it?

Preparing your application

Page 20: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Aim for loosely-coupled SOA modelAim for loosely-coupled SOA model

Preparing your application - Web 2.0

Application Component

Application Component

Application Component

Interface

Client

• Decoupling of GUI from Decoupling of GUI from backendbackend

Page 21: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Getting native executables onto remote platform and Getting native executables onto remote platform and controlling executioncontrolling execution

• Deploy app at runtime Deploy app at runtime –– e.g. via job manager / e.g. via job manager / middleware installed on Cmiddleware installed on Clloud instanceoud instance

Preparing your application - Batch

• Lightweight application wrappingLightweight application wrapping

• Provide service interface for basic Provide service interface for basic execution control of appsexecution control of apps

• ee.g. start, getOutput, getError.g. start, getOutput, getError

• Static deployment of application into Static deployment of application into Cloud instanceCloud instance

Service Wrapper

Messa

gin

g A

PIs

Nativ

e C

ode

Execu

table

Interface

Nativ

e Lib

rarie

s

Page 22: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

Technologies – Server-side / Client-side

Service-enabling your application

Technologies – Server-side / Client-side

Service-enabling your application

Page 23: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Cloud environments may provide a managed interface to physical Cloud environments may provide a managed interface to physical hardware, or a virtualised platform on which you install your own hardware, or a virtualised platform on which you install your own OS/application imageOS/application image

• An Application Server / Servlet Container may be needed to host An Application Server / Servlet Container may be needed to host your application and provide the messaging infrastructure to your application and provide the messaging infrastructure to communicate with itcommunicate with it

• ee.g. Apache Tomcat, Glassfish, .g. Apache Tomcat, Glassfish, JBoss, etc.JBoss, etc.

Server side software / technologies

Page 24: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Services / Messaging / Transport Services / Messaging / Transport –– Getting messages to Cloud apps Getting messages to Cloud apps

• Web Services (WSDL, SOAP) Web Services (WSDL, SOAP) ––

• Apache Axis, JAX-WS, Apache Axis, JAX-WS, ……

Server-side software / technologies

Client

AppServer

ServiceDescription(e.g. WSDL)

Messaging(e.g. SOAP over HTTP)

• HTTP GET/POSTHTTP GET/POST

• JMSJMS

• Adobe BlazeDSAdobe BlazeDS

• RMIRMI

• CORBA, …CORBA, …

Page 25: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

Client-side software / technologies

• Client-side tools / RIA PlatformsClient-side tools / RIA Platforms

• Web development – e.g.Web development – e.g.

• HTML, Javascript, AJAX, …HTML, Javascript, AJAX, …

• RIA platforms – e.g.RIA platforms – e.g.

• Adobe FlexAdobe Flex

• Sun JavaFX Sun JavaFX

• Microsoft SilverlightMicrosoft Silverlight

• ……

• JavaScript Libraries – e.g.JavaScript Libraries – e.g.

• Prototype, jQuery, YahooPrototype, jQuery, Yahoo

• Dojo, Script.aculo.us, …Dojo, Script.aculo.us, …

Page 26: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

Examples –

The MESSAGE Project

Dynamic Application Deployment

Examples –

The MESSAGE Project

Dynamic Application Deployment

Page 27: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• 3 year project starting October 20063 year project starting October 2006

• Funded jointly by EPSRC and DfT (~£4m), under Funded jointly by EPSRC and DfT (~£4m), under EPSRC’s e-Science demonstration programmeEPSRC’s e-Science demonstration programme

• 5 Universities, 19 industrial partners5 Universities, 19 industrial partners

• Pioneering combination and extension of leading Pioneering combination and extension of leading edge grid, sensor, communication and positioning edge grid, sensor, communication and positioning technologiestechnologies

• Create radically new sensing infrastructure based Create radically new sensing infrastructure based on combination of ad-hoc mobile and fixed sensorson combination of ad-hoc mobile and fixed sensors

• www.message-project.orgwww.message-project.org

The MESSAGE Project• MMobile obile EEnvironmental nvironmental SSensing ensing SSystem ystem AAcross a cross a GGrid rid EEnvironmentnvironment

Page 28: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

To extend existing e-Science, sensor, communication and modelling

technologies to enable the integration of data from heterogeneous fixed and

mobile environmental sensor grids in real time to provide dynamic estimates of

pollutant and hazard concentrations.

To demonstrate how these data can be usefully correlated with a wide range

of other complementary dynamic data on, for example, weather conditions,

transport network performance, vehicle mix and performance, driver behaviour,

travel demand, pollutant exposure and health outcomes.

To implement relevant e-Science tool sets and (fixed and mobile) sensor and

communication system in a number of selected real-world case study

applications, involving close collaboration with business and the public sector,

and to thereby to demonstrate their value to the research and policy community.

MESSAGE Objectives

Page 29: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

Architecture Overview

Three Layer ArchitectureThree Layer Architecture

• Application LayerApplication Layer• Realtime Data LayerRealtime Data Layer• Sensor LayerSensor Layer

Page 30: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

MESSAGE Project – Data CaptureData Capture PlatformData Capture PlatformReliable, efficient capture of data from an environment with an unreliable Reliable, efficient capture of data from an environment with an unreliable

communications infrastructure and varying load.communications infrastructure and varying load. Different types of sensors, different pre-processing requirementsDifferent types of sensors, different pre-processing requirements Different communications technologiesDifferent communications technologies Real time streaming and intermittent burstReal time streaming and intermittent burst

Multiple DBs distributed across several sites.

Scalable Cloud-based processing infrastructure

Multiple sensor and communications technologies.

Page 31: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Sensors join and leave the network stochasticallySensors join and leave the network stochastically

• Joining sensors need to know where to send their data Joining sensors need to know where to send their data –– this this information is provided by the Root Gateway:information is provided by the Root Gateway:

Processing data from sensors

RootGateway

SensorSensor

Sensor

SensorSensor

Sensor

? ?

• Difficult to know how many sensors active Difficult to know how many sensors active at any timeat any time

• Scalable Scalable infrastructure = infrastructure = more flexibility, more flexibility, less wasteless waste

Page 32: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Using Amazon EC2 (http://aws.amazon.com/ec2) to provide scalable Using Amazon EC2 (http://aws.amazon.com/ec2) to provide scalable computing infrastructure for MESSAGEcomputing infrastructure for MESSAGE

• An Amazon Machine Image (AMI) has been prepared for tAn Amazon Machine Image (AMI) has been prepared for thehe Sensor Sensor Gateway softwareGateway software

• Sensor Gateway AMI is stored in the Amazon S3 Simple Storage Sensor Gateway AMI is stored in the Amazon S3 Simple Storage ServiceService

• Resources based on this image can be started on-demandResources based on this image can be started on-demand

• Paid for on a CPU-hour basisPaid for on a CPU-hour basis

MESSAGE Project – Cloud Computing

Page 33: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Minimal Linux distribution to reduce image size and provide faster Minimal Linux distribution to reduce image size and provide faster start upstart up

• Image contains only necessary software to run Sensor Gateway:Image contains only necessary software to run Sensor Gateway:

• Java, Glassfish Application Server, Sensor Gateway Web ServiceJava, Glassfish Application Server, Sensor Gateway Web Service

• Start up scripts start application server and Sensor Gateway service Start up scripts start application server and Sensor Gateway service when image boots upwhen image boots up

• Root Gateway Service has uses embedded client to start / stop Root Gateway Service has uses embedded client to start / stop Sensor Gateway instances as requiredSensor Gateway instances as required

• Pre-processing may be carried out by Sensor Gateway nodes, data Pre-processing may be carried out by Sensor Gateway nodes, data then sent on to database for storagethen sent on to database for storage

MESSAGE Project – Cloud Computing

Page 34: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

MESSAGE Project – Cloud Computing

SensorSensor

Sensor

SensorSensor

Sensor

SensorSensor

Sensor

Scalable Sensor Gateway Pool

Cloud Computing Resources

Data

Sto

rage

Visu

alisa

tion

/Ap

plica

tion

Pla

tform

Page 35: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

Dynamic application deploymentDynamic application deployment

Page 36: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Have varying application requirementsHave varying application requirements

• Avoid preparing separate Cloud resources for each applicationAvoid preparing separate Cloud resources for each application

• Use Cloud resources with a generic configurationUse Cloud resources with a generic configuration

• Use a deployment service to move application executables into Use a deployment service to move application executables into execution environment as required, at runtimeexecution environment as required, at runtime

• Well suited to HPC, batch type applications that need to be run Well suited to HPC, batch type applications that need to be run occasionallyoccasionally

• Potential for automating workflow execution on Cloud resourcesPotential for automating workflow execution on Cloud resources

Dynamic application deployment

Page 37: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

Dynamic application deployment

Application 2

(Executable, Libraries)

Application 1

(Executable, Libraries)

Input Data

Input Data

Cloud Computing Resource

Service

Interface

GridSAM Job Submission and Monitoring

Service

using local fork launcher

JSDLJob

Description

• JSDL Job description sent JSDL Job description sent to GridSAM service on to GridSAM service on execution resourceexecution resource

• Application and input files staged Application and input files staged onto execution resource for onto execution resource for executionexecution

JSDLJob

Description

Page 38: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

• Many different considerations when moving applications to a Cloud Many different considerations when moving applications to a Cloud environmentenvironment

• Not necessarily suited to all apps but new models/services emerging Not necessarily suited to all apps but new models/services emerging

• UU

• Use a deployment service to move application executables into Use a deployment service to move application executables into execution environment as required, at runtimeexecution environment as required, at runtime

• Well suited to HPC, batch type applications that need to be run Well suited to HPC, batch type applications that need to be run occasionallyoccasionally

• Potential for automating workflow execution on Cloud resourcesPotential for automating workflow execution on Cloud resources

Conclusions

Page 39: Developing Applications for Cloud Computing Platforms Jeremy Cohen Department of Computing Imperial College London The Influence and Impact of Web 2.0

THANK YOU!

[email protected]