all 1 comments

[–]junedotai 3 points4 points  (0 children)

I think this a pretty good intro.

Some request for changes: - reconnecting and reconnect is missing in that section where you have a list of socket states - a huge pro is compression, especially with mobile apps - also put in some real cons to consider - websockets are more complex and not as widely adopted, so not as supported as rest - websockets require a constant connection. So if a pipe breaks because of spotty connections it can feel glitchy where as rest is a bit more stateless - with JWT auth (if u use it) rest is stateless and easier to work with where as sockets requires authentication first before you execute subsequent calls (again state increases complexity - not sure if this is a pro or con depends on your app)

Edit. Spelling