FastSocket learning notes ~ The concept of RPC, object-oriented flexibility, fastsocket learning notes
First of all, I would like to thank this Sina dude for developing this FastSocket very well. Let's not talk about its performance first, but simply say that it is awesome in terms of its usage and philosophy, from a macro perspective, it is more like calling RPC in a remote process, that is, the server exposes some commands for the client to call, which is flexible, and its concept is as follows, it abstracts socket programming so that developers do not have to care about the underlying communication mechanism, but only the development of the application layer. For example, to develop a user module, you do not have to worry about how to declare socket links, you don't need to worry about performance. You only need to develop user-related content.
I drew it myself.
Take a look at the examples provided by fastSocket
The configuration on the server is flexible and hard-coded. You can directly configure the file.
<configSections> <section name="socketServer" type="Sodao.FastSocket.Server.Config.SocketServerConfig, FastSocket.Server"/> </configSections> <socketServer> <servers> <server name="binary" port="8401" socketBufferSize="8192" messageBufferSize="8192" maxMessageSize="102400" maxConnections="20000" serviceType="Server.MyService, Server" protocol="asyncBinary"/> </servers> </socketServer>
Supports multiple transfer criteria, or Protocols
AsyncBinaryProtocol: asynchronous binary mode
CommandLineProtocol: Command Line Mode
ThriftProtocol: thrift Mode
Well, this section focuses on some concepts, including FastSocket design ideas. Thank you for reading this article!