add protobuf and mongo logic

Change-Id: I83c5f3a01ff79c9f7a320060c2e016ebf920394b