FastSocket learning notes ~ The concept of RPC, object-oriented flexibility, fastsocket learning notes

Source: Internet
Author: User

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!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.