When we want server to be automatically updated when we need Ex - Mobile app and Website updated when one is added Ex-Notion, Docs
- Use a polling system to send empty HTTP request every few seconds(But not optimal)
- Use Web Sockets
- Use WebRTC(Persistent connection between server)- When connection is created first request is always HTTP
Can use PostWOman(not Hopscotch) to connect to websocket
How to achieve Distributed Systems?
- Add all people of same room on same server (add a discovery engine which tell which server to connect)
- Add a Load Balancer which connects to all servers(add a Pub/Subs to send messages to all other people)