I'm new to Titan and have spent the week playing around with it and experimenting with friendship/social relationships.
I'm now convinced that Titan backed by Cassandra is the best fit for creating a modern application with basic social requirements. Namely, a newsfeed.
As such, I am looking for the most efficient model of implementing one. Having scoured the internet, it has become clear that most of the advice is at least 3-4 years old and not specifically applicable to Titan. Furthermore, I am aware that most of the advice out there was given prior to Titan introducing vertex-centric indexes.
Anyway, the two predominant models that I have come across are 'Linked List' and 'Graphity':
Each user (vertex) has a time ordered list of their posts (vertexes), as described in the Neo4J documentation:
When querying, we would have to look at a users friends, then look at all of each friends posts, collect them all, order them by date, and finally limit them to the most recent 15. This seems wasteful to me as it requires traversing all off the posts of all of a users friends, just to retrieve the most recent 15 items.
"Graphity"
This is similar to the above but adds a huge number of extra edges to make reading far faster, ultimately creating a directly transversable path through the most recent posts:
http://www.rene-pickhardt.de/graphity-an-efficient-graph-model-for-retrieving-the-top-k-news-feeds-for-users-in-social-networks/While it looks fantastic for read performance, it is poor for writes, and in my opinion, overly complex for what really should be a simple problem in a Graph database. I would like to avoid this method if possible, i'm not convinced it would work well with an eventually consistent datastore.
Now, as I said, this advice, and these methods are relatively old in terms of the speed of progress of modern graph databases. Furthermore, neither were implemented with Titan and vertex-centric indexes in mind.
Are either of these two approaches still worthwhile? Or since we now have vertex-centric indexes, should I simply use a single 'posted' edge between each post and it's 'user', making the model more natural. Or is there another model I am not aware of?
So what i'm asking is: What it the best way to model a newsfeed, for efficient retrieval, in Titan 1.0+. Especially baring in mind that we will need to add comments/replies, likes, entities (photos/videos/urls) to posts also.
Thanks in advance for any advice.