Answer the question
In order to leave comments, you need to log in
Does WebSockets make sense?
Does it make sense for Websockets admin?
I thought to try to get data, and divide into several calls.
Request dependent data and not pull one - so that the interface is "drawn" by data, and does not wait all at once.
I got the main data, loaded the statistics, dependent data, if necessary.
But the cons, as I understand it:
Websocket - one connection, while data is being transferred, everything "gets up", and http sets can go in parallel.
Http - easier debug and no need to monitor the connection.
What do you think?
Answer the question
In order to leave comments, you need to log in
If the admin panel is web, then of course websockets. One websocket can send as many requests as you like to the server in parallel, but for http, only 6 requests in parallel. In addition, http opens new connections for new concurrent requests, and web sockets allow you to do everything through one, in an asynchronous style. Also, using web sockets, the server can always push out a data packet without any request from the client (for example, with an event in the form of a serialized object). Communication is two-way, connection-oriented, non-blocking. In general, if there is no reason not to use websockets, then they should be used. The only real reason not to use them is if the client is not a web client, then just TCP sockets can be used.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question