You are on page 1of 74

© nasirsyed.utp@gmail.

com
Cloud Computing Applications
and Workflow Management
Dr. Syed
Dr. Syed Nasir
Nasir Mehmood
Mehmood Shah
Shah
nasirsyed.utp@gmail.com
nasirsyed.utp@gmail.com

© nasirsyed.utp@gmail.com
Sequence

Apache ZooKeeper
Cloud Computing

Elasticity and load distribution


Evolution of concepts and
technologies
Clouds for science and engineering
Business Drive for Cloud Computing
High performance computing on a cloud

Cloud applications
Social computing and digital content

Challenges for Cloud Application


Workflow Management in Cloud
Development

© nasirsyed.utp@gmail.com
Cloud Computing

►Cloud computing is internet based computing, whereby


shared resources, software and information are provided
on-demand, like a public utility.

© nasirsyed.utp@gmail.com
Cloud computing
• Information processing can be done more efficiently on large farms of computing and
storage systems accessible via the Internet.
• Grid computing – initiated by the National Labs in the early 1990s; targeted primarily at scientific
computing.
• Utility computing – initiated in 2005-2006 by IT companies and targeted at enterprise computing.

• The focus of utility computing is on the business model for providing computing services; it
often requires a cloud-like infrastructure.

• Cloud computing is a path to utility computing embraced by major IT companies including:


Amazon, HP, IBM, Microsoft, Oracle, and others.

© nasirsyed.utp@gmail.com
Evolution of concepts and technologies
• The concepts and technologies for network-centric computing and content
evolved along the years.
• The web and the semantic web- expected to support composition of services. The web is
dominated by unstructured or semi-structured data, while the semantic web advocates
inclusion of semantic content in web pages.
• The Grid - initiated in the early 1990s by National Laboratories and Universities; used
primarily for applications in the area of science and engineering.
• Peer-to-peer systems.

• Cloud system
© nasirsyed.utp@gmail.com
Origins of cloud computing
ARPANET was the network that became the basis for
the Internet. 

© nasirsyed.utp@gmail.com
Cloud computing

• Uses Internet technologies to offer scalable and elastic services.

• The term “elastic computing” refers to the ability of dynamically acquiring computing
resources and supporting a variable workload.

• The resources used for these services can be metered and the users can be charged
only for the resources they used.

• The maintenance and security are ensured by service providers.

• The service providers can operate more efficiently due to specialization and
centralization.

© nasirsyed.utp@gmail.com
Cloud computing

• Lower costs for the cloud service provider are past to the cloud users.

• Data is stored:
• closer to the site where it is used.

• in a device and in a location-independent manner.

• The data storage strategy can increase reliability, as well as security, and
can lower communication costs.

© nasirsyed.utp@gmail.com
Common Qualities
• Pool of resources

• Billed consumption

• Virtualized resources

• Dynamically reconfigured

• Scalable

• Guaranteed by the infrastructure provider

• Founded on the SLA

0 © nasirsyed.utp@gmail.com
Cloud Resources

• Clouds are a large pool of easily usable and accessible virtualized


resources(such as hardware, development platforms and/or services).

• These resources can be dynamically assigned to adjust to a variable load,


allowing also for an optimum resource utilization.

• This pool of resources is typically exploited by a pay-per-use model in which


guarantees are offered by the Infrastructure Provider by means of
customized SLAs

1 © nasirsyed.utp@gmail.com
Motivators
• Flexibility

• Costs

• Eco-efficiency (Green topics)

• Economic crisis proof

• Consumerization of enterprise IT

• Business perspective

2 © nasirsyed.utp@gmail.com
Business Drive

• Capacity Planning

• Cost Reduction

• Organizational Agility

3 © nasirsyed.utp@gmail.com
Capacity Planning Strategies
• Lead Strategy –adding capacity to an IT resource in anticipation of
demand. (predictive)

• Lag Strategy –adding capacity when the IT resource reaches its full
capacity. (preventive)

• Match Strategy –adding IT resource capacity in small increments, as


demand increases. (incremental)

4 © nasirsyed.utp@gmail.com
Cost Reduction

• The cloud is an effort geared towards cost reduction of operations:

• Common Costs include:


• Technical staff

• Upgrades/ patching costs

• Utility bills/ cooling costs

• Security/ access control costs

• Administrative staff for management

5 © nasirsyed.utp@gmail.com
Organizational Agility

• Newer organizations need to reduce upfront costs to enable growth of the


enterprise.

• The ability to tailor needs according to resource demand is required for


success.

• Business changes dictate scaling of IT resources.

• Cloud provides a suitable backup plan for disaster planning roles.

6 © nasirsyed.utp@gmail.com
Cloud activities (1/3)
• Service management and provisioning including:
• Virtualization.
• Service provisioning.
• Call center.
• Operations management.
• Systems management.
• QoS management.
• Billing and accounting, asset management.
• SLA management.
• Technical support and backups.

7 © nasirsyed.utp@gmail.com
Cloud activities (2/3)
• Security management including:
• ID and authentication.

• Certification and accreditation.

• Intrusion prevention.

• Intrusion detection.

• Virus protection.

• Cryptography.

• Physical security, incident response.

• Access control, audit and trails, and firewalls.


8 © nasirsyed.utp@gmail.com
Cloud activities (3/3)
• Customer services such as:
• Customer assistance and on-line help.
• Subscriptions.
• Business intelligence.
• Reporting.
• Customer preferences.
• Personalization.

• Integration services including:


• Data management.

• Development.
19
9 © nasirsyed.utp@gmail.com
Cloud Applications

0 © nasirsyed.utp@gmail.com
Cloud applications
• Cloud computing is very attractive to the users:

• Economic reasons.

• low infrastructure investment.

• low cost - customers are only billed for resources used.

• Convenience and performance.

• Application developers enjoy the advantages of a just-in-time infrastructure

• They are free to design an application without being concerned with the system
where the application will run.

1 © nasirsyed.utp@gmail.com
Cloud applications
• Convenience and performance.

• the execution time of compute-intensive and data-intensive applications can,


potentially, be reduced through parallelization.
• If an application can partition the workload in n segments and n instances could be
allocated to provided resources by the Cloud provider, then the execution time could
be reduced by a factor close to n.

• Cloud computing is also beneficial for the providers of computing cycles - it typically leads
to a higher level of resource utilization.

2 © nasirsyed.utp@gmail.com
Cloud applications
• Ideal applications for cloud computing:
• Web services.

• Database services.

• Transaction-based service. The resource requirements of transaction-oriented services benefit from


an elastic environment where resources are available when needed and where one pays only for the
resources it consumes.

• Applications unlikely to perform well on a cloud:


• Applications with a complex workflow and multiple dependencies, as is often the case in high-
performance computing.
• Applications which require intensive communication among concurrent instances.

• When the workload cannot be arbitrarily partitioned.


3 © nasirsyed.utp@gmail.com
Existing and new application opportunities
• Three broad categories of existing applications:
1. Processing pipelines.

2. Batch processing systems.

3. Web applications.

• Potentially new applications


• Batch processing for decision support systems and business analytics.

• Mobile interactive applications which process large volumes of data from different types of
sensors.
• Science and engineering could greatly benefit from cloud computing as many applications
in these areas are compute-intensive and data-intensive.
4 © nasirsyed.utp@gmail.com
1- Processing pipelines
• Data produced by applications, devices, or humans must be processed before it is consumed.
By definition, a data pipeline represents the flow of data between two or more systems. It is a set
of instructions that determine how and when to move data between these systems.
• Big Data Indexing large datasets created by web crawler engines.
• Data mining - searching large collections of records to locate items of interests.
• Image processing .
• Image conversion, e.g., enlarge an image or create thumbnails.
• Compress or encrypt images.
• Video transcoding from one video format to another, e.g., from AVI to MPEG.
• Document processing.
• Convert large collections of documents from one format to another, e.g., from Word to PDF.
• Encrypt documents.
• Use Optical Character Recognition to produce digital images of documents.
5 © nasirsyed.utp@gmail.com
2- Batch processing applications
• Batch processing is a general term used for frequently used programs that are executed
with minimum human interaction. Batch process jobs can run without any end-user
interaction or can be scheduled to start up on their own as resources permit.

• Generation of daily, weekly, monthly, and annual activity reports for retail, manufacturing, other
economical sectors.

• Processing, aggregation, and summaries of daily transactions for financial institutions, insurance
companies, and healthcare organizations.

• Processing billing and payroll records.

• Management of the software development, e.g., nightly updates of software repositories.

• Automatic testing and verification of software and hardware systems.


6 © nasirsyed.utp@gmail.com
3- Web Applications
• A web application is a software application that runs on a remote server. In most
cases, Web browsers are used to access Web applications, over a network, such as
the Internet. Some web applications are used in intranets for organizations.

• Sites for online commerce.

• Sites with a periodic or temporary presence.

• Conferences or other events.

• Active during a particular season (e.g., the Holidays Season) or income tax
reporting.

• Sites for promotional activities.


7 © nasirsyed.utp@gmail.com
Application Workflow Management in Cloud

8 © nasirsyed.utp@gmail.com
Architectural styles for Cloud applications
• Based on the client-server paradigm.

• Stateless servers - view a client request as an independent transaction and respond to it;
the client is not required to first establish a connection to the server.

• Often clients and servers communicate using Remote Procedure Calls (RPCs).

• Simple Object Access Protocol (SOAP) - application protocol for web applications; message
format based on the XML. Uses TCP or UDP transport protocols.

• Representational State Transfer (REST) - software architecture for distributed hypermedia


systems. Supports client communication with stateless servers, it is platform independent,
language independent, supports data caching, and can be used in the presence of firewalls.
9 © nasirsyed.utp@gmail.com
Cloud Computing Scenario

P0
U0 R0

U1 P1 R1

U2 R2
P2

Un Rk
Pm

Users
Processes Resources

0 © nasirsyed.utp@gmail.com
Workflows
• Process description - structure describing the tasks to be executed and the order of their
execution. Resembles a flowchart.

• Case - an instance of a process description.

• State of a case at time t - defined in terms of tasks already completed at that time.

• Events - cause transitions between states.

• The life cycle of a workflow - creation, definition, verification, and enactment; similar to
the life cycle of a traditional program (creation, compilation, and execution).

1 © nasirsyed.utp@gmail.com
2 © nasirsyed.utp@gmail.com
Safety and liveness
• Desirable properties of workflows.

• Safety  nothing “bad” ever happens.

• Liveness  something “good” will eventually happen.

3 © nasirsyed.utp@gmail.com
Tasks and their dependencies

4 © nasirsyed.utp@gmail.com
Basic workflow patterns
• Workflow patterns - the temporal relationship among the tasks of a process
• Sequence - several tasks have to be scheduled one after the
completion of the other.
• AND split - both tasks B and C are activated when task A terminates.
• Synchronization - task C can only start after tasks A and B terminate.

Basic workflow patterns. (a) Sequence. (b) AND split. (c) Synchronization
5 © nasirsyed.utp@gmail.com
Basic workflow patterns (2/4)
• Workflow patterns - the temporal relationship among the tasks of a process
• XOR split - after completion of task A, either B or C can be activated.
• XOR merge - task C is enabled when either A or B terminate.
• OR split - after completion of task A one could activate either B, C, or
both.

(d) XOR split. (e) XOR merge. (f) OR split.


6 © nasirsyed.utp@gmail.com
Basic workflow patterns

• Workflow patterns - the temporal relationship among the tasks of a process


• Multiple Merge - once task A terminates, B and C execute concurrently;
when the first of them, say B, terminates, then D is activated; then,
when C terminates, D is activated again.

(g) Multiple merge.


7 © nasirsyed.utp@gmail.com
Basic workflow patterns

• Workflow patterns - the temporal relationship among the tasks of a process


• Discriminator – wait for a number of incoming branches to complete
before activating the subsequent activity; then wait for the remaining
branches to finish without taking any action until all of them have
terminated.

(h) Discriminator.
8 © nasirsyed.utp@gmail.com
Basic workflow patterns
• Workflow patterns - the temporal relationship among the tasks of a process
• N out of M join - barrier synchronization. Assuming that M tasks run concurrently, N (N<M) of them
have to reach the barrier before the next task is enabled. In our example, any two out of the three
tasks A, B, and C have to finish before E is enabled.
• Deferred Choice - similar to the XOR split but the choice is not made explicitly; the run-time
environment decides what branch to take.

9 © nasirsyed.utp@gmail.com
Apache ZooKeeper

0 © nasirsyed.utp@gmail.com
Apache ZooKeeper
• Apache ZooKeeper is an open source file application program interface (API) that allows
distributed processes in large systems to synchronize with each other so that all clients making
requests receive consistent data.

• The Zookeeper service, which is a sub-project of Hadoop, is provided by a cluster of servers to


avoid a single point of failure.

• Zookeeper uses a distributed consensus protocol to determine which node in the ZooKeeper
service is the leader at any given time.

• The leader assigns a timestamp to each update to keep order. Once a majority of nodes have
acknowledged receipt of a time-stamped update, the leader can declare a quorum, which
means that any data contained in the update can be coordinated with elements of the data
store. The use of a quorum ensures that the service always returns consistent answers.
1 © nasirsyed.utp@gmail.com
Apache ZooKeeper – Key Features
• An open source, high-performance coordination service for distributed
application.

• Exposes common services in simple interface:


• Naming
• Configuration management
• Locks & synchronization
• Groups services
• Build own application on it for specific needs
2 © nasirsyed.utp@gmail.com
Coordination – ZooKeeper

• Cloud elasticity  distribute computations and data across multiple systems;


coordination among these systems is a critical function in a distributed
environment.

• ZooKeeper
• Distributed coordination service for large-scale distributed systems.

• High throughput and low latency service.

3 © nasirsyed.utp@gmail.com
Coordination – ZooKeeper

• ZooKeeper
• Open-source software written in Java with bindings for Java and C.
• The servers in the pack communicate and elect a leader.
• A database is replicated on each server; consistency of the replicas is
maintained.
• A client connect to a single server, synchronizes its clock with the
server, and sends requests, receives responses and watch events
through a TCP connection.
44
4 © nasirsyed.utp@gmail.com
A. The ZooKeeper coordination service.
(a) The service provides a single system image. Clients can connect to any server in the
pack.

5 © nasirsyed.utp@gmail.com
• ZooKeeper Service is replicated over a set of machines
• All machines store a copy of the data (in-memory)
• A leader is elected on service startup
• Clients only connect to a single ZooKeeper server and maintain a TCP connection

6 © nasirsyed.utp@gmail.com
The ZooKeeper coordination service.
(b) Functional model of the ZooKeeper service. The replicated database is accessed directly
by read commands; write commands involve more intricate processing based on atomic
broadcast.
(c) Processing a write command:
(1) A server receiving the command from a client forwards the command to the leader;
(2) the leader uses atomic broadcast to reach consensus among all followers

7 © nasirsyed.utp@gmail.com
States and Lifetime

• Main possible states: Not Connected, Connecting, Connected and Closed

8 © nasirsyed.utp@gmail.com
Zookeeper communication

• Messaging layer  responsible for the election of a new leader when the
current leader fails.

9 © nasirsyed.utp@gmail.com
Zookeeper communication
• Messaging protocols use:
• Packets - sequence of bytes sent through a FIFO channel.
• Proposals - units of agreement.
• Messages - sequence of bytes atomically broadcast to all servers.

• A message is included into a proposal and it is agreed upon before it is


delivered.

• Proposals are agreed upon by exchanging packets with a quorum of


servers.
0 © nasirsyed.utp@gmail.com
Zookeeper communication

• Messaging layer guarantees:


• Reliable delivery: if a message m is delivered to one server, it will be
eventually delivered to all servers.
• Total order: if message m is delivered before message n to one server,
it will be delivered before n to all servers.
• Causal order: if message n is sent after m has been delivered by the
sender of n, then m must be ordered before n.

1 © nasirsyed.utp@gmail.com
ZooKeeper service guarantees
• Atomicity - a transaction either completes or fails.

• Sequential consistency of updates - updates are applied strictly in the order they are
received.

• Single system image for the clients - a client receives the same response regardless of
the server it connects to.

• Persistence of updates - once applied, an update persists until it is overwritten by a


client.

• Reliability - the system is guaranteed to function correctly as long as the majority of


servers function correctly.
2 © nasirsyed.utp@gmail.com
Zookeeper API

• The API is simple - consists of seven operations:


• Create - add a node at a given location on the tree.

• Delete - delete a node.

• Get data - read data from a node.

• Set data - write data to a node.

• Get children - retrieve a list of the children of the node.

• Synch - wait for the data to propagate.

3 © nasirsyed.utp@gmail.com
Elasticity and load distribution
• Elasticity  ability to use as many servers as necessary to optimally respond to cost and timing constraints
of an application.

• How to divide the load

• Transaction processing systems  a front-end distributes the incoming transactions to a number of


back-end systems. As the workload increases new back-end systems are added to the pool.
• For data-intensive batch applications two types of divisible workloads are possible:

• modularly divisible  the workload partitioning is defined a priori.

• arbitrarily divisible  the workload can be partitioned into an arbitrarily large number of smaller
workloads of equal, or very close size.

• Many applications in physics, biology, and other areas of computational science and engineering obey the
arbitrarily divisible load sharing model.
4 © nasirsyed.utp@gmail.com
Clouds for science and engineering
• The generic problems in virtually all areas of science are:
• Collection of experimental data.
• Management of very large volumes of data.
• Building and execution of models.
• Integration of data and literature.
• Documentation of the experiments.
• Sharing the data with others; data preservation for a long periods of time.
• All these activities require “big” data storage and systems capable to deliver
abundant computing cycles.
• Computing clouds are able to provide such resources and support collaborative
environments.

5 © nasirsyed.utp@gmail.com
Online Data Discovery
• Phases of data discovery in large scientific data sets:
• recognition of the information problem.
• generation of search queries using one or more search engines.
• evaluation of the search results.
• evaluation of the web documents.
• comparing information from different sources.
• Large scientific data sets:
• biomedical and genomic data from the National Center for Biotechnology
Information (NCBI).
• astrophysics data from NASA.
• atmospheric data from the National Oceanic and Atmospheric Administration
(NOAA) and the National Center for Atmospheric Research (NCAR).
6 © nasirsyed.utp@gmail.com
High Performance Computing on a Cloud

NCP Cloud Node of

CERN CLOUD

Example

7 © nasirsyed.utp@gmail.com
The LHC Data Challenge

►Once the accelerator is completed it will run for 10-15 years

►Experiments will produce about 15 Million Gigabytes of data each year

►LHC data analysis requires a computing power equivalent to ~100,000 of


today's fastest PC processors

►Requires many cooperating computer centres,


as CERN can only provide ~20% of the capacity

8 © nasirsyed.utp@gmail.com
Solution: Cloud

9 © nasirsyed.utp@gmail.com
LHC Computing project
• More than 140 computing centres

• 12 large centres for primary data


management: CERN (Tier-0) and
eleven Tier-1s

• 38 federations of smaller Tier-2


centres
• 7 Tier 2 in Spain: supporting
ATLAS, CMS, LHCb

• 35+ countries involved Ian.Bird@cern.ch

0 © nasirsyed.utp@gmail.com
Tier 0 at CERN: Acquisition, First pass reconstruction,
Storage & Distribution

1.25 GB/sec (ions)

Ian.Bird@cern.ch
1 © nasirsyed.utp@gmail.com
NCP Cloud Node of CERN Cloud

http://www.ncp.edu.pk/

• NCP (National Centre for Physics), Pakistan is the associate


member of CERN.

• NCP is running its Cloud Node as Tier-2 site of CERN Cloud.

• NCP is using PERN connectivity provided by HEC for its live


working with CERN Cloud

2 © nasirsyed.utp@gmail.com
NCP Cloud

NCP is maintaining a large computing infrastructure:-


1. Hosted a WLCG TIER-2 Site
comprising of 524 CPU Cores and
400 TB of Disk Storage

2. HPC Cluster of 96 CPU Cores


installed for local scientific
community

3 © nasirsyed.utp@gmail.com
HPC Research areas @ NCP
 Computational Fluid Dynamics(CFD)
 Molecular Biology
 Bio Chemistry
 Physics
 Weather Forecasting
 Density Functional Theory (DTF)
 Ion channeling
 Multi-Particle Interaction

4 © nasirsyed.utp@gmail.com
Cloud Deployment @ NCP

Traditional Computing Model Migration to Cloud Computing Model

5 © nasirsyed.utp@gmail.com
HPC Cluster@ NCP

6 © nasirsyed.utp@gmail.com
7 © nasirsyed.utp@gmail.com
Social computing and digital content
• Networks allowing researchers to share data and provide a virtual
environment supporting remote execution of workflows are domain specific:
• MyExperiment for biology.
• nanoHub for nanoscience.

68
8 © nasirsyed.utp@gmail.com
Social computing and digital content
• Volunteer computing - a large population of users donate resources such as
CPU cycles and storage space for a specific project:
• Mersenne Prime Search
• SETI@Home,
• Folding@home,
• Storage@Home
• PlanetLab

• Berkeley Open Infrastructure for Network Computing (BOINC) 


middleware for a distributed infrastructure suitable for different applications.

9 © nasirsyed.utp@gmail.com
Challenges for cloud application development
• Performance isolation - nearly impossible to reach in a real system, especially when
the system is heavily loaded.

• Reliability - major concern; server failures expected when a large number of servers
cooperate for the computations.

• Cloud infrastructure exhibits latency and bandwidth fluctuations which affect the
application performance.

• Data logging Performance considerations limit the amount of data logging; the
ability to identify the source of unexpected results and errors is helped by frequent
logging.
0 © nasirsyed.utp@gmail.com
Challenges for Cloud Application Development

• Availability of service; what happens when the service provider cannot


deliver?

• Diversity of services, data organization, user interfaces available at different


service providers limit user mobility; once a customer is hooked to one
provider it is hard to move to another. Standardization efforts at NIST!

• Data confidentiality and auditability, a serious problem.

• Data transfer bottleneck; many applications are data-intensive.

1 © nasirsyed.utp@gmail.com
Challenges for Cloud Application Development

• Performance unpredictability, one of the consequences of resource sharing.


• How to use resource virtualization and performance isolation for QoS guarantees?

• How to support elasticity, the ability to scale up and down quickly?

• Resource management; are self-organization and self-management the


solution?

• Security and confidentiality; major concern.

Addressing these Hot challenges provides good research opportunities!!

2 © nasirsyed.utp@gmail.com
Key Challenges for Cloud Application Development
Security

Efficiency and Performance

Regulatory Compliance

SLA

Availability

Migration, Integration

Risk management

Power, ownership, control, job security

3 © nasirsyed.utp@gmail.com
Questions / Comments

4 © nasirsyed.utp@gmail.com

You might also like