Comment on page

Definition and usage

As a part of the Relation Protocol, the main function of the Graph Indexer is to construct a social graph:
Events are the atomic units in the Relation social graph. The general technical specification of the Relation Protocol defines three events:
  • CreateRDF: Triggered when a SBT containing RDF semantics is created.
  • UpdateRDF: Triggered when a SBT containing RDF semantics is updated.
  • RemoveRDF: Triggered when a SBT containing RDF semantics is removed.
The Graph Indexer parses these three events by listening to transactions on the blockchain. Users' social interactions are then stored in a graph database, thus constructing a social graph(see Figure: 7-1). This helps individual developers and companies to build a more meaningful user relationship in Dapps and other decentralized projects. It can foster a more user-friendly social network experience.
Figure 7-1
This chapter will show you how to construct a Graph Indexer:
  1. 1.
    Listen to events on the blockchain.: Listens to all events conforming to the EIP6239 specification on the blockchain.
  2. 2.
    Parse RDF data: Parse the RDF from the event conforming to the Schema specification and construct it into data structure in a graph.
  3. 3.
    Build the social graph: Store the data into the graph database.
Last modified 3mo ago