B
B
bernex2016-07-01 15:19:14
Node.js
bernex, 2016-07-01 15:19:14

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

3 answer(s)
Y
Yustas Alexu, 2016-07-01
@Yuxus

If there is no particular need for websockets, then http.

T
Timur Shemsedinov, 2016-07-02
@MarcusAurelius

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.

F
fituulu, 2016-07-01
@fituulu

For the admin - overkill.
Websockets are good for offloading when it comes to multiple clients.
There is only one admin.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question