I am working on an idea which involves chat backend. I don't have much knowledge about scalable systems. If I need to have a scalable chat backend, should I go ahead with ejabberd or should I write some custom software. And What are the design decisions that I should consider if I am writing custom software. Or is there any other better alternative?