Netty communication technology

1, Introduction 1, Overview Netty is an open source framework provided by JBOSS. In essence, it is a network application framework. It provides a non blocking and event driven network application framework and tools to facilitate the rapid development of high-performance and reliable network server and client. 2, Core architecture         ...

Added by RobertSubnet on Thu, 06 Jan 2022 12:02:11 +0200

Netty sticky unpacking

1. What is sticky unpacking? Packet gluing and unpacking generally occur at the TCP protocol layer. TCP, as the transport layer, generally does not know the specific meaning of the data in the upper layer (here refers to our code service layer). It will divide the data packets according to the actual situation of the TCP buffer. Therefo ...

Added by adamjnz on Wed, 05 Jan 2022 23:25:35 +0200

ByteBuf reference count of Netty source code analysis

Reference counting is a common memory management mechanism. It refers to the process of saving the number of references of resources and releasing them when the number of references becomes zero. Netty at 4 Version x began to use the reference counting mechanism to manage some objects. Its implementation idea is not particularly complex. It mai ...

Added by juancarlosc on Tue, 04 Jan 2022 14:49:35 +0200

Netty knowledge summary

Netty knowledge summary This article is mainly a summary of some knowledge points about Netty In Action history Blocking io A thread is used to process a connection. Connection creation and operation are blocked usage method try { // Listen to local port 8000 ServerSocket serverSocket = new ServerSocket(8000); // Blocking waitin ...

Added by ADLE on Mon, 03 Jan 2022 23:53:01 +0200

NioEventLoopGroup initialization of netty server

1. Inheritance system diagram of nioeventloopgroup You can see that the EventExecutorGroup inherits from ScheduleExecutorService and Iterable This means that there are thread pools and iterators. What does NioEventLoopGroup do to the thread pool and what are iterators iterating? Look down~ 2. Function description of eventexecutorgroup c ...

Added by amos_ on Mon, 03 Jan 2022 10:42:01 +0200

Implementation of instant messaging between server and client based on Netty's WebSocket protocol and its problems

1, Introduction Technology stack: Java: 1.8 SpringBoot: 2.2.2.RELEASE Netty: 4.1.32.Final For basic understanding, refer to the following article: https://blog.csdn.net/DreamsArchitects/article/details/120177336 Current time: 17:02:38, December 31, 2021 As the last year of 2021, blog. 2, Question 2.1 start server mode Previously, the ...

Added by jodie on Sun, 02 Jan 2022 13:47:06 +0200

BIO and NIO summary

BIO and NIO Note: the io models discussed in this paper are based on the network communication socket BIO -- blocking IO model In network communication, the client establishes a connection with the server first. Because the server does not know when the client will send data, the server has to start a thread to receive messages from the clie ...

Added by kumaran on Thu, 23 Dec 2021 11:51:58 +0200

netty series: problems needing attention in customizing codecs and decoders

brief introduction In the previous series of articles, we mentioned that the channel in netty only accepts ByteBuf objects. If it is not a ByteBuf object, it needs to be converted with a coder and decoder. Today, let's talk about the problems that need to be paid attention to in the implementation of netty's custom coder and decoder. Impl ...

Added by Lauram340 on Wed, 22 Dec 2021 03:22:15 +0200

< 2021SC@SDUSC > Netty group of Shandong University - Google Protobuf

2021SC@SDUSC Google Protobuf 1 basic introduction of encoding and decoding When writing a network application, because the data transmitted in the network is binary bytecode data, it needs to be encoded when sending data and decoded when receiving data [schematic diagram] There are two components of codec: decoder and encoder. The encoder ...

Added by delassus on Tue, 21 Dec 2021 10:03:08 +0200

netty series: built in Frame detection

brief introduction In the last article, we talked about how to customize the codec and decoder in netty, but the customization implementation is still very complex. Generally, when there is no special need, we all hope that the simpler the better. The difficulty is to find the segmentation points in ByteBuf and divide ByteBuf into manageab ...

Added by ashok_bam on Mon, 20 Dec 2021 10:09:02 +0200