Websockets VS SSE
- by user3385828
Sorry for asking this here, I bet it has been asked plenty of times before but this time it's something specific which I haven't understood anywhere else:
Suppose I have a service which requires to seek the database for different data once and in a while.
For this I have 2 or 3 SSE, each one with a different retry basetime (20000 miliseconds, 1000 miliseconds...).
What I'd like to know is if websockets can handle different "data type" accordingly to the request, for example, could I create one websocket to handle a notification system, a chat system, a group system instead of separated SSEs and treat data differently with javascript? And if so, would it be of higher interest (performance) than actually performing different queries to the server through different SSEs?