Hello interested question. For example, as in VK or gmail or the same icq. Just in the console, requests to the server (VC), leave at intervals of about 15 seconds, but the message, as expected, comes immediately after sending them to the interlocutor. When the message arrives, the page accesses the server even in the middle of the 15-second interval. With the help of what can be implemented like this or on what principle does the update of incoming messages work or how is it called? Thank you in advance.

PS You can of course with a second interval knock on the server, but it seems to me that it is like a collective farm or something.

Closed due to the fact that the issue is too general for participants aleksandr barakin , user194374, D-side , Streletz , enzo Jul 3 '16 at 3:57 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

1 answer 1

This new technology has been used for the last few years. Called Websocket.

At first there were only binary clients tcp / ip, udp and normal http. But the usual http was not enough to complete the work. The http principle to transfer all information and close the connection is very inconvenient.

And Adobe was the first to release Flash Player, a technology that allows embedding binary code in essence and using the same tcp in the html page.

Then http evolved with js, and now they’ve gotten to the point that Adobe was pressed (all large companies said we’re not going to let Adobe into the market), an allegedly outdated technology. IMHO, I personally do not agree with this, why we are dictated what to use = force. I am for free competition.

And now there is a mutated html5 + js, which allows you to embed the so-called web sockets inside the html. This is a thing that constantly keeps connection with the server. Like the same binary client.

In general, roughly speaking, they wanted to get away from binary clients, but they came to them. Only in web version. :)

PS By the way, despite the fact that Flash can simply be said to be crushed. She still lives. And I would not be surprised if he lives on, Flash has a lot of idols at Flash.

  • one
    " Adobe was pressed (all large companies said we would not allow Adobe to enter the market), an allegedly outdated technology. " - as I read now - etki
  • @Etki Russian myth-making in all its glory - strangeqargo
  • Then what was your opinion? :) What does flash on IOs not work on android? :) Accident? Forgot to add? - akula