This issue tracks the design of metadata spec, including memory structure, on-wire protocol and storage layout. This is the subtask of parent issue #3