473,698 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Quick implementation of social networking

I need to implement a concept somewhat similar to social networking
sites like orkut/linkedIn etc etc... The story is below......

'A' can send request to any other member say 'B' to join his network.
The B joins his network. Now 'A' can approach the 'B' 's contacts by 2
ways directly or through 'B' and so on. Now suppose there is 'Z'
somewhere in the chain of 'B' , when I search for 'Z' it will display
me that you can reach 'Z' from 'B' using the chain or how can I view
the chain.

My question is "do i need to write/implement graph theory here or is
there any other rapid development approach available for this problem"

Sep 15 '06 #1
9 3911
phaedrus wrote:
I need to implement a concept somewhat similar to social networking
sites like orkut/linkedIn etc etc... The story is below......

'A' can send request to any other member say 'B' to join his network.
The B joins his network. Now 'A' can approach the 'B' 's contacts by 2
ways directly or through 'B' and so on. Now suppose there is 'Z'
somewhere in the chain of 'B' , when I search for 'Z' it will display
me that you can reach 'Z' from 'B' using the chain or how can I view
the chain.

My question is "do i need to write/implement graph theory here or is
there any other rapid development approach available for this problem"
The path thru B to Z is just "minimum cost spanning tree", which is one of
the simplest graph theory algorithms available. Look that up, and you might
even find an implementation in C++ (the topic of this newsgroup).

Don't fear doing it the right way!

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Sep 15 '06 #2
On Fri, 15 Sep 2006 12:08:12 GMT in comp.lang.c++, "Phlip"
<ph******@yahoo .comwrote,
>
The path thru B to Z is just "minimum cost spanning tree", which is one of
the simplest graph theory algorithms available. Look that up, and you might
even find an implementation in C++
Sounds like it might be related to
http://www.boost.org/libs/graph/doc/..._contents.html

Sep 15 '06 #3
Can you explain with example and how do we extract data from the
database.

David Harmon wrote:
On Fri, 15 Sep 2006 12:08:12 GMT in comp.lang.c++, "Phlip"
<ph******@yahoo .comwrote,

The path thru B to Z is just "minimum cost spanning tree", which is one of
the simplest graph theory algorithms available. Look that up, and you might
even find an implementation in C++

Sounds like it might be related to
http://www.boost.org/libs/graph/doc/..._contents.html
Sep 18 '06 #4
David Harmon wrote:
On Fri, 15 Sep 2006 12:08:12 GMT in comp.lang.c++, "Phlip"
<ph******@yahoo .comwrote,
>
>The path thru B to Z is just "minimum cost spanning tree", which is one of
>the simplest graph theory algorithms available. Look that up, and you might
>even find an implementation in C++
Sounds like it might be related to
http://www.boost.org/libs/graph/doc/..._contents.html

sg********@gmai l.com wrote:
Can you explain with example and how do we extract data from the
database.
Buy the book! Boost::Graph is documented very well. It comes with CD.

ISBN: 0201729148

HTH,
Michiel Salters

Sep 18 '06 #5
Hi,
I dont think we exactly need Graph theory or "Minimum cost" Algos here
as in this case all the edges of the graph carry the same weightage.
We just need to detect the relation at minimum number of nodes/degrees.
If there is more than one path available to end contact with same
degree - we do not need to calulate anything based on "minumum cost" or
any other criteria as there is no different weightages of friendship.

As per my understanding, a sql query in the form of stored proc can be
enough which iteratively looks up friends at 1..n th level.

Your comments please...

Mi************* @tomtom.com wrote:
David Harmon wrote:
On Fri, 15 Sep 2006 12:08:12 GMT in comp.lang.c++, "Phlip"
<ph******@yahoo .comwrote,

The path thru B to Z is just "minimum cost spanning tree", which is one of
the simplest graph theory algorithms available. Look that up, and you might
even find an implementation in C++
>
Sounds like it might be related to
http://www.boost.org/libs/graph/doc/..._contents.html


sg********@gmai l.com wrote:
Can you explain with example and how do we extract data from the
database.

Buy the book! Boost::Graph is documented very well. It comes with CD.

ISBN: 0201729148

HTH,
Michiel Salters
Sep 19 '06 #6

aa******@gmail. com wrote:
Hi,
I dont think we exactly need Graph theory or "Minimum cost" Algos here
as in this case all the edges of the graph carry the same weightage.
We just need to detect the relation at minimum number of nodes/degrees.
If there is more than one path available to end contact with same
degree - we do not need to calulate anything based on "minumum cost" or
any other criteria as there is no different weightages of friendship.

As per my understanding, a sql query in the form of stored proc can be
enough which iteratively looks up friends at 1..n th level.

Your comments please...
[snip]

You are off-topic here where standard C++ is discussed. So find a forum
where you are topical or rephrase your question so that it is about
standard C++.

/Peter

Sep 19 '06 #7
aa******@gmail. com wrote:
>I dont think we exactly need Graph theory or "Minimum cost" Algos here
as in this case all the edges of the graph carry the same weightage.
It's still "minimum cost spanning tree", because that finds the minimum cost
path, even when each edge is the same cost.

To solve this problem, you need graph theory (and a topical newsgroup);
there are no shortcuts.

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Sep 19 '06 #8
Thanx Peter but i am not the questioner - I am just replying to the
question that is already posted in this group.

peter koch wrote:
aa******@gmail. com wrote:
Hi,
I dont think we exactly need Graph theory or "Minimum cost" Algos here
as in this case all the edges of the graph carry the same weightage.
We just need to detect the relation at minimum number of nodes/degrees.
If there is more than one path available to end contact with same
degree - we do not need to calulate anything based on "minumum cost" or
any other criteria as there is no different weightages of friendship.

As per my understanding, a sql query in the form of stored proc can be
enough which iteratively looks up friends at 1..n th level.

Your comments please...
[snip]

You are off-topic here where standard C++ is discussed. So find a forum
where you are topical or rephrase your question so that it is about
standard C++.

/Peter
Sep 20 '06 #9
aa******@gmail. com wrote:
Thanx Peter but i am not the questioner - I am just replying to the
question that is already posted in this group.


Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or the group FAQ list:
<http://www.parashift.c om/c++-faq-lite/how-to-post.html>
Sep 20 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3393
by: harlow.28 | last post by:
Looking to build a Social Networking site and i've heard of Drupal and Joomla and a few others and i was wondering if anyone had experience building a social networking site (i.e. myspace, friendster, linkedin, yelp... ) with one of these PHP CMS tools? ???? any suggestions ? pros / cons of any of them? thanks! - dan
10
6322
by: Fenix [Youth Director] | last post by:
Hello, I am in need of advice or examples of how I should build my database for a small non-profit youth computer gaming organization. I am a beginner at database design and I know this project will take some fairly complex database structure. Here is what I have planned: The site will function a lot like the hit social networking website Facebook.com.... each user will log in and have his/her own "wall" where friends can leave...
1
1657
by: pmm101 | last post by:
Can anyone recommend a decent free open source social networking software? I have been experimenting with elgg but have given up on it. Any thoughts on astrospaces appreciated. What I'm looking for should allow users to register, create profiles, upload files, search other's profiles, communicate with one another and be customizable in appearance. Any suggestions?
2
1447
by: sebhastian | last post by:
I’m interested in creating our own social networking site. Can anyone recommend a company or tech firm that does this?
0
1194
by: RigasMinho | last post by:
Description Company Description: Our client company is looking for very talented PHP engineers who can program without using any external tools. The company is a social networking company with strong VC funding. Job Qualifications:
1
4366
by: Shalini Bhalla | last post by:
hi , i want to use Yogurt Social networking CMS software .... Pls tell me how exacly i will do it ? in site it is specified that : Upload the yogurt directory to XOOPS_ROOT_URL/modules/ (i m not getting this where exacly i need to put files , om my server or where ?) 2. Log in to your site as administrator. 3. Install the module using the XOOPS module administration panel at 'System Admin -> Modules'.
4
3139
by: avh | last post by:
Does anyone know of a white-label social networking framework that has been built in .NET? Seems like everything out there is PHP...
1
2312
by: Grouchy.Oldgit | last post by:
Does anyone have experience (good or bad) with running any of the growing number of open source social networking platforms - eg elgg, phpizabi, PHP Social Flies etc etc
1
4849
by: deepucando | last post by:
Hi i am trying to design a social networking site for my project. i have to design the database for the social networking with user profile and friends contact list as like facebook and orkut. can anyone help me to implement the database design with fast and accuracy retrieval of data from the database using the Index and Hash table techniques regards ~Deepu~
0
8671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9152
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9016
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8856
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.