I am planning to create a chat application. I want to get some clarification on this.
which one should I use:
1. Using REST APIs for operations like sending messages, creating groups, and updates (to ensure data consistency), while using WebSocket for broadcasting real-time updates to users.
2. Using WebSocket for both sending data and broadcasting updates, skipping REST entirely
Key considerations:
- Scalability for enterprise-level applications.
- Data consistency and transactional integrity.
- Real-time performance with low latency.
- Ease of debugging and maintaining the codebase.
What’s the industry-standard approach for chat systems like WhatsApp, Slack, or Microsoft Teams?
I got two suggesstion. Which one should I select. And why?