<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>《SNS中好友动态功能的设计思路》的评论</title>
	<atom:link href="http://i.laoer.com/sns-news-feed-design.html/feed" rel="self" type="application/rss+xml" />
	<link>http://i.laoer.com/sns-news-feed-design.html</link>
	<description>技术、生活、感悟 -- Laoer的博客</description>
	<lastBuildDate>Wed, 01 Feb 2012 00:41:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>作者：yiqing95</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-545</link>
		<dc:creator>yiqing95</dc:creator>
		<pubDate>Fri, 02 Dec 2011 16:13:05 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-545</guid>
		<description>不错 我也在考虑这个问题  至于分表 和异步写入 是在后期考虑的 前期用户量不大的话 可以先不用考虑 其实用nosql的话分表就不用考虑了
这里我设计的表要比你这个多几张，所有的实体表 都继承自共有的模型 每个模型实现CRUD方法 每个CUD都会产生用户动作日志  user_op_log(id,uid,entity_class,entity_id,op_type,old_value,new_value,op_time);  比如上传图片 在模型层是操作的Picture这个模型 那么对于insert 和update delete 这样的动作都会触发op_event事件 由于我是在基类中捕获这样的事件 所以只做很少的动作 就可以形成用户的操作日志  这样用周期性任务定时处理操作日志，然后就是设计action_feed动作反馈表 因为用户跟好友分组属于一对多 广播性质的 反馈内容不能够重复不然太费空间了 只在id上重复即可 这里还牵扯 发布者/订阅者模式的实现 比如我要监听谁的动作  我的动作可以形成反馈给谁 都需要考虑 ，每个动作类型（action_type,entity_class的组合）对应一种通知模板   总共下来估计光表至少五六张 比较复杂的一个子系统啊 总的来说你的考虑也还算周全些 欢迎交流</description>
		<content:encoded><![CDATA[<p>不错 我也在考虑这个问题  至于分表 和异步写入 是在后期考虑的 前期用户量不大的话 可以先不用考虑 其实用nosql的话分表就不用考虑了<br />
这里我设计的表要比你这个多几张，所有的实体表 都继承自共有的模型 每个模型实现CRUD方法 每个CUD都会产生用户动作日志  user_op_log(id,uid,entity_class,entity_id,op_type,old_value,new_value,op_time);  比如上传图片 在模型层是操作的Picture这个模型 那么对于insert 和update delete 这样的动作都会触发op_event事件 由于我是在基类中捕获这样的事件 所以只做很少的动作 就可以形成用户的操作日志  这样用周期性任务定时处理操作日志，然后就是设计action_feed动作反馈表 因为用户跟好友分组属于一对多 广播性质的 反馈内容不能够重复不然太费空间了 只在id上重复即可 这里还牵扯 发布者/订阅者模式的实现 比如我要监听谁的动作  我的动作可以形成反馈给谁 都需要考虑 ，每个动作类型（action_type,entity_class的组合）对应一种通知模板   总共下来估计光表至少五六张 比较复杂的一个子系统啊 总的来说你的考虑也还算周全些 欢迎交流</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：luo</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-530</link>
		<dc:creator>luo</dc:creator>
		<pubDate>Sat, 24 Sep 2011 12:18:11 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-530</guid>
		<description>很喜欢你的文章
能否在你的网站上做一个新浪微博的 分享按钮 
方便我分享给我朋友</description>
		<content:encoded><![CDATA[<p>很喜欢你的文章<br />
能否在你的网站上做一个新浪微博的 分享按钮<br />
方便我分享给我朋友</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：盒子</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-476</link>
		<dc:creator>盒子</dc:creator>
		<pubDate>Wed, 15 Jun 2011 16:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-476</guid>
		<description>关注研究中。</description>
		<content:encoded><![CDATA[<p>关注研究中。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：DOOP</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-374</link>
		<dc:creator>DOOP</dc:creator>
		<pubDate>Wed, 08 Dec 2010 16:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-374</guid>
		<description>为什么要在向Events表里插入数据的同时向EventUser表里写入好友对应数据了，可以在好支做出删除动作时再向EventUser里写入数据来记录哪个用户删了好友的动态。</description>
		<content:encoded><![CDATA[<p>为什么要在向Events表里插入数据的同时向EventUser表里写入好友对应数据了，可以在好支做出删除动作时再向EventUser里写入数据来记录哪个用户删了好友的动态。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：quady</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-371</link>
		<dc:creator>quady</dc:creator>
		<pubDate>Wed, 10 Nov 2010 14:22:46 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-371</guid>
		<description>第二种方法感觉也有问题啊。
譬如A加了B做好友，那会写入一条数据到EventUser吧，B就可以看到A的动态，但是A是看不到B的动态的</description>
		<content:encoded><![CDATA[<p>第二种方法感觉也有问题啊。<br />
譬如A加了B做好友，那会写入一条数据到EventUser吧，B就可以看到A的动态，但是A是看不到B的动态的</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：msgtype</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-67</link>
		<dc:creator>msgtype</dc:creator>
		<pubDate>Fri, 05 Mar 2010 19:12:38 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-67</guid>
		<description>[...]  [...]</description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Suave&#8217;s Blog &#187; Blog Archive &#187; how to build activity-streaming</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-41</link>
		<dc:creator>Suave&#8217;s Blog &#187; Blog Archive &#187; how to build activity-streaming</dc:creator>
		<pubDate>Fri, 07 Aug 2009 06:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-41</guid>
		<description>[...] http://i.laoer.com/sns-news-feed-design.html http://www.javaeye.com/topic/176677  http://stackoverflow.com/questions/202198/whats-the-best-manner-of-implementing-a-social-activity-stream http://stackoverflow.com/questions/624616/best-database-structure-for-storing-rss-feeds   ruby on rails plugin: http://github.com/face/activity_streams/tree/master [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://i.laoer.com/sns-news-feed-design.html" rel="nofollow">http://i.laoer.com/sns-news-feed-design.html</a> <a href="http://www.javaeye.com/topic/176677" rel="nofollow">http://www.javaeye.com/topic/176677</a>  <a href="http://stackoverflow.com/questions/202198/whats-the-best-manner-of-implementing-a-social-activity-stream" rel="nofollow">http://stackoverflow.com/questions/202198/whats-the-best-manner-of-implementing-a-social-activity-stream</a> <a href="http://stackoverflow.com/questions/624616/best-database-structure-for-storing-rss-feeds" rel="nofollow">http://stackoverflow.com/questions/624616/best-database-structure-for-storing-rss-feeds</a>   ruby on rails plugin: <a href="http://github.com/face/activity_streams/tree/master" rel="nofollow">http://github.com/face/activity_streams/tree/master</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：chuck911</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-40</link>
		<dc:creator>chuck911</dc:creator>
		<pubDate>Wed, 05 Aug 2009 03:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-40</guid>
		<description>哈哈~博主你看看这片帖子：
主题：请做架构的朋友一起讨论下SNS中好友动态功能建模的设计
http://www.javaeye.com/topic/176677
最后大家认同的方案是最简单原始的log表</description>
		<content:encoded><![CDATA[<p>哈哈~博主你看看这片帖子：<br />
主题：请做架构的朋友一起讨论下SNS中好友动态功能建模的设计<br />
<a href="http://www.javaeye.com/topic/176677" rel="nofollow">http://www.javaeye.com/topic/176677</a><br />
最后大家认同的方案是最简单原始的log表</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：王涛</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-36</link>
		<dc:creator>王涛</dc:creator>
		<pubDate>Sat, 01 Aug 2009 08:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-36</guid>
		<description>说的很好。 我正在做一个这样的动态系统。 思路和你的好擦不多，当然没你想的这么深入。不过我想应该还有很多地方可以做优化。</description>
		<content:encoded><![CDATA[<p>说的很好。 我正在做一个这样的动态系统。 思路和你的好擦不多，当然没你想的这么深入。不过我想应该还有很多地方可以做优化。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：elin</title>
		<link>http://i.laoer.com/sns-news-feed-design.html/comment-page-1#comment-25</link>
		<dc:creator>elin</dc:creator>
		<pubDate>Mon, 18 May 2009 06:34:05 +0000</pubDate>
		<guid isPermaLink="false">http://i.laoer.com/?p=171#comment-25</guid>
		<description>我表的设计(部分) 
TrendType(反射到相应的类)
objectId(主体，可以是用户，可以是其他任何)
EventId 事件（某个object &#039;s Title）
EventBody( what...)
....    当然这个数据不管怎么样都会很大（前提这是个好网站，呵呵）首先一定要做表分区，之后做数据模版缓存，最后在呈现动态的时候保存当前动态（时间范围）（前提是有用户服务器，若干）</description>
		<content:encoded><![CDATA[<p>我表的设计(部分)<br />
TrendType(反射到相应的类)<br />
objectId(主体，可以是用户，可以是其他任何)<br />
EventId 事件（某个object &#8216;s Title）<br />
EventBody( what&#8230;)<br />
&#8230;.    当然这个数据不管怎么样都会很大（前提这是个好网站，呵呵）首先一定要做表分区，之后做数据模版缓存，最后在呈现动态的时候保存当前动态（时间范围）（前提是有用户服务器，若干）</p>
]]></content:encoded>
	</item>
</channel>
</rss>

