I'm planning on creating a social network and I don't think I quite understand how the status update module of facebook is designed. Hoping I can find some help here. At algorithmic and datastructure level, what is the most efficient way to create a status update mechanism in a social network?
A full table scan for all friends and then sorting their updates is very naive and costly. Do we use some sort of mechanism based on hashing or something else? Please let me know.
P.S: I'm not talking about their EdgeRank algorithm but the basic status update. How do they find and fetch them from the database?
Thanks in advance for the help!
1 : an arrangement of parts in a structure or a work of art The design of the house suits a large family. 2 : the art or process of planning and creating something His job is Web page design. 3 : a sketch, model, or plan of something made or to be made Architects studied the design for the building.
The definition of a design is a plan or something created, often in art or fashion. An example of design is a plaid pattern on a pair of pants. noun. 1. To conceive or fashion in the mind; invent.
In simple and brief words, a design is a plan to make something. “Design is a plan for arranging elements in such a way as best to accomplish a particular purpose.”
It's said that the word “design” comes from the Latin word designare. Designare is said to have meant to draw a plan. For this reason, it is thought that the word design initially was used in this sense of a plan on paper.
A design is a plan or specification for the construction of an object or system or for the implementation of an activity or process or the result of that plan or specification in the form of a prototype, product, or process. The verb to design expresses the process of developing a design.
What is design? Generally speaking, it is the process of envisioning and planning the creation of objects, interactive systems, buildings, vehicles, etc. It user-centered, i.e. users are at the heart of the design thinking approach. It is about creating solutions for people, physical items or more abstract systems to address a need or a problem.
The elements of design are the tools you use to create a work of art. Knowing the fundamental elements and applying them to your piece with a clear understanding will help you make it powerful enough to convey a message. So, what are the main elements that you need to know before starting working on your blank canvas?
Most people think that design is about making things look pretty – a decoration. Art. But design is as much an art as it is a science. Cold and calculated process. Sometimes the detriment of pretty.
Here is a great presentation that answers your question. The specific answer comes up at around minute 55:40, but I suggest that you watch the entire presentation to understand how the solution fits into the entire architecture.
In short:
This is terribly simplified, of course. This only works because all of it is memcached, the system is designed to minimize latency, some ranking is done at the leaf server that contains the friend's feed items, etc.
You really don't want to be hitting the database for any of this to work at a reasonable speed. FB use MySql mostly as a key-value store; JOINing tables is just impossible at their scale. Then they put memcache servers in front of the databases and application servers.
Having said that, don't worry about scaling problems until you have them (unless, of course, you are worrying about them for the fun of it.) On day one, scaling is the least of your problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With