Add multi threading in chat architecture