title: HBASE schema design for instant message
body: <p>We have been implementing an instant message service and want to use HBEASE to store message history (and using redis to caching ongoing conversation). The incoming message for a user looks like</p>
  
  <ol>
  <li>Userid (to whom)</li>
  <li>time</li>
  <li>message body (combined with from, message body ....)</li>
  </ol>
  
  <p>Regarding Schema design:
  Option A: one message per row
      Row key:  md5(userid) + timesample 
      column/valye:  null / message   </p>
  
  <p>Option B: one user per row
      Row key: md5(userid)
      column/valye:  time / message</p>
  
  <p>could you help me to figure out pro and cont? thanks
  chatting type include: peer-2-peer, group chating</p>