have implemented an event handler pattern to do messaging between components of server and between client and server as well.