Implement some RPC functions in slave.