As you say, websockets and unreliable and hard to scale, very much... but they are very useful and helps to make tools that enhance the UX.
Answering to @DavidMM, i must say that websockets and an api rest are not compatibles in the same scenario, api rest are meant to be an question & answer architecture. If you want to have websockets, you need to have a server with a software that allows them, Node is an example.
Anyway, you can have an api rest working on some machine, and a server side that gives you the websocket feature for your needs, they can be on different machines, same machine and different software or the same software. For example, i have made an api rest in node+express that at the same times allows websockets that sends and receives messages.
I tend to avoid websockets all together.
Why?
They're unreliable & hard to scale, the connection might drop, and you might find yourself doing polling for the sake of reliability...
Before going websockets, I would say please read this:
blogs.windows.com/windowsdeveloper...
As you say, websockets and unreliable and hard to scale, very much... but they are very useful and helps to make tools that enhance the UX.
Answering to @DavidMM, i must say that websockets and an api rest are not compatibles in the same scenario, api rest are meant to be an question & answer architecture. If you want to have websockets, you need to have a server with a software that allows them, Node is an example.
Anyway, you can have an api rest working on some machine, and a server side that gives you the websocket feature for your needs, they can be on different machines, same machine and different software or the same software. For example, i have made an api rest in node+express that at the same times allows websockets that sends and receives messages.
Maybe he cannot study it... :)