Google Summer of Code 2019/Graph compression

From Software Heritage Wiki
Revision as of 16:53, 11 December 2019 by Haltode (talk | contribs) (Update GSoC portal link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • Title: Graph compression
  • Description: The Software Heritage data model is a big Merkle DAG made of nodes like revisions, releases, directories, etc. It is a very big graph, with 12 billion nodes and 165 billion edges, which makes it hard to fit in memory using naive approaches. Graph compression techniques have been successfully used to compress the Web graph (which is slightly larger than the Software Heritage one) and make it fit in memory. The goal of this GSoC project is review existing graph compression techniques and apply the most appropriate one to the Software Heritage case, enabling in-memory processing of its Merkle DAG.
  • What was done:
    • Git repo: swh-graph (list of my commits)
    • Research on graph compression: evaluate/experiment feasibility and compression rate of multiple techniques
    • Docker environment and scripts to automate the entire compression pipeline
    • REST API to query the graph
      • Java server side: load the compressed graph, run API endpoints traversal algorithms, unit tests, javadoc
      • Python client side: integration with SWH infrastructure, integration tests
    • Automated benchmarking tools with statistical analysis
    • General documentation on docker environment, compression steps, graph query use-cases, etc.
  • Highlights:
    • Compression rates: 4.48 bits/edge (transposed graph) and 4.91 bits/edge (direct graph)
    • Memory requirements for loading both graphs: 200GB of RAM
    • Total compression time: 1 week
    • Node successors lookup times: below 2μs