Hello there,
as a new Neo4j user, I'm here to ask you design advices for the following 
scenario.
I would like to develop a mobile app with a social section that broadly 
acts like Instagram, therefore a feed with my last friends activity, their 
profile page, suggestions based on common interests and so on.

(please take a look at the sketch attached).

And here my questions:

1) While (User)-[FOLLOWS]->(User) relationship seams clear to me, with 
(User)-[POSTS]->(Media) first doubts come. Is it correct to add a node for 
every media a user will publish? Suppose 100-1000 pictures per user, it's 
clear that Neo4j should manage a lot of connections from early stages and I 
don't know if it's affordable in terms of required resources.

2) (User)-[LIKES]->(Media)
Because I red there isn't an atomic counter that safety let me store a 
property in a Media node (example: {likes: 291}, I thought of this 
solution. But again, I see an exponential growth of relations: what are 
your considerations about this?

3) In my schema, I represented a user feed like a tree, attaching new media 
to the last one with the [NEXT] relationship. 
This way, when a user opens someone else profile, I can fetch for Media 
with descending order and arbitrary limit for paginated results. Am I 
correct or is there a best strategy?
Maybe I could consider a Media root node, storing the last user's activity: 
this way I think it should be easier, from a user profile, querying for new 
followed user's activities, ins't it?

Thanks in advance for any advice,
Alessandro

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to