Skip to content

Commit

Permalink
Merge branch 'main' into 143-spark-library
Browse files Browse the repository at this point in the history
  • Loading branch information
lixueclaire authored Apr 25, 2023
2 parents 39d0987 + 7153a66 commit 05cdeb0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 38 deletions.
71 changes: 33 additions & 38 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ GraphAr

Welcome to GraphAr (short for "Graph Archive"), an open source, standardized file format for graph data storage and retrieval.

Join our `Weekly Community Meeting`_ to learn more about GraphAr and get involved! :trumpet:
📢 Join our `Weekly Community Meeting`_ to learn more about GraphAr and get involved!

What is GraphAr?
-----------------

|Overview Pic|
|
.. image:: https://alibaba.github.io/GraphAr/_images/overview.png
:width: 770
:align: center
:alt: Overview

|
Graph processing serves as the essential building block for a diverse variety of
real-world applications such as social network analytics, data mining, network routing,
Expand Down Expand Up @@ -57,7 +64,10 @@ And each edge contains:

The following is an example property graph containing two types of vertices ("person" and "comment") and three types of edges.

|Property Graph|
.. image:: https://alibaba.github.io/GraphAr/_images/property_graph.png
:width: 700
:align: center
:alt: property graph

Vertices in GraphAr
^^^^^^^^^^^^^^^^^^^
Expand All @@ -69,7 +79,10 @@ Each type of vertices (with the same label) constructs a logical vertex table, w

Given a vertex id and the vertex label, a vertex is uniquely identifiable and its respective properties can be accessed from this table. The vertex id is further used to identify the source and destination vertices when maintaining the topology of the graph.

|Vertex Logical Table|
.. image:: https://alibaba.github.io/GraphAr/_images/vertex_logical_table.png
:width: 700
:align: center
:alt: vertex logical table

Physical table of vertices
""""""""""""""""""""""""""
Expand All @@ -78,8 +91,10 @@ The logical vertex table will be partitioned into multiple continuous vertex chu

Take the "person" vertex table as an example, if the chunk size is set to be 500, the logical table will be separated into sub-logical-tables of 500 rows with the exception of the last one, which may have less than 500 rows. The columns for maintaining properties will also be divided into distinct groups (e.g., 2 for our example). As a result, a total of 4 physical vertex tables are created for storing the example logical table, which can be seen from the following figure.

|Vertex Physical Table|

.. image:: https://alibaba.github.io/GraphAr/_images/vertex_physical_table.png
:width: 700
:align: center
:alt: vertex physical table

Edges in GraphAr
^^^^^^^^^^^^^^^^
Expand All @@ -91,8 +106,10 @@ For maintaining a type of edges (that with the same triplet of the source label,

Take the logical table for "person likes person" edges as an example, the logical edge table looks like:

|Edge Logical Table|

.. image:: https://alibaba.github.io/GraphAr/_images/edge_logical_table.png
:width: 700
:align: center
:alt: edge logical table

Physical table of edges
""""""""""""""""""""""""""
Expand All @@ -109,9 +126,15 @@ Additionally, the partition of the offset table should be in alignment with the

Take the "person knows person" edges to illustrate. Suppose the vertex chunk size is set to 500 and the edge chunk size is 1024, the edges will be saved in the following physical tables:

|Edge Physical Table1|
|Edge Physical Table2|
.. image:: https://alibaba.github.io/GraphAr/_images/edge_physical_table1.png
:width: 700
:align: center
:alt: edge logical table1

.. image:: https://alibaba.github.io/GraphAr/_images/edge_physical_table2.png
:width: 700
:align: center
:alt: edge logical table2

Libraries
----------
Expand Down Expand Up @@ -173,34 +196,6 @@ third-party libraries may not have the same license as GraphAr.
.. |Discord| image:: https://img.shields.io/discord/1088377726634836051.svg?logo=discord&logoColor=fff&label=Discord&color=7389d8
:target: https://discord.gg/XPsfd4ShCu

.. |Overview Pic| image:: https://alibaba.github.io/GraphAr/_images/overview.png
:width: 650
:alt: Overview

.. |Property Graph| image:: https://alibaba.github.io/GraphAr/_images/property_graph.png
:width: 650
:alt: property graph

.. |Vertex Logical Table| image:: https://alibaba.github.io/GraphAr/_images/vertex_logical_table.png
:width: 650
:alt: vertex logical table

.. |Vertex Physical Table| image:: https://alibaba.github.io/GraphAr/_images/vertex_physical_table.png
:width: 650
:alt: vertex physical table

.. |Edge Logical Table| image:: https://alibaba.github.io/GraphAr/_images/edge_logical_table.png
:width: 650
:alt: edge logical table

.. |Edge Physical Table1| image:: https://alibaba.github.io/GraphAr/_images/edge_physical_table1.png
:width: 650
:alt: edge logical table1

.. |Edge Physical Table2| image:: https://alibaba.github.io/GraphAr/_images/edge_physical_table2.png
:width: 650
:alt: edge logical table2

.. _GraphAr File Format: https://alibaba.github.io/GraphAr/user-guide/file-format.html

.. _GraphAr Spark Library: https://github.com/alibaba/GraphAr/tree/main/spark
Expand Down
Binary file modified docs/images/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/property_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 05cdeb0

Please sign in to comment.