Netty source code analysis NioSocketChannel source code day reading

Opening words I hope you can learn this article with questions. Here I put forward two questions for you. The first Netty is where a new connection is detected. How does the second new connection register with the nioeventloop thread. netty new connection access processing logic: To detect new connection access, poll the accept event thr ...

Posted by monkey72 on Fri, 18 Feb 2022 22:12:27 +0100

Netty series: the Reference count in the JVM is also found in netty

brief introductionWhy are there so many JAVA programmers in the world? One of the important reasons is that compared with C + +, JAVA does not need to consider the release of objects, and everything is completed by the garbage collector. In the modern programming world that advocates simplicity, there are fewer and fewer experts who can speak C ...

Posted by kooper on Mon, 14 Feb 2022 10:44:03 +0100

Design and implementation of general interface open platform -- (37) optimization of heartbeat mechanism of message service

In the first part, we optimized the sending time of heartbeat. The client sends heartbeat after successful handshake. It is adjusted to start heartbeat sending after successful login, so as to ensure that the heartbeat mechanism can truly establish and maintain the effectiveness of the logical business message channel between the client and the ...

Posted by [/Darthus] on Sat, 12 Feb 2022 02:49:48 +0100

Netty parameter tuning

1, CONNECT_TIMEOUT_MILLIS Parameters belonging to socketchannelWhen the client establishes a connection, if the connection cannot be made within the specified milliseconds, a timeout exception will be thrownNote: don't use so in Netty_ Timeout is mainly used for blocking IO, while Netty is non blocking io Examples public class TimeOutTes ...

Posted by PCSpectra on Thu, 10 Feb 2022 17:38:30 +0100

After reading this article, you can enter the big factory for real-time chat. The article makes it clear: chat server + chat client + Web management console.

catalogue   1, Foreword 2, Final effect 1. Chat server 2. Chat client 3. Web administration console 3, Demand analysis 4, Outline design 1. Technology selection 1) Chat server 2) Web administration console 3) Chat client 4)SpringBoot 5) Code construction 2. Database design 3. Communication design 1) Message protocol format 2) ...

Posted by tomhoad on Thu, 10 Feb 2022 02:12:53 +0100

Design and implementation of general interface open platform -- (13) message processor of message server

Earlier, we introduced the configuration of each processor on the message processing chain of the server. This part is actually equivalent to the technical framework. Today, we will introduce the processor that processes specific business messages. ​ The processing framework consists of several main parts: 1. Message topic: we convert events i ...

Posted by nemethpeter on Wed, 02 Feb 2022 13:53:19 +0100

Summary of nio error prone knowledge points and code practice

Summary of error prone knowledge points NIO operates based on channel and buffer. Data is always read from the channel to the buffer or written from the buffer to the channel. The selector is used to listen to the events of multiple channels (such as connection request, data arrival, etc.), so a single thread can listen to multiple client cha ...

Posted by mattdarnold on Mon, 31 Jan 2022 22:04:21 +0100

Netty framework learning - Transmission

summary The data flowing through the network always has the same type: bytes. How these bytes are transmitted mainly depends on what we call network transmission. Users do not care about the details of transmission, only whether bytes are reliably sent and received If you use Java network programming, you will find that sometimes when you n ...

Posted by ExpendableDecoy on Sun, 30 Jan 2022 19:29:31 +0100

Netty learning notes netty source code - start the process

preface The notes are based on black horse's Netty teaching handout and some of my own understanding. I feel that this is a very good video I've seen. There's basically no nonsense. Video address: Black horse Netty . From here on, we try to look at the source code to understand the underlying operating mechanism of Netty. 1. nio star ...

Posted by firemankurt on Fri, 28 Jan 2022 18:52:41 +0100

2, java BIO programming

2.1 I/O model Simple understanding of I/O model; What channel is used to send and receive data, which largely determines the performance of program communication Java supports three network programming models I/O modes: BIO, NIO and AIO Java BIO: synchronous and blocking (traditional blocking type). The server implementation mode is one con ...

Posted by nitediver on Wed, 26 Jan 2022 22:00:11 +0100