Firebase

Developer: Google
Hosting by Google, free up to 100 real-time connections
No custom code
Easy and quick set-up
Recommended for time applications
In-built database
JSON storage data
Backup data upload option to Amazon S3 bucket or Google cloud storage
Pay as you go Method
XMPP

Developer: Jabber open-source community
Cloud-based server, unlimited
Full customization available
Difficult set-up
Recommended for real-time applications
Open-source database
XML storage data
Backup data upload option to Amazon S3 bucket or Google cloud storage
One-time payment
Compare firebase, I would suggest XMPP. You can modify an application as you want.
Mirrorfly solution has an inbuilt XMPP chat API framework to integrate or customize at any level to your business.