Graph data model
The primary entity in our data model is a Twitter user. A Twitter user can perform the following relationship-forming actions when posting a tweet:
- Use a word
- Mention a hashtag
- Mention another user
- Mention a URL
- Retweet another user
This concept maps very naturally into a graph model. In the model, we will have four different entity types (vertices):
- User: This represents a Twitter user account
- Word: This represents any word contained in a tweet
- URL: This represents any URL contained in a tweet
- Hashtag: This represents any hashtag contained in a tweet
Relationships (edges) will consist of the following actions:
- mentions_user: Using this action, ...
Get Storm Blueprints: Patterns for Distributed Real-time Computation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.