1

I am trying to build a social network. Users will be able to post on it, and follow certain users. The posts of the users that a user follows will appear on a newsfeed page of the user. This is just like twitter or Facebook;

post, follow and see what s/he posts.

I want to utilize a graph db, so far I think it will be Cayley db. I plan to use a graph db for the reason I will need to store the relationships between those entities like users.

However, apart from the relationships between entities, follow between persons, likes between persons and posts, commenting between persons and posts, there are other, more main like bulk data:

posts; their texts, images, videos.
comments on posts; their texts, images, videos.

Additionally, there are other very common tasks to be undertaken in such development processes, like

authentication and the storage of the user credentials (encrypted maybe) for this.
and other user data, like profile name, pictures uploaded.

In a case where a developer uses a graph database to better fit the graph part of application's data, relationships I suppose, where other kinds of data like post and comment texts, images, videos, and user passwords, pictures should be stored?

In the graph database? This makes me think, for posts and comments, about the performance, because there will be a lot of posts coming through the network. Is that an anti-pattern, or not good practice?

Or, in a rdbms or a no-sql db like mongo? Is that a good practice or good pattern, having a second database beside the graph db?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.