Joist interview question

Design a system for chat application