Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:06:31+00:00 2026-05-26T11:06:31+00:00

In the context of design of a social network using Graphs data structure ,

  • 0

In the context of design of a social network using Graphs data structure, where you can perform a BFS to find a connection from one person to another, I have some questions pertaining to it.

If there are million users, the topology would indeed be much more complicated and interconnected than the graphs we normally design and I am trying to comprehend how you could solve these problems.

  1. In the real world, servers fail. How does this affect you?

  2. How could you take advantage of caching?

  3. Do you search until the end of the graph (infinite)? How do you decide when to give up?

  4. In real life, some people have more friends of friends than others, and are therefore more likely
    to make a path between you and someone else. How could you use this data to pick where you
    start traverse?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:06:31+00:00Added an answer on May 26, 2026 at 11:06 am

    Your question seems interesting and curious 🙂

    1) Well… of course, data is stored in disks, not in ram.
    Disks have systems that avoid failure, in particular, RAID-5 for example.
    Redundancy is the key: if one system fail there is another system ready to take his place.
    There is also redundancy and workload sharing together… there are two computers that work in parallel and share their jobs but if one stops only one works and take the full workload.

    In places like google or facebook redundancy is not 2, is 1200000000 🙂
    And consider also that data is not in a single server farm, in google there are several datacenters connected together, so if one building explodes, another one will take his place for example.

    2) Not an easy question at all, but usually these systems have big cache for disk arrays too, so reading and writing data on disk is faster than on our laptops 🙂
    Data can be processed in parallel by several concurrent systems and this is the key of the speed of services like facebook.

    3) The end of the graph is not infinite.
    So it is possible with actual technology indeed.

    The computational complexity of exploring all connections and all nodes on a graph is O(n + m) where n is the number of vertices and m the number of edges.
    This means, it is linear to the number of registered user and to the number of connection between users. And RAM these days is very cheap.

    Being a linear growth is easy to add resources when needed.
    Add more computers the more you get rich 🙂

    Consider also that no-one will perform a real search for every node, everything in facebook is quite “local”, you can view the direct friend of one person, not the friend of friend of friend …. it would be not useful.

    Getting the number of vertices directly connected to a vertex, if the data structure is well done, is very easy and fast. In SQL it would be a simple select and if tables are well indexed it will be very fast and also not very dependant on the total number of users (see the concept of hash tables).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is a design pattern I can use for generating context-sensitive right click menus
I have a smaller web app that republishes content from one social source to
Update: Please read this question in the context of design principles, elegance, expression of
This is a design question, I noticed that by time by LINQ-to-SQL Context gets
I'm familiar with the use of the context object design pattern - a lightweight
I'm trying to design a macro to produce several related data structures related to
what is context object design pattern ?
I asked this question in a more general design context before. Now, I'd like
Context: I'm in the design phase of what I'm hoping will be a big
I try to design my app to find database entries which are similar. Let's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.