Added a redis pub-sub based locking/unlocking mechanism for handling write request in server.