简体   繁体   English

用于即时消息的HBASE模式设计

[英]HBASE schema design for instant message

We have been implementing an instant message service and want to use HBEASE to store message history (and using redis to caching ongoing conversation). 我们一直在实现即时消息服务,并希望使用HBEASE来存储消息历史记录(并使用Redis来缓存正在进行的对话)。 The incoming message for a user looks like 用户收到的消息看起来像

  1. Userid (to whom) 用户ID(向谁)
  2. time 时间
  3. message body (combined with from, message body ....) 邮件正文(与from邮件正文组合。)

Regarding Schema design: Option A: one message per row Row key: md5(userid) + timesample column/valye: null / message 关于模式设计:选项A:每行一条消息行键:md5(userid)+ timesample列/值:空/消息

Option B: one user per row Row key: md5(userid) column/valye: time / message 选项B:每行一个用户行键:md5(userid)列/谷值:时间/消息

could you help me to figure out pro and cont? 你能帮我弄清楚赞成与反对吗? thanks chatting type include: peer-2-peer, group chating 感谢聊天类型包括:对等2对等,群聊

As far as I know Facebook has done a great job on message system use hbase; 据我所知,Facebook在消息系统使用hbase方面做得很好。 Maybe these links will help you: http://www.slideshare.net/brizzzdotcom/facebook-messages-hbase 也许这些链接可以为您提供帮助: http : //www.slideshare.net/brizzzdotcom/facebook-messages-hbase

http://sites.computer.org/debull/A12june/facebook.pdf http://sites.computer.org/debull/A12june/facebook.pdf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM