最近看了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:

  1. Graph algorithms often exhibit poor locality of memory access,
  2. very little work per vertex,
  3. 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的更多相关文章

  1. 明风:分布式图计算的平台Spark GraphX 在淘宝的实践

    快刀初试:Spark GraphX在淘宝的实践 作者:明风 (本文由团队中梧苇和我一起撰写,并由团队中的林岳,岩岫,世仪等多人Review,发表于程序员的8月刊,由于篇幅原因,略作删减,本文为完整版) ...

  2. Apache Spark GraphX的体系结构

    1. 整体架构 GraphX 的整体架构(如图 1所示)可以分为三部分. 图 1  GraphX 架构 存储和原语层: Graph 类是图计算的核心类.内部含有 VertexRDD. EdgeRDD ...

  3. 《深入理解Spark:核心思想与源码分析》(第2章)

    <深入理解Spark:核心思想与源码分析>一书前言的内容请看链接<深入理解SPARK:核心思想与源码分析>一书正式出版上市 <深入理解Spark:核心思想与源码分析> ...

  4. Spark设计理念与基本架构

    1.基本概念 Spark中的一些概念: RDD(resillient distributed dataset):弹性分布式数据集. Partition:数据分区.即一个RDD的数据可以划分为多少个分区 ...

  5. 【转帖】Spark设计理念与基本架构

    Spark设计理念与基本架构 https://www.cnblogs.com/swordfall/p/9280006.html 1.基本概念 Spark中的一些概念: RDD(resillient d ...

  6. 大数据技术之_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 图存储模式 ...

  7. 转债---Pregel: A System for Large-Scale Graph Processing(译)

    转载:http://duanple.blog.163.com/blog/static/70971767201281610126277/   作者:Grzegorz Malewicz, Matthew ...

  8. Pregel: A System for Large-Scale Graph Processing(译)

    [说明:Pregel这篇是发表在2010年的SIGMOD上,Pregel这个名称是为了纪念欧拉,在他提出的格尼斯堡七桥问题中,那些桥所在的河就叫Pregel.最初是为了解决PageRank计算问题,由 ...

  9. 图数据库之Pregel

    /* 版权声明:能够随意转载,转载时请务必标明文章原始出处和作者信息 .*/            author: 张俊林 节选自<大数据日知录:架构与算法>十四章.书籍文件夹在此 Pre ...

  10. [Berkeley]弹性分布式数据集RDD的介绍(RDD: A Fault-Tolerant Abstraction for In-Memory Cluster Computing 论文翻译)

    摘要:     本文提出了分布式内存抽象的概念--弹性分布式数据集(RDD,Resilient Distributed Datasets).它同意开发者在大型集群上运行基于内存的计算.RDD适用于两种 ...

随机推荐

  1. excel如何自动获取本周工作日的日期显示作为标题(周一至周五)

    一.背景: 每周发周报的标题格式为:本周一到本周五的日期内容,如下:但是每隔一周发送的时候需要改一下周报标题里面的日期,比较麻烦目前的需求是通过函数自动化生成,根据当前的日期去定位出本周一的日期以及本 ...

  2. maven总结一: 常用命令

    本文为博主原创,未经允许不得转载: maven常用命令: 1. mvn clean  maven清理 2. mvn compile  maven 编译 3. mvn package maven 打包 ...

  3. 开发了一个json格式化工具,使用js格式化json的代码分享

    今天给大家介绍一下如何通过js来格式化json. 假设json字符串是: {"name":"刘德华","age":25.2,"bi ...

  4. NSSCTF Round#11 Basic 密码个人赛复盘

    [NSSRound#11 Basic]ez_enc ABAABBBAABABAABBABABAABBABAAAABBABABABAAABAAABBAABBBBABBABBABBABABABAABBAA ...

  5. SpringBoot - 阿里云OSS - 上传和删除

    1,首先在 pom.xml 中加入maven依赖 <!-- 阿里云oss --> <dependency> <groupId>com.aliyun.oss</ ...

  6. electron打包,使用electron-packager

    构建项目可以使用electron-forge构建,但是这个东西打包比较坑,mac运行报错,win下会有缓存机制,也就是热更新无效 所以选择使用electron-packager打包 sudo npm ...

  7. [转帖]ssh_exporter

    https://github.com/treydock/ssh_exporter SSH exporter The SSH exporter attempts to make an SSH conne ...

  8. [转帖]程序运行崩溃(segfault)的排查方法

    这篇博文记录的非常详细:https://blog.csdn.net/zhaohaijie600/article/details/45246569 我的笔记: 写的C++程序老是运行两三天就挂了,关键是 ...

  9. 部署于K8S集群上面应用性能影响点推测

    前言 本人2017年第一次接触K8S. 中间断断续续学习K8S相关的内容. 但是最近一年,几乎没太有学习. 因为之前学习了四五年, 一直以为产品马上要用 结果一直被浇冷水. 去年开始学乖了. 不这么搞 ...

  10. 【VictoriaMetrics的vmbackupmanager】这个一年卖 2 万美元的功能,我做出来了

    作者:张富春(ahfuzhang),转载时请注明作者和引用链接,谢谢! cnblogs博客 zhihu Github 公众号:一本正经的瞎扯 1.背景 在可观测领域的 metrics 解决方案中,Vi ...