Joist Interview Question

Design a system for chat application