Graph Change Announcement

A Graph Change Announcement is for publishing relationship state changes for a user.

Fields

FieldDescriptionData TypeSerializationParquet TypeBloom Filter
announcementTypeAnnouncement Type Enum (1)enumdecimalINT32no
changeTypeType of relationship changeenumdecimalINT32no
fromIdid of the user creating the relationship64-bit unsigned integerdecimalUINT_64YES
objectIdid of the target of the relationship64-bit unsigned integerdecimalUINT_64YES

Field Requirements

announcementType

  • MUST be fixed to 1

changeType

  • MUST be one of the Change Type Enum

Change Type Enum

Different change types have different meanings.

ValueNameDescription
0UnfollowRemove a Follow relationship
1FollowCreate a Follow relationship

fromId

  • MUST be a DSNP User Id
  • MUST have authorized the creation of the Announcement, either directly or via a transparent chain of delegation

objectId

Non-Normative

Graph Retrieval, Ordering and Reading

Each Graph Change event represents a state transition for the graph. The state of the graph at any time is given by taking the state of the graph at a previous time and applying all Graph Change events not previously applied in the order specified above. Once those Graph Change events are retrieved, they can be ordered to reflect the current graph state (i.e. Charlie has followed Bob, then he unfollowed him, and then followed him again. The graph state reflects that Charlie is following Bob).

To retrieve the graph, do the following:

  1. Retrieve the events with announcementType matching the enum for "Graph Change"
  2. Filter the events to a particular DSNP User Id to retrieve information about the respective graph.
  3. Order the retrieved data by Announcement Ordering.