SlideShare a Scribd company logo
1 of 25
Cloud Computing
CS 15-319
Pregel
Lecture 10, Feb 15, 2012
Majd F. Sakr, Suhail Rehman and
Mohammad Hammoud
Today…
 Last session
 Apache Mahout, Guest Lecture
 Today’s session
 Pregel
 Announcement:
 Project Phases I-A and I-B are due today
2
© Carnegie Mellon University in Qatar
Objectives
Discussion on Programming Models
Why
parallelism?
Parallel
computer
architectures
Traditional
models of
parallel
programming
Examples of
parallel
processing
Message
Passing
Interface (MPI)
Pregel, Dryad
and GraphLab
Last 3 Sessions
MapReduce
Pregel, Dryad
and GraphLab
© Carnegie Mellon University in Qatar 3
4
Pregel
© Carnegie Mellon University in Qatar
Pregel
 In this part, the following concepts of Pregel will
be described:
 Motivation for Pregel
 The Pregel Computation Model
 The Pregel API
 Execution of a Pregel Program
 Fault Tolerance in Pregel
5
© Carnegie Mellon University in Qatar
Pregel
 In this part, the following concepts of Pregel will
be described:
 Motivation for Pregel
 The Pregel Computation Model
 The Pregel API
 Execution of a Pregel Program
 Fault Tolerance in Pregel
6
© Carnegie Mellon University in Qatar
Motivation for Pregel
 How to implement algorithms to process large graphs?
 Create a custom distributed infrastructure for each new algorithm
 Rely on existing distributed computing platforms such as MapReduce
 Use a single-computer graph algorithm library like BGL, LEDA,
NetworkX etc.
 Use a parallel graph processing system like Parallel BGL or CGMGraph
7
© Carnegie Mellon University in Qatar
Motivation for Pregel
 How to implement algorithms to process large graphs?
 Create a custom distributed infrastructure for each new algorithm
 Rely on existing distributed computing platforms such as MapReduce
 Use a single-computer graph algorithm library like BGL, LEDA,
NetworkX etc.
 Use a parallel graph processing system like Parallel BGL or CGMGraph
8
Difficult!
Inefficient and Cumbersome!
Too large to fit on single machine!
Not suited for Large Scale Distributed Systems!
© Carnegie Mellon University in Qatar
Pregel
 Pregel is a framework developed by Google. It provides:
 High scalability
 Fault-tolerance
• Flexibility in expressing arbitrary graph algorithms
 Pregel is inspired by Valiant’s Bulk Synchronous Parallel
(BSP) model
9
© Carnegie Mellon University in Qatar
Bulk Synchronous Parallel
Model
10
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
CPU 1
CPU 2
CPU 3
CPU 1
CPU 2
CPU 3
Data
Data
Data
Data
Data
Data
Data
CPU 1
CPU 2
CPU 3
Iterations
Barrier
Barrier
Data
Data
Data
Data
Data
Data
Data
Barrier
© Carnegie Mellon University in Qatar
Pregel
 In this part, the following concepts of Pregel will
be described:
 Motivation for Pregel
 The Pregel Computation Model
 The Pregel API
 Execution of a Pregel Program
 Fault Tolerance in Pregel
11
© Carnegie Mellon University in Qatar
Entities and Supersteps
 The computation is described in terms of vertices, edges and a
sequence of iterations called supersteps
 You give Pregel a directed graph consisting of
vertices and edges
 Each vertex is associated with a modifiable
user-defined value
 Each edge is associated with a source vertex, value
and a destination vertex
 During a superstep:
 A user-defined function F is executed at each vertex V
 F can read messages sent to V in superstep S – 1 and send messages to other
vertices that will be received at superstep S + 1
 F can modify the state of V and its outgoing edges
 F can change the topology of the graph
12
© Carnegie Mellon University in Qatar
Algorithm Termination
 Algorithm termination is based on every vertex voting to halt
 In superstep 0, every vertex is active
 All active vertices participate in the computation of any given superstep
 A vertex deactivates itself by voting
to halt and enters an inactive state
 A vertex can return to active state
if it receives an external message
 Program terminates when all vertices
are simultaneously inactive and there are no messages in transit
13
Active Inactive
Vote to Halt
Message Received
Vertex State Machine
© Carnegie Mellon University in Qatar
Finding the Max Value in a Graph
3 6 2 1
3 6 2 1
6 2 6
6
6 6 2 6
6 6
6 6 6 6
6
Blue Arrows
are messages
Blue vertices
have voted to
halt
6
© Carnegie Mellon University in Qatar 14
Pregel
 In this part, the following concepts of Pregel will
be described:
 Motivation for Pregel
 The Pregel Computation Model
 The Pregel API
 Execution of a Pregel Program
 Fault Tolerance in Pregel
15
© Carnegie Mellon University in Qatar
The Pregel API in C++
 A Pregel program is written by subclassing the vertex class:
16
template <typename VertexValue,
typename EdgeValue,
typename MessageValue>
class Vertex {
public:
virtual void Compute(MessageIterator* msgs) = 0;
const string& vertex_id() const;
int64 superstep() const;
const VertexValue& GetValue();
VertexValue* MutableValue();
OutEdgeIterator GetOutEdgeIterator();
void SendMessageTo(const string& dest_vertex,
const MessageValue& message);
void VoteToHalt();
};
Override the
compute function to
define the
computation at
each superstep
To pass messages
to other vertices
To define the types for vertices,
edges and messages
To get the value of the
current vertex
To modify the value of
the vertex
© Carnegie Mellon University in Qatar
Pregel Code for Finding the Max
Value
Class MaxFindVertex
: public Vertex<double, void, double> {
public:
virtual void Compute(MessageIterator* msgs) {
int currMax = GetValue();
SendMessageToAllNeighbors(currMax);
for ( ; !msgs->Done(); msgs->Next()) {
if (msgs->Value() > currMax)
currMax = msgs->Value();
}
if (currMax > GetValue())
*MutableValue() = currMax;
else VoteToHalt();
}
};
© Carnegie Mellon University in Qatar 17
Message Passing, Combiners, and
Aggregators
 Messages can be passed from any vertex to any other vertex in the
Graph
 Any number of messages may be passed
 Message order is not guaranteed
 Messages will not be duplicated
 Combiners can be used to reduce the number of messages passed
between supersteps
 Aggregators are available for reduction operations such as
sum, min, max etc.
18
© Carnegie Mellon University in Qatar
Topology Mutations, Input and Output
 The graph structure can be modified during any superstep
 Vertices and edges can be added or deleted
 Conflicts are handled using partial ordering of operations
 User-defined handlers are also available to manage conflicts
 Flexible input and output formats
 Text File
 Relational Database
 Bigtable Entries
 Interpretation of input is a “pre-processing” step separate from graph
computation
 Custom formats can be created by sub-classing the Reader and Writer
classes
19
© Carnegie Mellon University in Qatar
Pregel
 In this part, the following concepts of Pregel will
be described:
 Motivation for Pregel
 The Pregel Computation Model
 The Pregel API
 Execution of a Pregel Program
 Fault Tolerance in Pregel
20
© Carnegie Mellon University in Qatar
Graph Partitioning
 The input graph is divided into partitions consisting of vertices and
outgoing edges
 Default partitioning function is hash(ID) mod N, where N is the # of partitions
 It can be customized
1 4
10
7
2
8
5
6
9
3
11
12
© Carnegie Mellon University in Qatar 21
Execution of a Pregel Program
 Steps of Program Execution:
1. Copies of the program are distributed across all workers
1.1 One copy is designated as a master
2. Master partitions the graph and assigns workers their respective
partition(s) along with portions of the input
3. Master coordinates the execution of supersteps and delivers messages
among vertices
4. Master calculates the number of inactive vertices after each superstep
and signals workers to terminate if all vertices are inactive and no
messages are in transit
5. Each worker may be instructed to save its portion of the graph
22
© Carnegie Mellon University in Qatar
Pregel
 In this part, the following concepts of Pregel will
be described:
 Motivation for Pregel
 The Pregel Computation Model
 The Pregel API
 Execution of a Pregel Program
 Fault Tolerance in Pregel
23
© Carnegie Mellon University in Qatar
Fault Tolerance in Pregel
 Fault tolerance is achieved through checkpointing
 At the start of every superstep the master may instruct the workers to
save the state of their partitions in a stable storage
 Master uses ping messages to detect worker failures
 If a worker fails, the master reassigns corresponding vertices and
input to another available worker and restarts the superstep
 The available worker reloads the partition state of the failed worker from
the most recent available checkpoint
24
© Carnegie Mellon University in Qatar
Next Class
Dryad and GraphLab
© Carnegie Mellon University in Qatar 25

More Related Content

Similar to MHH_20Feb_2012111111111111111111111111111.ppt

Fault Modeling for Verilog Register Transfer Level
Fault Modeling for Verilog Register Transfer LevelFault Modeling for Verilog Register Transfer Level
Fault Modeling for Verilog Register Transfer Levelidescitation
 
Hardback solution to accelerate multimedia computation through mgp in cmp
Hardback solution to accelerate multimedia computation through mgp in cmpHardback solution to accelerate multimedia computation through mgp in cmp
Hardback solution to accelerate multimedia computation through mgp in cmpeSAT Publishing House
 
Introduction to NServiceBus
Introduction to NServiceBusIntroduction to NServiceBus
Introduction to NServiceBusAdam Fyles
 
Large Graph Processing
Large Graph ProcessingLarge Graph Processing
Large Graph ProcessingZuhair khayyat
 
Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP
Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP
Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP IJCSEIT Journal
 
IEEE 2014 JAVA CLOUD COMPUTING PROJECTS Adaptive algorithm for minimizing clo...
IEEE 2014 JAVA CLOUD COMPUTING PROJECTS Adaptive algorithm for minimizing clo...IEEE 2014 JAVA CLOUD COMPUTING PROJECTS Adaptive algorithm for minimizing clo...
IEEE 2014 JAVA CLOUD COMPUTING PROJECTS Adaptive algorithm for minimizing clo...IEEEGLOBALSOFTSTUDENTPROJECTS
 
2014 IEEE JAVA CLOUD COMPUTING PROJECT Adaptive algorithm for minimizing clou...
2014 IEEE JAVA CLOUD COMPUTING PROJECT Adaptive algorithm for minimizing clou...2014 IEEE JAVA CLOUD COMPUTING PROJECT Adaptive algorithm for minimizing clou...
2014 IEEE JAVA CLOUD COMPUTING PROJECT Adaptive algorithm for minimizing clou...IEEEFINALSEMSTUDENTPROJECTS
 
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONSAPPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONSVLSICS Design
 
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONSAPPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONSVLSICS Design
 
Pretzel: optimized Machine Learning framework for low-latency and high throu...
Pretzel: optimized Machine Learning framework for  low-latency and high throu...Pretzel: optimized Machine Learning framework for  low-latency and high throu...
Pretzel: optimized Machine Learning framework for low-latency and high throu...NECST Lab @ Politecnico di Milano
 
IRJET- Latin Square Computation of Order-3 using Open CL
IRJET- Latin Square Computation of Order-3 using Open CLIRJET- Latin Square Computation of Order-3 using Open CL
IRJET- Latin Square Computation of Order-3 using Open CLIRJET Journal
 
Protecting from transient failures in cloud deployments
Protecting from transient failures in cloud deploymentsProtecting from transient failures in cloud deployments
Protecting from transient failures in cloud deploymentswww.pixelsolutionbd.com
 
Gate-Level Simulation Methodology Improving Gate-Level Simulation Performance
Gate-Level Simulation Methodology Improving Gate-Level Simulation PerformanceGate-Level Simulation Methodology Improving Gate-Level Simulation Performance
Gate-Level Simulation Methodology Improving Gate-Level Simulation Performancesuddentrike2
 
Hybrid Model Based Testing Tool Architecture for Exascale Computing System
Hybrid Model Based Testing Tool Architecture for Exascale Computing SystemHybrid Model Based Testing Tool Architecture for Exascale Computing System
Hybrid Model Based Testing Tool Architecture for Exascale Computing SystemCSCJournals
 
Load Balancing in Cloud using Modified Genetic Algorithm
Load Balancing in Cloud using Modified Genetic AlgorithmLoad Balancing in Cloud using Modified Genetic Algorithm
Load Balancing in Cloud using Modified Genetic AlgorithmIJCSIS Research Publications
 

Similar to MHH_20Feb_2012111111111111111111111111111.ppt (20)

Fault Modeling for Verilog Register Transfer Level
Fault Modeling for Verilog Register Transfer LevelFault Modeling for Verilog Register Transfer Level
Fault Modeling for Verilog Register Transfer Level
 
PID2143641
PID2143641PID2143641
PID2143641
 
FrackingPaper
FrackingPaperFrackingPaper
FrackingPaper
 
cug2011-praveen
cug2011-praveencug2011-praveen
cug2011-praveen
 
Hardback solution to accelerate multimedia computation through mgp in cmp
Hardback solution to accelerate multimedia computation through mgp in cmpHardback solution to accelerate multimedia computation through mgp in cmp
Hardback solution to accelerate multimedia computation through mgp in cmp
 
Introduction to NServiceBus
Introduction to NServiceBusIntroduction to NServiceBus
Introduction to NServiceBus
 
Large Graph Processing
Large Graph ProcessingLarge Graph Processing
Large Graph Processing
 
Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP
Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP
Performance Analysis of Parallel Algorithms on Multi-core System using OpenMP
 
IEEE 2014 JAVA CLOUD COMPUTING PROJECTS Adaptive algorithm for minimizing clo...
IEEE 2014 JAVA CLOUD COMPUTING PROJECTS Adaptive algorithm for minimizing clo...IEEE 2014 JAVA CLOUD COMPUTING PROJECTS Adaptive algorithm for minimizing clo...
IEEE 2014 JAVA CLOUD COMPUTING PROJECTS Adaptive algorithm for minimizing clo...
 
2014 IEEE JAVA CLOUD COMPUTING PROJECT Adaptive algorithm for minimizing clou...
2014 IEEE JAVA CLOUD COMPUTING PROJECT Adaptive algorithm for minimizing clou...2014 IEEE JAVA CLOUD COMPUTING PROJECT Adaptive algorithm for minimizing clou...
2014 IEEE JAVA CLOUD COMPUTING PROJECT Adaptive algorithm for minimizing clou...
 
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONSAPPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
 
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONSAPPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
APPROXIMATE ARITHMETIC CIRCUIT DESIGN FOR ERROR RESILIENT APPLICATIONS
 
Pretzel: optimized Machine Learning framework for low-latency and high throu...
Pretzel: optimized Machine Learning framework for  low-latency and high throu...Pretzel: optimized Machine Learning framework for  low-latency and high throu...
Pretzel: optimized Machine Learning framework for low-latency and high throu...
 
IRJET- Latin Square Computation of Order-3 using Open CL
IRJET- Latin Square Computation of Order-3 using Open CLIRJET- Latin Square Computation of Order-3 using Open CL
IRJET- Latin Square Computation of Order-3 using Open CL
 
Protecting from transient failures in cloud deployments
Protecting from transient failures in cloud deploymentsProtecting from transient failures in cloud deployments
Protecting from transient failures in cloud deployments
 
Gate-Level Simulation Methodology Improving Gate-Level Simulation Performance
Gate-Level Simulation Methodology Improving Gate-Level Simulation PerformanceGate-Level Simulation Methodology Improving Gate-Level Simulation Performance
Gate-Level Simulation Methodology Improving Gate-Level Simulation Performance
 
Ch1
Ch1Ch1
Ch1
 
Pregel
PregelPregel
Pregel
 
Hybrid Model Based Testing Tool Architecture for Exascale Computing System
Hybrid Model Based Testing Tool Architecture for Exascale Computing SystemHybrid Model Based Testing Tool Architecture for Exascale Computing System
Hybrid Model Based Testing Tool Architecture for Exascale Computing System
 
Load Balancing in Cloud using Modified Genetic Algorithm
Load Balancing in Cloud using Modified Genetic AlgorithmLoad Balancing in Cloud using Modified Genetic Algorithm
Load Balancing in Cloud using Modified Genetic Algorithm
 

Recently uploaded

Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Call Girls in Nagpur High Profile
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhisoniya singh
 
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...Suhani Kapoor
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...Suhani Kapoor
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberMs Riya
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...Call Girls in Nagpur High Profile
 
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...ranjana rawat
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Pooja Nehwal
 
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...nagunakhan
 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...Call Girls in Nagpur High Profile
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...Pooja Nehwal
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...Pooja Nehwal
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...Call Girls in Nagpur High Profile
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...Pooja Nehwal
 
presentation about microsoft power point
presentation about microsoft power pointpresentation about microsoft power point
presentation about microsoft power pointchhavia330
 

Recently uploaded (20)

Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | DelhiFULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
FULL ENJOY - 8264348440 Call Girls in Hauz Khas | Delhi
 
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
 
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
(MEGHA) Hinjewadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune E...
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
 
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
Russian Call Girls In South Delhi Delhi 9711199012 💋✔💕😘 Independent Escorts D...
 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
 
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
VVIP Pune Call Girls Balaji Nagar (7001035870) Pune Escorts Nearby with Compl...
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
 
presentation about microsoft power point
presentation about microsoft power pointpresentation about microsoft power point
presentation about microsoft power point
 

MHH_20Feb_2012111111111111111111111111111.ppt

  • 1. Cloud Computing CS 15-319 Pregel Lecture 10, Feb 15, 2012 Majd F. Sakr, Suhail Rehman and Mohammad Hammoud
  • 2. Today…  Last session  Apache Mahout, Guest Lecture  Today’s session  Pregel  Announcement:  Project Phases I-A and I-B are due today 2 © Carnegie Mellon University in Qatar
  • 3. Objectives Discussion on Programming Models Why parallelism? Parallel computer architectures Traditional models of parallel programming Examples of parallel processing Message Passing Interface (MPI) Pregel, Dryad and GraphLab Last 3 Sessions MapReduce Pregel, Dryad and GraphLab © Carnegie Mellon University in Qatar 3
  • 4. 4 Pregel © Carnegie Mellon University in Qatar
  • 5. Pregel  In this part, the following concepts of Pregel will be described:  Motivation for Pregel  The Pregel Computation Model  The Pregel API  Execution of a Pregel Program  Fault Tolerance in Pregel 5 © Carnegie Mellon University in Qatar
  • 6. Pregel  In this part, the following concepts of Pregel will be described:  Motivation for Pregel  The Pregel Computation Model  The Pregel API  Execution of a Pregel Program  Fault Tolerance in Pregel 6 © Carnegie Mellon University in Qatar
  • 7. Motivation for Pregel  How to implement algorithms to process large graphs?  Create a custom distributed infrastructure for each new algorithm  Rely on existing distributed computing platforms such as MapReduce  Use a single-computer graph algorithm library like BGL, LEDA, NetworkX etc.  Use a parallel graph processing system like Parallel BGL or CGMGraph 7 © Carnegie Mellon University in Qatar
  • 8. Motivation for Pregel  How to implement algorithms to process large graphs?  Create a custom distributed infrastructure for each new algorithm  Rely on existing distributed computing platforms such as MapReduce  Use a single-computer graph algorithm library like BGL, LEDA, NetworkX etc.  Use a parallel graph processing system like Parallel BGL or CGMGraph 8 Difficult! Inefficient and Cumbersome! Too large to fit on single machine! Not suited for Large Scale Distributed Systems! © Carnegie Mellon University in Qatar
  • 9. Pregel  Pregel is a framework developed by Google. It provides:  High scalability  Fault-tolerance • Flexibility in expressing arbitrary graph algorithms  Pregel is inspired by Valiant’s Bulk Synchronous Parallel (BSP) model 9 © Carnegie Mellon University in Qatar
  • 10. Bulk Synchronous Parallel Model 10 Data Data Data Data Data Data Data Data Data Data Data Data Data Data CPU 1 CPU 2 CPU 3 CPU 1 CPU 2 CPU 3 Data Data Data Data Data Data Data CPU 1 CPU 2 CPU 3 Iterations Barrier Barrier Data Data Data Data Data Data Data Barrier © Carnegie Mellon University in Qatar
  • 11. Pregel  In this part, the following concepts of Pregel will be described:  Motivation for Pregel  The Pregel Computation Model  The Pregel API  Execution of a Pregel Program  Fault Tolerance in Pregel 11 © Carnegie Mellon University in Qatar
  • 12. Entities and Supersteps  The computation is described in terms of vertices, edges and a sequence of iterations called supersteps  You give Pregel a directed graph consisting of vertices and edges  Each vertex is associated with a modifiable user-defined value  Each edge is associated with a source vertex, value and a destination vertex  During a superstep:  A user-defined function F is executed at each vertex V  F can read messages sent to V in superstep S – 1 and send messages to other vertices that will be received at superstep S + 1  F can modify the state of V and its outgoing edges  F can change the topology of the graph 12 © Carnegie Mellon University in Qatar
  • 13. Algorithm Termination  Algorithm termination is based on every vertex voting to halt  In superstep 0, every vertex is active  All active vertices participate in the computation of any given superstep  A vertex deactivates itself by voting to halt and enters an inactive state  A vertex can return to active state if it receives an external message  Program terminates when all vertices are simultaneously inactive and there are no messages in transit 13 Active Inactive Vote to Halt Message Received Vertex State Machine © Carnegie Mellon University in Qatar
  • 14. Finding the Max Value in a Graph 3 6 2 1 3 6 2 1 6 2 6 6 6 6 2 6 6 6 6 6 6 6 6 Blue Arrows are messages Blue vertices have voted to halt 6 © Carnegie Mellon University in Qatar 14
  • 15. Pregel  In this part, the following concepts of Pregel will be described:  Motivation for Pregel  The Pregel Computation Model  The Pregel API  Execution of a Pregel Program  Fault Tolerance in Pregel 15 © Carnegie Mellon University in Qatar
  • 16. The Pregel API in C++  A Pregel program is written by subclassing the vertex class: 16 template <typename VertexValue, typename EdgeValue, typename MessageValue> class Vertex { public: virtual void Compute(MessageIterator* msgs) = 0; const string& vertex_id() const; int64 superstep() const; const VertexValue& GetValue(); VertexValue* MutableValue(); OutEdgeIterator GetOutEdgeIterator(); void SendMessageTo(const string& dest_vertex, const MessageValue& message); void VoteToHalt(); }; Override the compute function to define the computation at each superstep To pass messages to other vertices To define the types for vertices, edges and messages To get the value of the current vertex To modify the value of the vertex © Carnegie Mellon University in Qatar
  • 17. Pregel Code for Finding the Max Value Class MaxFindVertex : public Vertex<double, void, double> { public: virtual void Compute(MessageIterator* msgs) { int currMax = GetValue(); SendMessageToAllNeighbors(currMax); for ( ; !msgs->Done(); msgs->Next()) { if (msgs->Value() > currMax) currMax = msgs->Value(); } if (currMax > GetValue()) *MutableValue() = currMax; else VoteToHalt(); } }; © Carnegie Mellon University in Qatar 17
  • 18. Message Passing, Combiners, and Aggregators  Messages can be passed from any vertex to any other vertex in the Graph  Any number of messages may be passed  Message order is not guaranteed  Messages will not be duplicated  Combiners can be used to reduce the number of messages passed between supersteps  Aggregators are available for reduction operations such as sum, min, max etc. 18 © Carnegie Mellon University in Qatar
  • 19. Topology Mutations, Input and Output  The graph structure can be modified during any superstep  Vertices and edges can be added or deleted  Conflicts are handled using partial ordering of operations  User-defined handlers are also available to manage conflicts  Flexible input and output formats  Text File  Relational Database  Bigtable Entries  Interpretation of input is a “pre-processing” step separate from graph computation  Custom formats can be created by sub-classing the Reader and Writer classes 19 © Carnegie Mellon University in Qatar
  • 20. Pregel  In this part, the following concepts of Pregel will be described:  Motivation for Pregel  The Pregel Computation Model  The Pregel API  Execution of a Pregel Program  Fault Tolerance in Pregel 20 © Carnegie Mellon University in Qatar
  • 21. Graph Partitioning  The input graph is divided into partitions consisting of vertices and outgoing edges  Default partitioning function is hash(ID) mod N, where N is the # of partitions  It can be customized 1 4 10 7 2 8 5 6 9 3 11 12 © Carnegie Mellon University in Qatar 21
  • 22. Execution of a Pregel Program  Steps of Program Execution: 1. Copies of the program are distributed across all workers 1.1 One copy is designated as a master 2. Master partitions the graph and assigns workers their respective partition(s) along with portions of the input 3. Master coordinates the execution of supersteps and delivers messages among vertices 4. Master calculates the number of inactive vertices after each superstep and signals workers to terminate if all vertices are inactive and no messages are in transit 5. Each worker may be instructed to save its portion of the graph 22 © Carnegie Mellon University in Qatar
  • 23. Pregel  In this part, the following concepts of Pregel will be described:  Motivation for Pregel  The Pregel Computation Model  The Pregel API  Execution of a Pregel Program  Fault Tolerance in Pregel 23 © Carnegie Mellon University in Qatar
  • 24. Fault Tolerance in Pregel  Fault tolerance is achieved through checkpointing  At the start of every superstep the master may instruct the workers to save the state of their partitions in a stable storage  Master uses ping messages to detect worker failures  If a worker fails, the master reassigns corresponding vertices and input to another available worker and restarts the superstep  The available worker reloads the partition state of the failed worker from the most recent available checkpoint 24 © Carnegie Mellon University in Qatar
  • 25. Next Class Dryad and GraphLab © Carnegie Mellon University in Qatar 25

Editor's Notes

  1. A superstep acts as a global synchronization barrier
  2. Needs Animation
  3. To avoid imposing specific choice of file format, Pregel decouples the task of interpreting an input file as a graph from the task of graph computation.
  4. The state of a partition includes vertex value, edge values, and incoming messages