Re: [Neo4j] Design help for G+ like app
If you really think your application will grow large, you might want to design your own sharding scheme across multiple servers for the posts, which will represent your largest # of nodes and properties. You can look at some of the QCon presentations from the Twitter team as to how they've attacked the problem. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Antoine Pouch Sent: Wednesday, September 21, 2011 10:21 AM To: Neo4j user discussions Subject: Re: [Neo4j] Design help for G+ like app Thanks for the reply Peter. So no direct user-to-user relationship, and each user has a group/circle called "AllMyFriends". Makes sense. Regarding the timeline index(es), should I make a huge one in Lucene with all of users posts and properties associating them to users and circles or is it better to make a lot of small indexes inside Neo4j? Antoine Pouch Architecte chef programmeur Woozworld Inc. Tél : 514-281-8999 #212 Cell : 514-463-1588 On Wed, Sep 21, 2011 at 9:38 AM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > Antoine, > the design sounds good from the initial in-the-head look. The only > thing I see is the modeling of groups. I would imagine something like > > > http://yuml.me/diagram/scruffy/class/[user1]-circle%3E[friendsU1],[user2]-partOf%3E[friendsU1],[user1]-circle%3E[jobU1],[user2]-partOf%3E[jobU1] > > where User2 is part of two of User1 circles. I agree that, if all > relationships are through circles, you probably don't need users-user > relationships at all. > > Does that make sense? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/- Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Tue, Sep 20, 2011 at 7:29 PM, ant-1 wrote: > > Hi, > > > > I'm our company software architect, and I'm new to GraphDBs. But as we're > > building a Google+-like, we realized the need for something like Neo4j. > And > > as this community seems the best, we settle for you guys :) > > > > Anyway. Onto the design. Call us fools, but we're trying to redo Google+ > > (except for kids). I need help with the design, for starters. > > > > Here's the Domain: > > - Users > > - Users have friends > > - Users can place friends in one or more group (circle for G+), groups > being > > only visible to the user creating them. > > - Users can create posts, which are visible either by all his friends or > > only one or more groups. > > > > I realize the hardest part is to retrieve feeds. For example, I want the > > posts feed for user X for his group G. > > > > Here's what I envision: > > - User are nodes > > - Users have FRIEND_WITH relationships (direction being the initial > > requester to the other) > > - Groups are nodes. > > - Group has a CREATED_BY relationship to user > > - Group has BELONGS_TO relationships to multiple users > > - Post are nodes > > - Post has CREATED_BY relationship to the user > > - Post has VISIBLE_TO relationship to one or more groups > > - PostingEvent is a node with a timestamp property > > - PostingEvent has a RELATED_TO relationship to the user and the post > > > > And we would have a timeline index (Lucene or B-tree, I have no idea) for > > feeds retrieval. > > > > 1. Do you see issues with my design? > > 2. What to do with postings to "All my friends", do I create a "All > friends" > > group? In that case do I still need the user-to-user relationships? > > 3. I never worked with timeline indexes and such, so I could use some > > readings on the subject, even theorical ones, even dead-tree books. > Please > > don't hesitate to make recommendations. > > > > Thanks ! > > > > Antoine > > > > -- > > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Design-help-for-G-like-app-tp3353185p3353185.html > > Sent from the Neo4j Community Discussions mailing list archive at > Nabble.com. > > ___ > > Neo4j mailing list > > User@lists.neo4j.org > > https://lists.neo4j.org/mailman/listinfo/user > > > ___ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Design help for G+ like app
Thanks for the reply Peter. So no direct user-to-user relationship, and each user has a group/circle called "AllMyFriends". Makes sense. Regarding the timeline index(es), should I make a huge one in Lucene with all of users posts and properties associating them to users and circles or is it better to make a lot of small indexes inside Neo4j? Antoine Pouch Architecte chef programmeur Woozworld Inc. Tél : 514-281-8999 #212 Cell : 514-463-1588 On Wed, Sep 21, 2011 at 9:38 AM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > Antoine, > the design sounds good from the initial in-the-head look. The only > thing I see is the modeling of groups. I would imagine something like > > > http://yuml.me/diagram/scruffy/class/[user1]-circle%3E[friendsU1],[user2]-partOf%3E[friendsU1],[user1]-circle%3E[jobU1],[user2]-partOf%3E[jobU1] > > where User2 is part of two of User1 circles. I agree that, if all > relationships are through circles, you probably don't need users-user > relationships at all. > > Does that make sense? > > Cheers, > > /peter neubauer > > GTalk: neubauer.peter > Skype peter.neubauer > Phone +46 704 106975 > LinkedIn http://www.linkedin.com/in/neubauer > Twitter http://twitter.com/peterneubauer > > http://www.neo4j.org - Your high performance graph database. > http://startupbootcamp.org/- Öresund - Innovation happens HERE. > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. > > > > On Tue, Sep 20, 2011 at 7:29 PM, ant-1 wrote: > > Hi, > > > > I'm our company software architect, and I'm new to GraphDBs. But as we're > > building a Google+-like, we realized the need for something like Neo4j. > And > > as this community seems the best, we settle for you guys :) > > > > Anyway. Onto the design. Call us fools, but we're trying to redo Google+ > > (except for kids). I need help with the design, for starters. > > > > Here's the Domain: > > - Users > > - Users have friends > > - Users can place friends in one or more group (circle for G+), groups > being > > only visible to the user creating them. > > - Users can create posts, which are visible either by all his friends or > > only one or more groups. > > > > I realize the hardest part is to retrieve feeds. For example, I want the > > posts feed for user X for his group G. > > > > Here's what I envision: > > - User are nodes > > - Users have FRIEND_WITH relationships (direction being the initial > > requester to the other) > > - Groups are nodes. > > - Group has a CREATED_BY relationship to user > > - Group has BELONGS_TO relationships to multiple users > > - Post are nodes > > - Post has CREATED_BY relationship to the user > > - Post has VISIBLE_TO relationship to one or more groups > > - PostingEvent is a node with a timestamp property > > - PostingEvent has a RELATED_TO relationship to the user and the post > > > > And we would have a timeline index (Lucene or B-tree, I have no idea) for > > feeds retrieval. > > > > 1. Do you see issues with my design? > > 2. What to do with postings to "All my friends", do I create a "All > friends" > > group? In that case do I still need the user-to-user relationships? > > 3. I never worked with timeline indexes and such, so I could use some > > readings on the subject, even theorical ones, even dead-tree books. > Please > > don't hesitate to make recommendations. > > > > Thanks ! > > > > Antoine > > > > -- > > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Design-help-for-G-like-app-tp3353185p3353185.html > > Sent from the Neo4j Community Discussions mailing list archive at > Nabble.com. > > ___ > > Neo4j mailing list > > User@lists.neo4j.org > > https://lists.neo4j.org/mailman/listinfo/user > > > ___ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Design help for G+ like app
Antoine, the design sounds good from the initial in-the-head look. The only thing I see is the modeling of groups. I would imagine something like http://yuml.me/diagram/scruffy/class/[user1]-circle%3E[friendsU1],[user2]-partOf%3E[friendsU1],[user1]-circle%3E[jobU1],[user2]-partOf%3E[jobU1] where User2 is part of two of User1 circles. I agree that, if all relationships are through circles, you probably don't need users-user relationships at all. Does that make sense? Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Tue, Sep 20, 2011 at 7:29 PM, ant-1 wrote: > Hi, > > I'm our company software architect, and I'm new to GraphDBs. But as we're > building a Google+-like, we realized the need for something like Neo4j. And > as this community seems the best, we settle for you guys :) > > Anyway. Onto the design. Call us fools, but we're trying to redo Google+ > (except for kids). I need help with the design, for starters. > > Here's the Domain: > - Users > - Users have friends > - Users can place friends in one or more group (circle for G+), groups being > only visible to the user creating them. > - Users can create posts, which are visible either by all his friends or > only one or more groups. > > I realize the hardest part is to retrieve feeds. For example, I want the > posts feed for user X for his group G. > > Here's what I envision: > - User are nodes > - Users have FRIEND_WITH relationships (direction being the initial > requester to the other) > - Groups are nodes. > - Group has a CREATED_BY relationship to user > - Group has BELONGS_TO relationships to multiple users > - Post are nodes > - Post has CREATED_BY relationship to the user > - Post has VISIBLE_TO relationship to one or more groups > - PostingEvent is a node with a timestamp property > - PostingEvent has a RELATED_TO relationship to the user and the post > > And we would have a timeline index (Lucene or B-tree, I have no idea) for > feeds retrieval. > > 1. Do you see issues with my design? > 2. What to do with postings to "All my friends", do I create a "All friends" > group? In that case do I still need the user-to-user relationships? > 3. I never worked with timeline indexes and such, so I could use some > readings on the subject, even theorical ones, even dead-tree books. Please > don't hesitate to make recommendations. > > Thanks ! > > Antoine > > -- > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/Design-help-for-G-like-app-tp3353185p3353185.html > Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. > ___ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Design help for G+ like app
Hi, I'm our company software architect, and I'm new to GraphDBs. But as we're building a Google+-like, we realized the need for something like Neo4j. And as this community seems the best, we settle for you guys :) Anyway. Onto the design. Call us fools, but we're trying to redo Google+ (except for kids). I need help with the design, for starters. Here's the Domain: - Users - Users have friends - Users can place friends in one or more group (circle for G+), groups being only visible to the user creating them. - Users can create posts, which are visible either by all his friends or only one or more groups. I realize the hardest part is to retrieve feeds. For example, I want the posts feed for user X for his group G. Here's what I envision: - User are nodes - Users have FRIEND_WITH relationships (direction being the initial requester to the other) - Groups are nodes. - Group has a CREATED_BY relationship to user - Group has BELONGS_TO relationships to multiple users - Post are nodes - Post has CREATED_BY relationship to the user - Post has VISIBLE_TO relationship to one or more groups - PostingEvent is a node with a timestamp property - PostingEvent has a RELATED_TO relationship to the user and the post And we would have a timeline index (Lucene or B-tree, I have no idea) for feeds retrieval. 1. Do you see issues with my design? 2. What to do with postings to "All my friends", do I create a "All friends" group? In that case do I still need the user-to-user relationships? 3. I never worked with timeline indexes and such, so I could use some readings on the subject, even theorical ones, even dead-tree books. Please don't hesitate to make recommendations. Thanks ! Antoine -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Design-help-for-G-like-app-tp3353185p3353185.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user