Metadata is packed generically with a simple interface for switching between datastores.