Dyn message Protocol:

I. Specification:

1. Structure format
  <MagicNumber> <Space>
  <MessageId>   <Space>
  <TypeId>      <Space>
  <BitField>    <Space>
  <Version>     <Space>
  <Same-dc>   <Space>
  *<Number of data bytes> <Space>
  <Data>        <space>
  *<Number of payload bytes> <CR LF>
  <Memcache or Redis payload>

2. Field descriptions
  a. MagicNumber: it is always 2014
  b. MessageId: sequence id of a message
  c. TypeId: please see the code for the list.  
  d. BitField: indicate whether compression and/or encryption. Right most bit indicates encryption.
     The 2nd bit from the right indicates a compressed message.
  e. Version: version of the msg.  This usually depends on the version of the dynomite.
     This is needed during upgrading a live cluster with mixed versions.
  f. Same-dc: bit to indicate whether the communication is inter-dcs.
              We should later to exchange node's metadata like rack, dc, and ip.

3. Example:
   This is a dynomite message that carries a Redis' "get foo" request:
   
     "2014 1344 5 1 1 0\r\n*4 minh\r\n*2\r\n$3\r\nget\r\n$3\r\nfoo\r\n"
    
     where "*2\r\n$3\r\nget\r\n$3\r\nfoo\r\n" is Redis' payload for "get foo" cmd.
     
     
II. Bit field for encryption/decryption
    

III. Compression
    We currently don't support compression but it should be similar to the way how 
    encryption/decryption works.  We will support/implement this feature in the near future
    if there is a demand for it.

IV. Payload size
    Will fill in soon     
     
