twitter / GraphJet

GraphJet is a real-time graph processing library.
Apache License 2.0
713 stars 111 forks source link

Add "Unfavorite" edge indexing into tweet counting algorithms #105

Closed guimingTang closed 6 years ago

guimingTang commented 6 years ago

This request adds the functionality to "remove" tweet favorite edges that are later on unfavorited. For example, userA "favs" and later on "unfavs" Tweet1. This has been a much requested feature, but inherently, GraphJet's internal graph storage is read-only, making it impossible to undo a favorite edge.

One alternative to achieving this feature, at least from the client's point of view, is that we introduce a counter edge, "unfavorite" edge, and index that edge into the graph. During graph traversal, for each tweet, we collect every engagement edge, including fav and unfavs, into a NodeInfo object. Before ranking, however, we re-check the NodeInfo and look for possible fav-unfav edge pairs. We remove these pairs from NodeInfo in-place should they exist. This way the unfavorited edge will be absent during ranking, and thus not returned to the client.

CLAassistant commented 6 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


gtang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.