How to store data related to group members in a forum using Cassandra?

Hii there

My question is related to groups on the forum, very similar to LinkedIn groups.

How would you save the list of all users in a group to a discussion forum? ... and when the size of the groups is quite large, like tens of thousands of participants in a group?

Also, how can you find user reciprocal connections in this group?

+3
source share
1 answer

I suggest doing this as one row for each group, a column for each member of the group. This will work well for any number of users in a group.

" ", .

: , "A" "G". A ( ) , ( pycassa):

group_members = GROUPS.get('G').keys()
group_members.remove('A')
user_connections = USERS.get('A').keys()
mutual_connections = USERS.multiget(group_members, columns=connections)

, , . , , .

+2

Source: https://habr.com/ru/post/1789607/


All Articles