Previous | Next --- Slide 15 of 58
Back to Lecture Thumbnails
grose

Fun fact from having worked there -- it actually takes a while to completely load your Facebook page, but each of the parts loads asynchronously -- the result being that the main structure of the page loads, then the news feed, then various other items. Although this seems a lot more complicated, people like this better than building the entire page first and then sending it all at once, because that'd mean waiting like 10 seconds before you see anything, whereas with this approach, you have something to do while you wait.

jcarchi

There are various models to use for feeds. Theres a push model, which fans out on writes (ie when you post a pic it gets sent to your friend's news feed). this means your feed is already computed before you read. The other popular model is a pull model which fans out on reads (ie when you go to facebook.com, Facebook will gather everything your friends posted). You can read more about feeds here (good read): http://highscalability.com/blog/2013/10/28/design-decisions-for-scaling-your-high-traffic-feeds.html

Pinterest has actually been working with a sort of hybrid approach which is kind of cool http://engineering.pinterest.com/post/96012794429/building-a-smarter-home-feed

grose

I heard Twitter uses the push model, at some expense. Like when a super-popular person like Justin Bieber tweets (especially early on), it's super expensive