AdvancedAbout 15 min

    Pregel: Graph Processing

    Read the full article on Substack

    6 min read.

    Run graph jobs in supersteps: vertices read messages, update, send to neighbours, wait at a barrier, and vote to halt. Spread a value, find shortest paths and connected components.

    Think of it this way: Imagine a rumour passed along a chain of friends where everyone may only phone their friends once per round. Each round, whoever heard something new calls their friends. Nobody calls out of turn, and the game ends when a whole round passes with no calls.

    before superstep 0messages sent: 0
    A3B6C2D1E4F5

    Each vertex holds a number. The job: every vertex learns the biggest number in the graph. A vertex only talks to its neighbours.

    1/12

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Run one superstep

    Sequence

    Order what happens in one Pregel superstep, from the start of the round to the next one.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    6. 6Drop a step here
    6 pieces left to place

    Quiz

    8 questions
    Question 1 of 8
    Score: 0

    What does a vertex do in a superstep?

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going