Design Facebook News Feed

本文主要设计Facebook新闻推送的核心功能,包括加载用户新闻推送、实时更新和发布状态更新。设计目标是构建数据管道,处理如何及何时构建和更新新闻推送。忽略帖子的复杂性,如图片和视频等,假设帖子为不透明实体。设计不涉及相关帖子的筛选系统或广告展示,但要处理全球用户的高并发需求,并确保状态更新能在一分钟内出现在好友的新闻推送中。
摘要由CSDN通过智能技术生成

Design Facebook News Feed
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Many systems design questions are intentionally left very vague and are literally given in the form of Design Foobar. It’s your job to ask clarifying questions to better understand the system that you have to build.

We’ve laid out some of these questions below; their answers should give you some guidance on the problem. Before looking at them, we encourage you to take few minutes to think about what questions you’d ask in a real interview.

Clarifying Questions To Ask
Question 1
Q: Facebook News Feed consists of multiple major features, like loading a user’s news feed, interacting with it (i.e., posting status updates, liking posts, etc.), and updating it in real time (i.e., adding new status updates that are being posted to the top of the feed, in real time). What part of Facebook News Feed are we designing exactly?

A: We’re designing the core functionality of the feed itself, which we’ll define as follows: loading a user’s news feed and updating it in real time, as well as posting status updates. But for posting status updates, we don’t need to worry about the actual API or the type of information that a user can post; we just want to design what happens once an API call to post a status update has been made. Ultimately, we primarily want to design the feed generation/refreshing piece of the data pipeline (i.e, how/when does it get constructed, and how/when does it get updated with new posts).

Question 2
Q: To clarify, posts on Facebook can be pretty complicated, with pictures, videos, special types of status updates, etc… Are you saying that we’re not concerned with this aspect of the system? For example, should we not focus on how we’ll be storing this type of information?

A: That’s correct. For the purpose of this question, we can treat posts as opaque entities that we’ll certainly want to store, but without worrying about the details of the storage, the ramifications of storing and serving large files like videos, etc…

Question 3
Q: Are we designing the relevant-post curation system (i.e., the system that decides what posts will show up on a user’s news feed)?

A: No. We’re not designing this system or any ranking algorithms; you can assume that you have access to a ranking algorithm that you can simply feed a list of relevant posts to in order to generate an actual news feed to display.

Quest

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值