change core to c++ and add rpc server defination