Module-5 Notes
Module-5 Notes
.IN
➢ Pay-per-use model – You only pay for what you use.
➢ Automatic updates – Cloud services are updated automatically by the provider.
C
➢ High availability – Cloud services offer strong uptime and data backup.
N
SY
➢ Distributed computing – Tasks are divided and processed across multiple systems.
VT
Capability Description
Physical or virtual computing The cloud environment includes physical and virtual platforms, with
platform virtual platforms offering isolated environments for diverse applications
and users.
Massive data storage service, Cloud data storage services and distributed file systems provide large disk
distributed filesystem capacity and interfaces for storing and retrieving data, similar to local file
systems.
Massive database storage Distributed file systems and cloud database storage services provide
service structured and scalable data storage, similar to traditional DBMS, enabling
.IN
developers to store data efficiently.
language support abstract the infrastructure, enabling better application logic, similar to how
SQL simplifies database management.
U
Programming interface and Cloud applications use web interfaces and APIs (e.g., J2EE, PHP, ASP,
service deployment Rails) to provide functionality, while Ajax enhances user experience, and
VT
Runtime support Cloud runtime support ensures transparent execution for users and
applications, offering distributed monitoring, task scheduling, and locking
services, which are essential for running cloud applications efficiently.
Support services Clouds provide data and computing services, including rich data services
and parallel execution models like MapReduce for efficient processing.
Traditional Features Common to Grids and Clouds
In this section, we concentrate on features related to workflow, data transport, security, and
availability concerns that are common to today’s computing grids and clouds
➢ Workflow-Workflow systems like Pegasus, Taverna, and Kepler have emerged but lack
universal adoption. Commercial options include Pipeline Pilot, AVS, and LIMS.
Microsoft's Trident, built on Windows Workflow Foundation, runs on Azure or
Windows and integrates cloud and non-cloud services via Linux proxy services.
➢ Data Transport-Data transport in commercial clouds is costly, but TeraGrid
integration could improve bandwidth. Cloud data structures support parallel
algorithms, though HTTP-based transfers are currently used
➢ Security, Privacy and Availability-Cloud programming ensures security, privacy,
and availability through virtual clustering, secure APIs, HTTPS/SSL protocols,
fine-grained access control, shared data protection, VM live migration, and a
.IN
reputation system for trusted access.
Below are the traditional features common to Grids and Clouds
• Resource Sharing – Both allow sharing of computing, storage, and network resources.
C
• Scalability – Can grow or shrink in resources as demand changes.
N
• Virtualization – Use of virtual machines to manage and deploy applications flexibly.
SY
• High Performance Computing (HPC) – Support for intensive computing tasks and
parallel processing.
• Service-Oriented Architecture (SOA) – Both use web services for accessing and
managing resources.
U
• Distributed Computing – Tasks and data are spread across multiple systems.
VT
.IN
• Azure lacks strong compute-data affinity support; Azure Affinity Groups are a start.
• Example: FutureGrid uses Oracle, SAS, and Hadoop for medical data analysis.
• Cloud DBs run as independent services (SQL-as-a-Service).
• Simplifies management, reduces VM image complexity.
U
VT
.IN
Dryad (expected on Azure).
MapReduce is a programming model used to process large amounts of data across
many computers (nodes) in a distributed system.
C
• It breaks the task into two main steps:
• Map:
N
• Takes input data and breaks it into key-value pairs.
SY
• Takes all the output from the Map step, groups by key, and combines values to
produce final results.
VT
➢ Cloud Programming Models: Includes models like Google App Engine (GAE) and
Aneka, supporting cloud, HPC, and clusters. Iterative MapReduce offers portability
across platforms.
➢ Software as a Service (SaaS): Users can package applications without needing
specialized support. Cloud services like MapReduce, BigTable, EC2, S3, and Hadoop
ensure scalability, security, and availability.
.IN
✓ Splits a job/program into smaller concurrent tasks.
✓ Requires identifying parts of the program that can run in parallel.
C
✓ Tasks may process different data or the same data copy.
• Data Partitioning
N
✓ Splits input or intermediate data into smaller chunks.
SY
.IN
• Enhancing system throughput to handle large-scale workloads.
• Supporting higher levels of abstraction for ease of programming.
C
Popular models like MapReduce, Hadoop, and Dryad were initially designed for information
retrieval but have proven useful for various applications. Their loose coupling makes them
N
suitable for virtual machine (VM) environments, improving fault tolerance and scalability over
traditional models.
SY
✓ MapReduce framework provides an abstraction layer for data and control flow in
distributed computing.
✓ It hides complex implementation details like data partitioning, mapping,
U
✓ Users call the built-in MapReduce(Spec, &Results) function to execute their program.
✓ A Spec object must be initialized and populated with:
✓ Names of input and output files.
✓ Names of user-defined Map and Reduce functions.
✓ Optional tuning parameters.
The user program includes three main components:
✓ Map Function – defines how input data is processed into intermediate key-value pairs.
✓ Reduce Function – defines how intermediate data is aggregated into final results.
Main Function – sets up the Spec object and invokes the MapReduce() function
.IN
C
N
SY
.IN
C
N
SY
U
The Map function is applied in parallel to every input (key, value) pair, and produces new set
of intermediate (key, value) pairs as follows
Then the MapReduce library collects all the produced intermediate (key, value) pairs from all
input (key, value) pairs, and sorts them based on the “key” part. It then groups the values of
all occur rences of the same key. Finally, the Reduce function is applied in parallel to each
group producing the collection of values as output as follows
Strategy to Solve MapReduce Problems
MapReduce Basics: Finding unique keys is crucial for solving MapReduce problems, as
intermediate data is grouped by key.
• Problem Examples & Solutions:
1. Word Frequency Counting: Each word is the unique key, and its occurrences form the
value.
2. Word Size Grouping: Each word is the unique key, with its length as the value.
3. Anagram Counting: The key is the alphabetically sorted sequence of letters, and the
value is the number of occurrences.
.IN
“most people ignore most poetry”
“most poetry ignores most people”
Map output (key = word, value = 1):
C
Example: (most, 1), (people, 1), (ignore, 1)
N
After Sort and Group:
SY
.IN
C
N
SY
U
VT
Compute-Data Affinity
➢ Origin & Implementation: Google first proposed and implemented MapReduce in
C, integrating it with Google File System (GFS).
➢ GFS & Data Storage: GFS stores files as fixed-size blocks (chunks) distributed
across cluster nodes.
➢ MapReduce Process: The framework splits input data into blocks, performing Map
tasks in parallel.
➢ Optimized Data Processing: Instead of moving large data sets, MapReduce sends
computation to the data location, improving efficiency.
➢ Block Size: Both GFS and MapReduce use a default block size of 64 MB.
Twister and Iterative MapReduce
It is important to understand the performance of different runtimes and, in particular, to
compare MPI and MapReduce
➢ MapReduce reads and writes via files, whereas MPI transfers information directly
between nodes over the network
➢ MPI does not transfer all data from node to node, but just the amount needed to
data flow.
.IN
C
N
SY
➢ To improve efficiency, streaming data between steps and using long-running threads
for δ flow can enhance performance, though at the cost of fault tolerance.
VT
HDFS Features:
❑ Designed for high performance, scalability, and fault tolerance.
❑ Not a general-purpose file system; it lacks some features like built-in security.
❑ HDFS Fault Tolerance
❑ Block Replication: Each file block is stored in multiple copies (default: 3 replicas).
❑ Replica Placement:
.IN
✓ 1st copy on the original node.
✓ 2nd copy on another node in the same rack.
✓ 3rd copy on a node in a different rack.
C
❑ Heartbeats & Block Reports:
N
✓ DataNodes send heartbeats to indicate they are alive.
SY
HDFS Operation:
U
Reading a File:
VT
.IN
C
N
SY
Figure 6.11 shows the MapReduce engine architecture cooperating with HDFS.
➢ Similar to HDFS, the MapReduce engine also has a master/slave architecture
U
➢ The JobTracker manages the MapReduce job over a cluster and is responsible for
monitoring jobs and assigning tasks to TaskTrackers.
➢ The TaskTracker manages the execution of the map and/or reduce tasks on a single
computation node in the cluster.
➢ Each TaskTracker manages multiple execution slots based on CPU threads (M * N
slots).
➢ Each data block is processed by one map task, ensuring a direct one-to-one mapping
between map tasks and data blocks.
Running a Job in Hadoop
➢ Job Execution Components: A user node, a JobTracker, and multiple TaskTrackers
coordinate a MapReduce job.
➢ Job Submission: The user node requests a job ID, prepares input file splits, and
submits the job to the JobTracker.
➢ Task Assignment: The JobTracker assigns map tasks based on data locality and reduce
tasks without locality constraints.
➢ Task Execution: The TaskTracker runs tasks by copying the job's JAR file and
executing it in a Java Virtual Machine (JVM).
➢ Task Monitoring: Heartbeat messages from TaskTrackers inform the JobTracker about
their status and readiness for new tasks
.IN
C
N
Dryad and DryadLINQ from Microsoft
SY
Two runtime software environments are reviewed in this section for parallel and
distributed computing, namely the Dryad and DryadLINQ, both developed by Microsoft.
Dryad
U
➢ Flexibility Over MapReduce: Dryad allows users to define custom data flows using
directed acyclic graphs (DAGs), unlike the fixed structure of MapReduce.
VT
.IN
o Results are written to output tables.
o The job manager terminates, returning control to DryadLINQ.
C
o Users access the results via a Dryad Table iterator.
Sawzall and Pig Latin High-Level Languages
N
Sawzall Overview: A high-level scripting language built on Google’s MapReduce
SY
• Distributed Data Processing: Handles large-scale datasets, offering fault tolerance and
efficiency.
VT
• Execution Process:
o Data partitioning & local processing with filtering.
o Aggregation for final result computation.
o Sawzall runtime engine translates scripts into MapReduce programs,
distributing tasks across multiple nodes.
• Scalability & Reliability: Leverages cluster computing and redundant servers to
ensure performance.
• Open Source Project: Recently released for public use.
Pig Latin Overview: A high-level data flow language developed by Yahoo!,
implemented in Apache Pig on Hadoop.
• Comparison with Other Languages:
o DryadLINQ is based on SQL.
o Pig Latin & Sawzall stem from NoSQL, though Pig Latin supports SQL-
like features (e.g., Join, which Sawzall lacks).
• Parallelism Automation: Users focus on data manipulation while parallel
execution is handled automatically.
• Historical Influence: Similar parallelism concepts appeared in High-Performance
Fortran.
• Language Features: Discussions cover data types and operators used in Pig Latin.
Mapping Applications to Parallel and Distributed Systems
Fox’s Application Architectures: Initially, five categories were defined for mapping
applications to hardware/software, mainly focusing on simulations.
Category Breakdown:
1. SIMD (Single Instruction, Multiple Data): Parallel execution with lock-step
.IN
operations (historically relevant but less used now).
2. SPMD (Single Program, Multiple Data) on MIMD machines: Each unit runs
the same program asynchronously, commonly used for dynamic irregular
C
problems.
N
3. Asynchronous Parallelism: Objects interact asynchronously, used in OS
threads, event-driven simulations, and gaming applications (less common in
SY
large-scale parallelism).
4. Disconnected Parallel Components: Simple tasks that require minimal inter-
node communication, suitable for grids/clouds.
U
.IN
• Blobstore: Supports large files up to 2GB.
External Connectivity & Communication
• Secure Data Connection (SDC): Allows tunneling between intranet and GAE.
C
• URL Fetch Service: Fetches web resources via HTTP/HTTPS.
N
• Google Data API: Enables interaction with services like Maps, Docs, YouTube,
Calendar.
SY
• Email Mechanism: Built-in system for sending emails from GAE applications.
Task & Resource Management
VT
• Not a traditional POSIX-compliant file system but offers a customized API for
Google applications.
VT
Key Features
• 64MB block size (much larger than traditional 4KB blocks).
• Optimized for sequential writes & streaming reads (minimal random access).
• Reliability through replication (each chunk stored on at least three chunk servers).
• Single master manages metadata and coordinates file access.
• Shadow master provides backup to prevent single-point failure.
• No caching (as large-scale sequential reads/writes do not benefit from locality).
• Supports snapshot & record append operations.
Architecture & Data Flow
• Single master oversees chunk servers, which store the actual data.
• The master handles namespace & locking, ensuring system integrity.
• The master periodically interacts with chunk servers for load balancing and failure
recovery.
• Clients communicate directly with chunk servers for data operations.
.IN
C
N
Data Mutation Process (Writes & Appends)
1. Client queries master for chunk location & replicas.
SY
2. Master designates the primary chunk server and provides replica locations.
3. Client pushes data to all replicas.
U
.IN
• Replication ensures resilience: Each chunk is stored in at least three locations.
• Checksum validation for data integrity.
• Designed for large-scale distributed computing with high availability (HA).
C
• Optimized for frequent append operations, which is crucial for applications like web
N
crawlers.
Google File System revolutionized big data storage, making large-scale processing possible
SY
on commodity hardware.
• Used for web pages, per-user data, and geographic locations in services like
Google Search, Google Earth, and Orkut.
• Handles massive data scales with billions of URLs, petabytes of storage, and millions
of queries per second.
Motivation for BigTable
• Commercial databases couldn’t handle such large-scale data.
• Performance optimization was critical for Google's growing data needs.
• Low-level storage optimizations improved speed and efficiency
Key Features
• Distributed multilevel map structure for fault-tolerant and persistent data storage.
• Scalability: Supports thousands of servers, petabytes of data, and millions of
read/write operations per second.
• Self-managing system: Dynamic addition/removal of servers with automatic load
balancing.
• Efficient data access: Supports high read/write rates, large dataset scans, and historical
data examination
BigTable’s Building Blocks
1. Google File System (GFS) – Stores persistent data.
2. Scheduler – Manages job scheduling.
3. Lock Service (Chubby) – Handles master election and location bootstrapping.
4. MapReduce – Used for reading and writing BigTable data.
BigTable plays a crucial role in Google’s cloud infrastructure, offering a highly scalable and
efficient data management system tailored for its massive data needs
.IN
Chubby, Google’s Distributed Lock Service
➢ Chubby Overview: A coarse-grained locking service that provides a simple
C
namespace for storing small files.
➢ Reliability: Uses the Paxos agreement protocol, ensuring consistency even if member
N
nodes fail.
SY
➢ Architecture: Each Chubby cell has five servers, all sharing the same file system
namespace.
➢ Client Interaction: Clients communicate with Chubby servers via the Chubby library
to perform file operations.
U
➢ Primary Use: Serves as Google’s internal name service, helping GFS and BigTable
VT
.IN
✓ AMI types:
✓ Private AMI – Created by you, used only by you (or shared with selected users).
C
✓ Public AMI – Shared by users for public use, free to launch.
✓ Paid AMI – Created by users, available for a fee per hour (plus AWS cost).
N
SY
U
VT
.IN
C
N
SY
U
.IN
❑ SQL Azure – Cloud-based SQL database.
❑ Web Role – Runs websites and handles web traffic.
C
❑ Worker Role – Runs background tasks or heavy processing.
N
❑ Main role methods:
✓ OnStart() – Runs when the app starts.
SY
❑ Roles can be load balanced – Work is shared across servers for better performance.
VT
Azure Tables
Azure Queue Storage
• Handles reliable message delivery for web and worker roles.
• Supports unlimited messages, each up to 8KB in size.
• Provides PUT, GET, DELETE message operations & CREATE, DELETE for queues.
Azure Table Storage
• A scalable NoSQL storage system for structured data.
• Organizes data into entities (rows) and properties (columns).
• No limit on number of entities; designed for distributed computing.
• Each entity can have up to 255 properties formatted as .
• Requires PartitionKey (grouping entities) and RowKey (unique identifier).
• PartitionKey usage enhances search performance.
• Maximum storage per entity: 1MB (larger values stored in blob storage).
• Supports ADO.NET and LINQ for querying.
.IN
EMERGING CLOUD SOFTWARE ENVIRONMENTS
management.
• Includes Walrus, a block storage system similar to Amazon S3, for storing VM
images.
U
• Allows users to create, upload, and register VM images, linking them with a kernel
and ramdisk.
• Images are stored in Walrus buckets and can be retrieved from any availability zone.
• Enables the creation of specialized virtual appliances for easy deployment.
• Available in commercial proprietary and open-source versions.
.IN
C
Nimbus
N
• Nimbus is an open-source IaaS cloud computing solution.
SY
• Includes Cumulus, a storage cloud system compatible with Amazon S3 REST API,
supporting quota management.
VT
• Works with boto, s2cmd, and Jets3t for cloud storage interactions.
• Supports two resource management modes:
o Resource Pool Mode: Direct control of VM manager nodes.
o Pilot Mode: Uses LRMS to request VM managers.
• Provides Amazon EC2-compatible API for cloud deployments.
OpenNebula, Sector/Sphere, and OpenStack
• OpenNebula is an open-source IaaS cloud toolkit for transforming existing
infrastructure into a cloud.
• Flexible and modular architecture supports various storage, network, and hypervisor
configurations.
• Core manages the full VM lifecycle, including network setup and storage
management.
• Capacity manager (scheduler) supports basic and advanced scheduling policies.
• Access drivers abstract infrastructure and expose functionalities for monitoring,
storage, and virtualization.
• Provides management interfaces, including libvirt API, CLI, and cloud interface.
• Supports live migration and VM snapshots for dynamic resource management.
• Enables hybrid cloud setups by integrating with Amazon EC2, Eucalyptus, and
.IN
ElasticHosts.
• Includes an Image Repository for simplified disk image selection and multiuser
environments.
C
N
SY
U
VT
Sector/Sphere
Sector:
A distributed file system (DFS) for managing large datasets over wide-area networks.
o Provides fault tolerance through replication.
o Uses UDP for fast message passing and UDT for high-speed data transfer.
o Includes a programming API and FUSE user space file system module.
Sphere: A parallel data processing engine integrated with Sector.
o Supports job scheduling and data locality for efficient processing.
o Allows User Defined Functions (UDFs) to run in parallel across data
segments.
o Provides fault tolerance by restarting failed data segments on other nodes.
Architecture Components:
o Security Server: Manages authentication.
o Master Servers: Handle metadata, job scheduling, and user requests.
Slave Nodes: Store and process data in distributed environments.
.IN
o
o Client Component: Offers APIs and tools for accessing Sector data.
o Space Component: Supports column-based distributed data tables.
C
o Tables are stored by columns with no relationships between them.
N
o Implements basic SQL operations like table creation, modifications, and key-
value updates.
SY
U
VT
OpenStack
• Founded – Introduced by Rackspace and NASA in July 2010.
• Purpose – Open-source cloud computing framework for scalable and secure
infrastructure.
• Community – Involves technologists, developers, researchers, and industries sharing
technologies.
• Key Components:
o Compute: Manages large groups of virtual private servers.
o Storage: Offers scalable object storage using clusters of commodity servers.
• Recent Development:
o Image repository prototyped.
o Image registration & discovery service – Locates and manages stored images.
o Image delivery service – Transfers images to compute services from storage.
• Future Direction – Expanding service integration and enhancing its ecosystem.
.IN
OpenStack Compute
➢ OpenStack Nova is a cloud fabric controller within the OpenStack IaaS ecosystem,
designed for efficient computing support.
C
➢ It follows a shared-nothing architecture, relying on message queues for
communication and using deferred objects to prevent blocking.
N
➢ The system maintains state through a distributed data system with atomic transactions
for consistency.
SY
➢ Built in Python, Nova integrates boto (Amazon API) and Tornado (fast HTTP server
for S3).
➢ The API Server processes requests and forwards them to the Cloud Controller, which
handles system state, authorization (via LDAP), and node management.
U
OpenStack Storage
Developed by Manjrasoft (Melbourne, Australia), Aneka is a cloud application platform for deploying
parallel & distributed applications on private or public clouds.
• Deployment Options – Can be hosted on Amazon EC2 (public cloud) or a private cloud with
restricted access.
.IN
• Key Advantages:
1. Build – Includes an SDK with APIs & tools for developing applications. Supports
enterprise/private clouds, Amazon EC2, and hybrid clouds.
VT
3. Manage – Offers tools (GUI & APIs) for monitoring, managing, and scaling Aneka compute
clouds dynamically based on SLA/QoS requirements.
1. Thread Programming Model – Best for utilizing multicore nodes in cloud computing.
3. MapReduce Programming Model – Efficient for large-scale data processing & computation.
Aneka Architecture
.IN
C
N
SY
1. Fabric Services:
2. Foundation Services:
3. Application Services:
o Manage application execution, elastic scalability, data transfer, performance
monitoring, and billing.
Virtual Appliances
.IN
✓ Include OS, libraries, app code, and auto-setup scripts.
✓ Can be managed like a local network, even if spread across different networks.
U