Implemented db_manager with thrift interface