Some probably wont know what XING is: it is a online network community like linkedIn etc. You can add new contacts, manage these contacts, search for new etc.
The whole application is done in Ruby and somewhat inspired by the small world theory, at least it is said so.
There is one specific feature that I really cant imagine how it is done. If you seach for some person Z, which is not in your contact list, and you click on Z´s profile, all possible connections from you to person Z are shown. Example:
- YOU -> person B -> person C -> person E -> person Z
- YOU -> person M -> person N -> person I -> person Z
- YOU -> person M -> person K -> person J -> person Z
etc.
Especially if you have many contacts there are also many possible connections. And the app is fast!
So, my question is: how is such a feature implemented? What kind of system/database is behind it? I am only experienced in standard RDMBS like mySQL and MSSQL server, and I really cant imagine how to do something like the above mentioned in a standard database system.
Are there any algorithms which can help in computing the possible relationships? Currently I am reading a interesting book on algorithms like computing the similarity of two things etc. so the "implementation of that small world theory" would be very interesting for me.
Thanks in advance for any hints.