Web Services vs Persistent Sockets

I plan to conduct a little benchmarking around this issue. But I thought it would be nice to get some initial feedback from the "community". Have any of them made any analysis regarding the pros and cons of these two technologies? My thoughts:

  • Opening and closing TCP / IP connections for web service calls is relatively expensive compared to persistent connections.
  • Work with intermittent connection errors and status, etc. it will be easier with a web services-based map.
  • You do not see World of Warcraft using web services.

One question that, it seems to me, cannot find a lot of answers anywhere (even here) ... are there restrictions on the number of permanent connections that one network card can support, etc.

+3
source share
2 answers

This is a very general question, and there are several questions that you are clearly raising, and many other problems that you may or may not know.

One problem is HTTP and other protocols (or messaging, to be exact). HTTP request-response , and many communication patterns do not match the request response paradigm. A persistent connection allows you to use message-oriented protocols that are more flexible, such as typical full duplex chat conversations.

WOW, UDP, TCP. TCP , . . , WOW, : .

, :

  • ( HTTP)
  • , HTTP-
  • NAT

, , , : TCP. . , Windows Server 1000 TCP - TCP-. . , 64K , . , , , , , , .

.

+2

. , , , -, , . , , - . , :

  • / TCP-: , . - HTTP ( TCP/IP), :
    • , HTTP- "keep-alive".
    • -, TCP. TCP/IP -.
  • : HTTP, , .
  • WoW WS: , , WoW , HTTP- , -.

. , , -, .

, . -Raj

+1

Source: https://habr.com/ru/post/1740799/


All Articles