Want to ask next everybody, the two ways are desirable? What are the advantages of each?
CodePudding user response:
Is not the same as the data transmission way,CodePudding user response:
Used Socket communication is generally long connection, and HTTP biggest difference is that the server can take the initiative to send data to the customer, also can do that, now HTTP2.0 seeminglyB/S should be aware that if you do have a WebSocket this thing,
CodePudding user response:
Rest way is cross-platform and stateless, socket, long connection can active issued by the serverCodePudding user response:
C/S mode of connection, have a good variety of, do you like or familiar with that,CodePudding user response:
The socket is mainly the service side can also send messages to the clientCodePudding user response:
Pre-sale, HTTPD rest ways to deploy trival, Java support version, OS version consume more time and manpower cost more, the longer, the more error probability; Socket, simple and practical and reliable, the production and maintenance costs low, usually green run,CodePudding user response:
It depends on the service side support communication protocol, and is not a good question which agreement, unless you write service server-assistedCodePudding user response:
This thing on the server side has been identified, the client also want to so much? According to the protocol and interface to do is a step in the right,CodePudding user response:
Using REDIAS memory server as intermediary also is pretty good, helping to learn REDIASCodePudding user response:
Be REDIS