In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what is the basic concept of SocketD protocol". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the basic concept of SocketD protocol".
1. Brief introduction
SocketD is a binary point-to-point communication protocol and a new network communication layer 7 protocol. Designed to be used in distributed applications. In this sense, SocketD can be an alternative to other similar protocols such as RSocket. Its message protocol specification has the characteristics of asynchronism, two-way back pressure, multiplexing, disconnection reconnection, message-based and so on. Only Java implementation is provided for the time being, and it is currently used as the sockte channel protocol for Solon rpc.
two。 Background
At this point, there are some questions, why do you want to make this agreement? Are programmers so full that they can get something new to mess with themselves? RSocket is mentioned above. If you are not familiar with this specification, you can make up the class. But it is still complicated to use, especially the interface style similar to RxJava, which is more convenient to do responsive calculation. On the other hand, SockteD is more suitable for traditional usage habits and more dedicated to service-oriented requests.
3. Characteristics
The features are very similar to RSocket, so here's a brief summary:
Binary Communication Protocol with language Independence
Asynchronous non-blocking message-driven communication, high performance
The back pressure processing of network communication is realized, on the basis of which flow control and connection recovery are carried out.
Naturally supports two-way communication. For example: single-linked two-way RPC call
More suitable for distributed communication scenarios
4. Three interaction models of SocketD
SocketD defines three interaction models to adapt to different application scenarios:
Send (msg): send only but not respond. It is useful when no response is required, such as non-critical event logging.
SendAndResponse (msg): send and wait for a response. A request / response model similar to Http. It is asynchronous and multiplexed.
SendAndCallback (msg, (msg2)-> {}): send and call back when there is a response. Similar to Ajax asynchronous callback.
5. SocketD two protocol models
Container messages, used to implement non-business processing such as message encryption or compression. Content message, which is used to carry business content.
Thank you for your reading, the above is the content of "what is the basic concept of SocketD protocol". After the study of this article, I believe you have a deeper understanding of what the basic concept of SocketD protocol is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.