Or use graphframes (Spark) over cassandra to store separately a graph of
users and followers and next a table of tweet. You will be able to join
data between those 2 structures using spark.

2016-05-31 14:27 GMT+02:00 <aeljami....@orange.com>:

> Hello,
>
>       >* First, Is this data modeling correct for follow base (follower,
> following actions) social network?*
>
>
>
> For social network, I advise you to see Graph Databases, over Cassandra
>
>
>
> Example :
> https://academy.datastax.com/resources/getting-started-graph-databases
>
>
>
> *De :* Mohammad Kermani [mailto:98kerm...@gmail.com]
> *Envoyé :* lundi 30 mai 2016 13:42
> *À :* user@cassandra.apache.org
> *Objet :* Cassandra data modeling for a social network
>
>
>
> We are using Cassandra for our social network and we are designing/data
> modeling tables we need, it is confusing for us and we don't know how to
> design some tables and we have some little problems!
>
>
>
> *As we understood for every query we have to have different tables*, and
> for example user A is following user C and B.
>
> Now, in Cassandra we have a table that is posts_by_user:
>
> user_id      |  post_id       |  text  |  created_on  |  deleted  |  
> view_count
>
>
>
> likes_count  |  comments_count  |  user_full_name
>
> And we have a table according to the followers of users, we insert the
> post's info to the table called user_timeline that when the follower
> users are visiting the first web page we get the post from database from
> user_timeline table.
>
> And here is user_timeline table:
>
> follower_id      |      post_id      | user_id (who posted)  |  likes_count  |
>
>
>
> comments_count   |   location_name   |  user_full_name
>
> *First, Is this data modeling correct for follow base (follower, following
> actions) social network?*
>
> And now we want to count likes of a post, as you see we have number of
> likes in both tables*(**user_timeline**,* *posts_by_user**)*, and imagine
> one user has 1000 followers then by each like action we have to update all
> 1000 rows in user_timeline and 1 row in posts_by_users; And this is not
> logical!
>
> *Then, my second question is How should it be? I mean how should like
> (favorite) table be?*
>
>
>
> Thank you
>
> I wish I can get answer
>
> _________________________________________________________________________________________________________________________
>
> Ce message et ses pieces jointes peuvent contenir des informations 
> confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu 
> ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
> electroniques etant susceptibles d'alteration,
> Orange decline toute responsabilite si ce message a ete altere, deforme ou 
> falsifie. Merci.
>
> This message and its attachments may contain confidential or privileged 
> information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete 
> this message and its attachments.
> As emails may be altered, Orange is not liable for messages that have been 
> modified, changed or falsified.
> Thank you.
>
>

Reply via email to