由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - facebook chat 更新好友在线状态 - 求解惑
相关主题
谁能end to end解释下user authentication怎么做python的list和array是一个东西?
8月底毕业,什么时候之前必须找到工作?物理phd好迷茫啊
Bloomberg Java的online test千老转行搞计算机需要恶补哪些CS的知识?
Bloomberg的JAVA online test太BT了。。。谷歌大脑之父吴恩达(Andrew Ng)加盟百度 (转载)
问个编程,系统,网络有关的综合问题。baidu IDL US怎么样?
One onsite inverview question是我土了么 百度美国开始招人了
Amazon二面杯具,share一下面试题DS 两道OA面试题目
有同仁搞GIS的找到job的吗DS 两道OA面试题目
相关话题的讨论汇总
话题: facebook话题: users话题: idleness话题: chat话题: idle
进入JobHunting版参与讨论
1 (共1页)
n******4
发帖数: 12
1
以下摘自http://www.facebook.com/note.php?note_id=14218138919&id=9445547199&index=0

"The naive implementation of sending a notification to all friends whenever
a user comes online or goes offline has a worst case cost of O(average
friendlist size * peak users * churn rate) messages/second, where churn rate
is the frequency with which users come online and go offline, in events/
second. This is wildly inefficient to the point of being untenable, given
that the average number of friends per user is measured in the hundreds, and
the number of concurrent users during peak site usage is on the order of
several millions.
Surfacing connected users' idleness greatly enhances the chat user
experience but further compounds the problem of keeping presence information
up-to-date. Each Facebook Chat user now needs to be notified whenever one
of his/her friends
(a) takes an action such as sending a chat message or loads a Facebook page
(if tracking idleness via a last-active timestamp) or
(b) transitions between idleness states (if representing idleness as a state
machine with states like "idle-for-1-minute", "idle-for-2-minutes", "idle-
for-5-minutes", "idle-for-10-minutes", etc.).
Note that approach (a) changes the sending a chat message / loading a
Facebook page from a one-to-one communication into a multicast to all online
friends, while approach (b) ensures that users who are neither chatting nor
browsing Facebook are nonetheless generating server load."
没怎么看懂这部分,不知道大牛可不可以给解释解释?
作者说第一段中的方法不好,在第二段中提出了改进。不太明白为什么需要做这些。
1. 为什么方法(a)比第一段中的方法要有效呢? 难道这种方法的worst cost不是O(
average friendlist size * peak users * rate)吗?
2. 为什么需要方法(b)?
1 (共1页)
进入JobHunting版参与讨论
相关主题
DS 两道OA面试题目问个编程,系统,网络有关的综合问题。
Baidu US AI team onsite 面经One onsite inverview question
李彦宏:百度牵头组建深度学习国家队 向女排学习zt (转载)Amazon二面杯具,share一下面试题
还原百度人工智能派系之争:吴恩达出局,马东敏陆奇定胜负zt (转载)有同仁搞GIS的找到job的吗
谁能end to end解释下user authentication怎么做python的list和array是一个东西?
8月底毕业,什么时候之前必须找到工作?物理phd好迷茫啊
Bloomberg Java的online test千老转行搞计算机需要恶补哪些CS的知识?
Bloomberg的JAVA online test太BT了。。。谷歌大脑之父吴恩达(Andrew Ng)加盟百度 (转载)
相关话题的讨论汇总
话题: facebook话题: users话题: idleness话题: chat话题: idle