netty-depth analysis of source code analysis 1-1 Netty

Why do we have to learn Netty communicate it? In fact, we have a lot of large-scale industry are Netty architecture as the underlying communication, asynchronous non-blocking. Such as: Duddo, RocketMQ, Spark, Elasticsearch, Cassandra, Flink, Netty-SocketIO, Spring5, Play, Grpc.


Netty so that in the end what is?


1. asynchronous event-driven framework for rapid development of high-performance server and client.


2. encapsulates the underlying JDK BIO (synchronous blocking IO) and the NIO (Synchronous Non-Blocking IO) model, providing high availability API.


3. own stick package unpacking decoder parses the problem, only concern the business logic.


4. reactor threading model designed to support high concurrent connection Mass


5. comes with a variety of protocol stack allows you to handle then I do not have a common protocol when both hands.


It is necessary to learn it?


1. The major open item selected as the underlying communication framework Netty


2. Better use detours


3. encountered bug? Stand-alone connections can not go up? Performance bottleneck? How to tune?


4. explain reactor threading model, practice giving top priority


5. How large is the organization of the project, design patterns, experience excellent design


6. Read the source code is actually not that suffering.


How to learn?


1. guiding their own way inferior to their predecessors.


2. The socket programming correspond, one by one cut.


3. The stepped pit, summed up the experience gained share without reservation, save a lot of time.


4. modal analysis techniques.


Finally, you can achieve what level?


1. grasp the underlying principle Netty, easy to solve all kinds of incurable diseases, depth tuning


2. interview extra points, positions of the major framework of the Internet division, the appreciation of pay to a file three


3. to the official issue


4. Implement a simple version of Netty


The open source code reading tour, do not stop.


Knowledge base


Familiar with java-based, multi-threaded familiar


2. Familiar with TCP principle, NIO


3. Used Netty


4.maven, idea tools.


Guess you like

Origin blog.51cto.com/14524696/2455526