
1 darasion Sep 9, 2011 参考下v2ex的设计思路你就知道了,其实忒简单. |
2 ong Sep 9, 2011 用户数大的情况,Task Queue+Memcache |
3 Livid MOD PRO 1. 为需要用户知道的事件生成新的 notification。 2. 每条 notification 带有时间戳。 3. 记录下用户每次访问 notifications 页面的时间戳。 4. 当新的 notification 创建好后,启动一个后台任务检查这些新的 notification 所带的时间戳是否大于用户上次访问 notifications 页面的时间戳,大于的条目的数量即是新的未读条目数量。 GAE 有 task queue 可以用于启动后台任务。在没有此架构的环境中,可以通过 Celery 或是 CRON 来模拟实现。 |
4 bhuztez Sep 9, 2011 实时的话,直接通过 XMPP 推送 ... |
6 mechille OP @不存在 是否成立 |
11 linchanx Sep 9, 2011 考虑到 账号有特殊字符的 像 . - 什么的 估计就要去user表 检索一下 不存在的就无视 |
13 mechille OP |
15 mechille OP 忽然想到。如果是email怎么办,比如 [email protected] |
16 mechille OP 半角.判断的么。 abc@qq com |
21 chloerei Sep 10, 2011 @mechille https://github.com/chloerei/campo/blob/master/app/models/reply.rb#L37 我一个项目里的实现,把LZ考虑的都做了处理 |