分布式图算法Pregel
最近看了Google的Pregel论文,图算法有一些经典且不可被替代的应用场景,如社交网络,相互引用等。但是在单个结点上的运算量往往过少,注重的是消息传播和逻辑处理,而不是单纯的大规模计算。虽然已经过去了十几年,但是其中的messsage passing,combiner,aggregator,group partition,状态机等机制还是设计分布式图算法的有效方法。这里针对设计和实现部分做一点点笔记。
Pregel: A System for Large-Scale Graph Processing
key point:
distributed computer clusters -> graph task
graph algorithm
introduction
Target:
Many practical computing problems concern large graphs. e.g. the Web graph and various social networks.
Parallelism for graph challenging:
- Graph algorithms often exhibit poor locality of memory access,
- very little work per vertex,
- and a changing degree of parallelism over the course of execution.
We want a scalable general-purpose system for graph! Compared with existed options:
- efficient
- scalable
- fault-tolerant
inspired by: Valiant’s Bulk Synchronous Parallel model
Model
data structure
input: directed graph(both have value):
- vertex: vertex identifier!
- edge: associated with source vertices
process
superstep: working unit with state machine -> sync!
vertex: first class citizens
output: may not as same as input(the graph structure can change)
terminal: voting to halt
API
Compute()
GetValue()
MutableValue()
combiner:
aggregator: global monitor (in my opinion, aggregator is global combiner + global coordinator(more logical than combiner))
aggregator: get global information and do a calculation, not only the combination of data.
e.g. do a particular operation when all the vertices meet a particualr condition
Implementation
Architecture
group partition: default(hash(ID) mod N)
self-define partition allocator: use locality
hierarchy(up to bottom):
- user program(copies of app) = 1 master + N-1 workers
- physical machine
- group partition
- vertex & outer-edge
Fault Tolerance
checkpoint
worker: partition state -> persistant storage
master: aggregator
regular "ping" message
分布式图算法Pregel的更多相关文章
- 明风:分布式图计算的平台Spark GraphX 在淘宝的实践
快刀初试:Spark GraphX在淘宝的实践 作者:明风 (本文由团队中梧苇和我一起撰写,并由团队中的林岳,岩岫,世仪等多人Review,发表于程序员的8月刊,由于篇幅原因,略作删减,本文为完整版) ...
- Apache Spark GraphX的体系结构
1. 整体架构 GraphX 的整体架构(如图 1所示)可以分为三部分. 图 1 GraphX 架构 存储和原语层: Graph 类是图计算的核心类.内部含有 VertexRDD. EdgeRDD ...
- 《深入理解Spark:核心思想与源码分析》(第2章)
<深入理解Spark:核心思想与源码分析>一书前言的内容请看链接<深入理解SPARK:核心思想与源码分析>一书正式出版上市 <深入理解Spark:核心思想与源码分析> ...
- Spark设计理念与基本架构
1.基本概念 Spark中的一些概念: RDD(resillient distributed dataset):弹性分布式数据集. Partition:数据分区.即一个RDD的数据可以划分为多少个分区 ...
- 【转帖】Spark设计理念与基本架构
Spark设计理念与基本架构 https://www.cnblogs.com/swordfall/p/9280006.html 1.基本概念 Spark中的一些概念: RDD(resillient d ...
- 大数据技术之_19_Spark学习_05_Spark GraphX 应用解析 + Spark GraphX 概述、解析 + 计算模式 + Pregel API + 图算法参考代码 + PageRank 实例
第1章 Spark GraphX 概述1.1 什么是 Spark GraphX1.2 弹性分布式属性图1.3 运行图计算程序第2章 Spark GraphX 解析2.1 存储模式2.1.1 图存储模式 ...
- 转债---Pregel: A System for Large-Scale Graph Processing(译)
转载:http://duanple.blog.163.com/blog/static/70971767201281610126277/ 作者:Grzegorz Malewicz, Matthew ...
- Pregel: A System for Large-Scale Graph Processing(译)
[说明:Pregel这篇是发表在2010年的SIGMOD上,Pregel这个名称是为了纪念欧拉,在他提出的格尼斯堡七桥问题中,那些桥所在的河就叫Pregel.最初是为了解决PageRank计算问题,由 ...
- 图数据库之Pregel
/* 版权声明:能够随意转载,转载时请务必标明文章原始出处和作者信息 .*/ author: 张俊林 节选自<大数据日知录:架构与算法>十四章.书籍文件夹在此 Pre ...
- [Berkeley]弹性分布式数据集RDD的介绍(RDD: A Fault-Tolerant Abstraction for In-Memory Cluster Computing 论文翻译)
摘要: 本文提出了分布式内存抽象的概念--弹性分布式数据集(RDD,Resilient Distributed Datasets).它同意开发者在大型集群上运行基于内存的计算.RDD适用于两种 ...
随机推荐
- 浅谈 Docker 网络:单节点单容器
1.Docker 网络模型 Docker 在 1.7 版本中将容器网络部分代码抽离出来作为 Docker 的网络库,叫 libnetwork.libnetwork 中使用 CNM(Container ...
- bitcask论文翻译/笔记
翻译 论文来源:bitcask-intro.pdf (riak.com) 背景介绍 Bitcask的起源与Riak分布式数据库的历史紧密相连.在Riak的K/V集群中,每个节点都使用了可插拔的本地存储 ...
- wireshark 报文颜色
在使用wireshark抓包分析的过程中,默认会对不同的包进行着色,截图如下: 对不同的颜色有了解,可快速的过滤包或分析请求. 菜单栏选择视图-->着色规则,即可看到不同颜色代表的含义: 大致可 ...
- Nacos源码 (5) Grpc服务端和客户端
Nacos 2.x在服务端与客户端直接增加了GRPC通信方式,本文通过2.0.2版本源码,简单分析GRPC通信方式: 服务器启动 客户端连接 客户端心跳 服务器监控检查 服务器 proto文件 api ...
- Keep English Level-04
firm -- 坚定的,坚固的;公司 share -- n 股份,份额 executive -- 执行官 There is no chance,no density,no fate,that can ...
- STM32F429 实测基本数据类型占用空间
实测代码 1 void CalculateDataTypeSize(void) 2 { 3 printf("sizeof(char} = %u\r\n", sizeof(char) ...
- [转帖]/dev/random 和 /dev/urandom的一点备忘
https://www.cnblogs.com/ohmygirl/p/random.html 1. 基本介绍 /dev/random和/dev/urandom是Linux系统中提供的随机伪设备,这两 ...
- [转帖]存储器分级:L1 Cache 比内存和 SSD 快多少倍?
目录 1.为什么会有存储器分级策略? 2.存储器分级策略 2.1 存储器的级别 2.2.1 L1-Cache 2.2.2 L2-Cache 2.2.3 L3-Cache 3.内存 4.SSD 和硬盘 ...
- [转帖]怎样设计异步系统: Linux Native AIO vs io_uring
https://zhuanlan.zhihu.com/p/149836046 Linux native aio一方面有其实用价值, 基本满足了特别业务比如大型数据库系统对异步io的需求, 另一方面却被 ...
- WinSCP和xftp 从Windows 上传到linux服务器时出现中文乱码的解决方案
1. 日常工作中有需求从Windows的办公机器将文件上传到linux服务器上面进行使用 中文经常出现乱码, 需要处理一下. 这里面主要用到了两个工具 WinSCP还有xftp 两个的原理都是一样的 ...