Search code examples
websocketsocket.iocommunicationduplexbidirectional

Socket.io is symmetrical or asymmetric transmission


I am writing a technical project report which uses Socket.IO (which uses WebSockets) for the Event-Driven-Architecture (EDA) based full-duplex communication. I know that full-duplex means that data travels in both sides. It is useful in situations when either sides want to start communication; or server wants to respond quickly.

But I do't know that if the either directions supports same rate of data transfer or not.

Symmetric bandwidth corresponds to the situation when the maximum rate of transfer is the same in both directions. Whereas, Asymmetric bandwidth corresponds to the situation when the maximum rate of transfer is different in each direction. A typical case might be a DSL line with 768 kbps upload and 1.5 Mbps download.

Kindly elaborate Symmetric/Asymmetric transmission concept in context to the Socket.IO framework.


Solution

  • There is no fundamental difference in the transports from client to server or server to client with socket.io. So, the answer to your question really has nothing to do with socket.io at all. socket.io doesn't care which end is the client and which end is the server. It's just a TCP connection that can send data either way equally well.

    The actual bandwidth that the connection is capable of is entirely dependent upon the physical network connection between client and server. For example if this is a connection between a home computer and a server on the internet, then the path from server to client is very likely to be a much faster path than vice versa because most consumer internet connections are asymmetrical (faster download to the client than upload to the server). But, this is entirely a property of the internet connection and the ISP the client and server are using. It has absolutely nothing to do with socket.io.