implement the basic lock client and lock server.