How do Facebook and Qaru have these amazing features?

I am very interested to know how these two things work out:

Facebook: when a user logs in and just sits in his news feed, new items automatically appear in the news feed, red icons automatically appear for friend requests, messages and notifications, and instant messaging in real time. This is a lot of database activity! In addition, users can remotely end other sessions, so all of their sessions should be constantly monitored if they are still valid. With so many users, how does it all work without killing their servers?

Stack Overflow: There are 60+ icons in the stack overflow based on the large number of actions that the user performs. It seems that it would be extremely difficult to check almost all of the user's actions to make sure that he earned them an icon or not. The same question: with so many users, how does it all work without killing their servers?

I would really appreciate some advice.

+3
source share
4 answers
 Planning: 

The first step in the process is planning. Facebook or Stackoverflow cannot create an icon today and after 2 months down, they find a problem. Therefore, detailed planning is performed to create the category. I can write here for a long time, but you need a technique; allows you to move forward.

 Object Oriented: 

. , , Careers.stackoverflow. , , . , , , stackoverflow. , , , obeject, . , .

I just promoted careers site of stackoverflow. :)

.

Database:

, , .., . . , , . , . , Stackoverflow , "1 ". , - . .

Ajax: 

.

Jquery, Ext JS: 

javascript .

Servers: 

node, . . , , . , . . - -, - .

R&D:

- R & D, , . .

, .

+2

facebook, , javascript .

Stackoverflow , .

0

javascript is one solution. It helps you do things on the fly without rebooting.

0
source

From what I heard (without checking on my part), HTTP requests can last forever, so notifications on Facebook, Gmail, etc. are nothing more than lengthy “give me the next change that is happening” requests. There is no survey; this is the reverse method.

0
source

Source: https://habr.com/ru/post/1790874/


All Articles