preface

Netty is a NIO framework for rapidly developing network applications, which greatly simplifies network programming for TCP or UDP servers. Netty’s easy and fast development does not mean that programs developed by Netty will lose maintainability or have performance problems. Its design refers to the implementation of many protocols, such as FTP, SMTP, HTTP and a variety of binary and text-based traditional protocols. Therefore, Netty successfully achieves both rapid development, performance and stability. Flexibility is an integral part of the equation, and you don’t have to compromise for one reason or another. Netty is widely used. For example, Alibaba’s open source Dubbo and Sofa-Bolt framework are all based on Netty for network communication.

How to learn the high-performance NetTY framework and some important knowledge points through the learning and interview questions about Netty mentioned in this article!

Netty basic questions

What are the characteristics of Netty?

What is the difference between BIO, NIO and AIO?

What is NIO made up of?

How to use Java NIO to build a simple client and server to achieve network communication?

How to use Netty to build a simple client and server to achieve network communication?

How do Netty operations correspond to Java NIO operations?

What is the relationship between Channel and Socket, Channel and EventLoop, Channel and Channel pipeline?

What is the relationship between EventLoop and EventLoopGroup?

What are the important objects in Netty and their relationships?

What is Netty’s threading model?

Sticky packets have problems with half packets and separators

What is sticky packet and half packet problem?

Why do sticky packets and half packets appear?

Ag: yunduoa2019

How to avoid sticky package and half package problem?

How to use FixedLengthFrameDecoder to solve sticky and half-pack problems? How does it work?

How to use the bag separators DelimiterBasedFrameDecoder solve the problem of glue bag with half a pack? How does it work?

How does Dubbo avoid sticky packets and half packets when using Netty for network communication?

Does Netty framework itself have sticky half packet problem?

When do we need to consider the problem of sticky and half packages?

WebSocket protocol development related issues

How to implement WebSocket long connection?

What is the structure of WebSocket frames?

WebSocket support by browser and server

How to use WebSocket to receive and send wide text messages?

How do I use WebSocket to receive and send binary information?

Netty source code analysis related issues

How to initialize the server?

When are client requests accepted?

Ag: yunduoa2019

When to register the Selector that accepts the Socket and registers with the corresponding EventLoop?

How to initialize the client?

When was the DefaultChannelPipeline created?

What about Netty’s zero copy?

How to learn Netty framework correctly and systematically

To understand the underlying principles of a framework, you need to master the most common principles. Framework is the auxiliary part of our development has been completed code, help us to achieve the function of part, we mainly master is framework, the internal principle is the framework for some internal rules specified by us, with these rules can and efficient development of our code, efficiency will be greatly improved in accordance with the relevant provisions. In fact, most of the time, we did not pay attention to these things, a function can be implemented in many ways, but we in accordance with the framework of our rules to achieve it should be a more correct choice. Therefore share a systematic learning Netty framework knowledge mind map to have the need of friends, I hope to help you!

 

 

Finally, for mind mapping, xiaobian also sorted out a set of video materials based on years of experience

(including Kafka, Mysql, Tomcat, Docker, MyBatis, Nginx, Netty, Dubbo, Redis, Spring Cloud, distributed, high concurrency, performance tuning, microservices)