如何在 Google App Engine 上建立社交新闻源模型
我们想要实现一个“新闻提要”,用户可以在其中看到消息 由她的朋友广播,以最新消息优先排序。但是 Feed 应反映她的朋友列表中的变化。 (如果她添加新的 朋友们,来自他们的消息应该包含在提要中,如果 她删除了朋友,他们的消息不应包含在内。)如果我们使用 pubsub-test 示例并将收件人列表附加到每封邮件 这意味着当用户 连接和断开朋友。
我们首先使用传统的 RDBMS 建模发布-订阅“扇出” 思维。一开始它似乎有效,但是后来,由于 IN 运算符 就这样工作,我们很快意识到我们无法继续下去 那条路。我们找到了 Brett Slatkin 去年的演讲 Google I/O,我们已经看了几次,但还不清楚 我们如何使用“动态”收件人列表来做到这一点。
我们需要的是一些关于在建模时如何“思考”的提示。
We want to implement a "News feed" where a user can see messages
broadcasted by her friends, sorted with newest message first. But the
feed should reflect changes in her friends list. (If she adds new
friends, messages from those should be included in the feed, and if
she removes friends their messages should not be included.) If we use
the pubsub-test example and attach a recipient list to each message
this means a lot of manipulation of the message recipients lists when users
connect and disconnect friends.
We first modeled publish-subscribe "fan out" using conventional RDBMS
thinking. It seemed to work at first, but then, since the IN operator
works the way it does, we quickly realized we couldn't continue on
that path. We found Brett Slatkin's presentation from last years
Google I/O and we have now watched it a few times but it isn't clear to
us how to do it with "dynamic" recipient lists.
What we need are some hints on how to "think" when modeling this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
粘贴我在 Google App Engine 的 Google 网上论坛中获得的针对此问题的答案 http://groups.google.com/group/google-appengine/browse_thread/thread/09a05c5f41163b4d# 作者:Ikai L (Google)
Pasting the answer I got for this question in the Google Group for Google App Engine http://groups.google.com/group/google-appengine/browse_thread/thread/09a05c5f41163b4d# By Ikai L (Google)